From: Steffen Klassert Date: Mon, 25 Apr 2011 19:40:23 +0000 (+0000) Subject: esp6: Fix scatterlist initialization X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c0a56e64aec331f33ead29ba493ee184d9bdc840;p=mv-sheeva.git esp6: Fix scatterlist initialization When we use IPsec extended sequence numbers, we may overwrite the last scatterlist of the associated data by the scatterlist for the skb. This patch fixes this by placing the scatterlist for the skb right behind the last scatterlist of the associated data. esp4 does it already like that. Signed-off-by: Steffen Klassert Acked-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 5aa8ec88f19..59dccfbb5b1 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -371,7 +371,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) iv = esp_tmp_iv(aead, tmp, seqhilen); req = esp_tmp_req(aead, iv); asg = esp_req_sg(aead, req); - sg = asg + 1; + sg = asg + sglists; skb->ip_summed = CHECKSUM_NONE;