[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220907125048.396126-2-andrew@daynix.com>
Date: Wed, 7 Sep 2022 15:50:43 +0300
From: Andrew Melnychenko <andrew@...nix.com>
To: edumazet@...gle.com, netdev@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
jasowang@...hat.com, mst@...hat.com, pabeni@...hat.com,
yoshfuji@...ux-ipv6.org, dsahern@...nel.org
Cc: yan@...nix.com, yuri.benditovich@...nix.com
Subject: [PATCH v3 1/6] udp: allow header check for dodgy GSO_UDP_L4 packets.
Packets from TAP devices with USO offload converts
to GSO_UDP_L4 & GSO_DODGY sk buffers.
Added changes allow skipping segmentation for DODGY/ROBUST packets.
Signed-off-by: Jason Wang <jasowang@...hat.com>
Signed-off-by: Andrew Melnychenko <andrew@...nix.com>
---
net/ipv4/udp_offload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 6d1a4bec2614..8e002419b4d5 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -387,7 +387,7 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
if (!pskb_may_pull(skb, sizeof(struct udphdr)))
goto out;
- if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4)
+ if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4 && !skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
return __udp_gso_segment(skb, features, false);
mss = skb_shinfo(skb)->gso_size;
--
2.37.2
Powered by blists - more mailing lists