- subreq insertion code fixup for slumber list.
- VERB_DETAIL, verbosity: 2 level gives short but readable output.
VERB_ALGO, verbosity: 3 gives extensive output.
+ - fixup RA bit in cached replies.
+ - fixup CNAME responses from the cache no longer partial response.
5 June 2007: Wouter
- iterator state finished.
qinf.qname = memdup(msg->qinfo.qname, msg->qinfo.qname_len);
if(!qinf.qname)
return 0;
+ /* fixup flags to be sensible for a reply based on the cache */
+ /* this module means that RA is available. It is an answer QR.
+ * Not AA from cache. Not CD in cache (depends on client bit). */
+ rep->flags |= (BIT_RA | BIT_QR);
+ rep->flags &= ~(BIT_AA | BIT_CD);
h = query_info_hash(&qinf);
dns_cache_store_msg(env, &qinf, h, rep);
free(qinf.qname);
&sname, &snamelen))
return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
/* cache the CNAME response under the current query */
- if(!iter_dns_store(qstate->env, iq->response, 0))
+ /* NOTE : set referral=1, so that rrsets get stored but not
+ * the partial query answer (CNAME only). */
+ if(!iter_dns_store(qstate->env, iq->response, 1))
return error_response(qstate, id, LDNS_RCODE_SERVFAIL);
/* set the current request's qname to the new value. */
qstate->qinfo.qname = sname;