]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] fix "initialize with revoked key" test
authorEvan Hunt <each@isc.org>
Tue, 10 Feb 2015 21:46:45 +0000 (13:46 -0800)
committerEvan Hunt <each@isc.org>
Tue, 10 Feb 2015 21:46:45 +0000 (13:46 -0800)
bin/tests/system/dnssec/tests.sh
lib/dns/keytable.c

index 1cf0cd8d4eb832238dea070a434bd31e9cb35225..03a5f324146c406372c6dfb604456bb220aae6c7 100644 (file)
@@ -2510,7 +2510,7 @@ cp ns5/named2.conf ns5/named.conf
 $RNDC -c ../common/rndc.conf -s 10.53.0.5 -p 9953 reconfig 2>&1 | sed 's/^/I:ns5 /'
 sleep 3
 $DIG $DIGOPTS +dnssec -p 5300 @10.53.0.5 SOA . > dig.out.ns5.test$n
-grep "status: NOERROR" dig.out.ns5.test$n > /dev/null || ret=1
+grep "status: SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
index 56fefcd2c122bde701ae5459bb2c828853848fe6..bdff137534e57b6faea090d3368e997e3baab5f5 100644 (file)
@@ -275,16 +275,17 @@ dns_keytable_deletekeynode(dns_keytable_t *keytable, dst_key_t *dstkey) {
        }
 
        knode = node->data;
-       if (knode->next == NULL &&
-           (knode->key == NULL ||
-            dst_key_compare(knode->key, dstkey) == ISC_TRUE)) {
+       if (knode->next == NULL && knode->key != NULL &&
+           dst_key_compare(knode->key, dstkey) == ISC_TRUE)
+       {
                result = dns_rbt_deletenode(keytable->table, node, ISC_FALSE);
                goto finish;
        }
 
        kprev = (dns_keynode_t **) &node->data;
        while (knode != NULL) {
-               if (dst_key_compare(knode->key, dstkey) == ISC_TRUE)
+               if (knode->key != NULL &&
+                   dst_key_compare(knode->key, dstkey) == ISC_TRUE)
                        break;
                kprev = &knode->next;
                knode = knode->next;