diff options
| author | Tony Lindgren <tony@atomide.com> | 2011-03-10 18:54:14 -0800 | 
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2011-03-10 18:54:14 -0800 | 
| commit | 94a06b74e724caabcf0464c81527cfbcae0c8aff (patch) | |
| tree | 3570b6a627382a5eb5c8328b4959f615544d8e62 /net/ipv6/route.c | |
| parent | 0dde52a9f5330eec240660191a94b51bd911ffcd (diff) | |
| parent | 9062511097683b4422f023d181b4a8b2db1a7a72 (diff) | |
| download | olio-linux-3.10-94a06b74e724caabcf0464c81527cfbcae0c8aff.tar.xz olio-linux-3.10-94a06b74e724caabcf0464c81527cfbcae0c8aff.zip  | |
Merge branch 'for_2.6.39/pm-misc' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus
Diffstat (limited to 'net/ipv6/route.c')
| -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 a998db6e789..904312e25a3 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2557,14 +2557,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[] = { @@ -2651,6 +2653,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;  |