diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-25 20:35:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 20:35:18 -0500 |
commit | 52479b623d3d41df84c499325b6a8c7915413032 (patch) | |
tree | 196f303f296b53dc89a05954d9c03226a9b4158b /net/ipv6/ip6_tunnel.c | |
parent | cdcbca7c1f1946758cfacb69bc1c7eeaccb11e2d (diff) |
netns xfrm: lookup in netns
Pass netns to xfrm_lookup()/__xfrm_lookup(). For that pass netns
to flow_cache_lookup() and resolver callback.
Take it from socket or netdevice. Stub DECnet to init_net.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_tunnel.c')
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index ef249ab5c93c..58e2b0d93758 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -846,6 +846,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb, | |||
846 | int encap_limit, | 846 | int encap_limit, |
847 | __u32 *pmtu) | 847 | __u32 *pmtu) |
848 | { | 848 | { |
849 | struct net *net = dev_net(dev); | ||
849 | struct ip6_tnl *t = netdev_priv(dev); | 850 | struct ip6_tnl *t = netdev_priv(dev); |
850 | struct net_device_stats *stats = &t->dev->stats; | 851 | struct net_device_stats *stats = &t->dev->stats; |
851 | struct ipv6hdr *ipv6h = ipv6_hdr(skb); | 852 | struct ipv6hdr *ipv6h = ipv6_hdr(skb); |
@@ -861,9 +862,9 @@ static int ip6_tnl_xmit2(struct sk_buff *skb, | |||
861 | if ((dst = ip6_tnl_dst_check(t)) != NULL) | 862 | if ((dst = ip6_tnl_dst_check(t)) != NULL) |
862 | dst_hold(dst); | 863 | dst_hold(dst); |
863 | else { | 864 | else { |
864 | dst = ip6_route_output(dev_net(dev), NULL, fl); | 865 | dst = ip6_route_output(net, NULL, fl); |
865 | 866 | ||
866 | if (dst->error || xfrm_lookup(&dst, fl, NULL, 0) < 0) | 867 | if (dst->error || xfrm_lookup(net, &dst, fl, NULL, 0) < 0) |
867 | goto tx_err_link_failure; | 868 | goto tx_err_link_failure; |
868 | } | 869 | } |
869 | 870 | ||