diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-10-07 17:15:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-07 17:15:00 -0400 |
commit | b339a47c370ec669f789c5989f54eec1d78574bb (patch) | |
tree | a6da652fe9c0a78780b6d7cdf3cf283cc5b23191 | |
parent | 68fffc679694d5f7c02fdeb684b481416cd8213b (diff) |
ipv6: initialize ip6_route sysctl vars in ip6_route_net_init()
This makes that ip6_route_net_init() does all of the route init code.
There used to be a race between ip6_route_net_init() and ip6_net_init()
and someone relying on the combined result was left out cold.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv6/af_inet6.c | 8 | ||||
-rw-r--r-- | net/ipv6/route.c | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index f018704ecb86..af90905fd0f3 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -840,14 +840,6 @@ static int inet6_net_init(struct net *net) | |||
840 | int err = 0; | 840 | int err = 0; |
841 | 841 | ||
842 | net->ipv6.sysctl.bindv6only = 0; | 842 | net->ipv6.sysctl.bindv6only = 0; |
843 | net->ipv6.sysctl.flush_delay = 0; | ||
844 | net->ipv6.sysctl.ip6_rt_max_size = 4096; | ||
845 | net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2; | ||
846 | net->ipv6.sysctl.ip6_rt_gc_timeout = 60*HZ; | ||
847 | net->ipv6.sysctl.ip6_rt_gc_interval = 30*HZ; | ||
848 | net->ipv6.sysctl.ip6_rt_gc_elasticity = 9; | ||
849 | net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ; | ||
850 | net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; | ||
851 | net->ipv6.sysctl.icmpv6_time = 1*HZ; | 843 | net->ipv6.sysctl.icmpv6_time = 1*HZ; |
852 | 844 | ||
853 | #ifdef CONFIG_PROC_FS | 845 | #ifdef CONFIG_PROC_FS |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 635d97d54b0a..e10a17015504 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2647,6 +2647,15 @@ static int ip6_route_net_init(struct net *net) | |||
2647 | net->ipv6.ip6_blk_hole_entry->u.dst.ops = net->ipv6.ip6_dst_ops; | 2647 | net->ipv6.ip6_blk_hole_entry->u.dst.ops = net->ipv6.ip6_dst_ops; |
2648 | #endif | 2648 | #endif |
2649 | 2649 | ||
2650 | net->ipv6.sysctl.flush_delay = 0; | ||
2651 | net->ipv6.sysctl.ip6_rt_max_size = 4096; | ||
2652 | net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2; | ||
2653 | net->ipv6.sysctl.ip6_rt_gc_timeout = 60*HZ; | ||
2654 | net->ipv6.sysctl.ip6_rt_gc_interval = 30*HZ; | ||
2655 | net->ipv6.sysctl.ip6_rt_gc_elasticity = 9; | ||
2656 | net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ; | ||
2657 | net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40; | ||
2658 | |||
2650 | #ifdef CONFIG_PROC_FS | 2659 | #ifdef CONFIG_PROC_FS |
2651 | proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops); | 2660 | proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops); |
2652 | proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); | 2661 | proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); |