summaryrefslogtreecommitdiff
path: root/net/bridge
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@nvidia.com>2021-08-16 13:11:32 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-16 15:57:59 +0300
commitf137b7d4ecf8fca0891f435a198b3c8beec8a9d2 (patch)
tree065d7141fc4ed5a176f1b3b70104541357336d57 /net/bridge
parent23a44b77e03f577e93ad1b0ce203bd15e99285f5 (diff)
downloadlinux-f137b7d4ecf8fca0891f435a198b3c8beec8a9d2.tar.xz
net: bridge: mcast: don't dump querier state if snooping is disabled
A minor improvement to avoid dumping mcast ctx querier state if snooping is disabled for that context (either bridge or vlan). Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_multicast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 0e5d6ba03457..9bdf12635871 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -2943,6 +2943,10 @@ int br_multicast_dump_querier_state(struct sk_buff *skb,
struct net_bridge_port *p;
struct nlattr *nest;
+ if (!br_opt_get(brmctx->br, BROPT_MULTICAST_ENABLED) ||
+ br_multicast_ctx_vlan_global_disabled(brmctx))
+ return 0;
+
nest = nla_nest_start(skb, nest_attr);
if (!nest)
return -EMSGSIZE;