Skip to content

Commit 8366685

Browse files
antonyantonyklassert
authored andcommitted
xfrm: clone whole liftime_cur structure in xfrm_do_migrate
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: 80c9aba ("[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>
1 parent 7aa05d3 commit 8366685

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/xfrm/xfrm_state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
15501550
x->tfcpad = orig->tfcpad;
15511551
x->replay_maxdiff = orig->replay_maxdiff;
15521552
x->replay_maxage = orig->replay_maxage;
1553-
x->curlft.add_time = orig->curlft.add_time;
1553+
memcpy(&x->curlft, &orig->curlft, sizeof(x->curlft));
15541554
x->km.state = orig->km.state;
15551555
x->km.seq = orig->km.seq;
15561556
x->replay = orig->replay;

0 commit comments

Comments
 (0)