diff mbox series

[v3,1/4] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate

Message ID 20200904064938.GA21496@moon.secunet.de
State Awaiting Upstream
Delegated to: David Miller
Headers show
Series [v3,1/4] xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate | expand

Commit Message

Antony Antony Sept. 4, 2020, 6:49 a.m. UTC
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>
---
 net/xfrm/xfrm_state.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Steffen Klassert Sept. 9, 2020, 5:54 a.m. UTC | #1
On Fri, Sep 04, 2020 at 08:49:38AM +0200, Antony Antony wrote:
> 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>

All applied, thanks Antony!
diff mbox series

Patch

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 69520ad3d83b..3a000f289dcd 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -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;