From: Herbert Xu Date: Thu, 27 May 2010 23:14:30 +0000 (-0700) Subject: ipv6: Add GSO support on forwarding path X-Git-Tag: v2.6.34.13~142 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90902c3233c4033050d5378ab3614881ee47d37b;p=thirdparty%2Fkernel%2Fstable.git ipv6: Add GSO support on forwarding path commit 0aa68271510ae2b221d4b60892103837be63afe4 upstream. Currently we disallow GSO packets on the IPv6 forward path. This patch fixes this. Note that I discovered that our existing GSO MTU checks (e.g., IPv4 forwarding) are buggy in that they skip the check altogether, when they really should be checking gso_size + header instead. I have also been lazy here in that I haven't bothered to segment the GSO packet by hand before generating an ICMP message. Someone should add that to be 100% correct. Reported-by: Ralf Baechle Signed-off-by: Herbert Xu Signed-off-by: David S. Miller Signed-off-by: Paul Gortmaker --- diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 60daecc77b66b..2d55954c0a90c 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -514,7 +514,7 @@ int ip6_forward(struct sk_buff *skb) if (mtu < IPV6_MIN_MTU) mtu = IPV6_MIN_MTU; - if (skb->len > mtu) { + if (skb->len > mtu && !skb_is_gso(skb)) { /* Again, force OUTPUT device used as source address */ skb->dev = dst->dev; icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);