Commit 8366685b authored by Antony Antony's avatar Antony Antony Committed by Steffen Klassert

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: 80c9abaa ("[XFRM]: Extension for dynamic update of endpoint address(es)")
Signed-off-by: default avatarAntony Antony <antony.antony@secunet.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 7aa05d30
...@@ -1550,7 +1550,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, ...@@ -1550,7 +1550,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
x->tfcpad = orig->tfcpad; x->tfcpad = orig->tfcpad;
x->replay_maxdiff = orig->replay_maxdiff; x->replay_maxdiff = orig->replay_maxdiff;
x->replay_maxage = orig->replay_maxage; x->replay_maxage = orig->replay_maxage;
x->curlft.add_time = orig->curlft.add_time; memcpy(&x->curlft, &orig->curlft, sizeof(x->curlft));
x->km.state = orig->km.state; x->km.state = orig->km.state;
x->km.seq = orig->km.seq; x->km.seq = orig->km.seq;
x->replay = orig->replay; x->replay = orig->replay;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment