diff options
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/af_decnet.c | 4 | ||||
-rw-r--r-- | net/decnet/sysctl_net_decnet.c | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 19acd00a6382..16fbf8c28e31 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -2354,6 +2354,8 @@ static const struct proto_ops dn_proto_ops = { .sendpage = sock_no_sendpage, }; +void dn_register_sysctl_skeleton(void); +void dn_unregister_sysctl_skeleton(void); void dn_register_sysctl(void); void dn_unregister_sysctl(void); @@ -2374,6 +2376,7 @@ static int __init decnet_init(void) if (rc != 0) goto out; + dn_register_sysctl_skeleton(); dn_neigh_init(); dn_dev_init(); dn_route_init(); @@ -2413,6 +2416,7 @@ static void __exit decnet_exit(void) dn_fib_cleanup(); proc_net_remove(&init_net, "decnet"); + dn_unregister_sysctl_skeleton(); proto_unregister(&dn_proto); diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c index 02e75d11cfbb..d50a13cbb04c 100644 --- a/net/decnet/sysctl_net_decnet.c +++ b/net/decnet/sysctl_net_decnet.c @@ -55,6 +55,7 @@ static int max_decnet_no_fc_max_cwnd[] = { NSP_MAX_WINDOW }; static char node_name[7] = "???"; static struct ctl_table_header *dn_table_header = NULL; +static struct ctl_table_header *dn_skeleton_table_header = NULL; /* * ctype.h :-) @@ -357,6 +358,27 @@ static struct ctl_path dn_path[] = { { } }; +static struct ctl_table empty[1]; + +static struct ctl_table dn_skeleton[] = { + { + .procname = "conf", + .mode = 0555, + .child = empty, + }, + { } +}; + +void dn_register_sysctl_skeleton(void) +{ + dn_skeleton_table_header = register_sysctl_paths(dn_path, dn_skeleton); +} + +void dn_unregister_sysctl_skeleton(void) +{ + unregister_sysctl_table(dn_skeleton_table_header); +} + void dn_register_sysctl(void) { dn_table_header = register_sysctl_paths(dn_path, dn_table); @@ -368,6 +390,12 @@ void dn_unregister_sysctl(void) } #else /* CONFIG_SYSCTL */ +void dn_register_sysctl_skeleton(void) +{ +} +void dn_unregister_sysctl_skeleton(void) +{ +} void dn_unregister_sysctl(void) { } |