From owner-freebsd-net@FreeBSD.ORG Wed May 28 12:34:16 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC77F106566B for ; Wed, 28 May 2008 12:34:16 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: from ibctech.ca (unknown [IPv6:2607:f118::b6]) by mx1.freebsd.org (Postfix) with SMTP id 7250A8FC18 for ; Wed, 28 May 2008 12:34:16 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: (qmail 76030 invoked by uid 89); 28 May 2008 08:34:28 -0000 Received: from unknown (HELO ?IPv6:2607:f118::5?) (steve@ibctech.ca@2607:f118::5) by v6.ibctech.ca with ESMTPA; 28 May 2008 08:34:28 -0000 Message-ID: <483D50D1.8000707@ibctech.ca> Date: Wed, 28 May 2008 08:32:17 -0400 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <483B3E7F.8000907@ibctech.ca> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: IPv6/IPv4 DNS resolver source X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2008 12:34:17 -0000 >> 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. Steve