summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2021-12-20 09:50:27 -0500
committerJakub Kicinski <kuba@kernel.org>2021-12-20 18:47:37 -0800
commit1ed1d592113959f00cc552c3b9f47ca2d157768f (patch)
tree38c8f57fc5231b57a47b0b0b5f98327f244d89d9 /drivers
parent7e5cced9ca84df52d874aca6b632f930b3dc5bc6 (diff)
net: skip virtio_net_hdr_set_proto if protocol already set
virtio_net_hdr_set_proto infers skb->protocol from the virtio_net_hdr gso_type, to avoid packets getting dropped for lack of a proto type. Its protocol choice is a guess, especially in the case of UFO, where the single VIRTIO_NET_HDR_GSO_UDP label covers both UFOv4 and UFOv6. Skip this best effort if the field is already initialized. Whether explicitly from userspace, or implicitly based on an earlier call to dev_parse_header_protocol (which is more robust, but was introduced after this patch). Fixes: 9d2f67e43b73 ("net/packet: fix packet drop as of virtio gso") Signed-off-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/20211220145027.2784293-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions