xfrm: Assign esn pointers when cloning a state
authorSteffen Klassert <steffen.klassert@secunet.com>
Mon, 28 Mar 2011 19:46:39 +0000 (19:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Mar 2011 06:34:52 +0000 (23:34 -0700)
commitaf2f464e326ebad57284cfdecb03f1606e89bbc7
tree0b9f1e9918a47f49e1454a0df5e045a0d627050d
parent36ae0148dbb6b9e15d8f067bb7523fd2b765a6af
xfrm: Assign esn pointers when cloning a state

When we clone a xfrm state we have to assign the replay_esn
and the preplay_esn pointers to the state if we use the
new replay detection method. To this end, we add a
xfrm_replay_clone() function that allocates memory for
the replay detection and takes over the necessary values
from the original state.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/xfrm.h
net/xfrm/xfrm_state.c