From owner-freebsd-stable Fri Jun 23 2:26: 7 2000 Delivered-To: freebsd-stable@freebsd.org Received: from apoq.skynet.be (apoq.skynet.be [195.238.2.35]) by hub.freebsd.org (Postfix) with ESMTP id 835F937B954 for ; Fri, 23 Jun 2000 02:26:04 -0700 (PDT) (envelope-from blk@skynet.be) Received: from [195.238.1.121] (brad.techos.skynet.be [195.238.1.121]) by apoq.skynet.be (Postfix) with ESMTP id 3C1AA1FB5B; Fri, 23 Jun 2000 11:26:01 +0200 (MET DST) Mime-Version: 1.0 X-Sender: blk@pop.skynet.be Message-Id: In-Reply-To: <200006230337.UAA07934@freeway.dcfinc.com> References: <200006230337.UAA07934@freeway.dcfinc.com> Date: Fri, 23 Jun 2000 10:48:14 +0200 To: chad@DCFinc.com From: Brad Knowles Subject: Re: Weird NSLOOKUP output... Cc: freebsd.stable@lists.craxx.nl, freebsd-stable@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At 8:37 PM -0700 2000/6/22, Chad R. Larson wrote: > However, as I've noted here before, there is a pitfall. Most > application programs don't call the resolver routines directly. Correct. However, nslookup violated this procedure, by skipping the standard routines, and going directly to the resolver. So, it would not show you the same kind of behaviour other programs would. > They call "gethostbyname(3)", which =may= query the /etc/hosts file > before checking with DNS via the resolver. So, if you've overloaded > a DNS address with one in the hosts file (deliberately or > accidentally), your application will not get the same answer you > will get from dig/host/nslookup. Much confusion can result. Don't > ask my how I know this. I believe that dig & host both call the standard gethostbyname routines, and therefore act in exactly the same way that a "normal" program would, whereas nslookup would bypass any sort of service switch you might have and instead go directly to the DNS. It is my understanding that this is one of many reasons why nslookup is so hated. -- These are my opinions -- not to be taken as official Skynet policy ====================================================================== Brad Knowles, || Belgacom Skynet SA/NV Systems Architect, Mail/News/FTP/Proxy Admin || Rue Colonel Bourg, 124 Phone/Fax: +32-2-706.13.11/12.49 || B-1140 Brussels http://www.skynet.be || Belgium To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message