aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 20:51:25 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 20:51:25 -0500
commitc5b3cf46eabe6e7459125fc6e2033b4222665017 (patch)
treea968ad567906d7b45270b9e91d534493f8a1a38d /net/ipv6
parentdb983c1144884cab10d6397532f4bf05eb0c01d2 (diff)
netns xfrm: ->dst_lookup in netns
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/xfrm6_policy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 2df8a78fc3df..d7a5b8bc3770 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -27,7 +27,8 @@
27static struct dst_ops xfrm6_dst_ops; 27static struct dst_ops xfrm6_dst_ops;
28static struct xfrm_policy_afinfo xfrm6_policy_afinfo; 28static struct xfrm_policy_afinfo xfrm6_policy_afinfo;
29 29
30static struct dst_entry *xfrm6_dst_lookup(int tos, xfrm_address_t *saddr, 30static struct dst_entry *xfrm6_dst_lookup(struct net *net, int tos,
31 xfrm_address_t *saddr,
31 xfrm_address_t *daddr) 32 xfrm_address_t *daddr)
32{ 33{
33 struct flowi fl = {}; 34 struct flowi fl = {};
@@ -38,7 +39,7 @@ static struct dst_entry *xfrm6_dst_lookup(int tos, xfrm_address_t *saddr,
38 if (saddr) 39 if (saddr)
39 memcpy(&fl.fl6_src, saddr, sizeof(fl.fl6_src)); 40 memcpy(&fl.fl6_src, saddr, sizeof(fl.fl6_src));
40 41
41 dst = ip6_route_output(&init_net, NULL, &fl); 42 dst = ip6_route_output(net, NULL, &fl);
42 43
43 err = dst->error; 44 err = dst->error;
44 if (dst->error) { 45 if (dst->error) {
@@ -54,7 +55,7 @@ static int xfrm6_get_saddr(xfrm_address_t *saddr, xfrm_address_t *daddr)
54 struct dst_entry *dst; 55 struct dst_entry *dst;
55 struct net_device *dev; 56 struct net_device *dev;
56 57
57 dst = xfrm6_dst_lookup(0, NULL, daddr); 58 dst = xfrm6_dst_lookup(&init_net, 0, NULL, daddr);
58 if (IS_ERR(dst)) 59 if (IS_ERR(dst))
59 return -EHOSTUNREACH; 60 return -EHOSTUNREACH;
60 61