diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-19 13:24:33 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-20 21:21:17 -0400 |
commit | 5dd3df105b9f6cb7dd2472b59e028d0d1c878ecb (patch) | |
tree | b12606e6e74ee6d07823eb268e09d899946279fd /net/ipv6 | |
parent | 4344475797a16ef948385780943f7a5cf09f0675 (diff) | |
download | linux-5dd3df105b9f6cb7dd2472b59e028d0d1c878ecb.tar.bz2 |
net: Move all of the network sysctls without a namespace into init_net.
This makes it clearer which sysctls are relative to your current network
namespace.
This makes it a little less error prone by not exposing sysctls for the
initial network namespace in other namespaces.
This is the same way we handle all of our other network interfaces to
userspace and I can't honestly remember why we didn't do this for
sysctls right from the start.
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/netfilter/ip6_queue.c | 6 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 4 | ||||
-rw-r--r-- | net/ipv6/sysctl_net_ipv6.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index a34c9e4c792c..6785f5044acf 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c @@ -588,7 +588,7 @@ static int __init ip6_queue_init(void) #endif register_netdevice_notifier(&ipq_dev_notifier); #ifdef CONFIG_SYSCTL - ipq_sysctl_header = register_sysctl_paths(net_ipv6_ctl_path, ipq_table); + ipq_sysctl_header = register_net_sysctl_table(&init_net, net_ipv6_ctl_path, ipq_table); #endif status = nf_register_queue_handler(NFPROTO_IPV6, &nfqh); if (status < 0) { @@ -599,7 +599,7 @@ static int __init ip6_queue_init(void) cleanup_sysctl: #ifdef CONFIG_SYSCTL - unregister_sysctl_table(ipq_sysctl_header); + unregister_net_sysctl_table(ipq_sysctl_header); #endif unregister_netdevice_notifier(&ipq_dev_notifier); proc_net_remove(&init_net, IPQ_PROC_FS_NAME); @@ -621,7 +621,7 @@ static void __exit ip6_queue_fini(void) ipq_flush(NULL, 0); #ifdef CONFIG_SYSCTL - unregister_sysctl_table(ipq_sysctl_header); + unregister_net_sysctl_table(ipq_sysctl_header); #endif unregister_netdevice_notifier(&ipq_dev_notifier); proc_net_remove(&init_net, IPQ_PROC_FS_NAME); diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 38f00b0298d3..754814462950 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -626,7 +626,7 @@ int nf_ct_frag6_init(void) inet_frags_init(&nf_frags); #ifdef CONFIG_SYSCTL - nf_ct_frag6_sysctl_header = register_sysctl_paths(nf_net_netfilter_sysctl_path, + nf_ct_frag6_sysctl_header = register_net_sysctl_table(&init_net, nf_net_netfilter_sysctl_path, nf_ct_frag6_sysctl_table); if (!nf_ct_frag6_sysctl_header) { inet_frags_fini(&nf_frags); @@ -640,7 +640,7 @@ int nf_ct_frag6_init(void) void nf_ct_frag6_cleanup(void) { #ifdef CONFIG_SYSCTL - unregister_sysctl_table(nf_ct_frag6_sysctl_header); + unregister_net_sysctl_table(nf_ct_frag6_sysctl_header); nf_ct_frag6_sysctl_header = NULL; #endif inet_frags_fini(&nf_frags); diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index 06f21e5ad361..99279c8aaf29 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c @@ -165,7 +165,7 @@ static struct ctl_table_header *ip6_base; int ipv6_static_sysctl_register(void) { - ip6_base = register_sysctl_paths(net_ipv6_ctl_path, ipv6_static_skeleton); + ip6_base = register_net_sysctl_table(&init_net, net_ipv6_ctl_path, ipv6_static_skeleton); if (ip6_base == NULL) return -ENOMEM; return 0; |