summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ipv6_sockglue.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2006-07-04 04:41:11 +0200
committerDavid S. Miller <davem@davemloft.net>2006-07-04 04:41:11 +0200
commit6703931c546e6dec0431776fa616d5accd3e7162 (patch)
tree69b5b001f9d8f6e639878215dc81dc77186eb398 /net/ipv6/ipv6_sockglue.c
parent[TIPC] Fixed sk_buff panic caused by tipc_link_bundle_buf (REVISED) (diff)
downloadlinux-6703931c546e6dec0431776fa616d5accd3e7162.tar.xz
linux-6703931c546e6dec0431776fa616d5accd3e7162.zip
[IPV6]: 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. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r--net/ipv6/ipv6_sockglue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index ec59344478d2..0c17dec11c8d 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -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: