Fix a regression in radix tree implementation introduced by ECS code (#38983)

This commit is contained in:
Mukund Sivaraman 2015-05-05 13:09:07 +05:30
parent ecaed3593c
commit 8f25faf972
4 changed files with 25 additions and 2 deletions

View file

@ -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]

View file

@ -0,0 +1,7 @@
acl a { 127.0.0.1; ::1; };
acl b { a; };
acl c { !b; };
options {
allow-query { c; };
};

View 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

View 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) {