summaryrefslogtreecommitdiff
path: root/net/ipv4/ah4.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-09 00:25:53 (GMT)
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 23:54:54 (GMT)
commit436a0a402203d5a47d2edf7e4dde6c08a7257983 (patch)
treeb47e73326a2ff7dbf8ac3fbcb6c4acea5c06619d /net/ipv4/ah4.c
parent83815dea47cf3e98ccbb6aecda08cba1ba91208f (diff)
downloadlinux-436a0a402203d5a47d2edf7e4dde6c08a7257983.tar.xz
[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/ipv4/ah4.c')
-rw-r--r--net/ipv4/ah4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index dc1d8e8..58af298 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -96,8 +96,7 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb)
ah->reserved = 0;
ah->spi = x->id.spi;
- ah->seq_no = htonl(++x->replay.oseq);
- xfrm_aevent_doreplay(x);
+ ah->seq_no = htonl(XFRM_SKB_CB(skb)->seq);
err = ah_mac_digest(ahp, skb, ah->auth_data);
if (err)
goto error;
@@ -297,6 +296,7 @@ static struct xfrm_type ah_type =
.description = "AH4",
.owner = THIS_MODULE,
.proto = IPPROTO_AH,
+ .flags = XFRM_TYPE_REPLAY_PROT,
.init_state = ah_init_state,
.destructor = ah_destroy,
.input = ah_input,