+ 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.
* 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>
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,
¬ify->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) {
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);
}
LOCK(¬ify->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;
}
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);