fix: nil: Small qpcache and qpzone related fixes

Merge branch 'ondrej/little-fixups-in-qp' into 'main'

See merge request isc-projects/bind9!10970
This commit is contained in:
Ondřej Surý 2025-09-16 18:49:30 +02:00
commit 3b6fe27455
2 changed files with 13 additions and 20 deletions

View file

@ -107,33 +107,26 @@ struct dns_slabheader {
dns_slabheader_proof_t *noqname;
dns_slabheader_proof_t *closest;
/*%<
* We don't use the LIST macros, because the LIST structure has
* both head and tail pointers, and is doubly linked.
*/
/*%
* Points to the top slabtop structure for the type.
*/
dns_slabtop_t *top;
/*%<
* If this is the top header for an rdataset, 'next' points
* to the top header for the next rdataset (i.e., the next type).
*
* Otherwise 'up' points up to the header whose down pointer points at
* this header.
*/
struct dns_slabheader *down;
/*%<
/*%
* Points to the header for the next older version of
* this rdataset.
*/
struct dns_slabheader *down;
dns_dbnode_t *node;
/*%<
* The database and database node objects containing
* this rdataset, if any.
/*%
* The database node objects containing this rdataset, if any.
*/
dns_dbnode_t *node;
/*%
* Cached glue records for an rdataset of type NS (zone only).
*/
dns_gluelist_t *gluelist;
/*%

View file

@ -474,7 +474,7 @@ first_header(dns_slabtop_t *top) {
static dns_slabheader_t *
first_existing_header(dns_slabtop_t *top) {
dns_slabheader_t *header = first_header(top);
if (EXISTS(top->header)) {
if (EXISTS(header)) {
return header;
}
return NULL;
@ -2933,7 +2933,7 @@ add(qpcache_t *qpdb, qpcnode_t *qpnode, dns_slabheader_t *newheader,
dns_slabheader_t *expireheader =
first_header(expiretop);
if (expireheader != NULL) {
mark_ancient(expiretop->header);
mark_ancient(expireheader);
}
/*
* FIXME: In theory, we should mark the RRSIG