[master] fix 'rndc refresh' in inline-signing zones

3685.	[bug]		"rndc refresh" didn't work correctly with slave
			zones using inline-signing. [RT #35105]
This commit is contained in:
Evan Hunt
2013-12-11 12:59:04 -08:00
parent 99c3e8e09c
commit 445a354e63
2 changed files with 11 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
3685. [bug] "rndc refresh" didn't work correctly with slave
zones using inline-signing. [RT #35105]
3684. [bug] The list of included files would grow on reload.
[RT 35090]

View File

@@ -7103,7 +7103,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;
@@ -7115,6 +7115,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);