Subject: Re: ares_gethostbyname fails to resolve localhost with AF_INET6

Re: ares_gethostbyname fails to resolve localhost with AF_INET6

From: Charlie Fenton <charlief_at_ssl.berkeley.edu>
Date: Sat, 11 Jun 2011 13:47:44 -0700

Apparently the author considered that possibility and was undecided:

At line 214 in ares_gethostbyname.c it says:

> /* The AAAA query yielded no useful result. Now look up an A instead.
> We should possibly limit this attempt-next logic to AF_UNSPEC lookups
> only. */

Cheers,
--Charlie

--
Charlie Fenton                        charlief_at_ssl.berkeley.edu
BOINC / SETI_at_home Macintosh & Windows Programmer
Space Sciences Laboratory
UC Berkeley
On Jun 11, 2011, at 3:00 AM, c-ares-request_at_cool.haxx.se wrote:
> From: Jakub Hrozek <jhrozek_at_redhat.com>
> Date: June 10, 2011 8:07:22 AM PDT
> To: c-ares_at_cool.haxx.se
> Subject: Re: ares_gethostbyname fails to resolve localhost with AF_INET6
> Reply-To: c-ares hacking <c-ares_at_cool.haxx.se>
> 
> 
> On 06/02/2011 12:34 AM, Sebastian Ramacher wrote:
>> As I understand the source ares_gethostbyname together with AF_INET6 falls back
>> to AF_INET if no IPv6 address can be found (at least if a DNS server is
>> queried).
> 
> May I ask the rationale for this fallback?
> 
> I would expect that when I /intentionally/ query for AF_INET6 only, I
> would get v6 addresses only..if I wanted to get both, I would use
> AF_UNSPEC..
> 
> 
> 
> _______________________________________________
> c-ares mailing list
> c-ares_at_cool.haxx.se
> http://cool.haxx.se/cgi-bin/mailman/listinfo/c-ares
Received on 2011-06-11