Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!usc!ucsd!pacbell.com!lll-winken!rogue.llnl.gov!oberman From: oberman@rogue.llnl.gov Newsgroups: comp.protocols.tcp-ip.domains Subject: Re: questionable resolver code Message-ID: <1990Aug10.083545.1@rogue.llnl.gov> Date: 10 Aug 90 15:35:45 GMT References: <1891@jimi.cs.unlv.edu> Sender: usenet@lll-winken.LLNL.GOV Organization: Lawrence Livermore National Laboratory Lines: 37 In article <1891@jimi.cs.unlv.edu>, greg@duke.cs.unlv.edu (Greg Wohletz) writes: > in the routine res_search is the following line of code: > > > if ((n == 0 || *--cp != '.') && (_res.options & RES_DEFNAMES)) > > > If you examine the routine you will notice that n > 0 if there were > any .'s in the name passed to res_search. I believe the intent was to > only append the local domain name in the case where there was no . in > the name passed to res_search, but instead the behavior is to append > the local domain name whenever the name does not end with a . Hence > when I type ``ping jimi.cs.unlv.edu'' it causes queries like > jimi.cs.unlv.edu.cs.unlv.edu to be generated. This is greatly > increasing the number of queries on my network. I believe the line > should read: > > if ((n == 0) && (_res.options & RES_DEFNAMES)) This is "standard behaviour and is, to my understanding, correct. The normal operation is to add the default domain information if there is no trailing '.' and, if that fails, to try again without adding anything. This is important to cases where there are multiple levels of domain structure in an organization. I am icaen.llnl.gov. But we also have systems like abc.ocf.llnl.gov. Under the current mode the address abc.ocf is first tried as abc.ocf.llnl.gov. It does result in queries like abc.ocf.llnl.gov.llnl.gov, but these are resolved locally (within the authority of the local name servers), so are fairly cheap. If any '.' eliminated the use of the local domain, abc.ocf would simply fail. R. Kevin Oberman Lawrence Livermore National Laboratory Internet: oberman@icdc.llnl.gov (415) 422-6955 Disclaimer: Don't take this too seriously. I just like to improve my typing and probably don't really know anything useful about anything.