diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-02-27 10:24:28 -0500 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-04 01:18:23 -0500 |
commit | 5ee091050986796856cc6207d86b38b4ef6bd8f4 (patch) | |
tree | f624046cf7e77451cd0faa89a4001509796a3353 | |
parent | 662397fd7aaa10afdbdc55a0bfdb7e9701454c27 (diff) |
[IPV6] SYSCTL: complete initialization for sysctl table in subsystem code.
Move initialization bits for subsystem sysctl tables to
appropriate functions.
- route
- icmp
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
-rw-r--r-- | net/ipv6/icmp.c | 4 | ||||
-rw-r--r-- | net/ipv6/route.c | 14 | ||||
-rw-r--r-- | net/ipv6/sysctl_net_ipv6.c | 15 |
3 files changed, 19 insertions, 14 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 8f44d49fcee2..12c0b85d6c46 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -955,6 +955,10 @@ struct ctl_table *ipv6_icmp_sysctl_init(struct net *net) | |||
955 | table = kmemdup(ipv6_icmp_table_template, | 955 | table = kmemdup(ipv6_icmp_table_template, |
956 | sizeof(ipv6_icmp_table_template), | 956 | sizeof(ipv6_icmp_table_template), |
957 | GFP_KERNEL); | 957 | GFP_KERNEL); |
958 | |||
959 | if (table) | ||
960 | table[0].data = &net->ipv6.sysctl.icmpv6_time; | ||
961 | |||
958 | return table; | 962 | return table; |
959 | } | 963 | } |
960 | #endif | 964 | #endif |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index e8b241cb60bc..1b15e1708409 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2505,6 +2505,20 @@ struct ctl_table *ipv6_route_sysctl_init(struct net *net) | |||
2505 | table = kmemdup(ipv6_route_table_template, | 2505 | table = kmemdup(ipv6_route_table_template, |
2506 | sizeof(ipv6_route_table_template), | 2506 | sizeof(ipv6_route_table_template), |
2507 | GFP_KERNEL); | 2507 | GFP_KERNEL); |
2508 | |||
2509 | if (table) { | ||
2510 | table[0].data = &net->ipv6.sysctl.flush_delay; | ||
2511 | /* table[1].data will be handled when we have | ||
2512 | routes per namespace */ | ||
2513 | table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; | ||
2514 | table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; | ||
2515 | table[4].data = &net->ipv6.sysctl.ip6_rt_gc_timeout; | ||
2516 | table[5].data = &net->ipv6.sysctl.ip6_rt_gc_interval; | ||
2517 | table[6].data = &net->ipv6.sysctl.ip6_rt_gc_elasticity; | ||
2518 | table[7].data = &net->ipv6.sysctl.ip6_rt_mtu_expires; | ||
2519 | table[8].data = &net->ipv6.sysctl.ip6_rt_min_advmss; | ||
2520 | } | ||
2521 | |||
2508 | return table; | 2522 | return table; |
2509 | } | 2523 | } |
2510 | #endif | 2524 | #endif |
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index d6d3e68086f8..3804dcbbfab0 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c | |||
@@ -71,24 +71,11 @@ static int ipv6_sysctl_net_init(struct net *net) | |||
71 | ipv6_route_table = ipv6_route_sysctl_init(net); | 71 | ipv6_route_table = ipv6_route_sysctl_init(net); |
72 | if (!ipv6_route_table) | 72 | if (!ipv6_route_table) |
73 | goto out_ipv6_table; | 73 | goto out_ipv6_table; |
74 | ipv6_table[0].child = ipv6_route_table; | ||
74 | 75 | ||
75 | ipv6_icmp_table = ipv6_icmp_sysctl_init(net); | 76 | ipv6_icmp_table = ipv6_icmp_sysctl_init(net); |
76 | if (!ipv6_icmp_table) | 77 | if (!ipv6_icmp_table) |
77 | goto out_ipv6_route_table; | 78 | goto out_ipv6_route_table; |
78 | |||
79 | ipv6_route_table[0].data = &net->ipv6.sysctl.flush_delay; | ||
80 | /* ipv6_route_table[1].data will be handled when we have | ||
81 | routes per namespace */ | ||
82 | ipv6_route_table[2].data = &net->ipv6.sysctl.ip6_rt_max_size; | ||
83 | ipv6_route_table[3].data = &net->ipv6.sysctl.ip6_rt_gc_min_interval; | ||
84 | ipv6_route_table[4].data = &net->ipv6.sysctl.ip6_rt_gc_timeout; | ||
85 | ipv6_route_table[5].data = &net->ipv6.sysctl.ip6_rt_gc_interval; | ||
86 | ipv6_route_table[6].data = &net->ipv6.sysctl.ip6_rt_gc_elasticity; | ||
87 | ipv6_route_table[7].data = &net->ipv6.sysctl.ip6_rt_mtu_expires; | ||
88 | ipv6_route_table[8].data = &net->ipv6.sysctl.ip6_rt_min_advmss; | ||
89 | ipv6_table[0].child = ipv6_route_table; | ||
90 | |||
91 | ipv6_icmp_table[0].data = &net->ipv6.sysctl.icmpv6_time; | ||
92 | ipv6_table[1].child = ipv6_icmp_table; | 79 | ipv6_table[1].child = ipv6_icmp_table; |
93 | 80 | ||
94 | ipv6_table[2].data = &net->ipv6.sysctl.bindv6only; | 81 | ipv6_table[2].data = &net->ipv6.sysctl.bindv6only; |