+ 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. [RT #399]
+
+ 517. [bug] The resolver's DNAME code would trigger an assertion
+ if there was more than one DNAME in the chain.
+ [RT #399]
+
+ 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. [RT #399]
+
511. [bug] The message code could throw an assertion on an
out of memory failure. [RT #392]
* SOFTWARE.
*/
-/* $Id: rbtdb.c,v 1.108.2.3 2000/09/12 19:16:00 gson Exp $ */
+/* $Id: rbtdb.c,v 1.108.2.4 2000/10/13 21:53:15 bwelling 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);
* SOFTWARE.
*/
-/* $Id: resolver.c,v 1.137.2.9 2000/07/28 22:45:52 gson Exp $ */
+/* $Id: resolver.c,v 1.137.2.10 2000/10/13 21:53:17 bwelling Exp $ */
#include <config.h>
isc_result_t result;
dns_rdata_t rdata;
isc_region_t r;
- dns_name_t *dname, tname;
+ dns_name_t tname;
unsigned int nlabels, nbits;
int order;
dns_namereln_t namereln;
+ dns_fixedname_t prefix;
/*
* Get the target name of the DNAME.
*/
- dns_fixedname_init(fixeddname);
- dname = dns_fixedname_name(fixeddname);
result = dns_rdataset_first(rdataset);
if (result != ISC_R_SUCCESS)
&nbits);
if (namereln != dns_namereln_subdomain)
return (DNS_R_FORMERR);
- result = dns_name_split(qname, nlabels, nbits, dname, NULL);
+ dns_fixedname_init(&prefix);
+ result = dns_name_split(qname, nlabels, nbits,
+ dns_fixedname_name(&prefix), NULL);
if (result != ISC_R_SUCCESS)
return (result);
-
- return (dns_name_concatenate(dname, &tname, dname, NULL));
+ dns_fixedname_init(fixeddname);
+ return (dns_name_concatenate(dns_fixedname_name(&prefix), &tname,
+ dns_fixedname_name(fixeddname), NULL));
}
static isc_result_t
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);
}
}
}