- Fix for neater printout for error for missing DS response.
- Fix neater printout.
- Fix #1099: Unbound core dump on SIGSEGV.
+ - Fix for #1099: Fix to check for deleted RRset when the contents
+ is updated and fetched after it is stored, and also check for a
+ changed RRset.
4 July 2024: Wouter
- Fix to print details about the failure to lookup a DNSKEY record
struct ub_packed_rrset_key* ck;
lock_rw_rdlock(&rep->ref[i].key->entry.lock);
/* if deleted rrset, do not copy it */
- if(rep->ref[i].key->id == 0)
+ if(rep->ref[i].key->id == 0 ||
+ rep->ref[i].id != rep->ref[i].key->id)
ck = NULL;
else ck = packed_rrset_copy_region(
rep->ref[i].key, region, now);
}
/* if ref was updated make sure the message ttl is updated to
* the minimum of the current rrsets. */
- lock_rw_rdlock(&rep->rrsets[i]->entry.lock);
- ttl = ((struct packed_rrset_data*)rep->rrsets[i]->entry.data)->ttl;
- lock_rw_unlock(&rep->rrsets[i]->entry.lock);
- if(ttl < min_ttl) min_ttl = ttl;
+ lock_rw_rdlock(&rep->ref[i].key->entry.lock);
+ if(rep->ref[i].key->id != 0 &&
+ rep->ref[i].id == rep->ref[i].key->id) {
+ /* if deleted, skip ttl update. */
+ ttl = ((struct packed_rrset_data*)rep->rrsets[i]->entry.data)->ttl;
+ if(ttl < min_ttl) min_ttl = ttl;
+ }
+ lock_rw_unlock(&rep->ref[i].key->entry.lock);
}
if(min_ttl < rep->ttl) {
rep->ttl = min_ttl;