Commit 0439bfed authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

Fix parsing of NZFs saved by rndc addzone with view specified (#39845)

parent 2a815e41
4142. [bug] rndc addzone with view specified saved NZF config
that could not be read back by named. This has now
been fixed. [RT #39845]
4141. [bug] A formatting bug caused rndc zonestatus to print
negative numbers for large serial values. This has
now been fixed. [RT #39854]
......
......@@ -5374,7 +5374,7 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
*/
cfg_parser_reset(ns_g_addparser);
result = cfg_parse_file(ns_g_addparser, view->new_zone_file,
&cfg_type_newzones, &nzcfg->nzconfig);
&cfg_type_addzoneconf, &nzcfg->nzconfig);
return (ISC_R_SUCCESS);
}
......
......@@ -311,6 +311,18 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:checking rndc reload causes named to reload the external view's NZF file ($n)"
ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
$DIG +norec $DIGOPTS @10.53.0.2 -b 10.53.0.2 a.added.example a > dig.out.ns2.int.$n || ret=1
grep 'status: NOERROR' dig.out.ns2.int.$n > /dev/null || ret=1
$DIG +norec $DIGOPTS @10.53.0.4 -b 10.53.0.4 a.added.example a > dig.out.ns2.ext.$n || ret=1
grep 'status: NOERROR' dig.out.ns2.ext.$n > /dev/null || ret=1
grep '^a.added.example' dig.out.ns2.ext.$n > /dev/null || ret=1
n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:checking rndc showzone with newly added zone ($n)"
ret=0
$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 showzone added.example in external > rndc.out.ns2.$n
......
......@@ -1731,24 +1731,6 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_bindkeys = {
&cfg_rep_map, bindkeys_clausesets
};
/*% The new-zone-file syntax (for zones added by 'rndc addzone') */
static cfg_clausedef_t
newzones_clauses[] = {
{ "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI },
{ NULL, NULL, 0 }
};
static cfg_clausedef_t *
newzones_clausesets[] = {
newzones_clauses,
NULL
};
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_newzones = {
"newzones", cfg_parse_mapbody, cfg_print_mapbody, cfg_doc_mapbody,
&cfg_rep_map, newzones_clausesets
};
/*% The "options" statement syntax. */
static cfg_clausedef_t *
......@@ -1956,6 +1938,13 @@ LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_addzoneconf = {
&cfg_rep_map, addzoneconf_clausesets
};
/*
* XXXMPA Remove in 9.11. Backwards API compat only.
*/
LIBISCCFG_EXTERNAL_DATA cfg_type_t cfg_type_newzones = {
"newzones", cfg_parse_mapbody, cfg_print_mapbody, cfg_doc_mapbody,
&cfg_rep_map, addzoneconf_clausesets
};
static isc_result_t
parse_unitstring(char *str, isc_resourcevalue_t *valuep) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment