bridge: only expire the mdb entry when query is received
authorCong Wang <amwang@redhat.com>
Tue, 21 May 2013 21:52:55 +0000 (21:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 May 2013 21:54:37 +0000 (14:54 -0700)
commit9f00b2e7cf241fa389733d41b615efdaa2cb0f5b
tree3426d01fdec8b2419cdb72f597f1f9e5336a7643
parent1c8ad5bfa2be5025b0c81e3c2decd0574d453ab1
bridge: only expire the mdb entry when query is received

Currently we arm the expire timer when the mdb entry is added,
however, this causes problem when there is no querier sent
out after that.

So we should only arm the timer when a corresponding query is
received, as suggested by Herbert.

And he also mentioned "if there is no querier then group
subscriptions shouldn't expire. There has to be at least one querier
in the network for this thing to work.  Otherwise it just degenerates
into a non-snooping switch, which is OK."

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Cong Wang <amwang@redhat.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_multicast.c
net/bridge/br_private.h