From: Kazunori MIYAZAWA Date: Fri, 25 May 2007 08:22:25 +0000 (-0700) Subject: [IPSEC]: Fix IPv6 AH calculation in outbound X-Git-Tag: v2.6.22-rc4~70^2~17 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=144466bdf8c479ae36678ace7a3b8e8b748df6f6;p=linux-2.6-omap-h63xx.git [IPSEC]: Fix IPv6 AH calculation in outbound Signed-off-by: Kazunori MIYAZAWA Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index b696c840120..128f94c79c6 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -247,7 +247,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) memcpy(tmp_base, top_iph, sizeof(tmp_base)); tmp_ext = NULL; - extlen = skb_transport_offset(skb) + sizeof(struct ipv6hdr); + extlen = skb_transport_offset(skb) - sizeof(struct ipv6hdr); if (extlen) { extlen += sizeof(*tmp_ext); tmp_ext = kmalloc(extlen, GFP_ATOMIC);