From: Satish Ashok Date: Mon, 6 Jul 2015 12:53:35 +0000 (-0700) Subject: bridge: mdb: start delete timer for temp static entries X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f7e2965db17dd3b60f05fad88e7afc79ea75b48f;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Nikolay Aleksandrov Fixes: ccb1c31a7a87 ("bridge: add flags to distinguish permanent mdb entires") Signed-off-by: David S. Miller --- 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;