aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_user.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-11-25 20:15:16 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-25 20:15:16 -0500
commit673c09be457bb23aa0eaaa79804cbb342210d195 (patch)
tree9948d1859bbcd07316f5cea239b86845d6061570 /net/xfrm/xfrm_user.c
parentd62ddc21b674b5ac1466091ff3fbf7baa53bc92c (diff)
netns xfrm: add struct xfrm_state::xs_net
To avoid unnecessary complications with passing netns around. * set once, very early after allocating * once set, never changes For a while create every xfrm_state in init_net. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index ee15d5dd6544..65cdaa5c2280 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -320,7 +320,7 @@ static struct xfrm_state *xfrm_state_construct(struct xfrm_usersa_info *p,
320 struct nlattr **attrs, 320 struct nlattr **attrs,
321 int *errp) 321 int *errp)
322{ 322{
323 struct xfrm_state *x = xfrm_state_alloc(); 323 struct xfrm_state *x = xfrm_state_alloc(&init_net);
324 int err = -ENOMEM; 324 int err = -ENOMEM;
325 325
326 if (!x) 326 if (!x)
@@ -1663,7 +1663,7 @@ static int xfrm_add_acquire(struct sk_buff *skb, struct nlmsghdr *nlh,
1663 struct nlattr *rt = attrs[XFRMA_TMPL]; 1663 struct nlattr *rt = attrs[XFRMA_TMPL];
1664 1664
1665 struct xfrm_user_acquire *ua = nlmsg_data(nlh); 1665 struct xfrm_user_acquire *ua = nlmsg_data(nlh);
1666 struct xfrm_state *x = xfrm_state_alloc(); 1666 struct xfrm_state *x = xfrm_state_alloc(&init_net);
1667 int err = -ENOMEM; 1667 int err = -ENOMEM;
1668 1668
1669 if (!x) 1669 if (!x)