Fix the VLAN_TAG_PRESENT in netvsc_recv_callback()
Subsystems (3)
Haiyang Zhang
maintainerPATCH 1/1 Fix the VLAN_TAG_PRESENT in netvsc_recv_callback()
We should call __vlan_hwaccel_put_tag() only if the packet comes from vlan, otherwise VLAN_TAG_PRESENT will always be added.
Reported-by Olaf Hering <[email protected]>
Signed-off-by Haiyang Zhang <[email protected]>
Reviewed-by K. Y. Srinivasan <[email protected]>
--- drivers/net/hyperv/netvsc_drv.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/net/hyperv/netvsc_drv.c +3 -1
@@ -285,7 +285,9 @@ int netvsc_recv_callback(struct hv_device *device_obj, skb->protocol =eth_type_trans (skb, net); skb->ip_summed =CHECKSUM_NONE ; -__vlan_hwaccel_put_tag (skb,htons (ETH_P_8021Q ), packet->vlan_tci); +if (packet->vlan_tci &VLAN_TAG_PRESENT ) +__vlan_hwaccel_put_tag (skb,htons (ETH_P_8021Q ), + packet->vlan_tci); net->stats.rx_packets++; net->stats.rx_bytes += packet->total_data_buflen;
Signature · 1 line
1.7.4.1
From: Haiyang Zhang <[email protected]>
Date: Mon, 17 Jun 2013 15:36:49 -0700
Quoted 7 lines
We should call
__vlan_hwaccel_put_tag()only if the packet comes from vlan, otherwiseVLAN_TAG_PRESENTwill always be added.Reported-by Olaf Hering <[email protected]>Signed-off-by Haiyang Zhang <[email protected]>Reviewed-by K. Y. Srinivasan <[email protected]>
Applied, thanks.