diff options
-rw-r--r-- | include/net/net_namespace.h | 2 | ||||
-rw-r--r-- | net/sysctl_net.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index ee547c14981..446245e3ade 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -287,6 +287,8 @@ extern struct ctl_table_header *register_net_sysctl_table(struct net *net, const struct ctl_path *path, struct ctl_table *table); extern struct ctl_table_header *register_net_sysctl_rotable( const struct ctl_path *path, struct ctl_table *table); +extern struct ctl_table_header *register_net_sysctl(struct net *net, + const char *path, struct ctl_table *table); extern void unregister_net_sysctl_table(struct ctl_table_header *header); #endif /* __NET_NET_NAMESPACE_H */ diff --git a/net/sysctl_net.c b/net/sysctl_net.c index c3e65aebecc..3865c4f76b8 100644 --- a/net/sysctl_net.c +++ b/net/sysctl_net.c @@ -117,6 +117,13 @@ struct ctl_table_header *register_net_sysctl_rotable(const } EXPORT_SYMBOL_GPL(register_net_sysctl_rotable); +struct ctl_table_header *register_net_sysctl(struct net *net, + const char *path, struct ctl_table *table) +{ + return __register_sysctl_table(&net->sysctls, path, table); +} +EXPORT_SYMBOL_GPL(register_net_sysctl); + void unregister_net_sysctl_table(struct ctl_table_header *header) { unregister_sysctl_table(header); |