No description
Find a file
Hangbin Liu c2137d565c net/af_packet: add VLAN support for AF_PACKET SOCK_RAW GSO
commit dfed913e8b upstream.

Currently, the kernel drops GSO VLAN tagged packet if it's created with
socket(AF_PACKET, SOCK_RAW, 0) plus virtio_net_hdr.

The reason is AF_PACKET doesn't adjust the skb network header if there is
a VLAN tag. Then after virtio_net_hdr_set_proto() called, the skb->protocol
will be set to ETH_P_IP/IPv6. And in later inet/ipv6_gso_segment() the skb
is dropped as network header position is invalid.

Let's handle VLAN packets by adjusting network header position in
packet_parse_headers(). The adjustment is safe and does not affect the
later xmit as tap device also did that.

In packet_snd(), packet_parse_headers() need to be moved before calling
virtio_net_hdr_set_proto(), so we can set correct skb->protocol and
network header first.

There is no need to update tpacket_snd() as it calls packet_parse_headers()
in tpacket_fill_skb(), which is already before calling virtio_net_hdr_*
functions.

skb->no_fcs setting is also moved upper to make all skb settings together
and keep consistency with function packet_sendmsg_spkt().

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20220425014502.985464-1-liuhangbin@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-14 10:16:29 +01:00
arch powerpc/rtas: avoid scheduling in rtas_os_term() 2023-01-14 10:16:26 +01:00
block blk-mq: fix possible memleak when register 'hctx' failed 2023-01-14 10:16:19 +01:00
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist 2022-06-22 14:13:17 +02:00
crypto crypto: tcrypt - Fix multibuffer skcipher speed test mem leak 2023-01-14 10:15:50 +01:00
Documentation ASoC: dt-bindings: wcd9335: fix reset line polarity in example 2023-01-14 10:15:33 +01:00
drivers wifi: rtlwifi: 8192de: correct checking of IQK reload 2023-01-14 10:16:29 +01:00
fs f2fs: should put a page when checking the summary info 2023-01-14 10:16:27 +01:00
include ASoC/SoundWire: dai: expand 'stream' concept beyond SoundWire 2023-01-14 10:16:28 +01:00
init init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash 2022-12-02 17:40:03 +01:00
io_uring io_uring: pass in EPOLL_URING_WAKE for eventfd signaling and wakeups 2023-01-04 11:39:24 +01:00
ipc ipc/sem: Fix dangling sem_array access in semtimedop race 2022-12-08 11:24:00 +01:00
kernel rcu: Prevent lockdep-RCU splats on lock acquisition/release 2023-01-14 10:16:29 +01:00
lib net: switch to storing KCOV handle directly in sk_buff 2023-01-14 10:16:10 +01:00
LICENSES
mm mm, compaction: fix fast_isolate_around() to stay within boundaries 2023-01-14 10:16:27 +01:00
net net/af_packet: add VLAN support for AF_PACKET SOCK_RAW GSO 2023-01-14 10:16:29 +01:00
samples samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe() 2023-01-14 10:16:01 +01:00
scripts scripts/faddr2line: Fix regression in name resolution on ppc64le 2022-12-08 11:23:54 +01:00
security ima: Simplify ima_lsm_copy_rule 2023-01-14 10:16:22 +01:00
sound ASoC/SoundWire: dai: expand 'stream' concept beyond SoundWire 2023-01-14 10:16:28 +01:00
tools torture: Exclude "NOHZ tick-stop error" from fatal errors 2023-01-14 10:16:29 +01:00
usr usr/include/Makefile: add linux/nfc.h to the compile-test coverage 2022-02-01 17:25:48 +01:00
virt kvm: Add support for arch compat vm ioctls 2022-10-30 09:41:15 +01:00
.clang-format RDMA 5.10 pull request 2020-10-17 11:18:18 -07:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
.mailmap mailmap: add two more addresses of Uwe Kleine-König 2020-12-06 10:19:07 -08:00
COPYING
CREDITS MAINTAINERS: Move Jason Cooper to CREDITS 2020-11-30 10:20:34 +01:00
Kbuild
Kconfig
MAINTAINERS futex: Move to kernel/futex/ 2023-01-14 10:15:20 +01:00
Makefile kbuild: refactor single builds of *.ko 2023-01-14 10:16:07 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.