summaryrefslogtreecommitdiff
path: root/drivers/net/Space.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2016-03-08 15:18:54 -0500
committerSasha Levin <sasha.levin@oracle.com>2016-07-10 23:07:03 -0400
commit686263920d666722c42b5347123113bd85ec67cc (patch)
tree072d1324dba89badc8d48c1ef68dbfcf7fc63663 /drivers/net/Space.c
parent5284ee1e9da2f8f78b5b800109ef4c436c58876d (diff)
macvtap: always pass ethernet header in linear
[ Upstream commit 8e2ad4113ce4671686740f808ff2795395c39eef ] The stack expects link layer headers in the skb linear section. Macvtap can create skbs with llheader in frags in edge cases: when (IFF_VNET_HDR is off or vnet_hdr.hdr_len < ETH_HLEN) and prepad + len > PAGE_SIZE and vnet_hdr.flags has no or bad csum. Add checks to ensure linear is always at least ETH_HLEN. At this point, len is already ensured to be >= ETH_HLEN. For backwards compatiblity, rounds up short vnet_hdr.hdr_len. This differs from tap and packet, which return an error. Fixes b9fb9ee07e67 ("macvtap: add GSO/csum offload support") Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers/net/Space.c')
0 files changed, 0 insertions, 0 deletions