aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-04-19 09:26:19 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-20 21:21:18 -0400
commita5287acc6ca3c69821ab4c5439be8c0ff30a20cb (patch)
treeebc0f3938fabf0b1b9e1849c655d77a7b4da2f1f /net/ipv6
parent45bad914987ed526d468247e0a5f5f7acb2066a1 (diff)
net ipv6: Remove unneded registration of an empty net/ipv6/neigh
sysctl no longer requires explicit creation of directories. The neigh directory is always populated with at least a default entry so this should cause no user visible changes. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/af_inet6.c15
-rw-r--r--net/ipv6/sysctl_net_ipv6.c27
2 files changed, 0 insertions, 42 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 8ed1b930e75f..461e7896e5d8 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -1111,11 +1111,6 @@ static int __init inet6_init(void)
1111 if (err) 1111 if (err)
1112 goto out_sock_register_fail; 1112 goto out_sock_register_fail;
1113 1113
1114#ifdef CONFIG_SYSCTL
1115 err = ipv6_static_sysctl_register();
1116 if (err)
1117 goto static_sysctl_fail;
1118#endif
1119 tcpv6_prot.sysctl_mem = init_net.ipv4.sysctl_tcp_mem; 1114 tcpv6_prot.sysctl_mem = init_net.ipv4.sysctl_tcp_mem;
1120 1115
1121 /* 1116 /*
@@ -1242,10 +1237,6 @@ ipmr_fail:
1242icmp_fail: 1237icmp_fail:
1243 unregister_pernet_subsys(&inet6_net_ops); 1238 unregister_pernet_subsys(&inet6_net_ops);
1244register_pernet_fail: 1239register_pernet_fail:
1245#ifdef CONFIG_SYSCTL
1246 ipv6_static_sysctl_unregister();
1247static_sysctl_fail:
1248#endif
1249 sock_unregister(PF_INET6); 1240 sock_unregister(PF_INET6);
1250 rtnl_unregister_all(PF_INET6); 1241 rtnl_unregister_all(PF_INET6);
1251out_sock_register_fail: 1242out_sock_register_fail:
@@ -1272,9 +1263,6 @@ static void __exit inet6_exit(void)
1272 /* Disallow any further netlink messages */ 1263 /* Disallow any further netlink messages */
1273 rtnl_unregister_all(PF_INET6); 1264 rtnl_unregister_all(PF_INET6);
1274 1265
1275#ifdef CONFIG_SYSCTL
1276 ipv6_sysctl_unregister();
1277#endif
1278 udpv6_exit(); 1266 udpv6_exit();
1279 udplitev6_exit(); 1267 udplitev6_exit();
1280 tcpv6_exit(); 1268 tcpv6_exit();
@@ -1302,9 +1290,6 @@ static void __exit inet6_exit(void)
1302 rawv6_exit(); 1290 rawv6_exit();
1303 1291
1304 unregister_pernet_subsys(&inet6_net_ops); 1292 unregister_pernet_subsys(&inet6_net_ops);
1305#ifdef CONFIG_SYSCTL
1306 ipv6_static_sysctl_unregister();
1307#endif
1308 proto_unregister(&rawv6_prot); 1293 proto_unregister(&rawv6_prot);
1309 proto_unregister(&udplitev6_prot); 1294 proto_unregister(&udplitev6_prot);
1310 proto_unregister(&udpv6_prot); 1295 proto_unregister(&udpv6_prot);
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 99279c8aaf29..cf1e96a49607 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -16,18 +16,6 @@
16#include <net/addrconf.h> 16#include <net/addrconf.h>
17#include <net/inet_frag.h> 17#include <net/inet_frag.h>
18 18
19static struct ctl_table empty[1];
20
21static ctl_table ipv6_static_skeleton[] = {
22 {
23 .procname = "neigh",
24 .maxlen = 0,
25 .mode = 0555,
26 .child = empty,
27 },
28 { }
29};
30
31static ctl_table ipv6_table_template[] = { 19static ctl_table ipv6_table_template[] = {
32 { 20 {
33 .procname = "route", 21 .procname = "route",
@@ -160,18 +148,3 @@ void ipv6_sysctl_unregister(void)
160 unregister_net_sysctl_table(ip6_header); 148 unregister_net_sysctl_table(ip6_header);
161 unregister_pernet_subsys(&ipv6_sysctl_net_ops); 149 unregister_pernet_subsys(&ipv6_sysctl_net_ops);
162} 150}
163
164static struct ctl_table_header *ip6_base;
165
166int ipv6_static_sysctl_register(void)
167{
168 ip6_base = register_net_sysctl_table(&init_net, net_ipv6_ctl_path, ipv6_static_skeleton);
169 if (ip6_base == NULL)
170 return -ENOMEM;
171 return 0;
172}
173
174void ipv6_static_sysctl_unregister(void)
175{
176 unregister_net_sysctl_table(ip6_base);
177}