diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-04 00:27:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-04 00:27:42 -0500 |
commit | 0a0e9ae1bd788bc19adc4d4ae08c98b233697402 (patch) | |
tree | 13825eeb5bbeae27d66e95f12168eff4b60701ab /net/ipv6 | |
parent | 01a16b21d6adf992aa863186c3c4e561a57c1714 (diff) | |
parent | b65a0e0c84cf489bfa00d6aa6c48abc5a237100f (diff) |
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 | |||
2594 | int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, | 2594 | int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, |
2595 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2595 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2596 | { | 2596 | { |
2597 | struct net *net = current->nsproxy->net_ns; | 2597 | struct net *net; |
2598 | int delay = net->ipv6.sysctl.flush_delay; | 2598 | int delay; |
2599 | if (write) { | 2599 | if (!write) |
2600 | proc_dointvec(ctl, write, buffer, lenp, ppos); | ||
2601 | fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); | ||
2602 | return 0; | ||
2603 | } else | ||
2604 | return -EINVAL; | 2600 | return -EINVAL; |
2601 | |||
2602 | net = (struct net *)ctl->extra1; | ||
2603 | delay = net->ipv6.sysctl.flush_delay; | ||
2604 | proc_dointvec(ctl, write, buffer, lenp, ppos); | ||
2605 | fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); | ||
2606 | return 0; | ||
2605 | } | 2607 | } |
2606 | 2608 | ||
2607 | ctl_table ipv6_route_table_template[] = { | 2609 | ctl_table ipv6_route_table_template[] = { |
@@ -2688,6 +2690,7 @@ struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net) | |||
2688 | 2690 | ||
2689 | if (table) { | 2691 | if (table) { |
2690 | table[0].data = &net->ipv6.sysctl.flush_delay; | 2692 | table[0].data = &net->ipv6.sysctl.flush_delay; |
2693 | table[0].extra1 = net; | ||
2691 | table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; | 2694 | table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; |
2692 | table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; | 2695 | table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; |
2693 | table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; | 2696 | table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; |