diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 6ef0b737d548..672492b9458f 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h @@ -420,10 +420,13 @@ virtio_net_hdr_tnl_from_skb(const struct sk_buff *skb, vhdr->hash_hdr.hash_report = 0; vhdr->hash_hdr.padding = 0; - /* Let the basic parsing deal with plain GSO features. */ - skb_shinfo(skb)->gso_type &= ~tnl_gso_type; + /* The basic parsing will look only for the transport header, + * let it refer to the relevant one + */ + outer_th = skb->transport_header - skb_headroom(skb); + skb->transport_header = skb->inner_transport_header; ret = virtio_net_hdr_from_skb(skb, hdr, true, false, vlan_hlen); - skb_shinfo(skb)->gso_type |= tnl_gso_type; + skb->transport_header = outer_th + skb_headroom(skb); if (ret) return ret;