aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_mdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge/br_mdb.c')
-rw-r--r--net/bridge/br_mdb.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index 0daae3ec2355..6319c4333c39 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -414,16 +414,20 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry)
414 if (!netif_running(br->dev) || br->multicast_disabled) 414 if (!netif_running(br->dev) || br->multicast_disabled)
415 return -EINVAL; 415 return -EINVAL;
416 416
417 if (timer_pending(&br->multicast_querier_timer))
418 return -EBUSY;
419
420 ip.proto = entry->addr.proto; 417 ip.proto = entry->addr.proto;
421 if (ip.proto == htons(ETH_P_IP)) 418 if (ip.proto == htons(ETH_P_IP)) {
419 if (timer_pending(&br->ip4_querier.timer))
420 return -EBUSY;
421
422 ip.u.ip4 = entry->addr.u.ip4; 422 ip.u.ip4 = entry->addr.u.ip4;
423#if IS_ENABLED(CONFIG_IPV6) 423#if IS_ENABLED(CONFIG_IPV6)
424 else 424 } else {
425 if (timer_pending(&br->ip6_querier.timer))
426 return -EBUSY;
427
425 ip.u.ip6 = entry->addr.u.ip6; 428 ip.u.ip6 = entry->addr.u.ip6;
426#endif 429#endif
430 }
427 431
428 spin_lock_bh(&br->multicast_lock); 432 spin_lock_bh(&br->multicast_lock);
429 mdb = mlock_dereference(br->mdb, br); 433 mdb = mlock_dereference(br->mdb, br);