[v9_9] fix 'rndc refresh' in inline-signing zones
3685. [bug] "rndc refresh" didn't work correctly with slave
zones using inline-signing. [RT #35105]
(cherry picked from commit 445a354e63)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
3685. [bug] "rndc refresh" didn't work correctly with slave
|
||||
zones using inline-signing. [RT #35105]
|
||||
|
||||
--- 9.9.5b1 released ---
|
||||
|
||||
3683. [cleanup] Add a more detailed "not found" message to rndc
|
||||
|
||||
+8
-1
@@ -6729,7 +6729,7 @@ ns_server_notifycommand(ns_server_t *server, char *args, isc_buffer_t *text) {
|
||||
isc_result_t
|
||||
ns_server_refreshcommand(ns_server_t *server, char *args, isc_buffer_t *text) {
|
||||
isc_result_t result;
|
||||
dns_zone_t *zone = NULL;
|
||||
dns_zone_t *zone = NULL, *raw = NULL;
|
||||
const unsigned char msg1[] = "zone refresh queued";
|
||||
const unsigned char msg2[] = "not a slave or stub zone";
|
||||
dns_zonetype_t type;
|
||||
@@ -6741,6 +6741,13 @@ ns_server_refreshcommand(ns_server_t *server, char *args, isc_buffer_t *text) {
|
||||
if (zone == NULL)
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
dns_zone_getraw(zone, &raw);
|
||||
if (raw != NULL) {
|
||||
dns_zone_detach(&zone);
|
||||
dns_zone_attach(raw, &zone);
|
||||
dns_zone_detach(&raw);
|
||||
}
|
||||
|
||||
type = dns_zone_gettype(zone);
|
||||
if (type == dns_zone_slave || type == dns_zone_stub) {
|
||||
dns_zone_refresh(zone);
|
||||
|
||||
Reference in New Issue
Block a user