When a zone that is configured in named.conf is modified with
'rndc modzone', the new zone configuration is now also stored in the
NZD.
This must be removed when the zone is deleted with 'rndc delzone',
otherwise a restart will fail.
char zonename[DNS_NAME_FORMATSIZE];
dns_view_t *view = NULL;
dns_db_t *dbp = NULL;
- bool added;
+ bool added, modded;
isc_result_t result;
MDB_txn *txn = NULL;
MDB_dbi dbi;
* (If this is a catalog zone member then nzf_config can be NULL)
*/
added = dns_zone_getadded(zone);
+ modded = dns_zone_getmodded(zone);
catz = dns_zone_get_parentcatz(zone);
LOCK(&view->newzone.lock);
- if (added && catz == NULL) {
+ if ((added || modded) && catz == NULL) {
/* Make sure we can open the NZD database */
result = nzd_open(view, 0, &txn, &dbi);
if (result != ISC_R_SUCCESS) {