From 3cad8d50c89a636c1581c61790c882cabb2c5f1d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 15 Jul 2008 16:00:59 -0400 Subject: [PATCH] --- yaml --- r: 106352 b: refs/heads/master c: bd7b1533cd6a68c734062aa69394bec7e2b1718e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/ip.h | 2 ++ trunk/net/ipv4/af_inet.c | 4 ++++ trunk/net/ipv4/sysctl_net_ipv4.c | 7 +++++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 443f788ceb27..f6a94e6fad03 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f7e6ced4061da509f737541ca4dbd44d83a6e82f +refs/heads/master: bd7b1533cd6a68c734062aa69394bec7e2b1718e diff --git a/trunk/include/net/ip.h b/trunk/include/net/ip.h index b5862b975207..250e6ef025a4 100644 --- a/trunk/include/net/ip.h +++ b/trunk/include/net/ip.h @@ -188,6 +188,8 @@ extern int sysctl_ip_dynaddr; extern void ipfrag_init(void); +extern void ip_static_sysctl_init(void); + #ifdef CONFIG_INET #include diff --git a/trunk/net/ipv4/af_inet.c b/trunk/net/ipv4/af_inet.c index f440a9f54924..354f6b54e492 100644 --- a/trunk/net/ipv4/af_inet.c +++ b/trunk/net/ipv4/af_inet.c @@ -1439,6 +1439,10 @@ static int __init inet_init(void) (void)sock_register(&inet_family_ops); +#ifdef CONFIG_SYSCTL + ip_static_sysctl_init(); +#endif + /* * Add all the base protocols. */ diff --git a/trunk/net/ipv4/sysctl_net_ipv4.c b/trunk/net/ipv4/sysctl_net_ipv4.c index 14ef202a2254..d63e9388d92d 100644 --- a/trunk/net/ipv4/sysctl_net_ipv4.c +++ b/trunk/net/ipv4/sysctl_net_ipv4.c @@ -882,4 +882,11 @@ static __init int sysctl_ipv4_init(void) return 0; } +/* set enough of tree skeleton to get rid of ordering problems */ +void __init ip_static_sysctl_init(void) +{ + static ctl_table table[1]; + register_sysctl_paths(net_ipv4_ctl_path, table); +} + __initcall(sysctl_ipv4_init);