Empty CNAME chain, should getaddrinfo() return EAI_NONAME or EAI_FAIL?

Doug Barton dougb at dougbarton.us
Thu Apr 28 01:02:33 UTC 2011

Assuming a case where there is an empty CNAME chain, but no error, 
should getaddrinfo() return EAI_NONAME or EAI_FAIL?

For example:

; <<>> DiG 9.8.0 <<>> www.apple.com aaaa
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64776
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 1, ADDITIONAL: 0

;www.apple.com.			IN	AAAA

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.

On FreeBSD 9-current I get this:

ping6 www.apple.com
ping6: Non-recoverable failure in name resolution

which is _FAIL. Should it be _NONAME instead? I looked at the POSIX 
definition and it's not clear to me which it should be.




	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/

More information about the bind-users mailing list