net: core: don't account for udp header size when computing seglen
authorFlorian Westphal <fw@strlen.de>
Wed, 9 Apr 2014 08:28:50 +0000 (10:28 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 29 May 2014 09:38:30 +0000 (11:38 +0200)
commit6a80e19b4cc257a0291920157a6c1749e138e268
tree8abb53903f890c8e14e95d67d38a5d6e022b0fcd
parent528738eb2da4924b5f8d74e99945bca1f9ca7bbd
net: core: don't account for udp header size when computing seglen

[ Upstream commit 6d39d589bb76ee8a1c6cde6822006ae0053decff ]

In case of tcp, gso_size contains the tcpmss.

For UFO (udp fragmentation offloading) skbs, gso_size is the fragment
payload size, i.e. we must not account for udp header size.

Otherwise, when using virtio drivers, a to-be-forwarded UFO GSO packet
will be needlessly fragmented in the forward path, because we think its
individual segments are too large for the outgoing link.

Fixes: fe6cc55f3a9a053 ("net: ip, ipv6: handle gso skbs in forwarding path")
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Reported-by: Tobias Brunner <tobias@strongswan.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/core/skbuff.c