Source
705
705
skb_reset_mac_header(skb);
706
706
skb->protocol = eth_hdr(skb)->h_proto;
707
707
708
708
if (vnet_hdr_len) {
709
709
err = virtio_net_hdr_to_skb(skb, &vnet_hdr,
710
710
tap_is_little_endian(q));
711
711
if (err)
712
712
goto err_kfree;
713
713
}
714
714
715
-
skb_probe_transport_header(skb, ETH_HLEN);
715
+
skb_probe_transport_header(skb);
716
716
717
717
/* Move network header to the right position for VLAN tagged packets */
718
718
if ((skb->protocol == htons(ETH_P_8021Q) ||
719
719
skb->protocol == htons(ETH_P_8021AD)) &&
720
720
__vlan_get_protocol(skb, skb->protocol, &depth) != 0)
721
721
skb_set_network_header(skb, depth);
722
722
723
723
rcu_read_lock();
724
724
tap = rcu_dereference(q->tap);
725
725
/* copy skb_ubuf_info for callback when skb has no error */
1180
1180
/* Move network header to the right position for VLAN tagged packets */
1181
1181
if ((skb->protocol == htons(ETH_P_8021Q) ||
1182
1182
skb->protocol == htons(ETH_P_8021AD)) &&
1183
1183
__vlan_get_protocol(skb, skb->protocol, &depth) != 0)
1184
1184
skb_set_network_header(skb, depth);
1185
1185
1186
1186
rcu_read_lock();
1187
1187
tap = rcu_dereference(q->tap);
1188
1188
if (tap) {
1189
1189
skb->dev = tap->dev;
1190
-
skb_probe_transport_header(skb, ETH_HLEN);
1190
+
skb_probe_transport_header(skb);
1191
1191
dev_queue_xmit(skb);
1192
1192
} else {
1193
1193
kfree_skb(skb);
1194
1194
}
1195
1195
rcu_read_unlock();
1196
1196
1197
1197
return 0;
1198
1198
1199
1199
err_kfree:
1200
1200
kfree_skb(skb);