]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ipv6: initialize ip6_route sysctl vars in ip6_route_net_init()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 7 Oct 2008 21:15:00 +0000 (14:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Oct 2008 21:15:00 +0000 (14:15 -0700)
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>
net/ipv6/af_inet6.c
net/ipv6/route.c

index f018704ecb8698516932ca57a4151dafa6152f3f..af90905fd0f3846a0299f88880870006136b6bc5 100644 (file)
@@ -840,14 +840,6 @@ static int inet6_net_init(struct net *net)
        int err = 0;
 
        net->ipv6.sysctl.bindv6only = 0;
-       net->ipv6.sysctl.flush_delay = 0;
-       net->ipv6.sysctl.ip6_rt_max_size = 4096;
-       net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2;
-       net->ipv6.sysctl.ip6_rt_gc_timeout = 60*HZ;
-       net->ipv6.sysctl.ip6_rt_gc_interval = 30*HZ;
-       net->ipv6.sysctl.ip6_rt_gc_elasticity = 9;
-       net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ;
-       net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40;
        net->ipv6.sysctl.icmpv6_time = 1*HZ;
 
 #ifdef CONFIG_PROC_FS
index 635d97d54b0acf4833ba6daedfb9015179b9bd0d..e10a17015504267c8932cead336600f01aca6db9 100644 (file)
@@ -2647,6 +2647,15 @@ static int ip6_route_net_init(struct net *net)
        net->ipv6.ip6_blk_hole_entry->u.dst.ops = net->ipv6.ip6_dst_ops;
 #endif
 
+       net->ipv6.sysctl.flush_delay = 0;
+       net->ipv6.sysctl.ip6_rt_max_size = 4096;
+       net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2;
+       net->ipv6.sysctl.ip6_rt_gc_timeout = 60*HZ;
+       net->ipv6.sysctl.ip6_rt_gc_interval = 30*HZ;
+       net->ipv6.sysctl.ip6_rt_gc_elasticity = 9;
+       net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ;
+       net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40;
+
 #ifdef CONFIG_PROC_FS
        proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
        proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);