diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-25 17:15:16 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 17:15:16 -0800 |
commit | 673c09be457bb23aa0eaaa79804cbb342210d195 (patch) | |
tree | 9948d1859bbcd07316f5cea239b86845d6061570 /net/key | |
parent | d62ddc21b674b5ac1466091ff3fbf7baa53bc92c (diff) | |
download | linux-673c09be457bb23aa0eaaa79804cbb342210d195.tar.gz linux-673c09be457bb23aa0eaaa79804cbb342210d195.tar.bz2 linux-673c09be457bb23aa0eaaa79804cbb342210d195.zip |
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/key')
-rw-r--r-- | net/key/af_key.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 5b22e011653b..bde8aad4cc93 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -1122,7 +1122,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct sadb_msg *hdr, (key->sadb_key_bits+7) / 8 > key->sadb_key_len * sizeof(uint64_t))) return ERR_PTR(-EINVAL); - x = xfrm_state_alloc(); + x = xfrm_state_alloc(&init_net); if (x == NULL) return ERR_PTR(-ENOBUFS); |