xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate
authorAntony Antony <antony.antony@secunet.com>
Fri, 4 Sep 2020 06:50:11 +0000 (08:50 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 7 Sep 2020 10:45:22 +0000 (12:45 +0200)
commit7aa05d304785204703a67a6aa7f1db402889a172
tree1c5627f4a26152b3dd2aaecd3e0944828e01964f
parent91a46c6d1b4fcbfa4773df9421b8ad3e58088101
xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate

XFRMA_SEC_CTX was not cloned from the old to the new.
Migrate this attribute during XFRMA_MSG_MIGRATE

v1->v2:
 - return -ENOMEM on error
v2->v3:
 - fix return type to int

Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c