Skip to content

Commit a496d2f

Browse files
Headcrabedkuba-moo
authored andcommitted
net: bridge: locally receive all multicast packets if IFF_ALLMULTI is set
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. OpenWrt uses a user space daemon for DHCPv6/RA/NDP handling, and in relay mode it sets the ALLMULTI flag in order to receive all relevant queries on the network. This works for normal network interfaces and non-snooping bridges, but not snooping bridges (unless multicast routing is enabled). Reported-by: Felix Fietkau <[email protected]> Closes: openwrt/openwrt#15857 (comment) Signed-off-by: Shengyu Qu <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Acked-by: Nikolay Aleksandrov <[email protected]> Link: https://patch.msgid.link/OSZPR01MB8434308370ACAFA90A22980798B32@OSZPR01MB8434.jpnprd01.prod.outlook.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1310f44 commit a496d2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/bridge/br_input.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
189189
if ((mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) &&
190190
br_multicast_querier_exists(brmctx, eth_hdr(skb), mdst)) {
191191
if ((mdst && mdst->host_joined) ||
192-
br_multicast_is_router(brmctx, skb)) {
192+
br_multicast_is_router(brmctx, skb) ||
193+
br->dev->flags & IFF_ALLMULTI) {
193194
local_rcv = true;
194195
DEV_STATS_INC(br->dev, multicast);
195196
}

0 commit comments

Comments
 (0)