Empty CNAME chain, should getaddrinfo() return EAI_NONAME or	EAI_FAIL?
    Chuck Swiger 
    cswiger at mac.com
       
    Thu Apr 28 17:00:36 UTC 2011
    
    
  
On Apr 28, 2011, at 3:23 AM, Havard Eidnes wrote:
www.apple.com.  281 IN CNAME www.isg-apple.com.akadns.net.
>> www.isg-apple.com.akadns.net. 60 IN CNAME www.apple.com.edgekey.net.
>> www.apple.com.edgekey.net. 17295 IN CNAME e3191.c.akamaiedge.net.
> ...
> 
> As a matter of terminology, in the quoted example, I see a chain
> of three CNAME records.  That's not what I would call an empty
> CNAME chain.
> 
> What I do see, though, is a CNAME chain of three CNAME records,
> but where the ultimate target of the CNAME chain exists, but does
> not have any data of the requested type.  Therefore, in the DNS
> you get a NOERROR status code, and an answer section which does
> not contain any records of the requested type.
Agreed.  Akamai's EdgeSuite doesn't provide IPv6 AAAA records at this time, but e3191.c.akamaiedge.net does have an A record.
>> should getaddrinfo() return EAI_NONAME or EAI_FAIL?
> 
> RFC 3493 says:
> 
>   [EAI_NONAME]    The name does not resolve for the supplied
>                   parameters.  Neither nodename nor servname were
>                   supplied.  At least one of these must be supplied.
> 
>   [EAI_FAIL]      A non-recoverable error occurred when attempting to
>                   resolve the name.
> 
> Which means that it should probably return EAI_NONAME; it's the least
> bad error code among the ones listed in RFC 3493 for getaddrinfo(),
> although one should not be mislead to think that this means that the
> DNS said NXDOMAIN.
+1 to this analysis as well.
Regards,
-- 
-Chuck
    
    
More information about the bind-users
mailing list