[NETNS][IPV6] ip6_fib - gc timer per namespace
Move the timer initialization at the network namespace creation and
store the network namespace in the timer argument.
That enables multiple timers (one per network namespace) to do garbage
collecting.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index fd44721..b13eb01 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -952,7 +952,7 @@
icmp6_dst_gc_list = &rt->u.dst;
spin_unlock_bh(&icmp6_dst_lock);
- fib6_force_start_gc();
+ fib6_force_start_gc(dev->nd_net);
out:
return &rt->u.dst;
@@ -1230,6 +1230,9 @@
rt->u.dst.dev = dev;
rt->rt6i_idev = idev;
rt->rt6i_table = table;
+
+ cfg->fc_nlinfo.nl_net = dev->nd_net;
+
return __ip6_ins_rt(rt, &cfg->fc_nlinfo);
out: