Skip to content
Commit 65ec0bd1 authored by Ronak Doshi's avatar Ronak Doshi Committed by David S. Miller
Browse files

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: default avatarRonak Doshi <doshir@vmware.com>
Acked-by: default avatarGuolin Yang <gyang@vmware.com>
Acked-by: default avatarLouis Luo <llouis@vmware.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f7e43672
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