aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/ip_queue.c6
-rw-r--r--net/ipv4/route.c2
-rw-r--r--net/ipv4/sysctl_net_ipv4.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index 94d45e1f8882..766485d7d099 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -586,7 +586,7 @@ static int __init ip_queue_init(void)
586#endif 586#endif
587 register_netdevice_notifier(&ipq_dev_notifier); 587 register_netdevice_notifier(&ipq_dev_notifier);
588#ifdef CONFIG_SYSCTL 588#ifdef CONFIG_SYSCTL
589 ipq_sysctl_header = register_sysctl_paths(net_ipv4_ctl_path, ipq_table); 589 ipq_sysctl_header = register_net_sysctl_table(&init_net, net_ipv4_ctl_path, ipq_table);
590#endif 590#endif
591 status = nf_register_queue_handler(NFPROTO_IPV4, &nfqh); 591 status = nf_register_queue_handler(NFPROTO_IPV4, &nfqh);
592 if (status < 0) { 592 if (status < 0) {
@@ -597,7 +597,7 @@ static int __init ip_queue_init(void)
597 597
598cleanup_sysctl: 598cleanup_sysctl:
599#ifdef CONFIG_SYSCTL 599#ifdef CONFIG_SYSCTL
600 unregister_sysctl_table(ipq_sysctl_header); 600 unregister_net_sysctl_table(ipq_sysctl_header);
601#endif 601#endif
602 unregister_netdevice_notifier(&ipq_dev_notifier); 602 unregister_netdevice_notifier(&ipq_dev_notifier);
603 proc_net_remove(&init_net, IPQ_PROC_FS_NAME); 603 proc_net_remove(&init_net, IPQ_PROC_FS_NAME);
@@ -618,7 +618,7 @@ static void __exit ip_queue_fini(void)
618 ipq_flush(NULL, 0); 618 ipq_flush(NULL, 0);
619 619
620#ifdef CONFIG_SYSCTL 620#ifdef CONFIG_SYSCTL
621 unregister_sysctl_table(ipq_sysctl_header); 621 unregister_net_sysctl_table(ipq_sysctl_header);
622#endif 622#endif
623 unregister_netdevice_notifier(&ipq_dev_notifier); 623 unregister_netdevice_notifier(&ipq_dev_notifier);
624 proc_net_remove(&init_net, IPQ_PROC_FS_NAME); 624 proc_net_remove(&init_net, IPQ_PROC_FS_NAME);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index a1c115d750e9..86866a4b537f 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3515,6 +3515,6 @@ int __init ip_rt_init(void)
3515 */ 3515 */
3516void __init ip_static_sysctl_init(void) 3516void __init ip_static_sysctl_init(void)
3517{ 3517{
3518 kmemleak_not_leak(register_sysctl_paths(ipv4_path, ipv4_skeleton)); 3518 kmemleak_not_leak(register_net_sysctl_table(&init_net, ipv4_path, ipv4_skeleton));
3519} 3519}
3520#endif 3520#endif
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 34a628625d9c..e7a6fa3d70bb 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -857,12 +857,12 @@ static __init int sysctl_ipv4_init(void)
857 if (!i->procname) 857 if (!i->procname)
858 return -EINVAL; 858 return -EINVAL;
859 859
860 hdr = register_sysctl_paths(net_ipv4_ctl_path, ipv4_table); 860 hdr = register_net_sysctl_table(&init_net, net_ipv4_ctl_path, ipv4_table);
861 if (hdr == NULL) 861 if (hdr == NULL)
862 return -ENOMEM; 862 return -ENOMEM;
863 863
864 if (register_pernet_subsys(&ipv4_sysctl_ops)) { 864 if (register_pernet_subsys(&ipv4_sysctl_ops)) {
865 unregister_sysctl_table(hdr); 865 unregister_net_sysctl_table(hdr);
866 return -ENOMEM; 866 return -ENOMEM;
867 } 867 }
868 868