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/dccp | |
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/dccp')
-rw-r--r-- | net/dccp/ipv6.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index f033e845bb07..b963f35c65f6 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -168,7 +168,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
168 | goto out; | 168 | goto out; |
169 | } | 169 | } |
170 | 170 | ||
171 | err = xfrm_lookup(&dst, &fl, sk, 0); | 171 | err = xfrm_lookup(net, &dst, &fl, sk, 0); |
172 | if (err < 0) { | 172 | if (err < 0) { |
173 | sk->sk_err_soft = -err; | 173 | sk->sk_err_soft = -err; |
174 | goto out; | 174 | goto out; |
@@ -279,7 +279,7 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req) | |||
279 | if (final_p) | 279 | if (final_p) |
280 | ipv6_addr_copy(&fl.fl6_dst, final_p); | 280 | ipv6_addr_copy(&fl.fl6_dst, final_p); |
281 | 281 | ||
282 | err = xfrm_lookup(&dst, &fl, sk, 0); | 282 | err = xfrm_lookup(sock_net(sk), &dst, &fl, sk, 0); |
283 | if (err < 0) | 283 | if (err < 0) |
284 | goto done; | 284 | goto done; |
285 | 285 | ||
@@ -343,7 +343,7 @@ static void dccp_v6_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb) | |||
343 | 343 | ||
344 | /* sk = NULL, but it is safe for now. RST socket required. */ | 344 | /* sk = NULL, but it is safe for now. RST socket required. */ |
345 | if (!ip6_dst_lookup(ctl_sk, &skb->dst, &fl)) { | 345 | if (!ip6_dst_lookup(ctl_sk, &skb->dst, &fl)) { |
346 | if (xfrm_lookup(&skb->dst, &fl, NULL, 0) >= 0) { | 346 | if (xfrm_lookup(net, &skb->dst, &fl, NULL, 0) >= 0) { |
347 | ip6_xmit(ctl_sk, skb, &fl, NULL, 0); | 347 | ip6_xmit(ctl_sk, skb, &fl, NULL, 0); |
348 | DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS); | 348 | DCCP_INC_STATS_BH(DCCP_MIB_OUTSEGS); |
349 | DCCP_INC_STATS_BH(DCCP_MIB_OUTRSTS); | 349 | DCCP_INC_STATS_BH(DCCP_MIB_OUTRSTS); |
@@ -569,7 +569,7 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk, | |||
569 | if (final_p) | 569 | if (final_p) |
570 | ipv6_addr_copy(&fl.fl6_dst, final_p); | 570 | ipv6_addr_copy(&fl.fl6_dst, final_p); |
571 | 571 | ||
572 | if ((xfrm_lookup(&dst, &fl, sk, 0)) < 0) | 572 | if ((xfrm_lookup(sock_net(sk), &dst, &fl, sk, 0)) < 0) |
573 | goto out; | 573 | goto out; |
574 | } | 574 | } |
575 | 575 | ||
@@ -1004,7 +1004,7 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
1004 | if (final_p) | 1004 | if (final_p) |
1005 | ipv6_addr_copy(&fl.fl6_dst, final_p); | 1005 | ipv6_addr_copy(&fl.fl6_dst, final_p); |
1006 | 1006 | ||
1007 | err = __xfrm_lookup(&dst, &fl, sk, XFRM_LOOKUP_WAIT); | 1007 | err = __xfrm_lookup(sock_net(sk), &dst, &fl, sk, XFRM_LOOKUP_WAIT); |
1008 | if (err < 0) { | 1008 | if (err < 0) { |
1009 | if (err == -EREMOTE) | 1009 | if (err == -EREMOTE) |
1010 | err = ip6_dst_blackhole(sk, &dst, &fl); | 1010 | err = ip6_dst_blackhole(sk, &dst, &fl); |