Commit 1fd54773 authored by Andrew Melnychenko's avatar Andrew Melnychenko Committed by David S. Miller

udp: allow header check for dodgy GSO_UDP_L4 packets.

Allow UDP_L4 for robust packets.
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarAndrew Melnychenko <andrew@daynix.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dd8b3a80
......@@ -387,7 +387,8 @@ 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;
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment