Asking for help in revising bind.9.2.3

Lee Fu-yuan leefy at
Tue Nov 29 08:20:45 UTC 2005

Dear sir,

I have to first apologize for sending this email to you since 
this is not actually a bug report. In fact, I send this mail 
to ask some help or advice on revising bind 9.2.3. Please kindly
give me some hints or suggestions. Please. Please... :)

In short, I am trying to let named query other DNS servers 
if it cannot find an answer in the database. The problem is
a little complex beause I want named to query other DNS even if 
it think itself is the master of the zone. 

Consider a simple configuration (a part of my named.conf): 

zone {
         type master;
         file "/etc/sys/named/zone/";

then, in /etc/sys/named/zone/ 

$TTL 43200
@       IN      SOA (
                IN      NS
abc     IN      A

As you know, under this configuration, named will not query other 
DNS server if it receives a DNS query with domain-name in the 
"" domain. For example, we send a query for "",
then we will receive NXDOMAIN from the named. 

To let the named turn to query other DNS server, I revise some lines 
of query_find() (in bin/named/query.c). Modified codes are listed below. 
(around in line 2650)

-----------  codes ------------
        CTRACE("query_find: resume");

        if((event == NULL)&& (result==DNS_R_NXDOMAIN)){
-----------  codes ------------

This will make named execute the statements in
"case ISC_R_NOTFOUND" and "case DNS_R_DELEGATION" rather than 

However, the result is not the same as we expect. After applying 
the above modifications, the client would receive SERVFAIL response.
(that is, the named execute the default case, about in line 3200 when 
it resumes from query_resume().)

I used sniffer to capture network packets and no DNS messages
were delivered to other DNS servers. (ps. the named will perform 
recursive query to other DNSs if the domain-name is not in "". 
For instance, if we query the named with "", we can 
obtain the IP address successfully. )

Can anyone give me some hints or suggestion for accomplishing 
the abovementioned goals?

Thanks a lot. 

With best regards,

Lee, Fu-Yuan
Distributed System and Network Security Lab.
Dept. of Comp. Sci. & Info. Eng
Nat'l Chiao Tung Univ.
Hsinchu, Taiwan 30050, ROC 
E-Mail: leefy at

More information about the bind-users mailing list