Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Satish Ashok and committed by
David S. Miller
f7e2965d cfa52005

+3
+3
net/bridge/br_mdb.c
··· 323 323 struct net_bridge_port_group *p; 324 324 struct net_bridge_port_group __rcu **pp; 325 325 struct net_bridge_mdb_htable *mdb; 326 + unsigned long now = jiffies; 326 327 int err; 327 328 328 329 mdb = mlock_dereference(br->mdb, br); ··· 348 347 if (unlikely(!p)) 349 348 return -ENOMEM; 350 349 rcu_assign_pointer(*pp, p); 350 + if (state == MDB_TEMPORARY) 351 + mod_timer(&p->timer, now + br->multicast_membership_interval); 351 352 352 353 br_mdb_notify(br->dev, port, group, RTM_NEWMDB); 353 354 return 0;