diff --git a/net/core/dev.c b/net/core/dev.c index e86ef1a1647ec..96e093e2206f4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3787,7 +3787,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),