diff options
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 1c29f95695de..904312e25a3c 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -128,6 +128,7 @@ static struct dst_ops ip6_dst_blackhole_ops = { | |||
128 | .destroy = ip6_dst_destroy, | 128 | .destroy = ip6_dst_destroy, |
129 | .check = ip6_dst_check, | 129 | .check = ip6_dst_check, |
130 | .default_mtu = ip6_blackhole_default_mtu, | 130 | .default_mtu = ip6_blackhole_default_mtu, |
131 | .default_advmss = ip6_default_advmss, | ||
131 | .update_pmtu = ip6_rt_blackhole_update_pmtu, | 132 | .update_pmtu = ip6_rt_blackhole_update_pmtu, |
132 | }; | 133 | }; |
133 | 134 | ||
@@ -2556,14 +2557,16 @@ static | |||
2556 | int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, | 2557 | int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, |
2557 | void __user *buffer, size_t *lenp, loff_t *ppos) | 2558 | void __user *buffer, size_t *lenp, loff_t *ppos) |
2558 | { | 2559 | { |
2559 | struct net *net = current->nsproxy->net_ns; | 2560 | struct net *net; |
2560 | int delay = net->ipv6.sysctl.flush_delay; | 2561 | int delay; |
2561 | if (write) { | 2562 | if (!write) |
2562 | proc_dointvec(ctl, write, buffer, lenp, ppos); | ||
2563 | fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); | ||
2564 | return 0; | ||
2565 | } else | ||
2566 | return -EINVAL; | 2563 | return -EINVAL; |
2564 | |||
2565 | net = (struct net *)ctl->extra1; | ||
2566 | delay = net->ipv6.sysctl.flush_delay; | ||
2567 | proc_dointvec(ctl, write, buffer, lenp, ppos); | ||
2568 | fib6_run_gc(delay <= 0 ? ~0UL : (unsigned long)delay, net); | ||
2569 | return 0; | ||
2567 | } | 2570 | } |
2568 | 2571 | ||
2569 | ctl_table ipv6_route_table_template[] = { | 2572 | ctl_table ipv6_route_table_template[] = { |
@@ -2650,6 +2653,7 @@ struct ctl_table * __net_init ipv6_route_sysctl_init(struct net *net) | |||
2650 | 2653 | ||
2651 | if (table) { | 2654 | if (table) { |
2652 | table[0].data = &net->ipv6.sysctl.flush_delay; | 2655 | table[0].data = &net->ipv6.sysctl.flush_delay; |
2656 | table[0].extra1 = net; | ||
2653 | table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; | 2657 | table[1].data = &net->ipv6.ip6_dst_ops.gc_thresh; |
2654 | table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; | 2658 | table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; |
2655 | table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; | 2659 | table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; |