diff --git a/CHANGES b/CHANGES index 3745e37cce..883882bdf0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ + 999. [func] "rndc retransfer zone [class [view]]" added. + [RT #1752] + 998. [func] named-checkzone now has arguements to specify the chroot directory (-t) and working directory (-w). [RT #1755] diff --git a/bin/named/control.c b/bin/named/control.c index 6ab225153c..79ed9b976b 100644 --- a/bin/named/control.c +++ b/bin/named/control.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: control.c,v 1.7 2001/05/31 01:21:06 bwelling Exp $ */ +/* $Id: control.c,v 1.8 2001/09/15 14:23:22 marka Exp $ */ #include @@ -85,6 +85,8 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) { result = ns_server_reconfigcommand(ns_g_server, command); } else if (command_compare(command, NS_COMMAND_REFRESH)) { result = ns_server_refreshcommand(ns_g_server, command); + } else if (command_compare(command, NS_COMMAND_RETRANSFER)) { + result = ns_server_retransfercommand(ns_g_server, command); } else if (command_compare(command, NS_COMMAND_HALT)) { ns_server_flushonshutdown(ns_g_server, ISC_FALSE); isc_app_shutdown(); diff --git a/bin/named/include/named/control.h b/bin/named/include/named/control.h index 74cf91d353..b539dac944 100644 --- a/bin/named/include/named/control.h +++ b/bin/named/include/named/control.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: control.h,v 1.6 2001/05/08 04:09:40 bwelling Exp $ */ +/* $Id: control.h,v 1.7 2001/09/15 14:23:25 marka Exp $ */ #ifndef NAMED_CONTROL_H #define NAMED_CONTROL_H 1 @@ -36,6 +36,7 @@ #define NS_COMMAND_RELOAD "reload" #define NS_COMMAND_RECONFIG "reconfig" #define NS_COMMAND_REFRESH "refresh" +#define NS_COMMAND_RETRANSFER "retransfer" #define NS_COMMAND_DUMPSTATS "stats" #define NS_COMMAND_QUERYLOG "querylog" #define NS_COMMAND_DUMPDB "dumpdb" diff --git a/bin/named/include/named/server.h b/bin/named/include/named/server.h index 906651feef..5eb233569f 100644 --- a/bin/named/include/named/server.h +++ b/bin/named/include/named/server.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.h,v 1.60 2001/09/04 19:29:24 gson Exp $ */ +/* $Id: server.h,v 1.61 2001/09/15 14:23:26 marka Exp $ */ #ifndef NAMED_SERVER_H #define NAMED_SERVER_H 1 @@ -134,6 +134,12 @@ ns_server_refreshcommand(ns_server_t *server, char *args); * Act on a "refresh" command from the command channel. */ +isc_result_t +ns_server_retransfercommand(ns_server_t *server, char *args); +/* + * Act on a "retransfer" command from the command channel. + */ + isc_result_t ns_server_togglequerylog(ns_server_t *server); /* diff --git a/bin/named/server.c b/bin/named/server.c index 7dc6a15d61..1bdd4cb906 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.342 2001/09/07 00:36:54 marka Exp $ */ +/* $Id: server.c,v 1.343 2001/09/15 14:23:23 marka Exp $ */ #include @@ -2565,6 +2565,29 @@ zone_from_args(ns_server_t *server, char *args, dns_zone_t **zonep) { return (result); } +/* + * Act on a "retransfer" command from the command channel. + */ +isc_result_t +ns_server_retransfercommand(ns_server_t *server, char *args) { + isc_result_t result; + dns_zone_t *zone = NULL; + dns_zonetype_t type; + + result = zone_from_args(server, args, &zone); + if (result != ISC_R_SUCCESS) + return (result); + if (zone == NULL) + return (ISC_R_UNEXPECTEDEND); + type = dns_zone_gettype(zone); + if (type == dns_zone_slave || type == dns_zone_stub) + dns_zone_forcereload(zone); + else + result = ISC_R_NOTFOUND; + dns_zone_detach(&zone); + return (result); +} + /* * Act on a "reload" command from the command channel. */ diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index b91cdc27ba..4be796cb51 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rndc.c,v 1.78 2001/09/06 23:14:38 gson Exp $ */ +/* $Id: rndc.c,v 1.79 2001/09/15 14:23:27 marka Exp $ */ /* * Principal Author: DCL @@ -97,6 +97,8 @@ command is one of the following:\n\ Reload a single zone.\n\ refresh zone [class [view]]\n\ Schedule immediate maintenance for a zone.\n\ + retransfer zone [class [view]]\n\ + Retransfer a single zone without checking serial number.\n\ reconfig Reload configuration file and new zones only.\n\ stats Write server statistics to the statistics file.\n\ querylog Toggle query logging.\n\ diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 6e608e28a8..5da904f5bf 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -2,7 +2,7 @@ - + BIND 9 Administrator Reference Manual @@ -750,6 +750,12 @@ of a server. Schedule zone maintenance for the given zone. + retransfer zone + class + view + Retransfer the given zone from the master. + + reconfig Reload the configuration file and load new zones, but do not reload existing zone files even if they have changed.