aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 20:30:50 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 20:30:50 -0500
commit221df1ed33c9284fc7a6f6e47ca7f8d5f3665d43 (patch)
tree1961ab9f9061b595e10449a24e7275d91f422de2 /net/xfrm/xfrm_user.c
parent0e6024519b4da2d9413b97be1de8122d5709ccc1 (diff)
netns xfrm: state lookup in netns
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
-rw-r--r--net/xfrm/xfrm_user.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 49a7e897ba96..e02ef3361190 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -440,7 +440,7 @@ static struct xfrm_state *xfrm_user_state_lookup(struct xfrm_usersa_id *p,
440 440
441 if (xfrm_id_proto_match(p->proto, IPSEC_PROTO_ANY)) { 441 if (xfrm_id_proto_match(p->proto, IPSEC_PROTO_ANY)) {
442 err = -ESRCH; 442 err = -ESRCH;
443 x = xfrm_state_lookup(&p->daddr, p->spi, p->proto, p->family); 443 x = xfrm_state_lookup(&init_net, &p->daddr, p->spi, p->proto, p->family);
444 } else { 444 } else {
445 xfrm_address_t *saddr = NULL; 445 xfrm_address_t *saddr = NULL;
446 446
@@ -451,8 +451,8 @@ static struct xfrm_state *xfrm_user_state_lookup(struct xfrm_usersa_id *p,
451 } 451 }
452 452
453 err = -ESRCH; 453 err = -ESRCH;
454 x = xfrm_state_lookup_byaddr(&p->daddr, saddr, p->proto, 454 x = xfrm_state_lookup_byaddr(&init_net, &p->daddr, saddr,
455 p->family); 455 p->proto, p->family);
456 } 456 }
457 457
458 out: 458 out:
@@ -1468,7 +1468,7 @@ static int xfrm_get_ae(struct sk_buff *skb, struct nlmsghdr *nlh,
1468 if (r_skb == NULL) 1468 if (r_skb == NULL)
1469 return -ENOMEM; 1469 return -ENOMEM;
1470 1470
1471 x = xfrm_state_lookup(&id->daddr, id->spi, id->proto, id->family); 1471 x = xfrm_state_lookup(&init_net, &id->daddr, id->spi, id->proto, id->family);
1472 if (x == NULL) { 1472 if (x == NULL) {
1473 kfree_skb(r_skb); 1473 kfree_skb(r_skb);
1474 return -ESRCH; 1474 return -ESRCH;
@@ -1509,7 +1509,7 @@ static int xfrm_new_ae(struct sk_buff *skb, struct nlmsghdr *nlh,
1509 if (!(nlh->nlmsg_flags&NLM_F_REPLACE)) 1509 if (!(nlh->nlmsg_flags&NLM_F_REPLACE))
1510 return err; 1510 return err;
1511 1511
1512 x = xfrm_state_lookup(&p->sa_id.daddr, p->sa_id.spi, p->sa_id.proto, p->sa_id.family); 1512 x = xfrm_state_lookup(&init_net, &p->sa_id.daddr, p->sa_id.spi, p->sa_id.proto, p->sa_id.family);
1513 if (x == NULL) 1513 if (x == NULL)
1514 return -ESRCH; 1514 return -ESRCH;
1515 1515
@@ -1628,7 +1628,7 @@ static int xfrm_add_sa_expire(struct sk_buff *skb, struct nlmsghdr *nlh,
1628 struct xfrm_user_expire *ue = nlmsg_data(nlh); 1628 struct xfrm_user_expire *ue = nlmsg_data(nlh);
1629 struct xfrm_usersa_info *p = &ue->state; 1629 struct xfrm_usersa_info *p = &ue->state;
1630 1630
1631 x = xfrm_state_lookup(&p->id.daddr, p->id.spi, p->id.proto, p->family); 1631 x = xfrm_state_lookup(&init_net, &p->id.daddr, p->id.spi, p->id.proto, p->family);
1632 1632
1633 err = -ENOENT; 1633 err = -ENOENT;
1634 if (x == NULL) 1634 if (x == NULL)