Subject: Re: should getnet*(3) use the DNS?
To: None <tech-userlevel@NetBSD.ORG>
From: Guenther Grau <Guenther.Grau@bk.bosch.de>
List: tech-userlevel
Date: 08/27/1997 08:21:00
Jason Thorpe wrote:
> > Hmm, can you elaborate on this point a little more?
> > In what cases will route still hang? I guess in the
[...]
> 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.
Ok, then I guess an option -n (or whichever letter you choose :-) is in
order to prevent route from using getnetbyname is in order.
Or, we change route to _require_ an additional keyword 'net' for
adding networks. That way
"route add myname localhost"
will do only the following checks:
- Is "net" given on commandline?
- No, is it an IP address?
- No, is it a host name?
and with net:
"route add net mynet localhost"
will do only the following checks:
- Is "net" given on commandline?
- Yes, is it an IP address?
- No, is it a network name?
What do you think?
Guenther