]> err.no Git - linux-2.6/commitdiff
[IPV6]: Fix ipv6 GSO payload length
authorMichael Chan <mchan@broadcom.com>
Tue, 4 Jul 2006 02:41:11 +0000 (19:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jul 2006 02:41:11 +0000 (19:41 -0700)
Fix ipv6 GSO payload length calculation.

The ipv6 payload length excludes the ipv6 base header length and so
must be subtracted.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ipv6_sockglue.c

index ec59344478d27eafb79c5ee88c0dbfc6e858f542..0c17dec11c8d1215725f780666056f8304ecf25f 100644 (file)
@@ -119,7 +119,8 @@ unlock:
 
        for (skb = segs; skb; skb = skb->next) {
                ipv6h = skb->nh.ipv6h;
-               ipv6h->payload_len = htons(skb->len - skb->mac_len);
+               ipv6h->payload_len = htons(skb->len - skb->mac_len -
+                                          sizeof(*ipv6h));
        }
 
 out: