bridge: fix seq check in br_mdb_dump()
authorCong Wang <amwang@redhat.com>
Mon, 10 Dec 2012 02:15:35 +0000 (02:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Dec 2012 18:44:09 +0000 (13:44 -0500)
commit2ce297fc24d1f0b70c756d1f593e7a089a2d888d
treec29d8d8f76ff8c8d574e70a9c28aa06a0a4b4211
parent2925f6c0c7af32720dcbadc586463aeceb6baa22
bridge: fix seq check in br_mdb_dump()

In case of rehashing, introduce a global variable 'br_mdb_rehash_seq'
which gets increased every time when rehashing, and assign
net->dev_base_seq + br_mdb_rehash_seq to cb->seq.

In theory cb->seq could be wrapped to zero, but this is not
easy to fix, as net->dev_base_seq is not visible inside
br_mdb_rehash(). In practice, this is rare.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_mdb.c
net/bridge/br_multicast.c
net/bridge/br_private.h