diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-10-08 20:25:53 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:54:54 -0400 |
commit | 436a0a402203d5a47d2edf7e4dde6c08a7257983 (patch) | |
tree | b47e73326a2ff7dbf8ac3fbcb6c4acea5c06619d /net/xfrm | |
parent | 83815dea47cf3e98ccbb6aecda08cba1ba91208f (diff) |
[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>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_output.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index 5b1c978a323c..20e789d8c63e 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c | |||
@@ -58,6 +58,11 @@ int xfrm_output(struct sk_buff *skb) | |||
58 | if (err) | 58 | if (err) |
59 | goto error; | 59 | goto error; |
60 | 60 | ||
61 | if (x->type->flags & XFRM_TYPE_REPLAY_PROT) { | ||
62 | XFRM_SKB_CB(skb)->seq = ++x->replay.oseq; | ||
63 | xfrm_aevent_doreplay(x); | ||
64 | } | ||
65 | |||
61 | err = x->mode->output(x, skb); | 66 | err = x->mode->output(x, skb); |
62 | if (err) | 67 | if (err) |
63 | goto error; | 68 | goto error; |