mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-27 12:13:20 -04:00
Store zone config also on modzone
'rndc modzone' deletes the old configuration. If we don't store the new zone config, when we do a 'rndc showzone' it will be a failure. This is not an issue in the 9.21 version, because of the effective config behavior. (cherry picked from commit acd0cb508b63b28bbcdefee6b28ff25bce9b7bf4)
This commit is contained in:
parent
f33310e410
commit
e94534fda0
1 changed files with 12 additions and 0 deletions
|
|
@ -14455,6 +14455,18 @@ do_modzone(named_server_t *server, ns_cfgctx_t *cfg, dns_view_t *view,
|
|||
TCHECK(putstr(text, zname));
|
||||
TCHECK(putstr(text, "' reconfigured."));
|
||||
} else {
|
||||
#ifdef HAVE_LMDB
|
||||
CHECK(nzd_open(view, 0, &txn, &dbi));
|
||||
CHECK(nzd_save(&txn, dbi, zone, zoneobj));
|
||||
#else /* ifdef HAVE_LMDB */
|
||||
result = nzf_append(view, zoneobj);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
TCHECK(putstr(text, "\nNew zone config not saved: "));
|
||||
TCHECK(putstr(text, isc_result_totext(result)));
|
||||
goto cleanup;
|
||||
}
|
||||
#endif /* HAVE_LMDB */
|
||||
|
||||
TCHECK(putstr(text, "zone '"));
|
||||
TCHECK(putstr(text, zname));
|
||||
TCHECK(putstr(text, "' must also be reconfigured in\n"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue