From: Kazunori MIYAZAWA Date: Fri, 25 May 2007 08:22:25 +0000 (-0700) Subject: [IPSEC]: Fix IPv6 AH calculation in outbound X-Git-Tag: v3.12-rc1~29240^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=144466bdf8c479ae36678ace7a3b8e8b748df6f6;p=kernel%2Fkernel-generic.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 b696c84..128f94c 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);