1795. [bug] "rndc dumpb" was not fully documented. Minor
formating issues with "rndc dumpdb -all". [RT #13396]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -64,7 +64,8 @@
|
||||
|
||||
1796. [func] "rndc freeze/thaw" now freezes/thaws all zones.
|
||||
|
||||
1795. [placeholder] rt13396
|
||||
1795. [bug] "rndc dumpb" was not fully documented. Minor
|
||||
formating issues with "rndc dumpdb -all". [RT #13396]
|
||||
|
||||
1794. [func] Named and named-checkzone can now both check for
|
||||
non-terminal wildcard records.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.438 2005/01/17 00:46:01 marka Exp $ */
|
||||
/* $Id: server.c,v 1.439 2005/03/14 23:55:56 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -3714,6 +3714,15 @@ add_view_tolist(struct dumpcontext *dctx, dns_view_t *view) {
|
||||
struct viewlistentry *vle;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
/*
|
||||
* Prevent duplicate views.
|
||||
*/
|
||||
for (vle = ISC_LIST_HEAD(dctx->viewlist);
|
||||
vle != NULL;
|
||||
vle = ISC_LIST_NEXT(vle, link))
|
||||
if (vle->view == view)
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
vle = isc_mem_get(dctx->mctx, sizeof *vle);
|
||||
if (vle == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
@@ -3777,9 +3786,11 @@ dumpdone(void *arg, isc_result_t result) {
|
||||
if (dctx->view == NULL)
|
||||
goto done;
|
||||
INSIST(dctx->zone == NULL);
|
||||
}
|
||||
} else
|
||||
goto resume;
|
||||
nextview:
|
||||
fprintf(dctx->fp, ";\n; Start view %s\n;\n", dctx->view->view->name);
|
||||
resume:
|
||||
if (dctx->zone == NULL && dctx->cache == NULL && dctx->dumpcache) {
|
||||
style = &dns_master_style_cache;
|
||||
/* start cache dump */
|
||||
@@ -3840,9 +3851,12 @@ dumpdone(void *arg, isc_result_t result) {
|
||||
&dctx->mdctx);
|
||||
if (result == DNS_R_CONTINUE)
|
||||
return;
|
||||
if (result == ISC_R_NOTIMPLEMENTED)
|
||||
if (result == ISC_R_NOTIMPLEMENTED) {
|
||||
fprintf(dctx->fp, "; %s\n",
|
||||
dns_result_totext(result));
|
||||
result = ISC_R_SUCCESS;
|
||||
goto nextzone;
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -3866,7 +3880,6 @@ dumpdone(void *arg, isc_result_t result) {
|
||||
dumpcontext_destroy(dctx);
|
||||
}
|
||||
|
||||
|
||||
isc_result_t
|
||||
ns_server_dumpdb(ns_server_t *server, char *args) {
|
||||
struct dumpcontext *dctx = NULL;
|
||||
@@ -3922,6 +3935,7 @@ ns_server_dumpdb(ns_server_t *server, char *args) {
|
||||
ptr = next_token(&args, " \t");
|
||||
}
|
||||
|
||||
nextview:
|
||||
for (view = ISC_LIST_HEAD(server->viewlist);
|
||||
view != NULL;
|
||||
view = ISC_LIST_NEXT(view, link))
|
||||
@@ -3930,6 +3944,11 @@ ns_server_dumpdb(ns_server_t *server, char *args) {
|
||||
continue;
|
||||
CHECK(add_view_tolist(dctx, view));
|
||||
}
|
||||
if (ptr != NULL) {
|
||||
ptr = next_token(&args, " \t");
|
||||
if (ptr != NULL)
|
||||
goto nextview;
|
||||
}
|
||||
dumpdone(dctx, ISC_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rndc.c,v 1.103 2005/02/23 01:06:36 marka Exp $ */
|
||||
/* $Id: rndc.c,v 1.104 2005/03/14 23:55:57 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: DCL
|
||||
@@ -111,7 +111,8 @@ command is one of the following:\n\
|
||||
reconfig Reload configuration file and new zones only.\n\
|
||||
stats Write server statistics to the statistics file.\n\
|
||||
querylog Toggle query logging.\n\
|
||||
dumpdb Dump cache(s) to the dump file (named_dump.db).\n\
|
||||
dumpdb [-all|-cache|-zones] [view ...]\n\
|
||||
Dump cache(s) to the dump file (named_dump.db).\n\
|
||||
stop Save pending updates to master files and stop the server.\n\
|
||||
stop -p Save pending updates to master files and stop the server\n\
|
||||
reporting process id.\n\
|
||||
|
||||
Reference in New Issue
Block a user