[IPSEC]: Move output replay code into xfrm_output

The replay counter is one of only two remaining things in the output code
that requires a lock on the xfrm state (the other being the crypto).  This
patch moves it into the generic xfrm_output so we can remove the lock from
the transforms themselves.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Herbert Xu
2007-10-08 17:25:53 -07:00
committed by David S. Miller
parent 83815dea47
commit 436a0a4022
6 changed files with 32 additions and 9 deletions

View File

@ -58,6 +58,11 @@ int xfrm_output(struct sk_buff *skb)
if (err)
goto error;
if (x->type->flags & XFRM_TYPE_REPLAY_PROT) {
XFRM_SKB_CB(skb)->seq = ++x->replay.oseq;
xfrm_aevent_doreplay(x);
}
err = x->mode->output(x, skb);
if (err)
goto error;