]> err.no Git - linux-2.6/commitdiff
[IPSEC]: Fix IPv6 AH calculation in outbound
authorKazunori MIYAZAWA <miyazawa@linux-ipv6.org>
Fri, 25 May 2007 08:22:25 +0000 (01:22 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 31 May 2007 08:23:25 +0000 (01:23 -0700)
Signed-off-by: Kazunori MIYAZAWA <miyazawa@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ah6.c

index b696c8401200b64c7775f85c511bad6e026d292b..128f94c79c641e462d62e3a762e92b00ab2fb0dc 100644 (file)
@@ -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);