mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
bridge: Restart queries when last querier expires
As it stands when we discover that a real querier (one that queries with a non-zero source address) we stop querying. However, even after said querier has fallen off the edge of the earth, we will never restart querying (unless the bridge itself is restarted). This patch fixes this by kicking our own querier into gear when the timer for other queriers expire. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
748572162a
commit
c83b8fab06
@ -36,6 +36,8 @@
|
||||
#define mlock_dereference(X, br) \
|
||||
rcu_dereference_protected(X, lockdep_is_held(&br->multicast_lock))
|
||||
|
||||
static void br_multicast_start_querier(struct net_bridge *br);
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
static inline int ipv6_is_transient_multicast(const struct in6_addr *addr)
|
||||
{
|
||||
@ -740,6 +742,21 @@ static void br_multicast_local_router_expired(unsigned long data)
|
||||
{
|
||||
}
|
||||
|
||||
static void br_multicast_querier_expired(unsigned long data)
|
||||
{
|
||||
struct net_bridge_port *port = (void *)data;
|
||||
struct net_bridge *br = port->br;
|
||||
|
||||
spin_lock(&br->multicast_lock);
|
||||
if (!netif_running(br->dev) || br->multicast_disabled)
|
||||
goto out;
|
||||
|
||||
br_multicast_start_querier(br);
|
||||
|
||||
out:
|
||||
spin_unlock(&br->multicast_lock);
|
||||
}
|
||||
|
||||
static void __br_multicast_send_query(struct net_bridge *br,
|
||||
struct net_bridge_port *port,
|
||||
struct br_ip *ip)
|
||||
@ -1562,7 +1579,7 @@ void br_multicast_init(struct net_bridge *br)
|
||||
setup_timer(&br->multicast_router_timer,
|
||||
br_multicast_local_router_expired, 0);
|
||||
setup_timer(&br->multicast_querier_timer,
|
||||
br_multicast_local_router_expired, 0);
|
||||
br_multicast_querier_expired, 0);
|
||||
setup_timer(&br->multicast_query_timer, br_multicast_query_expired,
|
||||
(unsigned long)br);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user