mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
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>
This commit is contained in:
parent
dd8b3a802b
commit
1fd54773c2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user