Asking for help in revising bind.9.2.3

Kevin Darcy kcd at daimlerchrysler.com
Tue Nov 29 21:15:11 UTC 2005


This is a bad idea, and has been shot down many times before. 
Authoritative means authoritative means authoritative. When you're 
authoritative, you don't ask anyone else about the zone.

Use subzones instead.

- Kevin

Lee Fu-yuan wrote:

>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 com.tw {
>         type master;
>         file "/etc/sys/named/zone/com.tw.a";
>         };
>
>then, in /etc/sys/named/zone/com.tw.a: 
>
>$TTL 43200
>@       IN      SOA      com.tw. root.com.tw. (
>                        2005112808
>                        10800
>                        54000
>                        259200
>                        10800
>                        )
>                IN      NS      ns.com.tw.
>abc     IN      A       140.113.1.100
>
>As you know, under this configuration, named will not query other 
>DNS server if it receives a DNS query with domain-name in the 
>"com.tw" domain. For example, we send a query for "aaa.com.tw",
>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 ------------
>resume:
>        CTRACE("query_find: resume");
>
>        if((event == NULL)&& (result==DNS_R_NXDOMAIN)){
>                is_zone=ISC_FALSE;
>                result=ISC_R_NOTFOUND;
>                authoritative=ISC_FALSE;
>                dns_zone_detach(&client->query.authzone);
>                dns_db_detach(&client->query.authdb);
>                //myflag=1;
>        }
>-----------  codes ------------
>
>This will make named execute the statements in
>"case ISC_R_NOTFOUND" and "case DNS_R_DELEGATION" rather than 
>"case DNS_R_NXDOMAIN". 
>
>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 ".com.tw". 
>For instance, if we query the named with "www.csie.nctu.edu.tw", 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,
>
>
>  
>




More information about the bind-users mailing list