diff --git a/CHANGES b/CHANGES index 30b2b83543..da98a8fedb 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,6 @@ + 830. [func] Implement 'rndc status'. + 829. [bug] The DNS_R_ZONECUT result code is only meaningful for secure zone databases. Queries at zone cut points in non-secure zones should always return a delegation. diff --git a/bin/named/server.c b/bin/named/server.c index 6fdb048cff..c52fcf3282 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.325 2001/05/14 19:06:40 bwelling Exp $ */ +/* $Id: server.c,v 1.326 2001/05/14 20:44:10 bwelling Exp $ */ #include @@ -841,11 +841,9 @@ create_bind_view(dns_view_t **viewp) { return (result); } - - /* * Create the zone that handles queries for "version.bind. CH". The - * version string returned either from the "version" configuration + * version string is returned either from the "version" configuration * option or the global defaults. */ static isc_result_t @@ -924,9 +922,8 @@ create_version_zone(cfg_obj_t **maps, dns_zonemgr_t *zmgr, dns_view_t *view) { } /* - * Create the special view that handles queries for - * "authors.bind. CH". The strings returned list - * the BIND 9 authors. + * Create the special zone that handles queries for "authors.bind. CH". + * The strings returned list the BIND 9 authors. */ static isc_result_t create_authors_zone(cfg_obj_t *options, dns_zonemgr_t *zmgr, dns_view_t *view) @@ -2781,18 +2778,16 @@ ns_server_flushcache(ns_server_t *server) { isc_result_t ns_server_status(ns_server_t *server, isc_buffer_t *text) { - dns_view_t *view; - int zonecount = 0; - int xferrunning = 0; - int xferdeferred = 0; + int zonecount, xferrunning, xferdeferred, soaqueries; int n; - isc_result_t result; zonecount = dns_zonemgr_getcount(server->zonemgr, DNS_ZONESTATE_ANY); xferrunning = dns_zonemgr_getcount(server->zonemgr, DNS_ZONESTATE_XFERRUNNING); xferdeferred = dns_zonemgr_getcount(server->zonemgr, DNS_ZONESTATE_XFERDEFERRED); + soaqueries = dns_zonemgr_getcount(server->zonemgr, + DNS_ZONESTATE_SOAQUERY); n = snprintf((char *)isc_buffer_used(text), isc_buffer_availablelength(text), "number of zones: %d\n" @@ -2803,8 +2798,7 @@ ns_server_status(ns_server_t *server, isc_buffer_t *text) { "query logging is %s\n" "server is up and running", zonecount, ns_g_debuglevel, xferrunning, xferdeferred, - -1, /* XXX */ - server->log_queries ? "ON" : "OFF"); + soaqueries, server->log_queries ? "ON" : "OFF"); if (n < 0) return (ISC_R_NOSPACE); isc_buffer_add(text, n); diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 5c64ba40a4..91529fb260 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -2,7 +2,7 @@ - + BIND 9 Administrator Reference Manual @@ -788,11 +788,15 @@ of a server. flush Flushes the server's cache. + status + Display status of the server. + -In BIND 9.1, rndc does not -yet support all the commands of the BIND 8 ndc -utility. Additonal commands will be added in future releases. + In BIND 9.2, rndc + supports all the commands of the BIND 8 ndc + utility except ndc start, which was also + not supported in ndc's channel mode. A configuration file is required, since all communication with the server is authenticated with diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 16c60bed8b..f36101dd16 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.324 2001/05/14 19:06:42 bwelling Exp $ */ +/* $Id: zone.c,v 1.325 2001/05/14 20:44:12 bwelling Exp $ */ #include @@ -5965,6 +5965,13 @@ dns_zonemgr_getcount(dns_zonemgr_t *zmgr, int state) { zone = ISC_LIST_NEXT(zone, statelink)) count++; break; + case DNS_ZONESTATE_SOAQUERY: + for (zone = ISC_LIST_HEAD(zmgr->zones); + zone != NULL; + zone = ISC_LIST_NEXT(zone, link)) + if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_REFRESH)) + count++; + break; case DNS_ZONESTATE_ANY: for (zone = ISC_LIST_HEAD(zmgr->zones); zone != NULL;