diff options
author | Andrew Melnychenko <andrew@daynix.com> | 2022-12-07 13:35:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-12-12 09:29:56 +0000 |
commit | 1fd54773c26787b9aea80e2f62c7d0780ea444d0 (patch) | |
tree | 46efb46e4553a8d47ed613d277a40eb5cc8b83ce /net/ipv6 | |
parent | dd8b3a802b64adf059a49a68f1bdca7846e492fc (diff) |
udp: allow header check for dodgy GSO_UDP_L4 packets.
Allow UDP_L4 for robust packets.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/udp_offload.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c index e0e10f6bcdc1..c39c1e32f980 100644 --- a/net/ipv6/udp_offload.c +++ b/net/ipv6/udp_offload.c @@ -42,7 +42,8 @@ static struct sk_buff *udp6_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, true); mss = skb_shinfo(skb)->gso_size; |