diff --git a/CHANGES b/CHANGES index aefc67c9db..f49aeb0a72 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ + 232. [bug] Allow slave zones to not have a file. + 231. [func] Support new 'port' clause in config file options section. Causes 'listen-on', 'masters' and 'also-notify' statements to use its value instead of diff --git a/bin/named/zoneconf.c b/bin/named/zoneconf.c index 93275f543f..d69faf0dbc 100644 --- a/bin/named/zoneconf.c +++ b/bin/named/zoneconf.c @@ -135,8 +135,12 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, /* XXX needs to be an zone option */ RETERR(dns_zone_setdbtype(zone, "rbt")); - RETERR(dns_c_zone_getfile(czone, &filename)); - RETERR(dns_zone_setdatabase(zone, filename)); + result = dns_c_zone_getfile(czone, &filename); + if (result == ISC_R_SUCCESS) + RETERR(dns_zone_setdatabase(zone, filename)); + else if (czone->ztype != dns_c_zone_slave && + czone->ztype != dns_c_zone_stub) + return (result); #ifdef notyet result = dns_c_zone_getchecknames(czone, &severity); diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 737bb9497d..e44b40f30b 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: zone.c,v 1.140 2000/06/02 17:31:29 gson Exp $ */ +/* $Id: zone.c,v 1.141 2000/06/05 03:44:17 marka Exp $ */ #include @@ -3135,7 +3135,7 @@ zone_replacedb(dns_zone_t *zone, dns_db_t *db, isc_boolean_t dump) { if (result != ISC_R_SUCCESS) goto fail; } else { - if (dump) { + if (dump && zone->dbname != NULL) { isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_ZONE, ISC_LOG_DEBUG(3), "dumping new zone version"); diff --git a/lib/dns/zoneconf.c b/lib/dns/zoneconf.c index 93275f543f..d69faf0dbc 100644 --- a/lib/dns/zoneconf.c +++ b/lib/dns/zoneconf.c @@ -135,8 +135,12 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview, /* XXX needs to be an zone option */ RETERR(dns_zone_setdbtype(zone, "rbt")); - RETERR(dns_c_zone_getfile(czone, &filename)); - RETERR(dns_zone_setdatabase(zone, filename)); + result = dns_c_zone_getfile(czone, &filename); + if (result == ISC_R_SUCCESS) + RETERR(dns_zone_setdatabase(zone, filename)); + else if (czone->ztype != dns_c_zone_slave && + czone->ztype != dns_c_zone_stub) + return (result); #ifdef notyet result = dns_c_zone_getchecknames(czone, &severity);