diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-01-22 08:58:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:10:34 -0500 |
commit | 8d8354d2fb9277f165715a6e1cb92bcc89259975 (patch) | |
tree | 465fd866b6f5b4ab9c05a5441697c07502d0f0ed /net/ipv6/sysctl_net_ipv6.c | |
parent | 9d5c824399dea881779d78a6c147288bf2dccb6b (diff) |
[NETNS][FRAGS]: Move ctl tables around.
This is a preparation for sysctl netns-ization.
Move the ctl tables to the files, where the tuning
variables reside. Plus make the helpers to register
the tables.
This will simplify the later patches and will keep
similar things closer to each other.
ipv4, ipv6 and conntrack_reasm are patched differently,
but the result is all the tables are in appropriate files.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/sysctl_net_ipv6.c')
-rw-r--r-- | net/ipv6/sysctl_net_ipv6.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 7197eb74a755..408691b777c2 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c | |||
@@ -38,40 +38,6 @@ static ctl_table ipv6_table_template[] = { | |||
38 | .proc_handler = &proc_dointvec | 38 | .proc_handler = &proc_dointvec |
39 | }, | 39 | }, |
40 | { | 40 | { |
41 | .ctl_name = NET_IPV6_IP6FRAG_HIGH_THRESH, | ||
42 | .procname = "ip6frag_high_thresh", | ||
43 | .data = &init_net.ipv6.sysctl.frags.high_thresh, | ||
44 | .maxlen = sizeof(int), | ||
45 | .mode = 0644, | ||
46 | .proc_handler = &proc_dointvec | ||
47 | }, | ||
48 | { | ||
49 | .ctl_name = NET_IPV6_IP6FRAG_LOW_THRESH, | ||
50 | .procname = "ip6frag_low_thresh", | ||
51 | .data = &init_net.ipv6.sysctl.frags.low_thresh, | ||
52 | .maxlen = sizeof(int), | ||
53 | .mode = 0644, | ||
54 | .proc_handler = &proc_dointvec | ||
55 | }, | ||
56 | { | ||
57 | .ctl_name = NET_IPV6_IP6FRAG_TIME, | ||
58 | .procname = "ip6frag_time", | ||
59 | .data = &init_net.ipv6.sysctl.frags.timeout, | ||
60 | .maxlen = sizeof(int), | ||
61 | .mode = 0644, | ||
62 | .proc_handler = &proc_dointvec_jiffies, | ||
63 | .strategy = &sysctl_jiffies, | ||
64 | }, | ||
65 | { | ||
66 | .ctl_name = NET_IPV6_IP6FRAG_SECRET_INTERVAL, | ||
67 | .procname = "ip6frag_secret_interval", | ||
68 | .data = &init_net.ipv6.sysctl.frags.secret_interval, | ||
69 | .maxlen = sizeof(int), | ||
70 | .mode = 0644, | ||
71 | .proc_handler = &proc_dointvec_jiffies, | ||
72 | .strategy = &sysctl_jiffies | ||
73 | }, | ||
74 | { | ||
75 | .ctl_name = NET_IPV6_MLD_MAX_MSF, | 41 | .ctl_name = NET_IPV6_MLD_MAX_MSF, |
76 | .procname = "mld_max_msf", | 42 | .procname = "mld_max_msf", |
77 | .data = &sysctl_mld_max_msf, | 43 | .data = &sysctl_mld_max_msf, |
@@ -126,16 +92,12 @@ static int ipv6_sysctl_net_init(struct net *net) | |||
126 | ipv6_table[1].child = ipv6_icmp_table; | 92 | ipv6_table[1].child = ipv6_icmp_table; |
127 | 93 | ||
128 | ipv6_table[2].data = &net->ipv6.sysctl.bindv6only; | 94 | ipv6_table[2].data = &net->ipv6.sysctl.bindv6only; |
129 | ipv6_table[3].data = &net->ipv6.sysctl.frags.high_thresh; | ||
130 | ipv6_table[4].data = &net->ipv6.sysctl.frags.low_thresh; | ||
131 | ipv6_table[5].data = &net->ipv6.sysctl.frags.timeout; | ||
132 | ipv6_table[6].data = &net->ipv6.sysctl.frags.secret_interval; | ||
133 | 95 | ||
134 | /* We don't want this value to be per namespace, it should be global | 96 | /* We don't want this value to be per namespace, it should be global |
135 | to all namespaces, so make it read-only when we are not in the | 97 | to all namespaces, so make it read-only when we are not in the |
136 | init network namespace */ | 98 | init network namespace */ |
137 | if (net != &init_net) | 99 | if (net != &init_net) |
138 | ipv6_table[7].mode = 0444; | 100 | ipv6_table[3].mode = 0444; |
139 | 101 | ||
140 | net->ipv6.sysctl.table = register_net_sysctl_table(net, net_ipv6_ctl_path, | 102 | net->ipv6.sysctl.table = register_net_sysctl_table(net, net_ipv6_ctl_path, |
141 | ipv6_table); | 103 | ipv6_table); |