Commit c802db1164f28e62c6a43132b8d290cb8113f2ac
Committed by
David S. Miller
1 parent
3f3e7ce4ff
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
hyperv: Fix vlan_proto setting in netvsc_recv_callback()
Since the recent addition of 8021AD, we need to set the new field vlan_proto in sk_buff. Otherwise, it will trigger BUG() call in vlan_proto_idx(). This patch fixes the problem. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff
drivers/net/hyperv/netvsc_drv.c
... | ... | @@ -31,6 +31,7 @@ |
31 | 31 | #include <linux/inetdevice.h> |
32 | 32 | #include <linux/etherdevice.h> |
33 | 33 | #include <linux/skbuff.h> |
34 | +#include <linux/if_vlan.h> | |
34 | 35 | #include <linux/in.h> |
35 | 36 | #include <linux/slab.h> |
36 | 37 | #include <net/arp.h> |
... | ... | @@ -284,7 +285,7 @@ |
284 | 285 | |
285 | 286 | skb->protocol = eth_type_trans(skb, net); |
286 | 287 | skb->ip_summed = CHECKSUM_NONE; |
287 | - skb->vlan_tci = packet->vlan_tci; | |
288 | + __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), packet->vlan_tci); | |
288 | 289 | |
289 | 290 | net->stats.rx_packets++; |
290 | 291 | net->stats.rx_bytes += packet->total_data_buflen; |