]> git.ipfire.org Git - thirdparty/bind9.git/commit
remove DNS_QPFIND_NOEXACT
authorEvan Hunt <each@isc.org>
Sat, 23 Sep 2023 08:02:17 +0000 (01:02 -0700)
committerEvan Hunt <each@isc.org>
Thu, 28 Sep 2023 07:30:57 +0000 (00:30 -0700)
commit606232b8d5f28012fdfef870718bc1e6b5fd3ef1
treeae3333d0b2a8786627f42c25d5e50eb16b8144cc
parent3bf23fadb0cd9c39319d6db5d12b2a1ab1c27f44
remove DNS_QPFIND_NOEXACT

since dns_qp_findname_ancestor() can now return a chain object, it is no
longer necessary to provide a _NOEXACT search option. if we want to look
up the closest ancestor of a name, we can just do a normal search, and
if successful, retrieve the second-to-last node from the QP chain.

this makes ancestor lookups slightly more complicated for the caller,
but allows us to simplify the code in dns_qp_findname_ancestor(), making
it easier to ensure correctness.  this was a fairly rare use case:
outside of unit tests, DNS_QPFIND_NOEXACT was only used in the zone
table, which has now been updated to use the QP chain.  the equivalent
RBT feature is only used by the resolver for cache lookups of 'atparent'
types (i.e, DS records).
lib/dns/forward.c
lib/dns/include/dns/qp.h
lib/dns/keytable.c
lib/dns/nametree.c
lib/dns/nta.c
lib/dns/qp.c
lib/dns/zt.c
tests/dns/qp_test.c