From: Mark Andrews Date: Tue, 7 Apr 2015 03:21:33 +0000 (+1000) Subject: 4092. [bug] 'in-view' didn't work for zones beneath a empty zone. X-Git-Tag: v9.11.0a1~896 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=febb020dceab01c12b406eeae6e825aca7411dd6;p=thirdparty%2Fbind9.git 4092. [bug] 'in-view' didn't work for zones beneath a empty zone. [RT #39173] --- diff --git a/CHANGES b/CHANGES index e8744e692eb..0a927077578 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4092. [bug] 'in-view' didn't work for zones beneath a empty zone. + [RT #39173] + 4091. [cleanup] Some cleanups in isc mem code. [RT #38896] 4090. [bug] Fix a crash while parsing malformed CAA RRs in diff --git a/bin/named/server.c b/bin/named/server.c index 63d46cd4a5d..1e42634adf3 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -2226,8 +2226,8 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view, obj = NULL; (void)cfg_map_get(zoptions, "type", &obj); - INSIST(obj != NULL); - if (strcasecmp(cfg_obj_asstring(obj), "forward") == 0) { + if (obj != NULL && + strcasecmp(cfg_obj_asstring(obj), "forward") == 0) { obj = NULL; (void)cfg_map_get(zoptions, "forward", &obj); if (obj == NULL) diff --git a/bin/tests/system/views/ns2/1.10.in-addr.arpa.db b/bin/tests/system/views/ns2/1.10.in-addr.arpa.db new file mode 100644 index 00000000000..65002ef1e98 --- /dev/null +++ b/bin/tests/system/views/ns2/1.10.in-addr.arpa.db @@ -0,0 +1,2 @@ +@ IN SOA . . 0 0 0 0 0 +@ IN NS . diff --git a/bin/tests/system/views/ns2/named2.conf b/bin/tests/system/views/ns2/named2.conf index 21ad423009a..ec470aecebb 100644 --- a/bin/tests/system/views/ns2/named2.conf +++ b/bin/tests/system/views/ns2/named2.conf @@ -54,6 +54,11 @@ view "internal" { allow-update { any; }; }; + zone "1.10.in-addr.arpa" { + type master; + file "1.10.in-addr.arpa.db"; + }; + zone "inline" { type master; file "internal/inline.db"; @@ -82,6 +87,10 @@ view "external" { forwarders { 10.53.0.5; }; }; + zone "1.10.in-addr.arpa" { + in-view internal; + }; + zone "inline" { type master; file "external/inline.db"; diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index bba2aacac77..d2c0a649508 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -13093,6 +13093,10 @@ view external { An in-view zone cannot be used as a response policy zone. + + An in-view zone is not intended to reference + a forward zone. +