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

Remove offsets from the dns_name and dns_fixedname structures

The offsets were meant to speed-up the repeated dns_name operations, but
it was experimentally proven that there's actually no real-world
benefit.  Remove the offsets and labels fields from the dns_name and the
static offsets fields to save 128 bytes from the fixedname in favor of
calculating labels and offsets only when needed.
This commit is contained in:
Ondřej Surý
2025-02-21 12:09:28 +01:00
parent 869168545a
commit 08e966df82
67 changed files with 348 additions and 652 deletions

View File

@@ -416,7 +416,7 @@ make_key(const dns_rrl_t *rrl, dns_rrl_key_t *key,
key->s.qclass = qclass & 0xff;
}
if (qname != NULL && qname->labels != 0) {
if (qname != NULL && qname->length != 0) {
dns_name_t *origin = NULL;
if (qname->attributes.wildcard && zone != NULL &&