Commit b5fff54f authored by Brian Wellington's avatar Brian Wellington
Browse files

SIG records were not properly negatively cached.

parent 3ae75793
56. [bug] SIG records were not properly returned in cached
negative answers.
55. [bug] Responses containing multiple names in the authority
section were not negatively cached.
54. [bug] If a fetch with sigrdataset==NULL joined one with 54. [bug] If a fetch with sigrdataset==NULL joined one with
sigrdataset!=NULL or vice versa, the resolver sigrdataset!=NULL or vice versa, the resolver
could catch an assertion or lose signature data, could catch an assertion or lose signature data,
......
...@@ -157,7 +157,8 @@ dns_ncache_add(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node, ...@@ -157,7 +157,8 @@ dns_ncache_add(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
isc_buffer_available(&buffer, &r); isc_buffer_available(&buffer, &r);
if (r.length < 2) if (r.length < 2)
return (ISC_R_NOSPACE); return (ISC_R_NOSPACE);
isc_buffer_putuint16(&buffer, type); isc_buffer_putuint16(&buffer,
rdataset->type);
/* /*
* Copy the rdataset into the buffer. * Copy the rdataset into the buffer.
*/ */
......
...@@ -2724,7 +2724,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) { ...@@ -2724,7 +2724,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
type = rdataset->type; type = rdataset->type;
if (type == dns_rdatatype_sig) if (type == dns_rdatatype_sig)
type = rdataset->covers; type = rdataset->covers;
if (rdataset->type == dns_rdatatype_ns) { if (type == dns_rdatatype_ns) {
/* /*
* NS or SIG NS. * NS or SIG NS.
* *
...@@ -2739,10 +2739,8 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) { ...@@ -2739,10 +2739,8 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
DNS_RDATASETATTR_CACHE; DNS_RDATASETATTR_CACHE;
rdataset->trust = dns_trust_glue; rdataset->trust = dns_trust_glue;
ns_rdataset = rdataset; ns_rdataset = rdataset;
} else if (rdataset->type == } else if (type == dns_rdatatype_soa ||
dns_rdatatype_soa || type == dns_rdatatype_nxt) {
rdataset->type ==
dns_rdatatype_nxt) {
/* /*
* SOA, SIG SOA, NXT, or SIG NXT. * SOA, SIG SOA, NXT, or SIG NXT.
* *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment