aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/esp6.c
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2011-03-07 19:06:31 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-13 23:22:28 -0400
commit1ce3644ade9c865c755bf0f6a4e109b7bb6eb60f (patch)
tree14ce0727337a43d1fa28432d01189d1a5f4269c7 /net/ipv6/esp6.c
parent9736acf395d3608583a7be70f62800b494fa103c (diff)
xfrm: Use separate low and high order bits of the sequence numbers in xfrm_skb_cb
To support IPsec extended sequence numbers, we split the output sequence numbers of xfrm_skb_cb in low and high order 32 bits and we add the high order 32 bits to the input sequence numbers. All users are updated accordingly. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/esp6.c')
-rw-r--r--net/ipv6/esp6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 1b5c9825743b..c7b5d5ee0dee 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -204,7 +204,7 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
204 *skb_mac_header(skb) = IPPROTO_ESP; 204 *skb_mac_header(skb) = IPPROTO_ESP;
205 205
206 esph->spi = x->id.spi; 206 esph->spi = x->id.spi;
207 esph->seq_no = htonl(XFRM_SKB_CB(skb)->seq.output); 207 esph->seq_no = htonl(XFRM_SKB_CB(skb)->seq.output.low);
208 208
209 sg_init_table(sg, nfrags); 209 sg_init_table(sg, nfrags);
210 skb_to_sgvec(skb, sg, 210 skb_to_sgvec(skb, sg,
@@ -216,7 +216,7 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
216 aead_givcrypt_set_crypt(req, sg, sg, clen, iv); 216 aead_givcrypt_set_crypt(req, sg, sg, clen, iv);
217 aead_givcrypt_set_assoc(req, asg, sizeof(*esph)); 217 aead_givcrypt_set_assoc(req, asg, sizeof(*esph));
218 aead_givcrypt_set_giv(req, esph->enc_data, 218 aead_givcrypt_set_giv(req, esph->enc_data,
219 XFRM_SKB_CB(skb)->seq.output); 219 XFRM_SKB_CB(skb)->seq.output.low);
220 220
221 ESP_SKB_CB(skb)->tmp = tmp; 221 ESP_SKB_CB(skb)->tmp = tmp;
222 err = crypto_aead_givencrypt(req); 222 err = crypto_aead_givencrypt(req);