diff options
author | Nikolay Aleksandrov <nikolay@nvidia.com> | 2021-12-28 18:31:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-05 14:42:37 +0300 |
commit | 62320f472fc235560926feb32dc1f64adf4c1387 (patch) | |
tree | 867d3799a61eb6bb8a1d548f3f8843bd9775a5a2 /net/bridge | |
parent | 5943eb7bbac34b5eedfb2fabbd8298dd0988a85f (diff) | |
download | linux-62320f472fc235560926feb32dc1f64adf4c1387.tar.xz |
net: bridge: mcast: fix br_multicast_ctx_vlan_global_disabled helper
[ Upstream commit 168fed986b3a7ec7b98cab1fe84e2f282b9e6a8f ]
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: 7b54aaaf53cb ("net: bridge: multicast: add vlan state initialization and control")
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Link: https://lore.kernel.org/r/20211228153142.536969-1-nikolay@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_private.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 5951e3142fe9..bd218c2b2cd9 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -1158,9 +1158,9 @@ br_multicast_port_ctx_get_global(const struct net_bridge_mcast_port *pmctx) static inline bool br_multicast_ctx_vlan_global_disabled(const struct net_bridge_mcast *brmctx) { - return br_opt_get(brmctx->br, BROPT_MCAST_VLAN_SNOOPING_ENABLED) && - br_multicast_ctx_is_vlan(brmctx) && - !(brmctx->vlan->priv_flags & BR_VLFLAG_GLOBAL_MCAST_ENABLED); + return br_multicast_ctx_is_vlan(brmctx) && + (!br_opt_get(brmctx->br, BROPT_MCAST_VLAN_SNOOPING_ENABLED) || + !(brmctx->vlan->priv_flags & BR_VLFLAG_GLOBAL_MCAST_ENABLED)); } static inline bool |