diff options
author | Satish Ashok <sashok@cumulusnetworks.com> | 2015-07-06 08:53:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-08 17:52:58 -0400 |
commit | f7e2965db17dd3b60f05fad88e7afc79ea75b48f (patch) | |
tree | 6fbf61cba158420e1ec884443ba547ff12382185 /net/bridge | |
parent | cfa520056407acaa29f3aa7aee10c929b371c7cf (diff) |
bridge: mdb: start delete timer for temp static entries
Start the delete timer when adding temp static entries so they can expire.
Signed-off-by: Satish Ashok <sashok@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fixes: ccb1c31a7a87 ("bridge: add flags to distinguish permanent mdb entires")
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_mdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c index e29ad70b3000..3bfc675cf0d1 100644 --- a/net/bridge/br_mdb.c +++ b/net/bridge/br_mdb.c | |||
@@ -323,6 +323,7 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port, | |||
323 | struct net_bridge_port_group *p; | 323 | struct net_bridge_port_group *p; |
324 | struct net_bridge_port_group __rcu **pp; | 324 | struct net_bridge_port_group __rcu **pp; |
325 | struct net_bridge_mdb_htable *mdb; | 325 | struct net_bridge_mdb_htable *mdb; |
326 | unsigned long now = jiffies; | ||
326 | int err; | 327 | int err; |
327 | 328 | ||
328 | mdb = mlock_dereference(br->mdb, br); | 329 | mdb = mlock_dereference(br->mdb, br); |
@@ -347,6 +348,8 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port, | |||
347 | if (unlikely(!p)) | 348 | if (unlikely(!p)) |
348 | return -ENOMEM; | 349 | return -ENOMEM; |
349 | rcu_assign_pointer(*pp, p); | 350 | rcu_assign_pointer(*pp, p); |
351 | if (state == MDB_TEMPORARY) | ||
352 | mod_timer(&p->timer, now + br->multicast_membership_interval); | ||
350 | 353 | ||
351 | br_mdb_notify(br->dev, port, group, RTM_NEWMDB); | 354 | br_mdb_notify(br->dev, port, group, RTM_NEWMDB); |
352 | return 0; | 355 | return 0; |