diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-25 20:31:51 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 20:31:51 -0500 |
commit | 5447c5e401c49aba0c36bb1066f2d25b152553b7 (patch) | |
tree | 5a5b4e0736368a70a266bd04075d174310aa5f80 /net/key/af_key.c | |
parent | 12604d8aaa38ac4e24299c9803fefdb301a16421 (diff) |
netns xfrm: finding states in netns
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key/af_key.c')
-rw-r--r-- | net/key/af_key.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 449a5d03e283..4ef0827009e9 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -1348,7 +1348,7 @@ static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h | |||
1348 | } | 1348 | } |
1349 | 1349 | ||
1350 | if (hdr->sadb_msg_seq) { | 1350 | if (hdr->sadb_msg_seq) { |
1351 | x = xfrm_find_acq_byseq(hdr->sadb_msg_seq); | 1351 | x = xfrm_find_acq_byseq(&init_net, hdr->sadb_msg_seq); |
1352 | if (x && xfrm_addr_cmp(&x->id.daddr, xdaddr, family)) { | 1352 | if (x && xfrm_addr_cmp(&x->id.daddr, xdaddr, family)) { |
1353 | xfrm_state_put(x); | 1353 | xfrm_state_put(x); |
1354 | x = NULL; | 1354 | x = NULL; |
@@ -1356,7 +1356,7 @@ static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h | |||
1356 | } | 1356 | } |
1357 | 1357 | ||
1358 | if (!x) | 1358 | if (!x) |
1359 | x = xfrm_find_acq(mode, reqid, proto, xdaddr, xsaddr, 1, family); | 1359 | x = xfrm_find_acq(&init_net, mode, reqid, proto, xdaddr, xsaddr, 1, family); |
1360 | 1360 | ||
1361 | if (x == NULL) | 1361 | if (x == NULL) |
1362 | return -ENOENT; | 1362 | return -ENOENT; |
@@ -1404,7 +1404,7 @@ static int pfkey_acquire(struct sock *sk, struct sk_buff *skb, struct sadb_msg * | |||
1404 | if (hdr->sadb_msg_seq == 0 || hdr->sadb_msg_errno == 0) | 1404 | if (hdr->sadb_msg_seq == 0 || hdr->sadb_msg_errno == 0) |
1405 | return 0; | 1405 | return 0; |
1406 | 1406 | ||
1407 | x = xfrm_find_acq_byseq(hdr->sadb_msg_seq); | 1407 | x = xfrm_find_acq_byseq(&init_net, hdr->sadb_msg_seq); |
1408 | if (x == NULL) | 1408 | if (x == NULL) |
1409 | return 0; | 1409 | return 0; |
1410 | 1410 | ||