cURL / Mailing Lists / curl-library / Single Mail


Re: bug in curl when using threaded resolver but no IPv6 since 7.34.0, all connections time out

From: Daniel Stenberg <>
Date: Fri, 10 Jan 2014 00:23:44 +0100 (CET)

On Thu, 9 Jan 2014, Fabian Frank wrote:

>> ... which it does because the 'hints' field in the thread_sync_data struct
>> only is present if HAVE_GETADDRINFO is defined!
> Which IMHO makes sense, because only getaddrinfo accepts a hints parameter,
> gethostbyname(_r) do not. FYI, I tested that TFTP (UDP) is still working
> after applying my patch to always pass the hints and it does so on my Mac.
> This was one concern for regression that I had.

Yes, but your patch doesn't work if libcurl is built on a system without
getaddrinfo() if I read the code correctly.

I would suggest a minor change:

diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 4882c37..1f7a189 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -209,7 +209,7 @@ int init_thread_sync_data(struct thread_sync_data * tsd,
    memset(tsd, 0, sizeof(*tsd));

    tsd->port = port;
-#ifdef CURLRES_IPV6
    tsd->hints = *hints;

What do you think?

List admin:
Received on 2014-01-10