Skip to content

Commit

Permalink
net ipv6: Remove unneded registration of an empty net/ipv6/neigh
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Apr 21, 2012
1 parent 45bad91 commit a5287ac
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
15 changes: 0 additions & 15 deletions net/ipv6/af_inet6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,11 +1111,6 @@ static int __init inet6_init(void)
if (err)
goto out_sock_register_fail;

#ifdef CONFIG_SYSCTL
err = ipv6_static_sysctl_register();
if (err)
goto static_sysctl_fail;
#endif
tcpv6_prot.sysctl_mem = init_net.ipv4.sysctl_tcp_mem;

/*
Expand Down Expand Up @@ -1242,10 +1237,6 @@ static int __init inet6_init(void)
icmp_fail:
unregister_pernet_subsys(&inet6_net_ops);
register_pernet_fail:
#ifdef CONFIG_SYSCTL
ipv6_static_sysctl_unregister();
static_sysctl_fail:
#endif
sock_unregister(PF_INET6);
rtnl_unregister_all(PF_INET6);
out_sock_register_fail:
Expand All @@ -1272,9 +1263,6 @@ static void __exit inet6_exit(void)
/* Disallow any further netlink messages */
rtnl_unregister_all(PF_INET6);

#ifdef CONFIG_SYSCTL
ipv6_sysctl_unregister();
#endif
udpv6_exit();
udplitev6_exit();
tcpv6_exit();
Expand Down Expand Up @@ -1302,9 +1290,6 @@ static void __exit inet6_exit(void)
rawv6_exit();

unregister_pernet_subsys(&inet6_net_ops);
#ifdef CONFIG_SYSCTL
ipv6_static_sysctl_unregister();
#endif
proto_unregister(&rawv6_prot);
proto_unregister(&udplitev6_prot);
proto_unregister(&udpv6_prot);
Expand Down
27 changes: 0 additions & 27 deletions net/ipv6/sysctl_net_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@
#include <net/addrconf.h>
#include <net/inet_frag.h>

static struct ctl_table empty[1];

static ctl_table ipv6_static_skeleton[] = {
{
.procname = "neigh",
.maxlen = 0,
.mode = 0555,
.child = empty,
},
{ }
};

static ctl_table ipv6_table_template[] = {
{
.procname = "route",
Expand Down Expand Up @@ -160,18 +148,3 @@ void ipv6_sysctl_unregister(void)
unregister_net_sysctl_table(ip6_header);
unregister_pernet_subsys(&ipv6_sysctl_net_ops);
}

static struct ctl_table_header *ip6_base;

int ipv6_static_sysctl_register(void)
{
ip6_base = register_net_sysctl_table(&init_net, net_ipv6_ctl_path, ipv6_static_skeleton);
if (ip6_base == NULL)
return -ENOMEM;
return 0;
}

void ipv6_static_sysctl_unregister(void)
{
unregister_net_sysctl_table(ip6_base);
}

0 comments on commit a5287ac

Please sign in to comment.