Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp669316pxj; Thu, 17 Jun 2021 11:02:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/K7U0OYVkACCOm8HlW50RlKAZgu50BvtqcUqBrlOGfaIOYtq3XF/1cJ8mv24IWALNUs/m X-Received: by 2002:a05:6402:4242:: with SMTP id g2mr8322482edb.350.1623952957935; Thu, 17 Jun 2021 11:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623952957; cv=none; d=google.com; s=arc-20160816; b=VUnUUZAeD3aaTva6r1LfdDvkRrdf8MNAPpRqJx43OpItxUGU10xLS36sSpsxzIYgB0 kTVEoRAfxhTs5ISj3uBlXJ0ilZPXGKUMQm/PHVu2p10HbTii+l8Jl7lbpCa+3rNK+Na7 aoSJGkrBJr96Y6/bgFK5dC72kZTDPblYWsMz7p6qazq/UaaAZ8sqBYXfJg8316O3MjiR xFrvWbQaD9ln032kEvf5cJOjbRzn2okH6/2oSb+XuY5AZx9NuGiheeM30Bj10gCXDPda PYV1qFyHLz4YkTsulQkmNVGz/J0QYU2j7gRLq9swZHlHUFS0kKlcRFYyJKuepAw/VXCu +sCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3Ot9bRG4UGOhknIs3KrZRAdz/ZdNqp7qKa5NdrkwD8E=; b=XcKUR8027b9ewrO4UUQXDwh2NHiikc3la/kvQ3++YZFUcQZMwGr8N8ZJren72YVnqJ jFzZ/OENGgiRkL/WoE5kTQ6TNO71wMUvocSCxpZjiiZ6Z9Dj4+uCnZjUdiPtjM2BgXJ8 GV9Gt6LgM9QUly5viUjQaic2Kf8emrWWsSWEtiA1TXsJX+mQTwtisljDRizLhrxB+Wgd quzWbSi8J8CbmE5tczEpbG4tU0ZegYBQ71UAry3CaUUPYz1kn6KLI5Zct1Vy3uzI2Z9A YMPoe4i1/fthZTVUjfj+M4OoCi4xGz7zHBLFPLwMgZ2FmTI7u/zH3Icsy8Uqpa2lhyX9 rGGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=f7Vtledv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h3si6364886ede.590.2021.06.17.11.02.14; Thu, 17 Jun 2021 11:02:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=f7Vtledv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231867AbhFQOUq (ORCPT + 99 others); Thu, 17 Jun 2021 10:20:46 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:42818 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231846AbhFQOUp (ORCPT ); Thu, 17 Jun 2021 10:20:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=3Ot9bRG4UGOhknIs3KrZRAdz/ZdNqp7qKa5NdrkwD8E=; b=f7Vtledvt65n+YULvHKCRKGw3S ioDeQSEVsjUPrpPyggJEEO383gSvdLOqIj7IfKepyx5J7cx8pxf8K3VKxe7sAVDbXJEJ3SGNRehlf FgK9GGV5ne0SEygEjB7ygQQDgUgxgKfjrmVdDoEkC1GJuJ+o55ArG5tW7hg/NfWJ8aVk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ltsqg-009vL3-DN; Thu, 17 Jun 2021 16:18:26 +0200 Date: Thu, 17 Jun 2021 16:18:26 +0200 From: Andrew Lunn To: Callum Sinclair Cc: dsahern@kernel.org, nikolay@nvidia.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linus.luessing@c0d3.blue Subject: Re: [PATCH 1/1] net: Allow all multicast packets to be received on a interface. Message-ID: References: <20210617095020.28628-1-callum.sinclair@alliedtelesis.co.nz> <20210617095020.28628-2-callum.sinclair@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210617095020.28628-2-callum.sinclair@alliedtelesis.co.nz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 09:50:20PM +1200, Callum Sinclair wrote: > To receive IGMP or MLD packets on a IP socket on any interface the > multicast group needs to be explicitly joined. This works well for when > the multicast group the user is interested in is known, but does not > provide an easy way to snoop all packets in the 224.0.0.0/8 or the > FF00::/8 range. > > Define a new sysctl to allow a given interface to become a IGMP or MLD > snooper. When set the interface will allow any IGMP or MLD packet to be > received on sockets bound to these devices. Hi Callum What is the big picture here? Are you trying to move the snooping algorithm into user space? User space will then add/remove Multicast FIB entries to the bridge to control where mulitcast frames are sent? In the past i have written a multicast routing daemon. It is a similar problem. You need access to all the join/leaves. But the stack does provide them, if you bind to the multicast routing socket. Why not use that mechanism? Look in the mrouted sources for an example. Andrew