aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-08 17:25:53 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:54:54 -0700
commit436a0a402203d5a47d2edf7e4dde6c08a7257983 (patch)
treeb47e73326a2ff7dbf8ac3fbcb6c4acea5c06619d /net/xfrm
parent83815dea47cf3e98ccbb6aecda08cba1ba91208f (diff)
downloadkernel_samsung_smdk4412-436a0a402203d5a47d2edf7e4dde6c08a7257983.zip
kernel_samsung_smdk4412-436a0a402203d5a47d2edf7e4dde6c08a7257983.tar.gz
kernel_samsung_smdk4412-436a0a402203d5a47d2edf7e4dde6c08a7257983.tar.bz2
[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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 5b1c978..20e789d 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -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;