cURL / Mailing Lists / curl-library / Single Mail


Re: c-ares and IPv6

From: Daniel Stenberg <>
Date: Tue, 4 Aug 2009 10:35:34 +0200 (CEST)

On Tue, 4 Aug 2009, Kamil Dudka wrote:

> I've spotted some inconsistency between curl and c-ares documentation. In
> curl's FAQ [1] is stated that c-ares has no IPv6 support. But going through
> c-ares mailing list [2] I can see the IPv6 works with c-ares already.
> Shouldn't we update the FAQ?

Ah yes we should.

c-ares handles IPv6 rather good these days. The biggest flaw I'm still aware
of is for host names that return both A and AAAA fields, as c-ares has no
getaddrinfo() equivalent that returns a mix of A and AAAA resolves.

I believe the current implementation will then favor AAAA, which is more than
just annoying if you happen to not have an IPv6 stack working locally...

Test site: I can't connect to it with curl built with c-ares, as
it'll prefer its IPv6 address:

$ curl
curl: (7) Failed to connect to 2001:708:10:9::20:1: Network is unreachable

"curl -4" works fine however, as then it'll just ask for A

Received on 2009-08-04