Thread (4 messages) 4 messages, 3 authors, 2025-03-10
STALE503d

[PATCH net] net: bridge: locally receive all multicast packets if IFF_ALLMULTI is set

From: Felix Fietkau <nbd@nbd.name>
Date: 2025-02-17 11:54:58
Also in: bridge, lkml
Subsystem: ethernet bridge, networking [general], the rest · Maintainers: Nikolay Aleksandrov, Ido Schimmel, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

If multicast snooping is enabled, multicast packets may not always end up on
the local bridge interface, if the host is not a member of the multicast
group. Similar to how IFF_PROMISC allows all packets to be received locally,
let IFF_ALLMULTI allow all multicast packets to be received.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 net/bridge/br_input.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 232133a0fd21..7fa2da6985b5 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -155,6 +155,8 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
 			pkt_type = BR_PKT_MULTICAST;
 			if (br_multicast_rcv(&brmctx, &pmctx, vlan, skb, vid))
 				goto drop;
+			if (br->dev->flags & IFF_ALLMULTI)
+				local_rcv = true;
 		}
 	}
 
-- 
2.47.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help