diff --git a/net/core/dev.c b/net/core/dev.c index b5c9648c2192f..916a095eaee27 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3435,7 +3435,7 @@ static void qdisc_pkt_len_init(struct sk_buff *skb) sizeof(_tcphdr), &_tcphdr); if (likely(th)) hdr_len += __tcp_hdrlen(th); - } else { + } else if (shinfo->gso_type & SKB_GSO_UDP_L4) { struct udphdr _udphdr; if (skb_header_pointer(skb, skb_transport_offset(skb),