Commit 075a3d60 authored by Mark Andrews's avatar Mark Andrews
Browse files

4197. [bug] 'named-checkconf -z' didn't handle 'in-view' clauses.

                        [RT #40603]
parent 4ca7391e
4197. [bug] 'named-checkconf -z' didn't handle 'in-view' clauses.
[RT #40603]
4196. [doc] Improve how "enum + other" types are documented.
[RT #40608]
......
......@@ -180,6 +180,7 @@ configure_zone(const char *vclass, const char *view,
const char *zfile = NULL;
const cfg_obj_t *maps[4];
const cfg_obj_t *mastersobj = NULL;
const cfg_obj_t *inviewobj = NULL;
const cfg_obj_t *zoptions = NULL;
const cfg_obj_t *classobj = NULL;
const cfg_obj_t *typeobj = NULL;
......@@ -211,6 +212,10 @@ configure_zone(const char *vclass, const char *view,
}
maps[i] = NULL;
cfg_map_get(zoptions, "in-view", &inviewobj);
if (inviewobj != NULL)
return (ISC_R_SUCCESS);
cfg_map_get(zoptions, "type", &typeobj);
if (typeobj == NULL)
return (ISC_R_FAILURE);
......
view internal {
zone shared.example {
type master;
file "shared.example.db";
};
};
view external {
zone shared.example {
in-view internal;
};
};
......@@ -254,5 +254,12 @@ grep "range 8610 8614;" checkconf.out7 > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
status=`expr $status + $ret`
echo "I: check that named-checkconf -z handles in-view"
ret=0
$CHECKCONF -z in-view-good.conf > checkconf.out7 2>&1 || ret=1
grep "zone shared.example/IN: loaded serial" < checkconf.out7 > /dev/null || ret=1
if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
status=`expr $status + $ret`
echo "I:exit status: $status"
exit $status
Markdown is supported
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