bridge: Fix timer typo that may render snooping less effective
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 11 Feb 2011 12:42:07 +0000 (12:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Feb 2011 05:59:37 +0000 (21:59 -0800)
In a couple of spots where we are supposed to modify the port
group timer (p->timer) we instead modify the bridge interface
group timer (mp->timer).

The effect of this is mostly harmless.  However, it can cause
port subscriptions to be longer than they should be, thus making
snooping less effective.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_multicast.c

index fdbd41c76ec45273155d9a99c67a655bc33e8ec6..c558274051eb9652945c8e6f5aebecc3bc3f4699 100644 (file)
@@ -1178,7 +1178,7 @@ static int br_ip4_multicast_query(struct net_bridge *br,
                if (timer_pending(&p->timer) ?
                    time_after(p->timer.expires, now + max_delay) :
                    try_to_del_timer_sync(&p->timer) >= 0)
-                       mod_timer(&mp->timer, now + max_delay);
+                       mod_timer(&p->timer, now + max_delay);
        }
 
 out:
@@ -1249,7 +1249,7 @@ static int br_ip6_multicast_query(struct net_bridge *br,
                if (timer_pending(&p->timer) ?
                    time_after(p->timer.expires, now + max_delay) :
                    try_to_del_timer_sync(&p->timer) >= 0)
-                       mod_timer(&mp->timer, now + max_delay);
+                       mod_timer(&p->timer, now + max_delay);
        }
 
 out: