mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
prevented 'named-checkconf -z' from stopping due to an intermediate fail
RT #3653 developer: marka reviewer: jinmei
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: named-checkconf.c,v 1.26 2002/07/11 04:50:34 marka Exp $ */
|
/* $Id: named-checkconf.c,v 1.27 2002/10/10 13:22:00 jinmei Exp $ */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@@ -129,6 +129,7 @@ configure_view(const char *vclass, const char *view, cfg_obj_t *config,
|
|||||||
cfg_obj_t *voptions;
|
cfg_obj_t *voptions;
|
||||||
cfg_obj_t *zonelist;
|
cfg_obj_t *zonelist;
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
|
isc_result_t tresult;
|
||||||
|
|
||||||
voptions = NULL;
|
voptions = NULL;
|
||||||
if (vconfig != NULL)
|
if (vconfig != NULL)
|
||||||
@@ -145,9 +146,10 @@ configure_view(const char *vclass, const char *view, cfg_obj_t *config,
|
|||||||
element = cfg_list_next(element))
|
element = cfg_list_next(element))
|
||||||
{
|
{
|
||||||
cfg_obj_t *zconfig = cfg_listelt_value(element);
|
cfg_obj_t *zconfig = cfg_listelt_value(element);
|
||||||
CHECK(configure_zone(vclass, view, zconfig, mctx));
|
tresult = configure_zone(vclass, view, zconfig, mctx);
|
||||||
|
if (tresult != ISC_R_SUCCESS)
|
||||||
|
result = tresult;
|
||||||
}
|
}
|
||||||
cleanup:
|
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,6 +162,7 @@ load_zones_fromconfig(cfg_obj_t *config, isc_mem_t *mctx) {
|
|||||||
cfg_obj_t *vconfig;
|
cfg_obj_t *vconfig;
|
||||||
const char *vclass;
|
const char *vclass;
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
|
isc_result_t tresult;
|
||||||
|
|
||||||
views = NULL;
|
views = NULL;
|
||||||
|
|
||||||
@@ -178,12 +181,16 @@ load_zones_fromconfig(cfg_obj_t *config, isc_mem_t *mctx) {
|
|||||||
vclass = cfg_obj_asstring(classobj);
|
vclass = cfg_obj_asstring(classobj);
|
||||||
}
|
}
|
||||||
vname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
|
vname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
|
||||||
CHECK(configure_view(vclass, vname, config, vconfig, mctx));
|
tresult = configure_view(vclass, vname, config, vconfig, mctx);
|
||||||
|
if (tresult != ISC_R_SUCCESS)
|
||||||
|
result = tresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (views == NULL)
|
if (views == NULL) {
|
||||||
CHECK(configure_view("IN", "_default", config, NULL, mctx));
|
tresult = configure_view("IN", "_default", config, NULL, mctx);
|
||||||
cleanup:
|
if (tresult != ISC_R_SUCCESS)
|
||||||
|
result = tresult;
|
||||||
|
}
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user