Skip to content

Commit

Permalink
rxrpc: Fix dependency on IPv6 in udp tunnel config
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Vadim Fedorenko authored and David S. Miller committed Feb 13, 2021
1 parent 0a2f6b3 commit 295f830
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/rxrpc/local_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 295f830

Please sign in to comment.