diff options
author | Willem de Bruijn <willemb@google.com> | 2016-03-08 23:18:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-11 22:45:21 +0300 |
commit | 8e2ad4113ce4671686740f808ff2795395c39eef (patch) | |
tree | 864a6adc34ad064f7c9ffae05e15776078c4224e /lib/locking-selftest-wlock.h | |
parent | 8208d21bf309551686b7a76d19059ae182a956d0 (diff) | |
download | linux-8e2ad4113ce4671686740f808ff2795395c39eef.tar.xz |
macvtap: always pass ethernet header in linear
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>
Diffstat (limited to 'lib/locking-selftest-wlock.h')
0 files changed, 0 insertions, 0 deletions