netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] NET: Fix ipv6 GSO payload length
@ 2006-06-30 22:56 Michael Chan
  2006-07-01  3:44 ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Chan @ 2006-06-30 22:56 UTC (permalink / raw)
  To: davem, herbert; +Cc: netdev

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>


diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 25f8bf8..2d622d1 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -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:



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-04  2:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30 22:56 [PATCH] NET: Fix ipv6 GSO payload length Michael Chan
2006-07-01  3:44 ` Herbert Xu
2006-07-04  2:41   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).