Skip to content
Commit 4bb526bc authored by Michal Kubeček's avatar Michal Kubeček Committed by Greg Kroah-Hartman
Browse files

udp: disallow UFO for sockets with SO_NO_CHECK option



[ Upstream commit 40ba3302 ]

Commit acf8dd0a ("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: default avatarMichal Kubecek <mkubecek@suse.cz>
Tested-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e7bbeacb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment