summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAntony Antony <antony.antony@secunet.com>2020-09-04 08:49:38 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-14 10:33:02 +0200
commit0bea401a9a5a05694a55b9754f2ab0dd1fc5c1d0 (patch)
tree3c836372247d3a32db316fe6f67cb8865d6f1406 /net
parentf825fd534f8b4b07cbcfbbb7ad570880ee4a9bb3 (diff)
xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate
[ Upstream commit 545e5c571662b1cd79d9588f9d3b6e36985b8007 ] XFRMA_SET_MARK and XFRMA_SET_MARK_MASK was not cloned from the old to the new. Migrate these two attributes during XFRMA_MSG_MIGRATE Fixes: 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.") 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>
Diffstat (limited to 'net')
-rw-r--r--net/xfrm/xfrm_state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index f3423562d933..10d30f0338d7 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1507,6 +1507,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
}
memcpy(&x->mark, &orig->mark, sizeof(x->mark));
+ memcpy(&x->props.smark, &orig->props.smark, sizeof(x->props.smark));
if (xfrm_init_state(x) < 0)
goto error;