Skip to content

Commit 295f830

Browse files
vvfedorenkodavem330
authored andcommitted
rxrpc: Fix dependency on IPv6 in udp tunnel config
As udp_port_cfg struct changes its members with dependency on IPv6 configuration, the code in rxrpc should also check for IPv6. Fixes: 1a9b86c ("rxrpc: use udp tunnel APIs instead of open code in rxrpc_open_socket") Reported-by: kernel test robot <[email protected]> Signed-off-by: Vadim Fedorenko <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0a2f6b3 commit 295f830

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/rxrpc/local_object.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,11 @@ static int rxrpc_open_socket(struct rxrpc_local *local, struct net *net)
120120
if (udp_conf.family == AF_INET) {
121121
udp_conf.local_ip = srx->transport.sin.sin_addr;
122122
udp_conf.local_udp_port = srx->transport.sin.sin_port;
123+
#if IS_ENABLED(CONFIG_AF_RXRPC_IPV6)
123124
} else {
124125
udp_conf.local_ip6 = srx->transport.sin6.sin6_addr;
125126
udp_conf.local_udp_port = srx->transport.sin6.sin6_port;
127+
#endif
126128
}
127129
ret = udp_sock_create(net, &udp_conf, &local->socket);
128130
if (ret < 0) {

0 commit comments

Comments
 (0)