xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate
authorAntony Antony <antony.antony@secunet.com>
Fri, 4 Sep 2020 06:49:38 +0000 (08:49 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 7 Sep 2020 10:45:22 +0000 (12:45 +0200)
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>
net/xfrm/xfrm_state.c

index 69520ad..3a000f2 100644 (file)
@@ -1510,6 +1510,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;