From owner-freebsd-net@FreeBSD.ORG Thu Sep 13 03:15:35 2007 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 3535E16A417 for ; Thu, 13 Sep 2007 03:15:35 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.freebsd.org (Postfix) with ESMTP id F07A413C442 for ; Thu, 13 Sep 2007 03:15:34 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id B610CEB6083; Thu, 13 Sep 2007 11:15:33 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id pDOq69YpoOuC; Thu, 13 Sep 2007 11:15:19 +0800 (CST) Received: from LI-Xins-MacBook.local (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id C1F4AEB6060; Thu, 13 Sep 2007 11:15:18 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:subject:x-enigmail-version:openpgp:content-type; b=H+9CQW5heGTmOtxXRz59O6hO5ppxmYm/wAnjLKYZywI0ezTL3fR8q6lRQPWxkEI6r 805tqLDTXTLCxWG/av8BQ== Message-ID: <46E8AB2E.7020602@delphij.net> Date: Thu, 13 Sep 2007 11:14:54 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: freebsd-net X-Enigmail-Version: 0.95.3 OpenPGP: url=http://www.delphij.net/delphij.asc Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig919655627E1CC87DEA2FC942" Subject: [nsdispatch] hosts(5) does not override DNS lookup? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2007 03:15:35 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig919655627E1CC87DEA2FC942 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Recently one of our local user has found that he was unable to use hosts(5) to override "localhost" lookup that happens in DNS, while doing rpc_clnt_create. A preliminary investigate of this seems to be related to nsdispatch, by replacing: hosts: files dns With: hosts: files in /etc/nsswitch.conf, it does not query DNS. Before diving into NSSWITCH code, I'd like to know if this is expected behavior? Say, when we have a match in hosts(5), should we even bother to query DNS if configured hosts: files dns? Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig919655627E1CC87DEA2FC942 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD4DBQFG6KsuOfuToMruuMARCmgtAJUXcplUBthkyBHhBgYs9rxb3GJOAJ4s/Bh4 G9j2DGzBo4YermJ8cQTJbw== =67mU -----END PGP SIGNATURE----- --------------enig919655627E1CC87DEA2FC942--