[v9_9] fix root-delegation-only without exclude

4112.	[bug]		Named failed to load when "root-delegation-only"
			was used without a list of domains to exclude.
			[RT #39380]
This commit is contained in:
Evan Hunt
2015-05-04 12:46:11 -07:00
parent 9bd61f393f
commit a25f1b3cf5
4 changed files with 17 additions and 5 deletions
+4
View File
@@ -1,3 +1,7 @@
4112. [bug] Named failed to load when "root-delegation-only"
was used without a list of domains to exclude.
[RT #39380]
4110. [bug] Address memory leaks / null pointer dereferences
on out of memory. [RT #39310]
+6 -5
View File
@@ -3263,18 +3263,19 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
obj = NULL;
result = ns_config_get(maps, "root-delegation-only", &obj);
if (result == ISC_R_SUCCESS) {
if (result == ISC_R_SUCCESS)
dns_view_setrootdelonly(view, ISC_TRUE);
if (result == ISC_R_SUCCESS && ! cfg_obj_isvoid(obj)) {
const cfg_obj_t *exclude;
dns_fixedname_t fixed;
dns_name_t *name;
const cfg_obj_t *exclude;
dns_view_setrootdelonly(view, ISC_TRUE);
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
for (element = cfg_list_first(obj);
element != NULL;
element = cfg_list_next(element)) {
element = cfg_list_next(element))
{
exclude = cfg_listelt_value(element);
CHECK(dns_name_fromstring(name,
cfg_obj_asstring(exclude),
+2
View File
@@ -30,6 +30,8 @@ options {
listen-on-v6 { none; };
recursion no;
// minimal-responses yes;
/* test that named loads with root-delegation-only */
root-delegation-only;
};
zone "." {
+5
View File
@@ -30,6 +30,11 @@ options {
listen-on-v6 { none; };
recursion no;
// minimal-responses yes;
/*
* test that named loads with root-delegation-only that
* has a exclude list.
*/
root-delegation-only exclude { "a"; };
};
zone "." {