aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Winzen <daniel@danwin1210.de>2024-10-13 22:32:56 +0200
committerDaniel Winzen <daniel@danwin1210.de>2024-10-13 22:32:56 +0200
commit6ea640dfc2d62232429ceb6478d52dd6319bd8b4 (patch)
treeeda12e98ab9e08f150b8bbd7fe78e51fb6e5e1aa
parente699cfc697fd6ac572fab7493cd52aa7d9a71dd9 (diff)
downloadtor-6ea640dfc2d62232429ceb6478d52dd6319bd8b4.tar.gz
tor-6ea640dfc2d62232429ceb6478d52dd6319bd8b4.zip
Create socket with correct family as given by sockshost
-rw-r--r--src/tools/tor-resolve.c2
1 files changed, 1 insertions, 1 deletions
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;