]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix: dev: Optimize key ID check when searching for matching keys
authorEvan Hunt <each@isc.org>
Thu, 20 Mar 2025 18:25:05 +0000 (18:25 +0000)
committerEvan Hunt <each@isc.org>
Thu, 20 Mar 2025 18:25:05 +0000 (18:25 +0000)
When searching through a DNSKEY or KEY rrset for the key matching a particular algorithm and ID, it's a waste of time to convert every key into a `dst_key` object; it's faster to compute the key ID from the rdata, then do the full key conversion after determining that we've found the right key. This optimization was already used in the validator, but it's been refactored for code clarity, and is now also used in query.c and message.c.

Merge branch 'each-refactor-key-search' into 'main'

See merge request isc-projects/bind9!10258


Trivial merge