aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/ip.h2
-rw-r--r--net/ipv4/af_inet.c4
-rw-r--r--net/ipv4/sysctl_net_ipv4.c7
3 files changed, 13 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index b5862b975207..250e6ef025a4 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -188,6 +188,8 @@ extern int sysctl_ip_dynaddr;
188 188
189extern void ipfrag_init(void); 189extern void ipfrag_init(void);
190 190
191extern void ip_static_sysctl_init(void);
192
191#ifdef CONFIG_INET 193#ifdef CONFIG_INET
192#include <net/dst.h> 194#include <net/dst.h>
193 195
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index f440a9f54924..354f6b54e492 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1439,6 +1439,10 @@ static int __init inet_init(void)
1439 1439
1440 (void)sock_register(&inet_family_ops); 1440 (void)sock_register(&inet_family_ops);
1441 1441
1442#ifdef CONFIG_SYSCTL
1443 ip_static_sysctl_init();
1444#endif
1445
1442 /* 1446 /*
1443 * Add all the base protocols. 1447 * Add all the base protocols.
1444 */ 1448 */
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 14ef202a2254..d63e9388d92d 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -882,4 +882,11 @@ static __init int sysctl_ipv4_init(void)
882 return 0; 882 return 0;
883} 883}
884 884
885/* set enough of tree skeleton to get rid of ordering problems */
886void __init ip_static_sysctl_init(void)
887{
888 static ctl_table table[1];
889 register_sysctl_paths(net_ipv4_ctl_path, table);
890}
891
885__initcall(sysctl_ipv4_init); 892__initcall(sysctl_ipv4_init);