Skip to content

Commit 54fc0c3

Browse files
committed
revert "net: account for current skb length when deciding about UFO"
This reverts commit ef09c9ff343122a0b245416066992d096416ff19 which is commit a5cb659bbc1c8644efa0c3138a757a1e432a4880 upstream as it causes merge issues with later patches that are much more important... Cc: Michal Kubecek <mkubecek@suse.cz> Cc: Vlad Yasevich <vyasevic@redhat.com> Cc: David S. Miller <davem@davemloft.net> Cc: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 63364a5 commit 54fc0c3

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

net/ipv4/ip_output.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,7 @@ static int __ip_append_data(struct sock *sk,
922922
csummode = CHECKSUM_PARTIAL;
923923

924924
cork->length += length;
925-
if ((((length + (skb ? skb->len : fragheaderlen)) > mtu) ||
926-
(skb && skb_is_gso(skb))) &&
925+
if ((((length + fragheaderlen) > mtu) || (skb && skb_is_gso(skb))) &&
927926
(sk->sk_protocol == IPPROTO_UDP) &&
928927
(rt->dst.dev->features & NETIF_F_UFO) && !rt->dst.header_len &&
929928
(sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx) {

net/ipv6/ip6_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ static int __ip6_append_data(struct sock *sk,
13571357
*/
13581358

13591359
cork->length += length;
1360-
if ((((length + (skb ? skb->len : headersize)) > mtu) ||
1360+
if ((((length + fragheaderlen) > mtu) ||
13611361
(skb && skb_is_gso(skb))) &&
13621362
(sk->sk_protocol == IPPROTO_UDP) &&
13631363
(rt->dst.dev->features & NETIF_F_UFO) &&

0 commit comments

Comments
 (0)