mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
udp: allow header check for dodgy GSO_UDP_L4 packets.
commit 1fd54773c2 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fe22370706
commit
f308e79182
@@ -387,7 +387,8 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
|
|||||||
if (!pskb_may_pull(skb, sizeof(struct udphdr)))
|
if (!pskb_may_pull(skb, sizeof(struct udphdr)))
|
||||||
goto out;
|
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);
|
return __udp_gso_segment(skb, features, false);
|
||||||
|
|
||||||
mss = skb_shinfo(skb)->gso_size;
|
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)))
|
if (!pskb_may_pull(skb, sizeof(struct udphdr)))
|
||||||
goto out;
|
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);
|
return __udp_gso_segment(skb, features, true);
|
||||||
|
|
||||||
mss = skb_shinfo(skb)->gso_size;
|
mss = skb_shinfo(skb)->gso_size;
|
||||||
|
|||||||
Reference in New Issue
Block a user