summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2008-07-27 08:59:33 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-27 09:45:34 -0700
commiteeb61f719c00c626115852bbc91189dc3011a844 (patch)
treeb52cddf222ee55082c0aeee5627049aa0d12afa4 /net/ipv4/route.c
parentbfbcf034798b2ca45338cee5049b5694b7ddc865 (diff)
downloadlinux-eeb61f719c00c626115852bbc91189dc3011a844.tar.bz2
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: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c11
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,
return 0;
}
-ctl_table ipv4_route_table[] = {
+static ctl_table ipv4_route_table[] = {
{
.ctl_name = NET_IPV4_ROUTE_GC_THRESH,
.procname = "gc_thresh",
@@ -3216,6 +3216,15 @@ int __init ip_rt_init(void)
return rc;
}
+/*
+ * We really need to sanitize the damn ipv4 init order, then all
+ * this nonsense will go away.
+ */
+void __init ip_static_sysctl_init(void)
+{
+ register_sysctl_paths(ipv4_route_path, ipv4_route_table);
+}
+
EXPORT_SYMBOL(__ip_select_ident);
EXPORT_SYMBOL(ip_route_input);
EXPORT_SYMBOL(ip_route_output_key);