[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:
committed by
David S. Miller
parent
83815dea47
commit
436a0a4022
@ -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;
|
||||
|
Reference in New Issue
Block a user