+ 744. [bug] When returning DNS_R_CNAME or DNS_R_DNAME as the
+ result of an ANY or SIG query, the resolver failed
+ to setup the return event's rdatasets, causing an
+ assertion failure in the query code. [RT #881]
+
743. [bug] Receiving a large number of certain malformed
answers could cause named to stop responding.
[RT #861]
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.h,v 1.83.2.2 2001/01/22 18:23:12 gson Exp $ */
+/* $Id: name.h,v 1.83.2.3 2001/02/20 21:56:25 gson Exp $ */
#ifndef DNS_NAME_H
#define DNS_NAME_H 1
#define DNS_NAMEATTR_CACHE 0x0100 /* Used by resolver. */
#define DNS_NAMEATTR_ANSWER 0x0200 /* Used by resolver. */
#define DNS_NAMEATTR_NCACHE 0x0400 /* Used by resolver. */
-#define DNS_NAMEATTR_CNAME 0x0800 /* Used by message. */
-#define DNS_NAMEATTR_DNAME 0x1000 /* Used by message. */
+#define DNS_NAMEATTR_CHAINING 0x0800 /* Used by resolver. */
extern dns_name_t *dns_rootname;
extern dns_name_t *dns_wildcardname;
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.187.2.6 2001/02/17 02:27:42 bwelling Exp $ */
+/* $Id: resolver.c,v 1.187.2.7 2001/02/20 21:56:23 gson Exp $ */
#include <config.h>
if (result != ISC_R_SUCCESS)
return (result);
anodep = &event->node;
- if (fctx->type != dns_rdatatype_any &&
- fctx->type != dns_rdatatype_sig) {
+ /*
+ * If this is an ANY or SIG query, we're not going
+ * to return any rdatasets, unless we encountered
+ * a CNAME or DNAME as "the answer". In this case,
+ * we're going to return DNS_R_CNAME or DNS_R_DNAME
+ * and we must set up the rdatasets.
+ */
+ if ((fctx->type != dns_rdatatype_any &&
+ fctx->type != dns_rdatatype_sig) ||
+ (name->attributes & DNS_NAMEATTR_CHAINING) != 0) {
ardataset = event->rdataset;
asigrdataset = event->sigrdataset;
}
*/
if (want_chaining) {
chaining = ISC_TRUE;
+ name->attributes |=
+ DNS_NAMEATTR_CHAINING;
rdataset->attributes |=
DNS_RDATASETATTR_CHAINING;
qname = &tname;
if (result != ISC_R_SUCCESS)
return (result);
chaining = ISC_TRUE;
+ name->attributes |=
+ DNS_NAMEATTR_CHAINING;
rdataset->attributes |=
DNS_RDATASETATTR_CHAINING;
qname = dns_fixedname_name(