Commit c802db11 authored by Haiyang Zhang's avatar Haiyang Zhang Committed by David S. Miller

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: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3f3e7ce4
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <linux/inetdevice.h> #include <linux/inetdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/if_vlan.h>
#include <linux/in.h> #include <linux/in.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <net/arp.h> #include <net/arp.h>
...@@ -284,7 +285,7 @@ int netvsc_recv_callback(struct hv_device *device_obj, ...@@ -284,7 +285,7 @@ int netvsc_recv_callback(struct hv_device *device_obj,
skb->protocol = eth_type_trans(skb, net); skb->protocol = eth_type_trans(skb, net);
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
skb->vlan_tci = packet->vlan_tci; __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), packet->vlan_tci);
net->stats.rx_packets++; net->stats.rx_packets++;
net->stats.rx_bytes += packet->total_data_buflen; net->stats.rx_bytes += packet->total_data_buflen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment