From owner-freebsd-stable@FreeBSD.ORG Thu May 4 23:16:15 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CF3C16A402 for ; Thu, 4 May 2006 23:16:15 +0000 (UTC) (envelope-from Mark_Andrews@isc.org) Received: from farside.isc.org (farside.isc.org [204.152.187.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C16F43D4C for ; Thu, 4 May 2006 23:16:15 +0000 (GMT) (envelope-from Mark_Andrews@isc.org) Received: from drugs.dv.isc.org (localhost.isc.org [IPv6:::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by farside.isc.org (Postfix) with ESMTP id 3976EE60D5 for ; Thu, 4 May 2006 23:16:13 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (localhost [127.0.0.1]) by drugs.dv.isc.org (8.13.4/8.13.4) with ESMTP id k44NFwSf001509; Fri, 5 May 2006 09:15:59 +1000 (EST) (envelope-from marka@drugs.dv.isc.org) Message-Id: <200605042315.k44NFwSf001509@drugs.dv.isc.org> To: Jan Gyselinck From: Mark Andrews In-reply-to: Your message of "Mon, 01 May 2006 20:46:40 +0200." <20060501204640.B8351@fire.b0rken.net> Date: Fri, 05 May 2006 09:15:58 +1000 Sender: Mark_Andrews@isc.org Cc: stable@freebsd.org Subject: Re: resolver behaviour regarding searchlist and A/AAAA query replies X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2006 23:16:15 -0000 > Hi, > > I was debugging some connection lag and I encountered some query > behavior which seems unnecessairy in my eyes. The system in > question is running one of the FreeBSD 6.1 prereleases, I've not > verified this on any other version yet. > > The queries I see are these: > > 22:15:29.657232 IP 172.16.21.2.57672 > 172.16.1.22.53: 54355+ A? images.slashdot.org. (37) > 22:15:29.658189 IP 172.16.21.2.64080 > 172.16.1.22.53: 46066+ AAAA? images.slashdot.org. (37) > 22:15:29.659407 IP 172.16.1.22.53 > 172.16.21.2.57672: 54355 1/13/1 A 66.35.250.55 (280) > 22:15:29.659674 IP 172.16.1.22.53 > 172.16.21.2.64080: 46066 0/1/0 (96) > 22:15:29.660514 IP 172.16.21.2.55636 > 172.16.1.22.53: 46067+ AAAA? images.slashdot.org.b0rken.net. (48 > ) > 22:15:29.661438 IP 172.16.1.22.53 > 172.16.21.2.55636: 46067 NXDomain* 0/1/0 (99) > 22:15:29.661847 IP 172.16.21.2.58524 > 172.16.1.22.53: 46068+ AAAA? images.slashdot.org.bureau.b0rken.n > et. (55) > 22:15:29.662720 IP 172.16.1.22.53 > 172.16.21.2.58524: 46068 NXDomain* 0/1/0 (106) > > So it sends out A and AAAA queries, so far so good. It gets an answer > for the A record query, however the AAAA query retuns an empty answer. > What I find strange though, is the fact it's now applying the searchlist > to get an answer on the AAAA query. Other than the fact this could > potentially give unpredictable results in specific situations, I find > this rather illogical. Since one of the queries (A or AAAA) succeeded > we _know_ the host in question exists (and the searchlist is there to > make non-fqdn queries work for 'local' hosts, by applying the searchlist > if the host does not seem to exist). So, in short, isn't this a bug? > > Regards A lot of this behaviour follows from having to support pre RFC 1535 resolvers which walked the search list first and handling wildcard records with such a resolver. Such resolvers needed to continue on a nodata response as the wildcard would almost always be matched while walking the search list independent of query type. search a.example b.example and you have *.a.example A 1.2.3.4 With a pre RFC 1535 resolver and uu.net mx record query you would get uu.net.a.example (nodata) uu.net.b.example (nxdomain) uu.net (data). A pre RFC 1535 could not stop on nodata and people started depending apon that behavior. Even post RFC 1535 they still depend upon that behavior for host.subdomain queries. I suggest that you raise the issue on the ipv6 IETF working group mailing list as that was where getaddrinfo() behaviour was specified and it really does not cover search lists. The current getaddrinfo() specification handles the non search list case well. Mark > Jan Gyselinck > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews@isc.org