lkml.org 
[lkml]   [2021]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1] net: Allow all multicast packets to be received on a interface.
Date
Hi Andrew

> 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?

Yes I want to run a IGMP, MLD and PIM implementation in userspace and
just use the kernel to send multicast frames to addresses that have been
installed into the multicast forwarding cache.

> 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.

Ah I can see that I get the IGMP and MLD packets now. I was just creating
the socket as a IP socket without multicast routing. Thanks for your help.

Cheers
Callum
________________________________________
From: Andrew Lunn <andrew@lunn.ch>
Sent: Friday, June 18, 2021 2:18 AM
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.

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 http://scanmail.trustwave.com/?c=20988&d=wNnL4EU-bOXOuxnfu9BLng8ncWxDIw3ACrur9S2N4w&u=http%3a%2f%2f224%2e0%2e0%2e0%2f8 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

\
 
 \ /
  Last update: 2021-06-18 02:11    [W:0.137 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site