提交 2f4520d3 编写于 作者: A Al Viro 提交者: David S. Miller

ipv4: sysctl fixes

net.ipv4.neigh should be a part of skeleton to avoid ordering problems
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 30c2235c
...@@ -3116,14 +3116,23 @@ static ctl_table ipv4_route_table[] = { ...@@ -3116,14 +3116,23 @@ static ctl_table ipv4_route_table[] = {
{ .ctl_name = 0 } { .ctl_name = 0 }
}; };
static __net_initdata struct ctl_path ipv4_route_path[] = { static struct ctl_table empty[1];
static struct ctl_table ipv4_skeleton[] =
{
{ .procname = "route", .ctl_name = NET_IPV4_ROUTE,
.child = ipv4_route_table},
{ .procname = "neigh", .ctl_name = NET_IPV4_NEIGH,
.child = empty},
{ }
};
static __net_initdata struct ctl_path ipv4_path[] = {
{ .procname = "net", .ctl_name = CTL_NET, }, { .procname = "net", .ctl_name = CTL_NET, },
{ .procname = "ipv4", .ctl_name = NET_IPV4, }, { .procname = "ipv4", .ctl_name = NET_IPV4, },
{ .procname = "route", .ctl_name = NET_IPV4_ROUTE, },
{ }, { },
}; };
static struct ctl_table ipv4_route_flush_table[] = { static struct ctl_table ipv4_route_flush_table[] = {
{ {
.ctl_name = NET_IPV4_ROUTE_FLUSH, .ctl_name = NET_IPV4_ROUTE_FLUSH,
...@@ -3136,6 +3145,13 @@ static struct ctl_table ipv4_route_flush_table[] = { ...@@ -3136,6 +3145,13 @@ static struct ctl_table ipv4_route_flush_table[] = {
{ .ctl_name = 0 }, { .ctl_name = 0 },
}; };
static __net_initdata struct ctl_path ipv4_route_path[] = {
{ .procname = "net", .ctl_name = CTL_NET, },
{ .procname = "ipv4", .ctl_name = NET_IPV4, },
{ .procname = "route", .ctl_name = NET_IPV4_ROUTE, },
{ },
};
static __net_init int sysctl_route_net_init(struct net *net) static __net_init int sysctl_route_net_init(struct net *net)
{ {
struct ctl_table *tbl; struct ctl_table *tbl;
...@@ -3287,7 +3303,7 @@ int __init ip_rt_init(void) ...@@ -3287,7 +3303,7 @@ int __init ip_rt_init(void)
*/ */
void __init ip_static_sysctl_init(void) void __init ip_static_sysctl_init(void)
{ {
register_sysctl_paths(ipv4_route_path, ipv4_route_table); register_sysctl_paths(ipv4_path, ipv4_skeleton);
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册