]> git.baikalelectronics.ru Git - kernel.git/commit
udp: never accept GSO_FRAGLIST packets
authorPaolo Abeni <pabeni@redhat.com>
Tue, 30 Mar 2021 10:28:52 +0000 (12:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Mar 2021 00:06:49 +0000 (17:06 -0700)
commit4470f3af9ebebf7f21534d57d404e6d128b9e9a1
tree9b837e7ef006636b83b42fb98102429058003345
parentc897604f7b1dbd6264f4a2ed641122e9aae73e43
udp: never accept GSO_FRAGLIST packets

Currently the UDP protocol delivers GSO_FRAGLIST packets to
the sockets without the expected segmentation.

This change addresses the issue introducing and maintaining
a couple of new fields to explicitly accept SKB_GSO_UDP_L4
or GSO_FRAGLIST packets. Additionally updates  udp_unexpected_gso()
accordingly.

UDP sockets enabling UDP_GRO stil keep accept_udp_fraglist
zeroed.

v1 -> v2:
 - use 2 bits instead of a whole GSO bitmask (Willem)

Fixes: 8adbd0e6dafc ("udp: Support UDP fraglist GRO/GSO.")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/udp.h
net/ipv4/udp.c