@@ -37,12 +37,6 @@ static ctl_table ipv6_table_template[] = {
.mode = 0644,
.proc_handler = proc_dointvec
},
- {
- .procname = "neigh",
- .maxlen = 0,
- .mode = 0555,
- .child = empty,
- },
{ }
};
What are the benefits of this empty entry?
Is there an assumption that we add this empty
'/proc/sys/net/ipv6/neigh/' entry *before* adding entries for
"/proc/sys/net/ipv6/neigh/default/" or
"/proc/sys/net/ipv6/neigh/all/"?
Because we register the empty '/proc/sys/net/ipv6/neigh/' entry
*after* registering these two of it's children, and I'm not sure how
this will affect the attachment of ctl_table_header corresponding to
these ctl_table trees.
With the following patch I get this ordering (for both init_net and a new net):
CALL addrconf_init_net (create default/all)
CALL ipv6_sysctl_net_init (create empty entry).
@@ -4564,6 +4564,8 @@ static int __net_init addrconf_init_net(struct net *net)
int err;
struct ipv6_devconf *all, *dflt;
+ printk(KERN_ALERT "CALL addrconf_init_net\n");
+
err = -ENOMEM;
all = &ipv6_devconf;
dflt = &ipv6_devconf_dflt;
@@ -71,6 +65,8 @@ static int __net_init ipv6_sysctl_net_init(struct net *net)
struct ctl_table *ipv6_icmp_table;
int err;
+ printk(KERN_ALERT "CALL ipv6_sysctl_net_init\n");
+
err = -ENOMEM;
ipv6_table = kmemdup(ipv6_table_template, sizeof(ipv6_table_template),
GFP_KERNEL);