On 24-sep-2007, at 2:07, Mark Andrews wrote:
I suppose, in theory, a DNS query over v4 might return an AAAA
record that _is_ accessible via one of my link-local addresses or
the loopback address.
Yeah right. Try again.
Don't you have "localhost AAAA ::1" and "localhost A
127.0.0.1" configured in you DNS?
You got me there. :-)
I don't think that specific case warrants asking for AAAA records all
the time for everything even though there is no IPv6 connectivity,
though. The proper way to do this is probably to make localhost a
special case in the resolver library. This also helps avoiding
weirdness when some joker puts "localhost" with a non-localhost
address in one of your search domains.
Actually getaddrinfo() not asking for AAAA all the time is
broken if you add in searching which most/all getaddrinfo()
calls do.
You want to get to the *same* name when searching regardless
of whether it has A, AAAA or AAAA & A records. There are two
way to achieve this.
1. you stop when you get a NODATA response.
2. you stop when there is a A or AAAA record at the name.
The IETF/POSIX needs to specify what is the correct algorithm
to use when searching. Note the first cannot be applies to
anyother backend than the DNS.
getaddrinfo("foo") and getaddrinfo("ftp.uu.net")
search "example.org example.net example.com"
foo.example.org A 1.2.3.4
foo.example.net A 2001::1
*.example.com A 1.2.3.5
*.example.com A 2001::2
What is the correct response on a
* IPv4 only machine
* IPv6 only machine
* dual stack machine
Note ftp.uu.net does NOT have AAAA records
Mark
_______________________________________________
Ietf mailing list
Ietf(_at_)ietf(_dot_)org
https://www1.ietf.org/mailman/listinfo/ietf
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews(_at_)isc(_dot_)org
_______________________________________________
Ietf mailing list
Ietf(_at_)ietf(_dot_)org
https://www1.ietf.org/mailman/listinfo/ietf