diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-19 09:32:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-20 21:21:18 -0400 |
commit | 4e5ca78541c549ec8886ad2fc19306f35ee672e1 (patch) | |
tree | 8e3119cc1710d20cd4f672e1f91b4adedbd5fab0 /net/ipv4/route.c | |
parent | a5287acc6ca3c69821ab4c5439be8c0ff30a20cb (diff) |
net ipv4: Remove the unneeded registration of an empty net/ipv4/neigh
sysctl no longer requires explicit creation of directories. The neigh
directory is always populated with at least a default entry so this
won't cause any user visible changes.
Delete the ipv4_path and the ipv4_skeleton these are no longer needed.
Directly register the ipv4_route_table.
And since I am an idiot remove the header definitions that I should
have removed in the previous patch.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 86866a4b537f..adf2105a6e85 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -3344,23 +3344,6 @@ static ctl_table ipv4_route_table[] = { | |||
3344 | { } | 3344 | { } |
3345 | }; | 3345 | }; |
3346 | 3346 | ||
3347 | static struct ctl_table empty[1]; | ||
3348 | |||
3349 | static struct ctl_table ipv4_skeleton[] = | ||
3350 | { | ||
3351 | { .procname = "route", | ||
3352 | .mode = 0555, .child = ipv4_route_table}, | ||
3353 | { .procname = "neigh", | ||
3354 | .mode = 0555, .child = empty}, | ||
3355 | { } | ||
3356 | }; | ||
3357 | |||
3358 | static __net_initdata struct ctl_path ipv4_path[] = { | ||
3359 | { .procname = "net", }, | ||
3360 | { .procname = "ipv4", }, | ||
3361 | { }, | ||
3362 | }; | ||
3363 | |||
3364 | static struct ctl_table ipv4_route_flush_table[] = { | 3347 | static struct ctl_table ipv4_route_flush_table[] = { |
3365 | { | 3348 | { |
3366 | .procname = "flush", | 3349 | .procname = "flush", |
@@ -3515,6 +3498,6 @@ int __init ip_rt_init(void) | |||
3515 | */ | 3498 | */ |
3516 | void __init ip_static_sysctl_init(void) | 3499 | void __init ip_static_sysctl_init(void) |
3517 | { | 3500 | { |
3518 | kmemleak_not_leak(register_net_sysctl_table(&init_net, ipv4_path, ipv4_skeleton)); | 3501 | register_net_sysctl(&init_net, "net/ipv4/route", ipv4_route_table); |
3519 | } | 3502 | } |
3520 | #endif | 3503 | #endif |