diff options
author | Daniel Lezcano <dlezcano@fr.ibm.com> | 2008-03-05 13:48:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-05 13:48:10 -0500 |
commit | 4591db4f37618f37a9f1f25d291c3c7a43a15a21 (patch) | |
tree | 10694d610a78d8cc607fcb2998e4dc97856138f6 /net/ipv6/route.c | |
parent | 6fda73500581be531fd9bc232173332ec64f6435 (diff) |
[NETNS][IPV6] route6 - add netns parameter to ip6_route_output
Add an netns parameter to ip6_route_output. That will allow to access
to the right routing table for outgoing traffic.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index ec1fedb339cc..f31d7dc11e72 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -772,7 +772,8 @@ static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table | |||
772 | return ip6_pol_route(net, table, fl->oif, fl, flags); | 772 | return ip6_pol_route(net, table, fl->oif, fl, flags); |
773 | } | 773 | } |
774 | 774 | ||
775 | struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl) | 775 | struct dst_entry * ip6_route_output(struct net *net, struct sock *sk, |
776 | struct flowi *fl) | ||
776 | { | 777 | { |
777 | int flags = 0; | 778 | int flags = 0; |
778 | 779 | ||
@@ -782,7 +783,7 @@ struct dst_entry * ip6_route_output(struct sock *sk, struct flowi *fl) | |||
782 | if (!ipv6_addr_any(&fl->fl6_src)) | 783 | if (!ipv6_addr_any(&fl->fl6_src)) |
783 | flags |= RT6_LOOKUP_F_HAS_SADDR; | 784 | flags |= RT6_LOOKUP_F_HAS_SADDR; |
784 | 785 | ||
785 | return fib6_rule_lookup(&init_net, fl, flags, ip6_pol_route_output); | 786 | return fib6_rule_lookup(net, fl, flags, ip6_pol_route_output); |
786 | } | 787 | } |
787 | 788 | ||
788 | EXPORT_SYMBOL(ip6_route_output); | 789 | EXPORT_SYMBOL(ip6_route_output); |
@@ -2260,7 +2261,7 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void | |||
2260 | skb_reset_mac_header(skb); | 2261 | skb_reset_mac_header(skb); |
2261 | skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr)); | 2262 | skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr)); |
2262 | 2263 | ||
2263 | rt = (struct rt6_info*) ip6_route_output(NULL, &fl); | 2264 | rt = (struct rt6_info*) ip6_route_output(&init_net, NULL, &fl); |
2264 | skb->dst = &rt->u.dst; | 2265 | skb->dst = &rt->u.dst; |
2265 | 2266 | ||
2266 | err = rt6_fill_node(skb, rt, &fl.fl6_dst, &fl.fl6_src, iif, | 2267 | err = rt6_fill_node(skb, rt, &fl.fl6_dst, &fl.fl6_src, iif, |