diff -up bind-9.3.6-P1/bin/named/query.c.rh754398 bind-9.3.6-P1/bin/named/query.c --- bind-9.3.6-P1/bin/named/query.c.rh754398 2011-11-16 18:32:54.209508196 +0100 +++ bind-9.3.6-P1/bin/named/query.c 2011-11-16 18:34:05.298452774 +0100 @@ -1094,11 +1094,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1139,8 +1137,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; diff -up bind-9.3.6-P1/lib/dns/rbtdb.c.rh754398 bind-9.3.6-P1/lib/dns/rbtdb.c --- bind-9.3.6-P1/lib/dns/rbtdb.c.rh754398 2011-11-16 18:34:41.058432529 +0100 +++ bind-9.3.6-P1/lib/dns/rbtdb.c 2011-11-16 18:40:53.182128755 +0100 @@ -3193,7 +3193,7 @@ cache_find(dns_db_t *db, dns_name_t *nam result == DNS_R_NCACHENXRRSET) { bind_rdataset(search.rbtdb, node, found, search.now, rdataset); - if (foundsig != NULL) + if (RBTDB_RDATATYPE_BASE(found->type) != 0 && foundsig != NULL) bind_rdataset(search.rbtdb, node, foundsig, search.now, sigrdataset); } @@ -3742,7 +3742,7 @@ cache_findrdataset(dns_db_t *db, dns_dbn } if (found != NULL) { bind_rdataset(rbtdb, rbtnode, found, now, rdataset); - if (foundsig != NULL) + if (RBTDB_RDATATYPE_BASE(found->type) != 0 && foundsig != NULL) bind_rdataset(rbtdb, rbtnode, foundsig, now, sigrdataset); }