Subject: Re: should getnet*(3) use the DNS?
To: Guenther Grau <Guenther.Grau@bk.bosch.de>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-userlevel
Date: 08/26/1997 10:36:45
On Tue, 26 Aug 1997 14:42:20 +0200
Guenther Grau <Guenther.Grau@bk.bosch.de> wrote:
> Hmm, can you elaborate on this point a little more?
> In what cases will route still hang? I guess in the
> cases where the needed information is not found in the
> neccessary file (/etc/hosts?). IMHO, this is a perfectly
> valid behaviour. Same things happens if you invoke
> nslookup and you dns-server is not answering.
Here is the problem:
Say you run the command "route add myname localhost".
Route performs the following checks on "myname":
- Is it an IP address?
- No, is it a network name?
- No, is it a host name?
So, it performs a getnetbyname() early, _before_ the
network has been brought up enough to contact the
name server. Even if you have "lookup file bind" in
your /etc/resolv.conf, since "myname" isn't in /etc/networks,
it attempts to contact the name server, which times out.
"It's really annoying."
Thankfully, /etc/netstart no longer performs the "route add myname localhost"
(mmm, lukem). However, the problem still does exist, and should be fixed.
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: +1 408 866 1912
NAS: M/S 258-6 Work: +1 415 604 0935
Moffett Field, CA 94035 Pager: +1 415 428 6939