diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-04 06:27:42 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-04 06:27:42 +0100 |
commit | 0a0e9ae1bd788bc19adc4d4ae08c98b233697402 (patch) | |
tree | 13825eeb5bbeae27d66e95f12168eff4b60701ab /net/ipv6 | |
parent | netlink: kill eff_cap from struct netlink_skb_parms (diff) | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmo... (diff) | |
download | linux-0a0e9ae1bd788bc19adc4d4ae08c98b233697402.tar.xz linux-0a0e9ae1bd788bc19adc4d4ae08c98b233697402.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bnx2x/bnx2x.h
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/route.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 59f2a58c1e32..d55d00c2a824 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2594,14 +2594,16 @@ static int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos) { - struct net *net = current->nsproxy->net_ns; - int delay = net->ipv6.sysctl.flush_delay; - if (write) { - proc_dointvec(ctl, write, buffer, lenp, ppos); - fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); - return 0; - } else + struct net *net; + int delay; + if (!write) return -EINVAL; + + net = (struct net *)ctl->extra1; + delay = net->ipv6.sysctl.flush_delay; + proc_dointvec(ctl, write, buffer, lenp, ppos); + fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); + return 0; } ctl_table ipv6_route_table_template[] = { @@ -2688,6 +2690,7 @@ struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net) if (table) { table[0].data = &net->ipv6.sysctl.flush_delay; + table[0].extra1 = net; table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; |