Skip to content

Commit f7e2965

Browse files
Satish Ashokdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Nikolay Aleksandrov <[email protected]> Fixes: ccb1c31 ("bridge: add flags to distinguish permanent mdb entires") Signed-off-by: David S. Miller <[email protected]>
1 parent cfa5200 commit f7e2965

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/bridge/br_mdb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port,
323323
struct net_bridge_port_group *p;
324324
struct net_bridge_port_group __rcu **pp;
325325
struct net_bridge_mdb_htable *mdb;
326+
unsigned long now = jiffies;
326327
int err;
327328

328329
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,
347348
if (unlikely(!p))
348349
return -ENOMEM;
349350
rcu_assign_pointer(*pp, p);
351+
if (state == MDB_TEMPORARY)
352+
mod_timer(&p->timer, now + br->multicast_membership_interval);
350353

351354
br_mdb_notify(br->dev, port, group, RTM_NEWMDB);
352355
return 0;

0 commit comments

Comments
 (0)