2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Expand the list of the priority types and move it to db_p.h

Add HTTPS, SVCB, SRV, PTR, NAPTR, DNSKEY and TXT records to the list of
the priority types that are put at the beginning of the slabheader list
for faster access and to avoid eviction when there are more types than
the max-types-per-name limit.
This commit is contained in:
Ondřej Surý
2024-06-17 11:40:40 +02:00
parent b8522e5b8e
commit b27c6bcce8
5 changed files with 44 additions and 73 deletions

View File

@@ -2438,30 +2438,6 @@ again:
}
}
static bool
prio_type(dns_typepair_t type) {
switch (type) {
case dns_rdatatype_soa:
case DNS_SIGTYPE(dns_rdatatype_soa):
case dns_rdatatype_a:
case DNS_SIGTYPE(dns_rdatatype_a):
case dns_rdatatype_aaaa:
case DNS_SIGTYPE(dns_rdatatype_aaaa):
case dns_rdatatype_nsec:
case DNS_SIGTYPE(dns_rdatatype_nsec):
case dns_rdatatype_nsec3:
case DNS_SIGTYPE(dns_rdatatype_nsec3):
case dns_rdatatype_ns:
case DNS_SIGTYPE(dns_rdatatype_ns):
case dns_rdatatype_ds:
case DNS_SIGTYPE(dns_rdatatype_ds):
case dns_rdatatype_cname:
case DNS_SIGTYPE(dns_rdatatype_cname):
return (true);
}
return (false);
}
/*%
* These functions allow the heap code to rank the priority of each
* element. It returns true if v1 happens "sooner" than v2.