[PATCH 0/1] Create multicast snooping sysctl option

From: Callum Sinclair
Date: Thu Jun 17 2021 - 05:50:49 EST


IGMP and MLD packets can be received on IP sockets but only if the
group has been explicitly joined. This makes snooping all multicast
packets in the ranges 224.0.0.0/8 and FF00::/8 difficult as each
group in these ranges would have to be added via socketopt calls
individually.

It is possible to get all IGMP and MLD packets by creating a packet
socket and using a BPF to grab only IGMP and MLD packets but this
removes some of the other useful options IP sockets have.

Define a new sysctl to allow one or more interfaces to be defined
as a IGMP and/or MLD Snooping device. This means all multicast
packets will be received on a socket bound to the interface without
being explicitly asked for.

Callum Sinclair (1):
net: Allow all multicast packets to be received on a interface.

Documentation/networking/ip-sysctl.rst | 8 ++++++++
include/linux/inetdevice.h | 1 +
include/linux/ipv6.h | 1 +
include/uapi/linux/ip.h | 1 +
include/uapi/linux/ipv6.h | 1 +
include/uapi/linux/netconf.h | 1 +
include/uapi/linux/sysctl.h | 1 +
net/ipv4/devinet.c | 7 +++++++
net/ipv4/igmp.c | 5 +++++
net/ipv6/addrconf.c | 14 ++++++++++++++
net/ipv6/mcast.c | 5 +++++
11 files changed, 45 insertions(+)

--
2.32.0