]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix a regression in radix tree implementation introduced by ECS code (#38983)
authorMukund Sivaraman <muks@isc.org>
Tue, 5 May 2015 07:39:07 +0000 (13:09 +0530)
committerMukund Sivaraman <muks@isc.org>
Tue, 5 May 2015 07:41:23 +0000 (13:11 +0530)
CHANGES
bin/tests/system/checkconf/good-nested.conf [new file with mode: 0644]
bin/tests/system/checkconf/tests.sh
lib/isc/radix.c

diff --git a/CHANGES b/CHANGES
index 7ca6e7c1b2dc6cf2e01a40517409f887e826305d..790fe679628cecf31d138d17c5c3fb7218b6625f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+4114.  [bug]           Fix a regression in radix tree implementation
+                       introduced by ECS code. This bug was never
+                       released, but it was reported by a user testing
+                       master. [RT #38983]
+
 4113.  [test]          Check for Net::DNS is some system test
                        prerequisites. [RT #39369]
 
diff --git a/bin/tests/system/checkconf/good-nested.conf b/bin/tests/system/checkconf/good-nested.conf
new file mode 100644 (file)
index 0000000..03bc22b
--- /dev/null
@@ -0,0 +1,7 @@
+acl a { 127.0.0.1; ::1; };
+acl b { a; };
+acl c { !b; };
+
+options {
+       allow-query { c; };
+};
index d492298531f71c34f0639148b3fd063d2911e4dc..6a77f7738be6cde96bf7ce9e27c216b4b10e1fc7 100644 (file)
@@ -42,7 +42,7 @@ grep 'secret "????????????????"' good.conf.out > /dev/null 2>&1 || ret=1
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
 
-for bad in bad*.conf
+for bad in bad-*.conf
 do
        ret=0
        echo "I: checking that named-checkconf detects error in $bad"
@@ -51,6 +51,15 @@ do
        status=`expr $status + $ret`
 done
 
+for good in good-*.conf
+do
+       ret=0
+       echo "I: checking that named-checkconf detects no error in $good"
+       $CHECKCONF $good > /dev/null 2>&1
+       if [ $? != 0 ]; then echo "I:failed"; ret=1; fi
+       status=`expr $status + $ret`
+done
+
 echo "I: checking that named-checkconf -z catches missing hint file"
 ret=0
 $CHECKCONF -z hint-nofile.conf > hint-nofile.out 2>&1 && ret=1
index a1d8235d94b88f45e86d44241f6665baf073d6db..b302f8c920f3ba7997bc9415312a5fa84f359243 100644 (file)
@@ -520,8 +520,10 @@ isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target,
        }
        new_node->parent = NULL;
        new_node->l = new_node->r = NULL;
-       for (i = 0; i < 4; i++)
+       for (i = 0; i < 4; i++) {
                new_node->node_num[i] = -1;
+               new_node->data[i] = NULL;
+       }
        radix->num_active_node++;
 
        if (source != NULL) {