Skip to content

Commit 683dc24

Browse files
Joseph Huangkuba-moo
authored andcommitted
net: bridge: Do not offload IGMP/MLD messages
Do not offload IGMP/MLD messages as it could lead to IGMP/MLD Reports being unintentionally flooded to Hosts. Instead, let the bridge decide where to send these IGMP/MLD messages. Consider the case where the local host is sending out reports in response to a remote querier like the following: mcast-listener-process (IP_ADD_MEMBERSHIP) \ br0 / \ swp1 swp2 | | QUERIER SOME-OTHER-HOST In the above setup, br0 will want to br_forward() reports for mcast-listener-process's group(s) via swp1 to QUERIER; but since the source hwdom is 0, the report is eligible for tx offloading, and is flooded by hardware to both swp1 and swp2, reaching SOME-OTHER-HOST as well. (Example and illustration provided by Tobias.) Fixes: 4721119 ("net: bridge: switchdev: allow the TX data plane forwarding to be offloaded") Signed-off-by: Joseph Huang <[email protected]> Acked-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9bb8a9f commit 683dc24

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/bridge/br_switchdev.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ static bool nbp_switchdev_can_offload_tx_fwd(const struct net_bridge_port *p,
1717
if (!static_branch_unlikely(&br_switchdev_tx_fwd_offload))
1818
return false;
1919

20+
if (br_multicast_igmp_type(skb))
21+
return false;
22+
2023
return (p->flags & BR_TX_FWD_OFFLOAD) &&
2124
(p->hwdom != BR_INPUT_SKB_CB(skb)->src_hwdom);
2225
}

0 commit comments

Comments
 (0)