This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
resolver strangeness
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: resolver strangeness
- From: Pawel Krawczyk <kravietz at ceti dot pl>
- Date: Thu, 11 Nov 1999 14:27:53 +0100
- Organization: CETI internet services, Krakow, Poland
Could anyone explain the anomaly described below (if this is a glibc issue)?
When I placed "domain ceti.com.pl" in /etc/resolver.conf a
gethostbyname("hiper") resulted in such an packet exchange with my
nameserver:
tau > nocturnus: A? hiper.ceti.com.pl.
nocturnus > tau: NXDomain q: hiper.ceti.com.pl.
tau > nocturnus: A? hiper.com.pl.
nocturnus > tau: q: hiper.com.pl. 1/3/3 hiper.com.pl. A blaszak.webnet.pl
Which is obviously wrong, since the resolver should not ask for "hiper"
suffixed with "com.pl". Seems like after the resolver got NXDomain for
hiper.ceti.com.pl (there's no such host really), it took the "domain
ceti.com.pl" argument, cut everything before the first dot and appended
the result to the "hiper".
Similiar behaviour is described in resolver(5), but it should only be
used for hostname obtained by gethostname(2). In this case the algorithm
applied to "tau.ceti.com.pl" would result a correct domain name. Anyway
this should only happern when there's neither "domain" nor "search"
in resolv.conf.
--
Pawel Krawczyk, CETI internet, Krakow. http://ceti.pl/~kravietz/