aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 71598f64c113..f62187bb6d08 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3122,14 +3122,23 @@ static ctl_table ipv4_route_table[] = {
3122 { .ctl_name = 0 } 3122 { .ctl_name = 0 }
3123}; 3123};
3124 3124
3125static __net_initdata struct ctl_path ipv4_route_path[] = { 3125static struct ctl_table empty[1];
3126
3127static struct ctl_table ipv4_skeleton[] =
3128{
3129 { .procname = "route", .ctl_name = NET_IPV4_ROUTE,
3130 .mode = 0555, .child = ipv4_route_table},
3131 { .procname = "neigh", .ctl_name = NET_IPV4_NEIGH,
3132 .mode = 0555, .child = empty},
3133 { }
3134};
3135
3136static __net_initdata struct ctl_path ipv4_path[] = {
3126 { .procname = "net", .ctl_name = CTL_NET, }, 3137 { .procname = "net", .ctl_name = CTL_NET, },
3127 { .procname = "ipv4", .ctl_name = NET_IPV4, }, 3138 { .procname = "ipv4", .ctl_name = NET_IPV4, },
3128 { .procname = "route", .ctl_name = NET_IPV4_ROUTE, },
3129 { }, 3139 { },
3130}; 3140};
3131 3141
3132
3133static struct ctl_table ipv4_route_flush_table[] = { 3142static struct ctl_table ipv4_route_flush_table[] = {
3134 { 3143 {
3135 .ctl_name = NET_IPV4_ROUTE_FLUSH, 3144 .ctl_name = NET_IPV4_ROUTE_FLUSH,
@@ -3142,6 +3151,13 @@ static struct ctl_table ipv4_route_flush_table[] = {
3142 { .ctl_name = 0 }, 3151 { .ctl_name = 0 },
3143}; 3152};
3144 3153
3154static __net_initdata struct ctl_path ipv4_route_path[] = {
3155 { .procname = "net", .ctl_name = CTL_NET, },
3156 { .procname = "ipv4", .ctl_name = NET_IPV4, },
3157 { .procname = "route", .ctl_name = NET_IPV4_ROUTE, },
3158 { },
3159};
3160
3145static __net_init int sysctl_route_net_init(struct net *net) 3161static __net_init int sysctl_route_net_init(struct net *net)
3146{ 3162{
3147 struct ctl_table *tbl; 3163 struct ctl_table *tbl;
@@ -3293,7 +3309,7 @@ int __init ip_rt_init(void)
3293 */ 3309 */
3294void __init ip_static_sysctl_init(void) 3310void __init ip_static_sysctl_init(void)
3295{ 3311{
3296 register_sysctl_paths(ipv4_route_path, ipv4_route_table); 3312 register_sysctl_paths(ipv4_path, ipv4_skeleton);
3297} 3313}
3298#endif 3314#endif
3299 3315