Subject: Re: release and A instead of AAAA?

Re: release and A instead of AAAA?

From: Charles Hardin <ckhardin_at_gmail.com>
Date: Wed, 8 Dec 2010 08:55:27 -0800

Daniel,

Our group took the position that an IPv4 (T_A) record can be
represented as an IPv6 address (T_AAAA) record, so a fallback is
appropriate and can still return a mapped IPv6 address.

We actually added this logic to the another resolver a while back, and
if it gets removed from libcares - then, we would just add it back.

I don't really think it is a hack, just a choice about do you return a
IPv6 address if at all possible for an AF_INET6 query.

Two cents,
Charles

On Wed, Dec 8, 2010 at 6:26 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> Hi friends,
>
> I'm putting together a release tomorrow unless someone shouts loud here
> really fast.
>
> I learned that ares_gethostbyname() for a AF_INET6 address will in fact, if
> nothing is returned for it, instead try to lookup plain A (IPv4) entries for
> the given name instead (see ares_gethostbyname.c:host_callback).
>
> Can we really justify that as anything else than a hack?
>
> In libcurl we might start doing duplicate calls to ares_gethostbyname(), one
> for AF_INET and one for AF_INET6 and that logic gives us duplicated A
> entries at times! (I hope that our work in libcurl will get moved into
> c-ares later on as a sort of first early attempt at a getaddrinfo()
> function).
>
> --
>
>  / daniel.haxx.se
>
Received on 2010-12-08