[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>
This commit is contained in:
Daniel Lezcano 2008-03-03 23:31:11 -08:00 committed by David S. Miller
parent 450d19f8ab
commit 63152fc0de
4 changed files with 34 additions and 30 deletions

View file

@ -952,7 +952,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
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 @@ install_route:
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: