Skip to content

Commit 168fed9

Browse files
Nikolay Aleksandrovkuba-moo
authored andcommitted
net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper
We need to first check if the context is a vlan one, then we need to check the global bridge multicast vlan snooping flag, and finally the vlan's multicast flag, otherwise we will unnecessarily enable vlan mcast processing (e.g. querier timers). Fixes: 7b54aaa ("net: bridge: multicast: add vlan state initialization and control") Signed-off-by: Nikolay Aleksandrov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e22e45f commit 168fed9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/bridge/br_private.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,9 +1153,9 @@ br_multicast_port_ctx_get_global(const struct net_bridge_mcast_port *pmctx)
11531153
static inline bool
11541154
br_multicast_ctx_vlan_global_disabled(const struct net_bridge_mcast *brmctx)
11551155
{
1156-
return br_opt_get(brmctx->br, BROPT_MCAST_VLAN_SNOOPING_ENABLED) &&
1157-
br_multicast_ctx_is_vlan(brmctx) &&
1158-
!(brmctx->vlan->priv_flags & BR_VLFLAG_GLOBAL_MCAST_ENABLED);
1156+
return br_multicast_ctx_is_vlan(brmctx) &&
1157+
(!br_opt_get(brmctx->br, BROPT_MCAST_VLAN_SNOOPING_ENABLED) ||
1158+
!(brmctx->vlan->priv_flags & BR_VLFLAG_GLOBAL_MCAST_ENABLED));
11591159
}
11601160

11611161
static inline bool

0 commit comments

Comments
 (0)