]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4092. [bug] 'in-view' didn't work for zones beneath a empty zone.
authorMark Andrews <marka@isc.org>
Tue, 7 Apr 2015 03:21:33 +0000 (13:21 +1000)
committerMark Andrews <marka@isc.org>
Tue, 7 Apr 2015 03:21:33 +0000 (13:21 +1000)
                        [RT #39173]

CHANGES
bin/named/server.c
bin/tests/system/views/ns2/1.10.in-addr.arpa.db [new file with mode: 0644]
bin/tests/system/views/ns2/named2.conf
doc/arm/Bv9ARM-book.xml

diff --git a/CHANGES b/CHANGES
index e8744e692eb6923b474e00b788a30e9295bc0be6..0a92707757837829709e6cbcdab13dea27fed7f0 100644 (file)
--- 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
index 63d46cd4a5dcedec5c551a259151c0693aad3797..1e42634adf3b62db240d4cc23c77b9902bf24613 100644 (file)
@@ -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 (file)
index 0000000..65002ef
--- /dev/null
@@ -0,0 +1,2 @@
+@      IN      SOA     . . 0 0 0 0 0
+@      IN      NS      .
index 21ad423009aa538439a56b98fe8762af70539f06..ec470aecebb1a9a488f948058159d833df205075 100644 (file)
@@ -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";
index bba2aacac77289b58e14dfb2f82f022e0a8fb59d..d2c0a64950874abae5796b42ce4d0a9fb6163ddb 100644 (file)
@@ -13093,6 +13093,10 @@ view external {
              An <command>in-view</command> zone cannot be used as a
              response policy zone.
            </para>
+           <para>
+             An <command>in-view</command> zone is not intended to reference
+             a <command>forward</command> zone.
+           </para>
          </sect3>
 
        </sect2>