linux-brain/net/rxrpc
David Howells ce3460b90e rxrpc: Fix DATA Tx to disable nofrag for UDP on AF_INET6 socket
commit 0e631eee17dcea576ab922fa70e4fdbd596ee452 upstream.

Fix the DATA packet transmission to disable nofrag for UDPv4 on an AF_INET6
socket as well as UDPv6 when trying to transmit fragmentably.

Without this, packets filled to the normal size used by the kernel AFS
client of 1412 bytes be rejected by udp_sendmsg() with EMSGSIZE
immediately.  The ->sk_error_report() notification hook is called, but
rxrpc doesn't generate a trace for it.

This is a temporary fix; a more permanent solution needs to involve
changing the size of the packets being filled in accordance with the MTU,
which isn't currently done in AF_RXRPC.  The reason for not doing so was
that, barring the last packet in an rx jumbo packet, jumbos can only be
assembled out of 1412-byte packets - and the plan was to construct jumbos
on the fly at transmission time.

Also, there's no point turning on IPV6_MTU_DISCOVER, since IPv6 has to
engage in this anyway since fragmentation is only done by the sender.  We
can then condense the switch-statement in rxrpc_send_data_packet().

Fixes: 75b54cb57c ("rxrpc: Add IPv6 support")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-02 08:48:47 +02:00
..
af_rxrpc.c rxrpc: Fix call interruptibility handling 2020-04-17 10:49:57 +02:00
ar-internal.h rxrpc: Fix call interruptibility handling 2020-04-17 10:49:57 +02:00
call_accept.c rxrpc: Fix missing security check on incoming calls 2020-01-17 19:49:05 +01:00
call_event.c rxrpc: Use the tx-phase skb flag to simplify tracing 2019-08-27 10:04:18 +01:00
call_object.c rxrpc: Fix call interruptibility handling 2020-04-17 10:49:57 +02:00
conn_client.c rxrpc: Fix call interruptibility handling 2020-04-17 10:49:57 +02:00
conn_event.c rxrpc: Fix missing active use pinning of rxrpc_local object 2020-02-11 04:35:05 -08:00
conn_object.c rxrpc: Fix service call disconnection 2020-02-11 04:35:55 -08:00
conn_service.c rxrpc: Fix missing security check on incoming calls 2020-01-17 19:49:05 +01:00
input.c afs: Fix client call Rx-phase signal handling 2020-04-01 11:02:07 +02:00
insecure.c rxrpc: Fix -Wframe-larger-than= warnings from on-stack crypto 2019-07-30 10:32:35 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
key.c KEYS: Don't write out to userspace while holding key semaphore 2020-04-23 10:36:45 +02:00
local_event.c rxrpc: Use the tx-phase skb flag to simplify tracing 2019-08-27 10:04:18 +01:00
local_object.c rxrpc: Fix DATA Tx to disable nofrag for UDP on AF_INET6 socket 2020-05-02 08:48:47 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
misc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
net_ns.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00
output.c rxrpc: Fix DATA Tx to disable nofrag for UDP on AF_INET6 socket 2020-05-02 08:48:47 +02:00
peer_event.c rxrpc: Fix missing active use pinning of rxrpc_local object 2020-02-11 04:35:05 -08:00
peer_object.c rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record 2019-10-07 11:05:05 +01:00
proc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
protocol.h rxrpc: Improve jumbo packet counting 2019-08-27 09:48:37 +01:00
recvmsg.c rxrpc: Fix handling of last subpacket of jumbo packet 2019-10-31 12:23:09 -07:00
rxkad.c rxrpc: Fix missing security check on incoming calls 2020-01-17 19:49:05 +01:00
security.c rxrpc: Fix missing security check on incoming calls 2020-01-17 19:49:05 +01:00
sendmsg.c rxrpc: Fix call interruptibility handling 2020-04-17 10:49:57 +02:00
skbuff.c rxrpc: Use skb_unshare() rather than skb_cow_data() 2019-08-27 10:13:46 +01:00
sysctl.c proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
utils.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 36 2019-05-24 17:27:11 +02:00