4197. [bug] 'named-checkconf -z' didn't handle 'in-view' clauses.
[RT #40603]
(cherry picked from commit 075a3d60c2)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
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);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
view internal {
|
||||
zone shared.example {
|
||||
type master;
|
||||
file "shared.example.db";
|
||||
};
|
||||
};
|
||||
|
||||
view external {
|
||||
zone shared.example {
|
||||
in-view internal;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
@ 0 SOA . . 0 0 0 0 0
|
||||
@ 0 NS .
|
||||
@@ -247,5 +247,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
|
||||
|
||||
Reference in New Issue
Block a user