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
sigrdataset!=NULL or vice versa, the resolver
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,
isc_buffer_available(&buffer, &r);
if (r.length < 2)
return (ISC_R_NOSPACE);
isc_buffer_putuint16(&buffer, type);
isc_buffer_putuint16(&buffer,
rdataset->type);
/*
* Copy the rdataset into the buffer.
*/
......
......@@ -2724,7 +2724,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
type = rdataset->type;
if (type == dns_rdatatype_sig)
type = rdataset->covers;
if (rdataset->type == dns_rdatatype_ns) {
if (type == dns_rdatatype_ns) {
/*
* NS or SIG NS.
*
......@@ -2739,10 +2739,8 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
DNS_RDATASETATTR_CACHE;
rdataset->trust = dns_trust_glue;
ns_rdataset = rdataset;
} else if (rdataset->type ==
dns_rdatatype_soa ||
rdataset->type ==
dns_rdatatype_nxt) {
} else if (type == dns_rdatatype_soa ||
type == dns_rdatatype_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