]> git.baikalelectronics.ru Git - kernel.git/commit
udp: disallow UFO for sockets with SO_NO_CHECK option
authorMichal Kubeček <mkubecek@suse.cz>
Mon, 11 Jan 2016 06:50:30 +0000 (07:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jan 2016 22:40:57 +0000 (17:40 -0500)
commit9bbdbbe3ae9fcb8bc7ce8445cd2ca35cdd8cd442
tree3718c7179545b58a97d956881860846fc85597a1
parentc5b5e251de3ebcf72a378456904a5ae5a9aca9ad
udp: disallow UFO for sockets with SO_NO_CHECK option

Commit 741ce2747fac ("udp: only allow UFO for packets from SOCK_DGRAM
sockets") disallows UFO for packets sent from raw sockets. We need to do
the same also for SOCK_DGRAM sockets with SO_NO_CHECK options, even if
for a bit different reason: while such socket would override the
CHECKSUM_PARTIAL set by ip_ufo_append_data(), gso_size is still set and
bad offloading flags warning is triggered in __skb_gso_segment().

In the IPv6 case, SO_NO_CHECK option is ignored but we need to disallow
UFO for packets sent by sockets with UDP_NO_CHECK6_TX option.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Tested-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c
net/ipv6/ip6_output.c