Commit 71c6bd5a authored by Herbert Xu's avatar Herbert Xu Committed by Greg Kroah-Hartman

ipv6: Add GSO support on forwarding path

commit 0aa68271 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: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarApollon Oikonomopoulos <apoikos@gmail.com>
Signed-off-by: default avatarFaidon Liambotis <paravoid@debian.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3b454d6b
......@@ -510,7 +510,7 @@ int ip6_forward(struct sk_buff *skb)
}
}
if (skb->len > dst_mtu(dst)) {
if (skb->len > dst_mtu(dst) && !skb_is_gso(skb)) {
/* Again, force OUTPUT device used as source address */
skb->dev = dst->dev;
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst_mtu(dst), skb->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment