Commit bb63f1f8 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller
Browse files

bridge: Fix fatal typo in setup of multicast_querier_expired



Unfortunately it seems that I didn't properly test the case of
an expired external querier in the recent multicast bridge series.

The setup of the timer in that case is completely broken and leads
to a NULL-pointer dereference.  This patch fixes it.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d499bd2e
...@@ -744,8 +744,7 @@ static void br_multicast_local_router_expired(unsigned long data) ...@@ -744,8 +744,7 @@ static void br_multicast_local_router_expired(unsigned long data)
static void br_multicast_querier_expired(unsigned long data) static void br_multicast_querier_expired(unsigned long data)
{ {
struct net_bridge_port *port = (void *)data; struct net_bridge *br = (void *)data;
struct net_bridge *br = port->br;
spin_lock(&br->multicast_lock); spin_lock(&br->multicast_lock);
if (!netif_running(br->dev) || br->multicast_disabled) if (!netif_running(br->dev) || br->multicast_disabled)
...@@ -1581,7 +1580,7 @@ void br_multicast_init(struct net_bridge *br) ...@@ -1581,7 +1580,7 @@ void br_multicast_init(struct net_bridge *br)
setup_timer(&br->multicast_router_timer, setup_timer(&br->multicast_router_timer,
br_multicast_local_router_expired, 0); br_multicast_local_router_expired, 0);
setup_timer(&br->multicast_querier_timer, setup_timer(&br->multicast_querier_timer,
br_multicast_querier_expired, 0); br_multicast_querier_expired, (unsigned long)br);
setup_timer(&br->multicast_query_timer, br_multicast_query_expired, setup_timer(&br->multicast_query_timer, br_multicast_query_expired,
(unsigned long)br); (unsigned long)br);
} }
......
Supports Markdown
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