Merge branch 'tor-resolve-bugfix' into 'main'

Create socket with correct family as given by sockshost

See merge request tpo/core/tor!836
This commit is contained in:
Alexander Hansen Færøy 2024-10-16 12:35:57 +00:00
commit 605f30c486
2 changed files with 5 additions and 1 deletions

4
changes/bug40982 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (tor-resolve):
- Create socket with correct family as given by sockshost, fixes IPv6.
Fixes bug 40982; bugfix on 0.4.9.0-alpha.

View File

@ -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;