Commit e64a0c1a authored by Satish Ashok's avatar Satish Ashok Committed by Luis Henriques

bridge: mdb: start delete timer for temp static entries

commit f7e2965d upstream.

Start the delete timer when adding temp static entries so they can expire.
Signed-off-by: default avatarSatish Ashok <sashok@cumulusnetworks.com>
Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fixes: ccb1c31a ("bridge: add flags to distinguish permanent mdb entires")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 1d2bb302
...@@ -322,6 +322,7 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port, ...@@ -322,6 +322,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 *p;
struct net_bridge_port_group __rcu **pp; struct net_bridge_port_group __rcu **pp;
struct net_bridge_mdb_htable *mdb; struct net_bridge_mdb_htable *mdb;
unsigned long now = jiffies;
int err; int err;
mdb = mlock_dereference(br->mdb, br); mdb = mlock_dereference(br->mdb, br);
...@@ -346,6 +347,8 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port, ...@@ -346,6 +347,8 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port,
if (unlikely(!p)) if (unlikely(!p))
return -ENOMEM; return -ENOMEM;
rcu_assign_pointer(*pp, p); 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); br_mdb_notify(br->dev, port, group, RTM_NEWMDB);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment