]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorBrian Wellington <source@isc.org>
Mon, 21 Aug 2000 20:51:47 +0000 (20:51 +0000)
committerBrian Wellington <source@isc.org>
Mon, 21 Aug 2000 20:51:47 +0000 (20:51 +0000)
 399.   [bug]           When reloading the server with a config file
                        containing a syntax error, it could catch an
                        assertion failure trying to perform zone
                        maintenance on, or sending notifies from,
                        tentatively created zones whose views were
                        never fully configured and lacked an address
                        database and request manager.

CHANGES
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index a5a48cab01347392257a8a60381c7f7f8cf5acfc..3e45beb909d0979ffdde029b4dab89e459e92c41 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,12 @@
 
+ 399.   [bug]           When reloading the server with a config file
+                        containing a syntax error, it could catch an
+                        assertion failure trying to perform zone
+                        maintenance on, or sending notifies from,
+                        tentatively created zones whose views were
+                        never fully configured and lacked an address
+                        database and request manager.
+
  398.  [bug]           "dig" sometimes caught an assertion failure when
                        using TSIG, depending on the key length.
 
index c7908298c258db0e35ec7fc5f7c23e1bbf0a400f..c6dd59e436dd2feda57baa5aee7cd9fe1e662268 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.152.2.5 2000/08/06 22:07:25 gson Exp $ */
+/* $Id: zone.c,v 1.152.2.6 2000/08/21 20:51:47 bwelling Exp $ */
 
 #include <config.h>
 
@@ -1703,6 +1703,10 @@ notify_find_address(dns_notify_t *notify) {
                  DNS_ADBFIND_INET6 | DNS_ADBFIND_RETURNLAME;
 
        dns_zone_iattach(notify->zone, &zone);
+
+       if (zone->view->adb == NULL)
+               goto destroy;
+       
        result = dns_adb_createfind(zone->view->adb,
                                    zone->task,
                                    process_adb_event, notify,
@@ -1711,13 +1715,8 @@ notify_find_address(dns_notify_t *notify) {
                                    &notify->find);
 
        /* Something failed? */
-       if (result != ISC_R_SUCCESS) {
-               LOCK(&zone->lock);
-               notify_destroy(notify);
-               UNLOCK(&zone->lock);
-               dns_zone_idetach(&zone);
-               return;
-       }
+       if (result != ISC_R_SUCCESS)
+               goto destroy;
 
        /* More addresses pending? */
        if ((notify->find->options & DNS_ADBFIND_WANTEVENT) != 0) {
@@ -1729,6 +1728,13 @@ notify_find_address(dns_notify_t *notify) {
        LOCK(&zone->lock);
        notify_send(notify);
        UNLOCK(&zone->lock);
+       goto detach;
+
+ destroy:
+       LOCK(&zone->lock);
+       notify_destroy(notify);
+       UNLOCK(&zone->lock);
+ detach:
        dns_zone_idetach(&zone);
 }
 
@@ -1772,7 +1778,8 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
        LOCK(&notify->zone->lock);
        dns_zone_iattach(notify->zone, &zone);
        if ((event->ev_attributes & ISC_EVENTATTR_CANCELED) != 0 ||
-            DNS_ZONE_FLAG(notify->zone, DNS_ZONEFLG_EXITING)) {
+           DNS_ZONE_FLAG(notify->zone, DNS_ZONEFLG_EXITING) ||
+           zone->view->requestmgr == NULL) {
                result = ISC_R_CANCELED;
                goto cleanup;
        }
@@ -2614,7 +2621,8 @@ soa_query(isc_task_t *task, isc_event_t *event) {
        DNS_ENTER;
 
        if (((event->ev_attributes & ISC_EVENTATTR_CANCELED) != 0) ||
-           DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) {
+           DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING) ||
+           zone->view->requestmgr == NULL) {
                if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING))
                        cancel_refresh(zone);
                isc_event_free(&event);