]> git.ipfire.org Git - thirdparty/bind9.git/commit
Remove maybe_set_name
authorAlessio Podda <alessio@isc.org>
Mon, 1 Dec 2025 14:12:01 +0000 (15:12 +0100)
committerAlessio Podda <alessio@isc.org>
Wed, 10 Dec 2025 10:28:10 +0000 (11:28 +0100)
commit46e25bd0db8e79c9e286aca69d3a97b263bd8370
tree36a7a4dee5b0098372fcebfaf27612926f6a511a
parent14f880761b2cf0d4f7dd9239758d94a40509b6f5
Remove maybe_set_name

Outside of unit tests, the name parameter in dns_qpiter_<...> and
dns_qpchain_<...> is only used in context where the name can be
extracted directly from the underlying node.

This commits modifies the signatures of dns_qpiter_<...> and
dns_qpchain_<...> not to have a name parameter. Where the name parameter
was needed, we now query the node and copy the name directly from it.

This allows us to remove maybe_set_name from qp.c. Besides simplifying
the API, this leads to a performance speedup for NXDOMAIN handling,
as we avoid calling maybe_set_name inside step, and maybe_set_name is
very inefficient.

A copy of the implementation maybe_set_name is retained for the unit
tests.
lib/dns/include/dns/qp.h
lib/dns/keytable.c
lib/dns/nta.c
lib/dns/qp.c
lib/dns/qp_p.h
lib/dns/qpcache.c
lib/dns/qpzone.c
lib/dns/rpz.c
lib/dns/zt.c
tests/bench/qplookups.c
tests/dns/qp_test.c