diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-07-27 07:40:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-27 07:40:51 -0400 |
commit | 6f9f489a4eeaa3c8a8618e078a5270d2c4872b67 (patch) | |
tree | be3348d282a5ac20275710afaaedc2a45adbb8d6 /net/ipv4/route.c | |
parent | 15d3b4a26291c170563e2b25ded5de1324f93959 (diff) |
net: missing bits of net-namespace / sysctl
Piss-poor sysctl registration API strikes again, film at 11...
What we really need is _pathname_ required to be present in
already registered table, so that kernel could warn about bad
order. That's the next target for sysctl stuff (and generally
saner and more explicit order of initialization of ipv[46]
internals wouldn't hurt either).
For the time being, here are full fixups required by ..._rotable()
stuff; we make per-net sysctl sets descendents of "ro" one and
make sure that sufficient skeleton is there before we start registering
per-net sysctls.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index a507c5e27d0e..380d6474cf66 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2914,7 +2914,7 @@ static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table, | |||
2914 | return 0; | 2914 | return 0; |
2915 | } | 2915 | } |
2916 | 2916 | ||
2917 | ctl_table ipv4_route_table[] = { | 2917 | static ctl_table ipv4_route_table[] = { |
2918 | { | 2918 | { |
2919 | .ctl_name = NET_IPV4_ROUTE_GC_THRESH, | 2919 | .ctl_name = NET_IPV4_ROUTE_GC_THRESH, |
2920 | .procname = "gc_thresh", | 2920 | .procname = "gc_thresh", |
@@ -3216,6 +3216,15 @@ int __init ip_rt_init(void) | |||
3216 | return rc; | 3216 | return rc; |
3217 | } | 3217 | } |
3218 | 3218 | ||
3219 | /* | ||
3220 | * We really need to sanitize the damn ipv4 init order, then all | ||
3221 | * this nonsense will go away. | ||
3222 | */ | ||
3223 | void __init ip_static_sysctl_init(void) | ||
3224 | { | ||
3225 | register_sysctl_paths(ipv4_route_path, ipv4_route_table); | ||
3226 | } | ||
3227 | |||
3219 | EXPORT_SYMBOL(__ip_select_ident); | 3228 | EXPORT_SYMBOL(__ip_select_ident); |
3220 | EXPORT_SYMBOL(ip_route_input); | 3229 | EXPORT_SYMBOL(ip_route_input); |
3221 | EXPORT_SYMBOL(ip_route_output_key); | 3230 | EXPORT_SYMBOL(ip_route_output_key); |