]> git.ipfire.org Git - thirdparty/bind9.git/commit
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)
commit3415392d01248dcfab69078704bd8986d2b65ea0
tree1f5c4a9ad8302f1b57b6dbbfd70cc938fdaec7c1
parentd3db9ccf5384718f7b14c5a9a172ce911a743160
parent2e6107008dae09d32e3d34fb5423b3d78c4ff651
fix: dev: Optimize key ID check when searching for matching keys

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