Linux/linux 65ec0bddrivers/net/vmxnet3 vmxnet3_drv.c vmxnet3_int.h

vmxnet3: fix incorrect dereference when rxvlan is disabled

vmxnet3_get_hdr_len() is used to calculate the header length which in
turn is used to calculate the gso_size for skb. When rxvlan offload is
disabled, vlan tag is present in the header and the function references
ip header from sizeof(ethhdr) and leads to incorrect pointer reference.

This patch fixes this issue by taking sizeof(vlan_ethhdr) into account
if vlan tag is present and correctly references the ip hdr.

Signed-off-by: Ronak Doshi <doshir at vmware.com>
Acked-by: Guolin Yang <gyang at vmware.com>
Acked-by: Louis Luo <llouis at vmware.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
DeltaFile
+13-4drivers/net/vmxnet3/vmxnet3_drv.c
+2-2drivers/net/vmxnet3/vmxnet3_int.h
+15-62 files

UnifiedSplitRaw