Skip to content

Commit

Permalink
bridge: Fix fatal typo in setup of multicast_querier_expired
Browse files Browse the repository at this point in the history
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: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Apr 30, 2012
1 parent d499bd2 commit bb63f1f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,7 @@ 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;
struct net_bridge *br = (void *)data;

spin_lock(&br->multicast_lock);
if (!netif_running(br->dev) || br->multicast_disabled)
Expand Down Expand Up @@ -1581,7 +1580,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_querier_expired, 0);
br_multicast_querier_expired, (unsigned long)br);
setup_timer(&br->multicast_query_timer, br_multicast_query_expired,
(unsigned long)br);
}
Expand Down

0 comments on commit bb63f1f

Please sign in to comment.