]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.suse/SoN-04-net-ipv6-route-cleanup-sysctl.patch
Merge branch 'master' of git://git.ipfire.org/ipfire-2.x
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / SoN-04-net-ipv6-route-cleanup-sysctl.patch
1 From: Peter Zijlstra <a.p.zijlstra@chello.nl>
2 Subject: net: ipv6: initialize ip6_route sysctl vars in ip6_route_net_init()
3 Patch-mainline: No
4 References: FATE#303834
5
6 This makes that ip6_route_net_init() does all of the route init code.
7 There used to be a race between ip6_route_net_init() and ip6_net_init()
8 and someone relying on the combined result was left out cold.
9
10 Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
11 Acked-by: Neil Brown <neilb@suse.de>
12 Acked-by: Suresh Jayaraman <sjayaraman@suse.de>
13
14 ---
15 net/ipv6/af_inet6.c | 8 --------
16 net/ipv6/route.c | 9 +++++++++
17 2 files changed, 9 insertions(+), 8 deletions(-)
18
19 Index: linux-2.6.26/net/ipv6/af_inet6.c
20 ===================================================================
21 --- linux-2.6.26.orig/net/ipv6/af_inet6.c
22 +++ linux-2.6.26/net/ipv6/af_inet6.c
23 @@ -839,14 +839,6 @@ static int inet6_net_init(struct net *ne
24 int err = 0;
25
26 net->ipv6.sysctl.bindv6only = 0;
27 - net->ipv6.sysctl.flush_delay = 0;
28 - net->ipv6.sysctl.ip6_rt_max_size = 4096;
29 - net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2;
30 - net->ipv6.sysctl.ip6_rt_gc_timeout = 60*HZ;
31 - net->ipv6.sysctl.ip6_rt_gc_interval = 30*HZ;
32 - net->ipv6.sysctl.ip6_rt_gc_elasticity = 9;
33 - net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ;
34 - net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40;
35 net->ipv6.sysctl.icmpv6_time = 1*HZ;
36
37 #ifdef CONFIG_PROC_FS
38 Index: linux-2.6.26/net/ipv6/route.c
39 ===================================================================
40 --- linux-2.6.26.orig/net/ipv6/route.c
41 +++ linux-2.6.26/net/ipv6/route.c
42 @@ -2627,6 +2627,15 @@ static int ip6_route_net_init(struct net
43 net->ipv6.ip6_blk_hole_entry->u.dst.ops = net->ipv6.ip6_dst_ops;
44 #endif
45
46 + net->ipv6.sysctl.flush_delay = 0;
47 + net->ipv6.sysctl.ip6_rt_max_size = 4096;
48 + net->ipv6.sysctl.ip6_rt_gc_min_interval = HZ / 2;
49 + net->ipv6.sysctl.ip6_rt_gc_timeout = 60*HZ;
50 + net->ipv6.sysctl.ip6_rt_gc_interval = 30*HZ;
51 + net->ipv6.sysctl.ip6_rt_gc_elasticity = 9;
52 + net->ipv6.sysctl.ip6_rt_mtu_expires = 10*60*HZ;
53 + net->ipv6.sysctl.ip6_rt_min_advmss = IPV6_MIN_MTU - 20 - 40;
54 +
55 #ifdef CONFIG_PROC_FS
56 proc_net_fops_create(net, "ipv6_route", 0, &ipv6_route_proc_fops);
57 proc_net_fops_create(net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);