]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/net/tap.c
can: xilinx_can: fix RX overflow interrupt not being enabled
[mirror_ubuntu-bionic-kernel.git] / drivers / net / tap.c
index 0a886fda01291efb5a6beb0a2b5eb2123c1f05ab..afbe5bec2c332872575c6cd47442036370770422 100644 (file)
@@ -777,13 +777,16 @@ static ssize_t tap_put_user(struct tap_queue *q,
        int total;
 
        if (q->flags & IFF_VNET_HDR) {
+               int vlan_hlen = skb_vlan_tag_present(skb) ? VLAN_HLEN : 0;
                struct virtio_net_hdr vnet_hdr;
+
                vnet_hdr_len = READ_ONCE(q->vnet_hdr_sz);
                if (iov_iter_count(iter) < vnet_hdr_len)
                        return -EINVAL;
 
                if (virtio_net_hdr_from_skb(skb, &vnet_hdr,
-                                           tap_is_little_endian(q), true))
+                                           tap_is_little_endian(q), true,
+                                           vlan_hlen))
                        BUG();
 
                if (copy_to_iter(&vnet_hdr, sizeof(vnet_hdr), iter) !=