ipv6: Add GSO support on forwarding path
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 <ralf@linux-mips.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
a47311380e
Коммит
0aa6827151
|
@ -507,7 +507,7 @@ int ip6_forward(struct sk_buff *skb)
|
||||||
if (mtu < IPV6_MIN_MTU)
|
if (mtu < IPV6_MIN_MTU)
|
||||||
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 */
|
/* Again, force OUTPUT device used as source address */
|
||||||
skb->dev = dst->dev;
|
skb->dev = dst->dev;
|
||||||
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
|
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче