From 6ea640dfc2d62232429ceb6478d52dd6319bd8b4 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sun, 13 Oct 2024 22:32:56 +0200 Subject: Create socket with correct family as given by sockshost --- src/tools/tor-resolve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c index ad52fdaa22..33e565dac4 100644 --- a/src/tools/tor-resolve.c +++ b/src/tools/tor-resolve.c @@ -385,7 +385,7 @@ do_resolve(const char *hostname, tor_addr_make_unspec(result_addr); *result_hostname = NULL; - s = tor_open_socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); + s = tor_open_socket(sockshost->family,SOCK_STREAM,IPPROTO_TCP); if (s<0) { log_sock_error("creating_socket", -1); return -1; -- cgit v1.2.3-54-g00ecf