bind9 and resolver

From: <ldg_at_ulysium.net>
Date: Sat, 15 Mar 2003 23:13:03 -0500

Hello all,

I already posted some questions about this on the bind list, but haven't got
any help from there yet.

I compiled bind 9.2.2 on a new tru64 5.1b system and it's been giving me
troubles with apache2. I was unable to compile it successfully if I tried
building the libbind libraries because of errors on variables that are being
redifined in bind. So I compiled it without libbind and it was running fine
under a chrooted enviroment and its own user/group. That system is stand
alone and not networked with anything at the moment.

I was having trouble when doing a start/restart/configtest of apache
(2.0.44), which was waiting a very long time before doing anything, because
it was looking up 127.0.0.1 IN AAAA which the name server has no answer for.

I found that using a tool such as nslookup or dig that came from bind9
causes no problem on such a query on 127.0.0.1 IN AAAA but the old nslookup
and apache have trouble and timeout on those queries. So I assumed this
must've been because the old resolver isn't fully compatible with bind9.

I figured I'd try getting a more up to date resolver from bind9, but it
doesn't seem to build one.

Anyway if I try building bind9 with libbind, the errors are in
lib/bind/port_after.h (in bind9 source) at lines 366, 371 and 375 with the
variables getnetgrent, setnetgrent and innetgr which are colliding with an
incompatible prior definition in the tru64 system header unistd.h in
/usr/include at the lines 703, 704 and 721. Those lines in unistd.h are part
of a group in an ifdef statement on _OSF_SOURCE and so that means
_OSF_SOURCE is defined during the bind9 compile process. I don't know if
that's correct, but not knowing for sure, I commented out those 3 lines in
unistd.h to allow the compilation to finish successfully (which it does
then). Of course I don't want to keep such changes in system headers
permanent, so there must be some kind of a fix/patch to apply to the bind9
source to handle this properly, I assume most likely in the configure
script..

But what is the fix for this?

And how about the resolver? If bind9 doesn't provide a new resolver, then
how do I get one and from where?

Since apache looks for the resolv.h and libresolv.a during compilation, and
those are in the standard /usr locations on a tru64 system, it must be using
the resolver which is from the bind 8.1.2 (way too old) and that doesn't
work properly when apache is making queries on the IPs listed in its listen
statements in its configuration file(s). In my case I tried it using
127.0.0.1:80 which causes apache to query on 127.0.0.1 IN AAAA and that
causes the timeouts because the name server is doing a forward lookup
instead of a reverse on the 127.0.0.1 address. This happens the same
regardless on the IP(s) given to it in its listen config statement(s).

I can't be the only one on tru64 who is using (or trying to) bind 9.2.2 so
this must've been fixed by somebody recently, but I haven't found anything
anywhere about this, not in a google search nor any mailing list archive.
So I will definitely summarize for the next ones having this trouble later
on...

-- 
Didier Godefroy
mailto:dg_at_ulysium.net
Received on Sun Mar 16 2003 - 04:15:01 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:44 NZDT