diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2012-04-29 20:22:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-30 13:30:56 -0400 |
commit | bb63f1f8a08cf8028564ad04831ebd7a8ffb9cba (patch) | |
tree | 65a50a4cc38f7994ab62fefa4cc9a65a191e15ae /net/bridge | |
parent | d499bd2ee979cd0e1b5e3f6379d753582c67ec8c (diff) |
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: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_multicast.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 708e84f31888..5ca4c50ea233 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -744,8 +744,7 @@ static void br_multicast_local_router_expired(unsigned long data) | |||
744 | 744 | ||
745 | static void br_multicast_querier_expired(unsigned long data) | 745 | static void br_multicast_querier_expired(unsigned long data) |
746 | { | 746 | { |
747 | struct net_bridge_port *port = (void *)data; | 747 | struct net_bridge *br = (void *)data; |
748 | struct net_bridge *br = port->br; | ||
749 | 748 | ||
750 | spin_lock(&br->multicast_lock); | 749 | spin_lock(&br->multicast_lock); |
751 | if (!netif_running(br->dev) || br->multicast_disabled) | 750 | if (!netif_running(br->dev) || br->multicast_disabled) |
@@ -1581,7 +1580,7 @@ void br_multicast_init(struct net_bridge *br) | |||
1581 | setup_timer(&br->multicast_router_timer, | 1580 | setup_timer(&br->multicast_router_timer, |
1582 | br_multicast_local_router_expired, 0); | 1581 | br_multicast_local_router_expired, 0); |
1583 | setup_timer(&br->multicast_querier_timer, | 1582 | setup_timer(&br->multicast_querier_timer, |
1584 | br_multicast_querier_expired, 0); | 1583 | br_multicast_querier_expired, (unsigned long)br); |
1585 | setup_timer(&br->multicast_query_timer, br_multicast_query_expired, | 1584 | setup_timer(&br->multicast_query_timer, br_multicast_query_expired, |
1586 | (unsigned long)br); | 1585 | (unsigned long)br); |
1587 | } | 1586 | } |