Subject: Re: release and A instead of AAAA?

Re: release and A instead of AAAA?

From: Steinar H. Gunderson <sesse_at_google.com>
Date: Wed, 8 Dec 2010 15:36:20 +0100

Den 8. desember 2010 15:26 skrev Daniel Stenberg <daniel_at_haxx.se> følgende:
> 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?

This is normally what you want, yes; it's hard to get the interaction
between AAAA/A and search path right in the application (plus most
applications should not have to reimplement this logic over and over
again). Doesn't glibc do the same?

> 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!

That sounds like a libcurl bug…?

/* Steinar */

-- 
Software Engineer, Google Switzerland
Received on 2010-12-08