diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 09241709ee..6b4333ac19 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -2620,7 +2620,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` diff --git a/lib/dns/keytable.c b/lib/dns/keytable.c index 56fefcd2c1..bdff137534 100644 --- a/lib/dns/keytable.c +++ b/lib/dns/keytable.c @@ -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;