projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aa2723
)
Fix the VLAN_TAG_PRESENT in netvsc_recv_callback()
author
Haiyang Zhang
<
[email protected]
>
Mon, 17 Jun 2013 22:36:49 +0000
(15:36 -0700)
committer
David S. Miller
<
[email protected]
>
Mon, 17 Jun 2013 22:58:11 +0000
(15:58 -0700)
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]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/hyperv/netvsc_drv.c
patch
|
blob
|
history
diff --git
a/drivers/net/hyperv/netvsc_drv.c
b/drivers/net/hyperv/netvsc_drv.c
index ab2307b5d9a7c881cff59aabdc35b20823d14cd9..4dccead586bee57a076be015478809ea82e7157e 100644
(file)
--- a/
drivers/net/hyperv/netvsc_drv.c
+++ b/
drivers/net/hyperv/netvsc_drv.c
@@
-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;