diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-10 06:26:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:29 -0500 |
commit | 4d1169c1e781e5853317c6b75620d678b2c4854e (patch) | |
tree | 69e7a7cf4c0f619d13eec7ff85ab1837f3abaf16 /net/ipv4/fib_frontend.c | |
parent | 6b175b26c1048d331508940ad3516ead1998084f (diff) |
[NETNS]: Add netns to nl_info structure.
nl_info is used to track the end-user destination of routing change
notification. This is a natural object to hold a namespace on. Place
it there and utilize the context in the appropriate places.
Acked-by: Benjamin Thery <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index d1a45cb6f6b0..90aa05f47f8e 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -310,6 +310,7 @@ static int rtentry_to_fib_config(int cmd, struct rtentry *rt, | |||
310 | int plen; | 310 | int plen; |
311 | 311 | ||
312 | memset(cfg, 0, sizeof(*cfg)); | 312 | memset(cfg, 0, sizeof(*cfg)); |
313 | cfg->fc_nlinfo.nl_net = &init_net; | ||
313 | 314 | ||
314 | if (rt->rt_dst.sa_family != AF_INET) | 315 | if (rt->rt_dst.sa_family != AF_INET) |
315 | return -EAFNOSUPPORT; | 316 | return -EAFNOSUPPORT; |
@@ -516,6 +517,7 @@ static int rtm_to_fib_config(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
516 | 517 | ||
517 | cfg->fc_nlinfo.pid = NETLINK_CB(skb).pid; | 518 | cfg->fc_nlinfo.pid = NETLINK_CB(skb).pid; |
518 | cfg->fc_nlinfo.nlh = nlh; | 519 | cfg->fc_nlinfo.nlh = nlh; |
520 | cfg->fc_nlinfo.nl_net = &init_net; | ||
519 | 521 | ||
520 | if (cfg->fc_type > RTN_MAX) { | 522 | if (cfg->fc_type > RTN_MAX) { |
521 | err = -EINVAL; | 523 | err = -EINVAL; |
@@ -670,6 +672,9 @@ static void fib_magic(int cmd, int type, __be32 dst, int dst_len, struct in_ifad | |||
670 | .fc_prefsrc = ifa->ifa_local, | 672 | .fc_prefsrc = ifa->ifa_local, |
671 | .fc_oif = ifa->ifa_dev->dev->ifindex, | 673 | .fc_oif = ifa->ifa_dev->dev->ifindex, |
672 | .fc_nlflags = NLM_F_CREATE | NLM_F_APPEND, | 674 | .fc_nlflags = NLM_F_CREATE | NLM_F_APPEND, |
675 | .fc_nlinfo = { | ||
676 | .nl_net = &init_net, | ||
677 | }, | ||
673 | }; | 678 | }; |
674 | 679 | ||
675 | if (type == RTN_UNICAST) | 680 | if (type == RTN_UNICAST) |