Message ID | 165126271697.1384698.4579591150130001289.stgit@warthog.procyon.org.uk (mailing list archive) |
---|---|
State | Accepted |
Commit | 39cb9faa5d46d0d0694f4b594ef905f517600c8e |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] rxrpc: Enable IPv6 checksums on transport socket | expand |
Hello: This patch was applied to netdev/net.git (master) by David S. Miller <davem@davemloft.net>: On Fri, 29 Apr 2022 21:05:16 +0100 you wrote: > 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. > > [...] Here is the summary with links: - [net] rxrpc: Enable IPv6 checksums on transport socket https://git.kernel.org/netdev/net/c/39cb9faa5d46 You are awesome, thank you!
diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index a4111408ffd0..6a1611b0e303 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -117,6 +117,7 @@ static int rxrpc_open_socket(struct rxrpc_local *local, struct net *net) local, srx->transport_type, srx->transport.family); udp_conf.family = srx->transport.family; + udp_conf.use_udp_checksums = true; if (udp_conf.family == AF_INET) { udp_conf.local_ip = srx->transport.sin.sin_addr; udp_conf.local_udp_port = srx->transport.sin.sin_port; @@ -124,6 +125,8 @@ static int rxrpc_open_socket(struct rxrpc_local *local, struct net *net) } else { udp_conf.local_ip6 = srx->transport.sin6.sin6_addr; udp_conf.local_udp_port = srx->transport.sin6.sin6_port; + udp_conf.use_udp6_tx_checksums = true; + udp_conf.use_udp6_rx_checksums = true; #endif } ret = udp_sock_create(net, &udp_conf, &local->socket);