Skip to contentSkip to conversation

NET: Fix ipv6 GSO payload length

PATCH Applied Michael Chan 3 participants 3 messages Jun 30, 2006 – Jul 4, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NET: Fix ipv6 GSO payload length

Fix ipv6 GSO payload length calculation.

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

net/ipv6/ipv6_sockglue.c +2 -1
index 25f8bf8..2d622d1 100644
@@ -112,7 +112,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:
#1 lore raw
Quoted 6 lines · Michael Chan

Fix ipv6 GSO payload length calculation.

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

Looks good to me. Thanks for cathcing this!

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
maintainer Applied
#2 lore raw

From: Herbert Xu <[email protected]>
Date: Sat, 1 Jul 2006 13:44:46 +1000

Quoted 9 lines · Michael Chan
Quoted 6 lines

Fix ipv6 GSO payload length calculation.

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

Looks good to me. Thanks for cathcing this!

Applied, thanks Michael.