Skip to content

Commit

Permalink
bridge: Fix timer typo that may render snooping less effective
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Feb 12, 2011
1 parent 6b0d6a9 commit 24f9cdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 24f9cdc

Please sign in to comment.