aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r--net/ipv6/route.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 2e6da2afd948..fd44721abebb 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -40,6 +40,7 @@
40#include <linux/if_arp.h> 40#include <linux/if_arp.h>
41#include <linux/proc_fs.h> 41#include <linux/proc_fs.h>
42#include <linux/seq_file.h> 42#include <linux/seq_file.h>
43#include <linux/nsproxy.h>
43#include <net/net_namespace.h> 44#include <net/net_namespace.h>
44#include <net/snmp.h> 45#include <net/snmp.h>
45#include <net/ipv6.h> 46#include <net/ipv6.h>
@@ -995,7 +996,7 @@ static int ip6_dst_gc(struct dst_ops *ops)
995 goto out; 996 goto out;
996 997
997 expire++; 998 expire++;
998 fib6_run_gc(expire); 999 fib6_run_gc(expire, &init_net);
999 last_gc = now; 1000 last_gc = now;
1000 if (atomic_read(&ip6_dst_ops.entries) < ip6_dst_ops.gc_thresh) 1001 if (atomic_read(&ip6_dst_ops.entries) < ip6_dst_ops.gc_thresh)
1001 expire = init_net.ipv6.sysctl.ip6_rt_gc_timeout>>1; 1002 expire = init_net.ipv6.sysctl.ip6_rt_gc_timeout>>1;
@@ -2413,10 +2414,11 @@ static
2413int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp, 2414int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp,
2414 void __user *buffer, size_t *lenp, loff_t *ppos) 2415 void __user *buffer, size_t *lenp, loff_t *ppos)
2415{ 2416{
2416 int delay = init_net.ipv6.sysctl.flush_delay; 2417 struct net *net = current->nsproxy->net_ns;
2418 int delay = net->ipv6.sysctl.flush_delay;
2417 if (write) { 2419 if (write) {
2418 proc_dointvec(ctl, write, filp, buffer, lenp, ppos); 2420 proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
2419 fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay); 2421 fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net);
2420 return 0; 2422 return 0;
2421 } else 2423 } else
2422 return -EINVAL; 2424 return -EINVAL;