]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfrm: clone whole liftime_cur structure in xfrm_do_migrate
authorAntony Antony <antony.antony@secunet.com>
Fri, 4 Sep 2020 06:50:29 +0000 (08:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Oct 2020 09:55:52 +0000 (11:55 +0200)
commit38dd384ce429ff0bbd4c7e7750e159397b79f0de
treeb350bdb9a03f1b9c4f7f955f3601b06ec5e5c7aa
parent8baab80240288ad0ccefcca9f638f7cc412089f2
xfrm: clone whole liftime_cur structure in xfrm_do_migrate

[ Upstream commit 8366685b2883e523f91e9816d7be371eb1144749 ]

When we clone state only add_time was cloned. It missed values like
bytes, packets.  Now clone the all members of the structure.

v1->v3:
 - use memcpy to copy the entire structure

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