summaryrefslogtreecommitdiffstats
path: root/net/key/af_key.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 17:21:45 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-25 17:21:45 -0800
commit0331b1f383e1fa4049f8e75cafeea8f006171c64 (patch)
tree69409ab7c17e1527ed063bb4f2eda440e2cb4ea2 /net/key/af_key.c
parent50a30657fd7ee77a94a6bf0ad86eba7c37c3032e (diff)
downloadop-kernel-dev-0331b1f383e1fa4049f8e75cafeea8f006171c64.zip
op-kernel-dev-0331b1f383e1fa4049f8e75cafeea8f006171c64.tar.gz
netns xfrm: add struct xfrm_policy::xp_net
Again, to avoid complications with passing netns when not necessary. Again, ->xp_net is set-once field, once set it never changes. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index f202ba6..036315d 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -2174,7 +2174,7 @@ static int pfkey_spdadd(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h
if (!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir >= IPSEC_DIR_MAX)
return -EINVAL;
- xp = xfrm_policy_alloc(GFP_KERNEL);
+ xp = xfrm_policy_alloc(&init_net, GFP_KERNEL);
if (xp == NULL)
return -ENOBUFS;
@@ -3141,7 +3141,7 @@ static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt,
(!pol->sadb_x_policy_dir || pol->sadb_x_policy_dir > IPSEC_DIR_OUTBOUND))
return NULL;
- xp = xfrm_policy_alloc(GFP_ATOMIC);
+ xp = xfrm_policy_alloc(&init_net, GFP_ATOMIC);
if (xp == NULL) {
*dir = -ENOBUFS;
return NULL;
OpenPOWER on IntegriCloud