diff options
Diffstat (limited to 'net/key/af_key.c')
-rw-r--r-- | net/key/af_key.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 545f047868ad..3fa811c46913 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -2485,6 +2485,7 @@ static int pfkey_migrate(struct sock *sk, struct sk_buff *skb, | |||
2485 | struct xfrm_selector sel; | 2485 | struct xfrm_selector sel; |
2486 | struct xfrm_migrate m[XFRM_MAX_DEPTH]; | 2486 | struct xfrm_migrate m[XFRM_MAX_DEPTH]; |
2487 | struct xfrm_kmaddress k; | 2487 | struct xfrm_kmaddress k; |
2488 | struct net *net = sock_net(sk); | ||
2488 | 2489 | ||
2489 | if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC - 1], | 2490 | if (!present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC - 1], |
2490 | ext_hdrs[SADB_EXT_ADDRESS_DST - 1]) || | 2491 | ext_hdrs[SADB_EXT_ADDRESS_DST - 1]) || |
@@ -2558,7 +2559,7 @@ static int pfkey_migrate(struct sock *sk, struct sk_buff *skb, | |||
2558 | } | 2559 | } |
2559 | 2560 | ||
2560 | return xfrm_migrate(&sel, dir, XFRM_POLICY_TYPE_MAIN, m, i, | 2561 | return xfrm_migrate(&sel, dir, XFRM_POLICY_TYPE_MAIN, m, i, |
2561 | kma ? &k : NULL); | 2562 | kma ? &k : NULL, net); |
2562 | 2563 | ||
2563 | out: | 2564 | out: |
2564 | return err; | 2565 | return err; |