cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 9 Jan 2014 19:59:05 +0100 (CET)

On Wed, 8 Jan 2014, Fabian Frank wrote:

> The following patch fixes the bug (meaning on MacOS it works with IPv6
> enabled as well as disabled while using the threaded resolver), by always
> passing the hints:

Awesome find. This is definately the right fix. I'm just not totally sure yet
it is complete.

The DEBUGASSERT(hints); there in the code will bail out if NULL is passed in,
and if you trace back how the 'hints' argument gets passed to
init_thread_sync_data() we see that it always comes from
init_resolve_thread().

But init_resolve_thread() that also gets 'hints' as an argument gets called
from two different places - depending if getaddrinfo was present or not at
configure time. One of them passes NULL as hints...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-09