* [PATCH net] bridge: mdb: start delete timer for temp static entries
@ 2015-07-06 12:53 Nikolay Aleksandrov
2015-07-08 21:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Aleksandrov @ 2015-07-06 12:53 UTC (permalink / raw)
To: netdev; +Cc: amwang, Nikolay Aleksandrov, bridge, davem
From: Satish Ashok <sashok@cumulusnetworks.com>
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")
---
net/bridge/br_mdb.c | 3 +++
1 file changed, 3 insertions(+)
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,
struct net_bridge_port_group *p;
struct net_bridge_port_group __rcu **pp;
struct net_bridge_mdb_htable *mdb;
+ unsigned long now = jiffies;
int err;
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,
if (unlikely(!p))
return -ENOMEM;
rcu_assign_pointer(*pp, p);
+ if (state == MDB_TEMPORARY)
+ mod_timer(&p->timer, now + br->multicast_membership_interval);
br_mdb_notify(br->dev, port, group, RTM_NEWMDB);
return 0;
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] bridge: mdb: start delete timer for temp static entries
2015-07-06 12:53 [PATCH net] bridge: mdb: start delete timer for temp static entries Nikolay Aleksandrov
@ 2015-07-08 21:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-07-08 21:53 UTC (permalink / raw)
To: nikolay; +Cc: netdev, bridge, amwang
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date: Mon, 6 Jul 2015 05:53:35 -0700
> From: Satish Ashok <sashok@cumulusnetworks.com>
>
> 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")
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-08 21:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06 12:53 [PATCH net] bridge: mdb: start delete timer for temp static entries Nikolay Aleksandrov
2015-07-08 21:53 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).