]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorBrian Wellington <source@isc.org>
Thu, 1 Mar 2001 20:58:19 +0000 (20:58 +0000)
committerBrian Wellington <source@isc.org>
Thu, 1 Mar 2001 20:58:19 +0000 (20:58 +0000)
 756.   [bug]           dns_zone_load() could "return" success when no master
                        file was configured.

 755.   [bug]           Fix incorrectly formatted log messages in zone.c.

CHANGES
lib/dns/include/dns/result.h
lib/dns/result.c
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index c0eb0ed08b64a43615b52e49afd9401d30175918..d0374d3c4e29eaee1c8b148f6b71bace97d664f1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,11 @@
                        be useful to be avoided.  This bug only affected
                        platforms which support both IPv4 and IPv6. [RT #927]
 
+ 756.  [bug]           dns_zone_load() could "return" success when no master
+                       file was configured.
+
+ 755.  [bug]           Fix incorrectly formatted log messages in zone.c.
+
        --- 9.1.1rc3 released ---
 
  754.  [bug]           Certain failure conditions sending UDP packets
index 1bbbd9df0e8e1f4734f80c23c4f06ef6604e4d98..ca39cc5550ab7fe67879a2a0abd56d897f424eab 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: result.h,v 1.76.2.1 2001/01/09 22:46:11 bwelling Exp $ */
+/* $Id: result.h,v 1.76.2.2 2001/03/01 20:58:19 bwelling Exp $ */
 
 #ifndef DNS_RESULT_H
 #define DNS_RESULT_H 1
 #define DNS_R_CNAMEANDOTHER            (ISC_RESULTCLASS_DNS + 71)
 #define DNS_R_SINGLETON                        (ISC_RESULTCLASS_DNS + 72)
 #define DNS_R_HINTNXRRSET              (ISC_RESULTCLASS_DNS + 73)
+#define DNS_R_NOMASTERFILE             (ISC_RESULTCLASS_DNS + 74)
 
-#define DNS_R_NRESULTS                 74      /* Number of results */
+#define DNS_R_NRESULTS                 75      /* Number of results */
 
 /*
  * DNS wire format rcodes.
index bfa0423c47d591819c5b17606c3d820b8422d81c..0308da3fe691dffd708364f4b13d561cbb387d3a 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: result.c,v 1.84.2.1 2001/01/09 22:44:13 bwelling Exp $ */
+/* $Id: result.c,v 1.84.2.2 2001/03/01 20:58:16 bwelling Exp $ */
 
 #include <config.h>
 
@@ -113,7 +113,8 @@ static const char *text[DNS_R_NRESULTS] = {
 
        "CNAME and other data",                /* 71 DNS_R_CNAMEANDOTHER     */
        "multiple RRs of singleton type",      /* 72 DNS_R_SINGLETON         */
-       "hint nxrrset"                         /* 73 DNS_R_HINTNXRRSET       */
+       "hint nxrrset",                        /* 73 DNS_R_HINTNXRRSET       */
+       "no master file configured"            /* 74 DNS_R_NOMASTERFILE      */
 };
 
 static const char *rcode_text[DNS_R_NRCODERESULTS] = {
index 1482fb28a27ba23588e6c10428ac318a153fb365..25a3545050ea2062fee1a377950f738ccea286ae 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.283.2.8 2001/03/01 17:48:32 bwelling Exp $ */
+/* $Id: zone.c,v 1.283.2.9 2001/03/01 20:58:17 bwelling Exp $ */
 
 #include <config.h>
 
@@ -970,10 +970,14 @@ dns_zone_load(dns_zone_t *zone) {
                if (zone->masterfile != NULL) {
                        result = zone_startload(db, zone, loadtime);
                } else {
+                       result = DNS_R_NOMASTERFILE;
                        if (zone->type == dns_zone_master) {
                                zone_log(zone, me, ISC_LOG_ERROR,
                                         "no master file configured");
+                               goto cleanup;
                        }
+                       zone_log(zone, me, ISC_LOG_INFO, "loading zone: "
+                                "no master file configured: continuing");
                }
        }
 
@@ -1095,7 +1099,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
                        if (result == ISC_R_FILENOTFOUND)
                                zone_log(zone, me, ISC_LOG_DEBUG(1),
                                         "no master file");
-                       else
+                       else if (result != DNS_R_NOMASTERFILE)
                                zone_log(zone, me, ISC_LOG_ERROR,
                                         "loading master file %s: %s",
                                         zone->masterfile,
@@ -2867,7 +2871,7 @@ stub_callback(isc_task_t *task, isc_event_t *event) {
 
                zone_log(zone, me, ISC_LOG_INFO,
                         "unexpected rcode (%.*s) from %s",
-                        rb.used, rcode, master);
+                        (int)rb.used, rcode, master);
                goto next_master;
        }
 
@@ -3067,7 +3071,7 @@ refresh_callback(isc_task_t *task, isc_event_t *event) {
 
                zone_log(zone, me, ISC_LOG_INFO,
                         "unexpected rcode (%.*s) from %s",
-                        rb.used, rcode, master);
+                        (int)rb.used, rcode, master);
                goto next_master;
        }
 
@@ -5025,7 +5029,7 @@ forward_callback(isc_task_t *task, isc_event_t *event) {
                dns_rcode_totext(msg->rcode, &rb);
                zone_log(zone, me, ISC_LOG_WARNING,
                         "unexpected response: master %s returned: %.*s",
-                        master, rb.used, rcode);
+                        master, (int)rb.used, rcode);
                goto next_master;
        }