macvtap: do not assume 802.1Q when send vlan packets
authorJason Wang <jasowang@redhat.com>
Tue, 16 Jul 2013 05:36:34 +0000 (13:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jul 2013 20:01:57 +0000 (13:01 -0700)
The hard-coded 8021.q proto will break 802.1ad traffic. So switch to use
vlan->proto.

Cc: Basil Gor <basil.gor@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvtap.c

index 0e5492ec753ab13508bf83d4042651e15e708362..a7c5654a2e5ce188a566d1518b485c40cc5b81c1 100644 (file)
@@ -873,7 +873,7 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,
                        __be16 h_vlan_proto;
                        __be16 h_vlan_TCI;
                } veth;
-               veth.h_vlan_proto = htons(ETH_P_8021Q);
+               veth.h_vlan_proto = skb->vlan_proto;
                veth.h_vlan_TCI = htons(vlan_tx_tag_get(skb));
 
                vlan_offset = offsetof(struct vlan_ethhdr, h_vlan_proto);