]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Enable IPv6 checksums on transport socket
authorDavid Howells <dhowells@redhat.com>
Fri, 29 Apr 2022 20:05:16 +0000 (21:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Apr 2022 12:59:34 +0000 (13:59 +0100)
commit9678a418237c06ec70a65e218471b05d75dc16ef
tree2671a413a79e1980d25b271990bf48d4f6396721
parentff72e2c603543f109096c2c672f0c9c82248bc3e
rxrpc: Enable IPv6 checksums on transport socket

AF_RXRPC doesn't currently enable IPv6 UDP Tx checksums on the transport
socket it opens and the checksums in the packets it generates end up 0.

It probably should also enable IPv6 UDP Rx checksums and IPv4 UDP
checksums.  The latter only seem to be applied if the socket family is
AF_INET and don't seem to apply if it's AF_INET6.  IPv4 packets from an
IPv6 socket seem to have checksums anyway.

What seems to have happened is that the inet_inv_convert_csum() call didn't
get converted to the appropriate udp_port_cfg parameters - and
udp_sock_create() disables checksums unless explicitly told not too.

Fix this by enabling the three udp_port_cfg checksum options.

Fixes: 6b5fc4c8f1df ("rxrpc: use udp tunnel APIs instead of open code in rxrpc_open_socket")
Reported-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
cc: Vadim Fedorenko <vfedorenko@novek.ru>
cc: David S. Miller <davem@davemloft.net>
cc: linux-afs@lists.infradead.org
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rxrpc/local_object.c