Commit 51ed7f3e authored by Satish Ashok's avatar Satish Ashok Committed by David S. Miller

bridge: mdb: allow the user to delete mdb entry if there's a querier

Until now when a querier was present static entries couldn't be deleted.
Fix this and allow the user to manipulate the mdb with or without a
querier.
Signed-off-by: default avatarSatish Ashok <sashok@cumulusnetworks.com>
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7234e030
...@@ -423,19 +423,12 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry) ...@@ -423,19 +423,12 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry)
memset(&ip, 0, sizeof(ip)); memset(&ip, 0, sizeof(ip));
ip.proto = entry->addr.proto; ip.proto = entry->addr.proto;
if (ip.proto == htons(ETH_P_IP)) { if (ip.proto == htons(ETH_P_IP))
if (timer_pending(&br->ip4_other_query.timer))
return -EBUSY;
ip.u.ip4 = entry->addr.u.ip4; ip.u.ip4 = entry->addr.u.ip4;
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
} else { else
if (timer_pending(&br->ip6_other_query.timer))
return -EBUSY;
ip.u.ip6 = entry->addr.u.ip6; ip.u.ip6 = entry->addr.u.ip6;
#endif #endif
}
spin_lock_bh(&br->multicast_lock); spin_lock_bh(&br->multicast_lock);
mdb = mlock_dereference(br->mdb, br); mdb = mlock_dereference(br->mdb, br);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment