+ 518. [bug] The resolver did not realize that a DNAME which was
+ "the answer" to the client's query was "the answer",
+ and such queries would fail.
+
+ 517. [bug] The resolver's DNAME code would trigger an assertion
+ if there was more than one DNAME in the chain.
+
+ 516. [bug] Cache lookups which had a NULL node pointer, e.g.
+ those by dns_view_find(), and which would match a
+ DNAME, would trigger an INSIST(!search.need_cleanup)
+ assertion.
+
515. [bug] The ssu table was not beinge attached / detached
by dns_zone_[sg]etssutable. [RT#397]
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rbtdb.c,v 1.126 2000/09/11 16:48:25 halley Exp $ */
+/* $Id: rbtdb.c,v 1.127 2000/10/13 18:55:10 halley Exp $ */
/*
* Principal Author: Bob Halley
tree_exit:
RWUNLOCK(&search.rbtdb->tree_lock, isc_rwlocktype_read);
- INSIST(!search.need_cleanup);
+ /*
+ * If we found a zonecut but aren't going to use it, we have to
+ * let go of it.
+ */
+ if (search.need_cleanup) {
+ node = search.zonecut;
+
+ LOCK(&(search.rbtdb->node_locks[node->locknum].lock));
+ INSIST(node->references > 0);
+ node->references--;
+ if (node->references == 0)
+ no_references(search.rbtdb, node, 0);
+ UNLOCK(&(search.rbtdb->node_locks[node->locknum].lock));
+ }
dns_rbtnodechain_reset(&search.chain);
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.171 2000/10/07 00:09:24 bwelling Exp $ */
+/* $Id: resolver.c,v 1.172 2000/10/13 18:55:11 halley Exp $ */
#include <config.h>
{
isc_result_t result;
dns_rdata_t rdata;
- dns_name_t *tname;
unsigned int nlabels, nbits;
int order;
dns_namereln_t namereln;
dns_rdata_dname_t dname;
+ dns_fixedname_t prefix;
/*
* Get the target name of the DNAME.
*/
- dns_fixedname_init(fixeddname);
- tname = dns_fixedname_name(fixeddname);
result = dns_rdataset_first(rdataset);
if (result != ISC_R_SUCCESS)
dns_rdata_freestruct(&dname);
return (DNS_R_FORMERR);
}
- result = dns_name_split(qname, nlabels, nbits, tname, NULL);
+ dns_fixedname_init(&prefix);
+ result = dns_name_split(qname, nlabels, nbits,
+ dns_fixedname_name(&prefix), NULL);
if (result != ISC_R_SUCCESS) {
dns_rdata_freestruct(&dname);
return (result);
}
-
- result = dns_name_concatenate(tname, &dname.dname, tname, NULL);
+ dns_fixedname_init(fixeddname);
+ result = dns_name_concatenate(dns_fixedname_name(&prefix),
+ &dname.dname,
+ dns_fixedname_name(fixeddname), NULL);
dns_rdata_freestruct(&dname);
return (result);
}
isc_boolean_t have_answer, found_cname, found_type;
unsigned int aflag;
dns_rdatatype_t type;
- dns_fixedname_t dname;
+ dns_fixedname_t dname, fqname;
FCTXTRACE("answer_response");
* we're not chaining.
*/
INSIST(!external);
+ if (aflag ==
+ DNS_RDATASETATTR_ANSWER)
+ have_answer = ISC_TRUE;
name->attributes |=
DNS_NAMEATTR_ANSWER;
rdataset->attributes |= aflag;
* DNAME chaining.
*/
if (want_chaining) {
+ /*
+ * Copy the the dname into the
+ * qname fixed name.
+ *
+ * Although we check for
+ * failure of the concatenate
+ * operation, in practice it
+ * should never fail since
+ * we already know that the
+ * result fits in a fixedname.
+ */
+ dns_fixedname_init(&fqname);
+ result = dns_name_concatenate(
+ dns_fixedname_name(&dname),
+ NULL,
+ dns_fixedname_name(&fqname),
+ NULL);
+ if (result != ISC_R_SUCCESS)
+ return (result);
chaining = ISC_TRUE;
rdataset->attributes |=
DNS_RDATASETATTR_CHAINING;
qname = dns_fixedname_name(
- &dname);
+ &fqname);
}
}
}