]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Oct 2020 09:55:52 +0000 (11:55 +0200)
commit8baab80240288ad0ccefcca9f638f7cc412089f2
tree1b36336b6e23dbdf1a2aa0b1d9c82f5f42d97afc
parent3ab37554e6ce52f2ed330872d4949775efbebaf2
xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate

[ Upstream commit 7aa05d304785204703a67a6aa7f1db402889a172 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_state.c