Skip to content

Commit 3bf28ce

Browse files
tobiasbrunnergregkh
authored andcommitted
esp4: Fix integrity verification when ESN are used
commit 7c7fedd51c02f4418e8b2eed64bdab601f882aa4 upstream. When handling inbound packets, the two halves of the sequence number stored on the skb are already in network order. Fixes: 7021b2e ("esp4: Switch to new AEAD interface") Signed-off-by: Tobias Brunner <tobias@strongswan.org> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2176ec1 commit 3bf28ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/ipv4/esp4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
476476
esph = (void *)skb_push(skb, 4);
477477
*seqhi = esph->spi;
478478
esph->spi = esph->seq_no;
479-
esph->seq_no = htonl(XFRM_SKB_CB(skb)->seq.input.hi);
479+
esph->seq_no = XFRM_SKB_CB(skb)->seq.input.hi;
480480
aead_request_set_callback(req, 0, esp_input_done_esn, skb);
481481
}
482482

0 commit comments

Comments
 (0)