From owner-freebsd-hackers Mon May 13 0: 3:52 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by hub.freebsd.org (Postfix) with ESMTP id B047537B40D for ; Mon, 13 May 2002 00:03:34 -0700 (PDT) Received: from kokeb.ambesa.net ([64.166.84.14]) by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 (built May 7 2001)) with ESMTP id <0GW10041DFLYCE@mta5.snfc21.pbi.net> for hackers@FreeBSD.ORG; Mon, 13 May 2002 00:03:34 -0700 (PDT) Received: from kokeb.ambesa.net (localhost [127.0.0.1]) by kokeb.ambesa.net (8.12.3/8.12.3) with ESMTP id g4D78Zmp048708; Mon, 13 May 2002 00:08:36 -0700 (PDT envelope-from makonnen@pacbell.net) Received: (from mikem@localhost) by kokeb.ambesa.net (8.12.3/8.12.3/Submit) id g4D78Wp4048630; Mon, 13 May 2002 00:08:32 -0700 (PDT) Date: Mon, 13 May 2002 01:08:31 -0600 From: Mike Makonnen Subject: Re: gethostbyname2 and AF_INET6 In-reply-to: <200205122016.g4CKGlUn048082@wartch.sapros.com> To: Peter Haight Cc: Bernd Walter , hackers@FreeBSD.ORG Message-id: <1021273711.97354.74.camel@kokeb.ambesa.net> MIME-version: 1.0 X-Mailer: Evolution/1.0.2 Content-type: text/plain Content-transfer-encoding: 7BIT References: <200205122016.g4CKGlUn048082@wartch.sapros.com> X-Authentication-warning: kokeb.ambesa.net: mikem set sender to makonnen@pacbell.net using -f Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 2002-05-12 at 14:16, Peter Haight wrote: > > Hmm. Looking at the FreeBSD resolver code, it doesn't look like there is > some convenient way to do this. Maybe something like, try the AAAA lookup, > but if we don't get any reply in a short timeout, try an A lookup. If we get > a reply to that, then log the site as probably not conforming to the RFC. > In mozilla's case, it's not the FreeBSD resolver that's trying ipv6 and then ipv4. Mozilla does it explicitly by calling gethostbyname2 first with AF_INET6, and if that fails with AF_INET. You could just patch it to not make the first gethostbyname2 call. From a quick browse of the source from mozilla.org it's src/misc/prnetdb.c around line # 579 or thereabouts. Cheers, Mike Makonnen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message