IPv6/IPv4 DNS resolver source

Steve Bertrand iaccounts at ibctech.ca
Wed May 28 12:34:17 UTC 2008

>> Is there anyone here who can advise me where in the source tree I would 
>> find the DNS resolver code that performs AAAA/A record lookups, and more 
>> specifically, the fallback to A lookup if AAAA fails?
> Assuming you're considering getaddrinfo(), see res_queryN() in
> lib/libc/net/getaddrinfo.c.
> BTW: "fallback" does not really accurately describe the behavior.
> When AF_UNPSEC is specified, both AAAA and A queries are issued,
> whether or not the AAAA query fails.

Thank  you for the info. I did not know that little tidbit.

I've got my first IPv6 DNS, mail, web etc server up and running now, and 
before I think about migrating the actual production network, I want to 
perform some extensive testing, all the while being familiar with the 
framework of the resolver itself, and how to overcome particular 
DNS/connectivity issues (if possible).

ie: I want to learn more about how DNS and IP react in the event I lose 
my IPv6 BGP peers (or IPv4 peers), and also write in some debug log 
writing into the resolver if certain events trigger.


More information about the freebsd-net mailing list