Skip to content

Commit

Permalink
UPSTREAM: xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate
Browse files Browse the repository at this point in the history
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: 9b42c1f ("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>
(cherry picked from commit 545e5c5)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I1f49264dde418481a0d1e53d5a4df3fc29bbccb1
  • Loading branch information
antonyantony authored and gregkh committed Feb 21, 2022
1 parent c00af3c commit fe5eb1a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/xfrm/xfrm_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,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;
Expand Down

0 comments on commit fe5eb1a

Please sign in to comment.