[lvc-project] [PATCH 3/4 5.10] rxrpc: Fix dependency on IPv6 in udp tunnel config
Alexander Ofitserov
oficerovas at altlinux.org
Wed Apr 10 14:27:45 MSK 2024
From: Vadim Fedorenko <vfedorenko ÎÁ novek.ru>
[ Upstream commit 295f830e53f4838344c97e12ce69637e2128ca8d ]
As udp_port_cfg struct changes its members with dependency on IPv6
configuration, the code in rxrpc should also check for IPv6.
Fixes: 1a9b86c9fd95 ("rxrpc: use udp tunnel APIs instead of open code in rxrpc_open_socket")
Reported-by: kernel test robot <lkp ÎÁ intel.com>
Signed-off-by: Vadim Fedorenko <vfedorenko ÎÁ novek.ru>
Acked-by: David Howells <dhowells ÎÁ redhat.com>
Signed-off-by: David S. Miller <davem ÎÁ davemloft.net>
Signed-off-by: Alexander Ofitserov <oficerovas ÎÁ altlinux.org>
Cc: stable ÎÁ vger.kernel.org
---
net/rxrpc/local_object.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
index 8f9c06fd37e984..6215800db33333 100644
--- a/net/rxrpc/local_object.c
+++ b/net/rxrpc/local_object.c
@@ -120,9 +120,11 @@ static int rxrpc_open_socket(struct rxrpc_local *local, struct net *net)
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;
+#if IS_ENABLED(CONFIG_AF_RXRPC_IPV6)
} else {
udp_conf.local_ip6 = srx->transport.sin6.sin6_addr;
udp_conf.local_udp_port = srx->transport.sin6.sin6_port;
+#endif
}
ret = udp_sock_create(net, &udp_conf, &local->socket);
if (ret < 0) {
--
2.42.1
More information about the lvc-project
mailing list