diff options
author | Vadim Fedorenko <vfedorenko@novek.ru> | 2021-02-12 13:48:14 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-13 03:42:05 +0300 |
commit | 295f830e53f4838344c97e12ce69637e2128ca8d (patch) | |
tree | ce85794bad8e3dc8f01d5726ebc3539e8febb3e4 /net/rxrpc | |
parent | 0a2f6b32cc45e3918321779fe90c28f1ed27d2af (diff) | |
download | linux-295f830e53f4838344c97e12ce69637e2128ca8d.tar.xz |
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: 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>
Diffstat (limited to 'net/rxrpc')
-rw-r--r-- | net/rxrpc/local_object.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index 546fd237a649..a4111408ffd0 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) { |