]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
7 months agochg: dev: rename ns_pluginregister_ctx_t into ns_pluginctx_t
Colin Vidal [Thu, 2 Oct 2025 05:32:50 +0000 (07:32 +0200)] 
chg: dev: rename ns_pluginregister_ctx_t into ns_pluginctx_t

The type `ns_pluginregister_ctx_t` was initially added to pass plugin
contextual data when the plugin is registered, but this is also now
passed into `plugin_check`. Furthermore, those various data are not
specific to the registration in particular. Rename the type into
`ns_pluginctx_t` for clarity.

Merge branch 'colin/rename-pluginctx-rename' into 'main'

See merge request isc-projects/bind9!11035

7 months agorename ns_pluginregister_ctx_t into ns_pluginctx_t
Colin Vidal [Wed, 1 Oct 2025 11:32:59 +0000 (13:32 +0200)] 
rename ns_pluginregister_ctx_t into ns_pluginctx_t

The type `ns_pluginregister_ctx_t` was initially added to pass plugin
contextual data when the plugin is registered, but this is also now
passed into `plugin_check`. Furthermore, those various data are not
specific to the registration in particular. Rename the type into
`ns_pluginctx_t` for clarity.

7 months agonew: ci: Prepare release announcement MR
Andoni Duarte [Wed, 1 Oct 2025 14:20:26 +0000 (14:20 +0000)] 
new: ci: Prepare release announcement MR

In the 'release' stage, create an MR automatically with the
corresponding release announcement. The input for this is taken from
metadata.json in bind9-qa.

Merge branch 'andoni/release-announcement-preparation' into 'main'

See merge request isc-projects/bind9!11039

7 months agoCreate release announcement MR
Andoni Duarte Pintado [Mon, 29 Sep 2025 15:21:13 +0000 (17:21 +0200)] 
Create release announcement MR

In the 'release' stage, create an MR automatically with the
corresponding release announcement. The input for this is taken from
metadata.json in bind9-qa.

7 months agochg: dev: Minor refactor of dst code
Matthijs Mekking [Wed, 1 Oct 2025 12:26:03 +0000 (12:26 +0000)] 
chg: dev: Minor refactor of dst code

Convert the defines to enums. Initialize the tags more explicitly and less ugly.

Merge branch 'matthijs-ugly-kid-joe' into 'main'

See merge request isc-projects/bind9!11000

7 months agoMinor refactor of dst code
Matthijs Mekking [Mon, 22 Sep 2025 14:58:22 +0000 (16:58 +0200)] 
Minor refactor of dst code

Convert the defines to enums. Initialize the tags more explicitly and
less ugly.

7 months agonew: usr: add support for synthetic records
Colin Vidal [Wed, 1 Oct 2025 10:52:39 +0000 (12:52 +0200)] 
new: usr: add support for synthetic records

Add a query plugin which, in "reverse" mode, enables the server to build a synthesized response to a PTR query when the PTR record requested is not found in the zone.

The dynamically-built name is constructed from a static prefix (passed as a plugin parameter), the IP address (extracted from the query name) and a suffix (also passed as a plugin parameter).  An `allow-synth` address-match list can be used to limit the network addresses for which the plugin may generate responses.

The plugin can also be used in "forward" mode, to build synthesized A/AAAA records from names using the same format as the dynamically-built PTR names. The same parameters are used: the plugin will react and answer a query if the name matches the configured prefix and origin, and encodes an IP address that is within `allow-synth`.

Closes #1586

Merge branch '1586-synthreverse' into 'main'

See merge request isc-projects/bind9!10348

7 months agomake "origin" optional for forward zones
Evan Hunt [Sat, 27 Sep 2025 04:59:52 +0000 (21:59 -0700)] 
make "origin" optional for forward zones

The "origin" parameter for synthrecord is now mandatory for reverse
zones, but when configured in a non-reverse zone, it will default to
the zone name.

7 months agoremove "mode" parameter from synthrecord
Evan Hunt [Sat, 27 Sep 2025 04:42:04 +0000 (21:42 -0700)] 
remove "mode" parameter from synthrecord

the plugin's operating mode is now determined automatically
from the zone name: if the name ends in "ip6.arpa" or "in-addr.arpa",
then the plugin is in reverse mode, otherwise forward.

7 months agoadd synthrecord plugin documentation
Colin Vidal [Thu, 15 May 2025 08:34:32 +0000 (10:34 +0200)] 
add synthrecord plugin documentation

Add synthrecord plugin documentation as well as update some
documentation for the other filter-a and filter-aaaa plugins.

7 months agoShare reverse (ARPA) domain names
Colin Vidal [Wed, 14 May 2025 11:56:48 +0000 (13:56 +0200)] 
Share reverse (ARPA) domain names

Names for reverse resolution are now shared and accessible from
dns/name.h header as those are used by ptr_12.c and byaddr.c files.

(Also, for consistency, move deprecated ip6.int. name in name.h, even
though it is used only by ptr_12.c).

7 months agoadd synthesized record system tests
Colin Vidal [Mon, 31 Mar 2025 14:00:32 +0000 (16:00 +0200)] 
add synthesized record system tests

Add system tests for the dynamically synthesized record plugin. This
covers the various cases the plugin should handle: generating a PTR
record only when (1) no answer is found locally and (2) the IP address
extracted from the query name is part of an allowed network. This also
covered the cases of forward synthesized records; answering a A/AAAA/ANY
query from a PTR address when this match the prefix, ACL and origin.

7 months agoadd support for synthesized PTR answers
Colin Vidal [Mon, 31 Mar 2025 13:57:24 +0000 (15:57 +0200)] 
add support for synthesized PTR answers

Add a BIND9 plugin which, in "reverse" mode, enables the server to build
a synthesized response to a PTR query when the PTR record requested is
not found in the zone. (The plugin won't be called for names below a
delegation point, because it couldn't know whether a name actually
exists within the delegation.)

The dynamically-built name is constructed from a static prefix (passed
as a plugin parameter), the IP address (extracted from the query name)
and a suffx (also passed as a plugin parameter).  An "allow-synth"
address-match list is used to limit the network addresses for which
the plugin may generate responses.

The plugin can also be used in "forward" mode, to build synthesized
A/AAAA records from names using the same format as he dynamically-built
PTR names, if the query name and type are not found in the zone.
The same parameters are used when the plugin is in forward mode:
the plugin will react and answer a query if the name matches the
configured prefix and origin, and encodes an IP address that is
within "allow-synth".

7 months agoadd API to parse and extract IP from PTR name
Colin Vidal [Mon, 31 Mar 2025 13:50:32 +0000 (15:50 +0200)] 
add API to parse and extract IP from PTR name

Add an API to parse and extract either an IPv4 or IPv6 address from
a name using the reverse format. It takes care of family detection,
and returns a generic error in case of syntax error.

7 months agoexpose hex_decode APIs
Colin Vidal [Fri, 16 May 2025 16:33:13 +0000 (18:33 +0200)] 
expose hex_decode APIs

Functions hex_decode_init(), hex_decode_char() and hex_decode_finish()
are now exposed, as well as the context hex_decode_ctx_t. They now are
respectively called isc_hex_decodeinit(), isc_hex_decodechar(),
isc_hex_decodefinish() and isc_hex_decodectx_t.

This enable to re-implement the functionality of isc_hex_decodestring()
in contextes where the input is not a NULL-terminated string, but, for
example, individual characters extracted (and avoid creating an
intermediate buffer to store them). This also enable to decode a stream
of hex characters where only hex characters are expected (i.e. no white
spaces).

7 months agochg: dev: provide more context when registering plugins
Colin Vidal [Wed, 1 Oct 2025 09:52:14 +0000 (11:52 +0200)] 
chg: dev: provide more context when registering plugins

Add a new type, `ns_pluginregister_ctx_t`, which is passed to `plugin_register()` in place of the `source` parameter. The source value is now just part of the structure, which also holds a pointer to the zone origin if the plugin is loaded at a zone level.

This provides more contextual information, enabling the plugin to make specific configuration decisions based on the name of the zone for which it is loaded.

It's also flexible if more contextual data are needed in the future: add a new field to `ns_pluginregister_ctx_t`, and new plugins can use it without affecting compatibility with existing plugins.

Closes #5533

Merge branch '5533-plugin-register-ctx' into 'main'

See merge request isc-projects/bind9!11019

7 months agounload zone plugin before freeing the zone
Colin Vidal [Sun, 28 Sep 2025 21:07:11 +0000 (23:07 +0200)] 
unload zone plugin before freeing the zone

Make sure all zone's plugin are unloaded before the zone gets freed.
This makes passing zone metadata like its origin to the plugin
registering function safe, as this garantee that the origin would always
be valid from the plugin lifecycle.

7 months agoprovide a context structure for plugin_register()
Colin Vidal [Fri, 26 Sep 2025 13:54:51 +0000 (15:54 +0200)] 
provide a context structure for plugin_register()

This commit introduces a new type, ns_pluginregister_ctx_t,
which is passed to plugin_check() and plugin_register() in place of the
'source' parameter. The source value is now just part of the structure,
which also holds a pointer to the zone origin if the plugin is loaded at
a zone level.

This provides more contextual information, enabling the plugin to make
specific configuration decisions based on the name of the zone for which
it is loaded.

It's also flexible if more contextual data are needed in the future:
add a new field to ns_pluginregister_ctx_t, and new plugins can use
it without affecting compatibility with existing plugins.

7 months agofix: dev: check plugin config before registering
Colin Vidal [Wed, 1 Oct 2025 09:10:40 +0000 (11:10 +0200)] 
fix: dev: check plugin config before registering

In `named_config_parsefile()`, when checking the validity of
`named.conf`, the checking of plugin correctness was deliberately
postponed until the plugin is loaded and registered. However,
the checking was never actually done: the `plugin_register()`
implementation was called, but `plugin_check()` was not.

`ns_plugin_register()` (used by `named`) now calls the check function
before the register function, and aborts if either one fails.
`ns_plugin_check()` (used by `named-checkconf`) calls only
the check function.

Merge branch 'each-check-plugin-named' into 'main'

See merge request isc-projects/bind9!11031

7 months agocheck plugin config before registering
Evan Hunt [Sat, 27 Sep 2025 03:57:52 +0000 (20:57 -0700)] 
check plugin config before registering

In named_config_parsefile(), when checking the validity of
named.conf, the checking of plugin correctness was deliberately
postponed until the plugin is loaded and registered. However,
when the plugin was registered, the checking was never actually
done: the plugin_register() implementation was called, but
plugin_check() was not.

This made it necessary to duplicate the correctness checking in both
functions, so that both named-checkconf and named could catch errors.
That should not be required.

ns_plugin_register() now calls the check function before the register
function, and aborts if either one fails.  ns_plugin_check() calls only
the check function.  ns_plugin_check() is used by named-checkconf, and
ns_plugin_register() is used by named. (Note: this design has a
side effect that a call to ns_plugin_register() will result in the
plugin parameters being parsed twice at registration time.)

ns_plugin_check() now takes an additional argument for the hook
source: zone or view.

7 months agorem: dev: remove CHECK_FOR_GLUE_IN_ANSWER
Colin Vidal [Tue, 30 Sep 2025 10:42:04 +0000 (12:42 +0200)] 
rem: dev: remove CHECK_FOR_GLUE_IN_ANSWER

Macro CHECK_FOR_GLUE_IN_ANSWER is defined in `lib/dns/resolver.c` only,
documented nowhere and not exposed as build configuration. This is valid
at least for 9.21+, 9.20 and 9.18. Furthermore, it doesn't compile
anymore on 9.21+ with -DCHECK_FOR_GLUE_IN_ANSWER=1.

Considering it is very unlikely that anyone build named with this,
remove the code rather than fixing it.

Closes #5538

Merge branch '5538-remove-check-for-glue-in-answer' into 'main'

See merge request isc-projects/bind9!11029

7 months agoremove CHECK_FOR_GLUE_IN_ANSWER
Colin Vidal [Tue, 30 Sep 2025 08:02:34 +0000 (10:02 +0200)] 
remove CHECK_FOR_GLUE_IN_ANSWER

Macro CHECK_FOR_GLUE_IN_ANSWER is defined in `lib/dns/resolver.c` only,
documented nowhere and not exposed as build configuration. This is valid
at least for 9.21+, 9.20 and 9.18. Furthermore, it doesn't compile
anymore on 9.21+ with -DCHECK_FOR_GLUE_IN_ANSWER=1.

Considering it is very unlikely that anyone build named with this,
remove the code rather than fixing it.

7 months agochg: dev: Add option to always build fuzz binaries
Alessio Podda [Mon, 29 Sep 2025 14:07:12 +0000 (14:07 +0000)] 
chg: dev: Add option to always build fuzz binaries

Currently the fuzzer binaries are only built when someone requests a
fuzzer. This might cause us to inadvertently break fuzzing when changing
function signatures. It also deviates with the behaviour we had with
autotools, where the fuzz binaries were built with make test.

This commit splits the -Dfuzzing option into two: fuzzing, and
fuzzing-backend. The fuzzing option controls whether the fuzzing
binaries are built. The fuzzing-backend option controls which backend to
use, and defaults to none. If the value none is used the binaries are
built, but no backend is used or guaranteed, which means that the
binaries might be non-functional.

Closes #5526

Merge branch '5526-add-meson-option-to-always-build-fuzz-binaries' into 'main'

See merge request isc-projects/bind9!10990

7 months agoAdd option to always build fuzz binaries
Alessio Podda [Thu, 18 Sep 2025 09:32:13 +0000 (11:32 +0200)] 
Add option to always build fuzz binaries

Currently the fuzzer binaries are only built when someone requests a
fuzzer. This might cause us to inadvertently break fuzzing when changing
function signatures. It also deviates with the behaviour we had with
autotools, where the fuzz binaries were built with make test.

This commit splits the -Dfuzzing option into two: fuzzing, and
fuzzing-backend. The fuzzing option controls whether the fuzzing
binaries are built. The fuzzing-backend option controls which backend to
use, and defaults to none. If the value none is used the binaries are
built, but no backend is used or guaranteed, which means that the
binaries might be non-functional.

7 months agonew: ci: Merge tag back to its base branch in tag pipeline
Andoni Duarte [Mon, 29 Sep 2025 12:02:10 +0000 (12:02 +0000)] 
new: ci: Merge tag back to its base branch in tag pipeline

Add a CI job to merge tags back to the respective base branch in tag pipelines.

Merge branch 'andoni/add-merge-tag-to-tag-pipeline' into 'main'

See merge request isc-projects/bind9!11001

7 months agoMerge tag back to its base branch in tag pipeline
Andoni Duarte Pintado [Tue, 23 Sep 2025 09:20:46 +0000 (11:20 +0200)] 
Merge tag back to its base branch in tag pipeline

Merging a tag to its base branch will now be a manual job in its tag
pipeline.

7 months agofix: dev: hookasyncctx renaming
Colin Vidal [Mon, 29 Sep 2025 08:15:38 +0000 (10:15 +0200)] 
fix: dev: hookasyncctx renaming

The field `ns_hookasync_t` was initially named `hook_actx` and wrongly
renamed `hook_aclctx` during a mass-renaming of various names for the
config acl context into a consistent `aclctx` name (see !11003). Of
course this is wrong as `ns_hookasync_t` has nothing to do with ACL but
about _async_ context. This commit fixes the mistake by renaming this
field `hookasyncctx`

Merge branch 'colin/fix-hookasyncctx-rename' into 'main'

See merge request isc-projects/bind9!11021

7 months agofix hookasyncctx renaming
Colin Vidal [Sun, 28 Sep 2025 20:37:33 +0000 (22:37 +0200)] 
fix hookasyncctx renaming

The field `ns_hookasync_t` was initially named `hook_actx` and wrongly
renamed `hook_aclctx` during a mass-renaming of various names for the
config acl context into a consistent `aclctx` name (see !11003). Of
course this is wrong as `ns_hookasync_t` has nothing to do with ACL but
about _async_ context. This commit fixes the mistake by renaming this
field `hookasyncctx`

7 months agofix: dev: apply_configuration: leave exclusive mode after viewlist cleanup
Colin Vidal [Fri, 26 Sep 2025 13:31:33 +0000 (15:31 +0200)] 
fix: dev: apply_configuration: leave exclusive mode after viewlist cleanup

When a re-configuration fails, `apply_configuration` flows jump to a
cleanup label and, at some point, leave the exclusive mode and cleanup
the viewlist. It looks fine as the viewlist is at this point only
locally known (if this is a configuration failure, this is the new view
list, if this is a success, this is the old list which has been swapped
out from the production list during the exclusive mode).

However, the view and zone initialization code enqueues job callbacks,
for instance from `dns_zone_setsigninginterval` (but there are others
cases) which will be called for the new views and zones after the
exclusive mode is over.

Depending where the configuration fails, those views and zones can be
half-configured, for instance a view might have an unfrozen resolver.
Hence, leaving the exclusive mode before cleaning up those views ans
zones will immediately called the previously enqueued callbacks and lead
to this reconfiguration-failure crash stack:

```
isc_assertion_failed
dns_resolver_createfetch
do_keyfetch
isc__async_cb
...
uv_run
loop_thread
thread_body
thread_run
start_thread
...
```

To avoid the problem, the views are now cleaned up before leaving the
exclusive mode (which also clean up the zones and enqueued callbacks).

As context, the bug was introduced by !10910 which moved the creation
(not configuration) of the view outsides of the exclusive mode. This is
a safe move (as at this point, the newly view are only known locally by
`apply_configuration`) but the re-order was wrong regarding the point
where the exclusive mode was ended (before the change, the exclusive
mode as always ended before the new view are detached).

Merge branch 'colin/leave-exclusive-mode-after-view-cleanup' into 'main'

See merge request isc-projects/bind9!11016

7 months agotest views are detached before leaving exclusive mode
Colin Vidal [Fri, 26 Sep 2025 12:54:42 +0000 (14:54 +0200)] 
test views are detached before leaving exclusive mode

Adds a log-based test ensuring that when a reconfiguration fails inside
the view configuration, the newly created view are always detached
before the exclusive mode is ended.

7 months agoapply_configuration: leave exclusive mode after viewlist cleanup
Colin Vidal [Fri, 26 Sep 2025 09:12:53 +0000 (11:12 +0200)] 
apply_configuration: leave exclusive mode after viewlist cleanup

When a re-configuration fails, `apply_configuration` flows jump to a
cleanup label and, at some point, leave the exclusive mode and cleanup
the viewlist. It looks fine as the viewlist is at this point only
locally known (if this is a configuration failure, this is the new view
list, if this is a success, this is the old list which has been swapped
out from the production list during the exclusive mode).

However, the view and zone initialization code enqueues job callbacks,
for instance from `dns_zone_setsigninginterval` (but there are others
cases) which will be called for the new views and zones after the
exclusive mode is over.

Depending where the configuration fails, those views and zones can be
half-configured, for instance a view might have an unfrozen resolver.
Hence, leaving the exclusive mode before cleaning up those views ans
zones will immediately called the previously enqueued callbacks and lead
to this reconfiguration-failure crash stack:

```
isc_assertion_failed
dns_resolver_createfetch
do_keyfetch
isc__async_cb
...
uv_run
loop_thread
thread_body
thread_run
start_thread
...
```

To avoid the problem, the views are now cleaned up before leaving the
exclusive mode (which also clean up the zones and enqueued callbacks).

As context, the bug was introduced by !10910 which moved the creation
(not configuration) of the view outsides of the exclusive mode. This is
a safe move (as at this point, the newly view are only known locally by
`apply_configuration`) but the re-order was wrong regarding the point
where the exclusive mode was ended (before the change, the exclusive
mode as always ended before the new view are detached).

7 months agofix: usr: rndc sign during ZSK rollover will now replace signatures
Matthijs Mekking [Fri, 26 Sep 2025 12:03:46 +0000 (12:03 +0000)] 
fix: usr: rndc sign during ZSK rollover will now replace signatures

When performing a ZSK rollover, if the new DNSKEY is omnipresent, the :option:`rndc sign` command now signs the zone completely with the successor key, replacing all zone signatures from the predecessor key with new ones.

Closes #5483

Merge branch '5483-smooth-operator-bug' into 'main'

See merge request isc-projects/bind9!10867

7 months agoUpdate the retire interval after full sign
Matthijs Mekking [Tue, 19 Aug 2025 13:16:39 +0000 (15:16 +0200)] 
Update the retire interval after full sign

After a full sign we no longer have to need to take the sign delay into
account. Update the timing checks in keymgr_transition_time to determine
the start of the interval: Either the last change, or if SigPublish/
SigDelete is set. The latter case indicates a full sign was done and
so we no longer have to take the sign delay into account.

7 months agoTest the next key event after full sign
Matthijs Mekking [Tue, 19 Aug 2025 13:10:59 +0000 (15:10 +0200)] 
Test the next key event after full sign

After a full sign we no longer have to need to take the sign delay into
account.

7 months agoForce full sign to generate new signatures
Matthijs Mekking [Tue, 19 Aug 2025 10:37:29 +0000 (12:37 +0200)] 
Force full sign to generate new signatures

When introducing the kasp logic, a full sign of the zone did not
generate new signatures for the new active keys during a ZSK rollover.

The introduced kasp logic ensured that the rollover is performed
smoothly, as in the signatures are only replaced if the old signature
is close to expiring (depending on the signatures-refresh option).

Fix by maintaining a fullsign boolean value in the signing structure,
that will ensure the RRsets are signed with the correct key, rather
than a similar good key.

In case of a fullsign, we can also remove signatures from inactive
keys.

Remove the unused dns_zone_signwithkey function.

7 months agoTest rndc sign updates the signatures
Matthijs Mekking [Tue, 19 Aug 2025 10:42:35 +0000 (12:42 +0200)] 
Test rndc sign updates the signatures

Add a check to the ZSK rollover test case that ensures the zone is
signed with the successor key only, after a 'rndc sign' is commanded.

7 months agofix: usr: Use signer name when disabling DNSSEC algorithms
Mark Andrews [Thu, 25 Sep 2025 14:13:38 +0000 (00:13 +1000)] 
fix: usr: Use signer name when disabling DNSSEC algorithms

``disable-algorithms`` could cause DNSSEC validation failures when the parent zone was
signed with the algorithms that were being disabled for the child zone.
This has been fixed; `disable-algorithms` now works
on a whole-of-zone basis.

If the zone's name is at or below the ``disable-algorithms`` name the algorithm
is disabled for that zone, using deepest match when there are multiple
``disable-algorithms`` clauses.

Closes #5165

Merge branch '5165-use-signer-name-when-disabling-dnssec-algorithms' into 'main'

See merge request isc-projects/bind9!10837

7 months agoCheck disable-algorithms with non-zone names
Matthijs Mekking [Tue, 23 Sep 2025 13:36:56 +0000 (15:36 +0200)] 
Check disable-algorithms with non-zone names

Test that if disable-algorithms is configured on a name that is below
the zonecut, it still validates (z.secure.example).

Test that if disable-algorithms is configured on a name that is above
the zonecut, it is treated as insecure (zonecut.ent.secure.example).

7 months agoMake it clearer that disable-algorithms applies to zone names
Mark Andrews [Tue, 9 Sep 2025 06:57:35 +0000 (16:57 +1000)] 
Make it clearer that disable-algorithms applies to zone names

7 months agoCheck that badalg.secure.example resolves
Mark Andrews [Thu, 7 Aug 2025 06:27:32 +0000 (16:27 +1000)] 
Check that badalg.secure.example resolves

Previously, badalg.secure.example would return SERVFAIL because the DS
records (from the parent) could not be validated.

7 months agoUse signer name when disabling DNSSEC algorithms
Mark Andrews [Thu, 7 Aug 2025 04:37:33 +0000 (14:37 +1000)] 
Use signer name when disabling DNSSEC algorithms

When disabling algorithms, use the signer name to determine if the
algorithm is disabled or not.  This allows for algorithms to be
cleanly disabled on a zone level basis.  Previously, just using the
records owner name, "disable-algorithms" could impact resolution of
names that where not disabled.  This does now mean that
"disable-algorithms" can not be used to disable part of a zone anymore.

7 months agochg: dev: rename cfg_aclconfctx_t variables to aclctx
Colin Vidal [Wed, 24 Sep 2025 18:57:38 +0000 (20:57 +0200)] 
chg: dev: rename cfg_aclconfctx_t variables to aclctx

ACL configuration context variables are inconsistently named as `actx`,
`ac`, or `aclconfctx`, which caused confusion during code reviews. This
commit renames all `cfg_aclconfctx_t` variables to `aclctx`, which is
short, consistent, and unambiguous.

Closes #5530

Merge branch '5530-rename-actx' into 'main'

See merge request isc-projects/bind9!11003

7 months agorename cfg_aclconfctx_t variables to aclctx
Colin Vidal [Wed, 24 Sep 2025 09:10:29 +0000 (11:10 +0200)] 
rename cfg_aclconfctx_t variables to aclctx

ACL configuration context variables are inconsistently named as `actx`,
`ac`, or `aclconfctx`, which caused confusion during code reviews. This
commit renames all `cfg_aclconfctx_t` variables to `aclctx`, which is
short, consistent, and unambiguous.

7 months agonew: usr: Add dnssec-policy keys configuration check to named-checkconf
Matthijs Mekking [Wed, 24 Sep 2025 15:44:08 +0000 (15:44 +0000)] 
new: usr: Add dnssec-policy keys configuration check to named-checkconf

A new option `-k` is added to `named-checkconf` that allows checking the `dnssec-policy` `keys` configuration against the configured key stores. If the found key files are not in sync with the given `dnssec-policy`, the check will fail.

This is useful to run before migrating to `dnssec-policy`.

Closes #5486

Merge branch '5486-named-checkconf-dnssec-policy-key-directory' into 'main'

See merge request isc-projects/bind9!10907

7 months agoCleanup unused constant
Matthijs Mekking [Mon, 22 Sep 2025 09:24:18 +0000 (11:24 +0200)] 
Cleanup unused constant

The DST_ALGORITHM_FORMATSIZE constant is unused. It could be used in
dst_kasp_key_format, but instead we will use DNS_NAME_FORMATSIZE
because it is used in other places too. Clean up the unused constant.

7 months agoChange checkconf to include built-in dnssec-policy
Matthijs Mekking [Thu, 28 Aug 2025 12:48:07 +0000 (14:48 +0200)] 
Change checkconf to include built-in dnssec-policy

The configuration should also take into account the built-in
DNSSEC policies when verifying the keys in the key-directory match the
given policy. Update the code accordingly and add some good and
failure test cases.

7 months agoTest named-checkconf -k
Matthijs Mekking [Thu, 28 Aug 2025 08:12:33 +0000 (10:12 +0200)] 
Test named-checkconf -k

Test named-checkconf -k option, that checks the dnssec-policy against
the configured keystores.

7 months agoImplement named-checkconf -k (check keys)
Matthijs Mekking [Thu, 28 Aug 2025 08:28:02 +0000 (10:28 +0200)] 
Implement named-checkconf -k (check keys)

With named-checkconf -k you can check your configuration including
checking the dnssec-policy keys against the configured keystores. If
there is a mismatch in the key files versus the policy, named-checkconf
will fail. This is useful for running before migrating to dnssec-policy.

For logging purposes, introduce a function that writes the identifying
information about a policy key into a string.

Allow a dnssec key to be initialized outside the keymgr code.

Add 'log_errors' to 'cfg_kasp_fromconfig' to avoid duplicate error
logs.

7 months agochg: ci: Temporarily disable shotgun jobs alessio/qpznode-embedded-name-buffer-baseline
Nicki Křížek [Wed, 24 Sep 2025 12:28:40 +0000 (14:28 +0200)] 
chg: ci: Temporarily disable shotgun jobs

There's currently an issue with the shotgun workflow that's being
investigated. Until it's resolved, there's no point in creating the
shotgun jobs as they'll just fail.

Merge branch 'nicki/ci-temporarily-disable-shotgun-jobs' into 'main'

See merge request isc-projects/bind9!11005

7 months agoTemporarily disable shotgun jobs
Nicki Křížek [Wed, 24 Sep 2025 11:37:03 +0000 (13:37 +0200)] 
Temporarily disable shotgun jobs

There's currently an issue with the shotgun workflow that's being
investigated. Until it's resolved, there's no point in creating the
shotgun jobs as they'll just fail.

7 months agofix: nil: Reformat strings broken by successive clang-format runs
Petr Špaček [Wed, 24 Sep 2025 12:14:50 +0000 (12:14 +0000)] 
fix: nil: Reformat strings broken by successive clang-format runs

Merge branch 'marka-re-format-strings' into 'main'

See merge request isc-projects/bind9!11002

7 months agore-split STATIC_ASSERT message
Mark Andrews [Tue, 2 Sep 2025 05:49:43 +0000 (15:49 +1000)] 
re-split STATIC_ASSERT message

7 months agore-split log message text
Mark Andrews [Tue, 2 Sep 2025 05:48:35 +0000 (15:48 +1000)] 
re-split log message text

7 months agochg: test: Re-enable delv tests with TSAN
Nicki Křížek [Wed, 24 Sep 2025 11:34:26 +0000 (13:34 +0200)] 
chg: test: Re-enable delv tests with TSAN

With the loopmgr rewrite in 9.20, the delv issue shoud no longer happen,
thus the delv tests can be executed under TSAN as well.

Related #4119

Merge branch 'nicki/delv-reenable-under-tsan' into 'main'

See merge request isc-projects/bind9!10996

7 months agoRe-enable delv tests with TSAN
Nicki Křížek [Thu, 18 Sep 2025 08:39:22 +0000 (10:39 +0200)] 
Re-enable delv tests with TSAN

With the loopmgr rewrite in 9.20, the delv issue shoud no longer happen,
thus the delv tests can be executed under TSAN as well.

7 months agochg: dev: Add option to compile named with static linking and LTO
Ondřej Surý [Wed, 24 Sep 2025 11:23:21 +0000 (13:23 +0200)] 
chg: dev: Add option to compile named with static linking and LTO

Statically linking lib{isc,dns,ns,cfg,isccc} and enabling LTO shows over 10% improvements on all almost measurements in perflab. That said, we can't use Meson's option for LTO since it would result in every binary being compiled with LTO and a great increase in compile time.

To work around it, we add a configuration option that enables LTO and static linking only for the `named` binary.

Merge branch 'alessio/meson-lto-v2' into 'main'

See merge request isc-projects/bind9!10761

7 months agoAdd named-lto option to meson build to named with LTO
Alessio Podda [Thu, 17 Jul 2025 04:51:36 +0000 (06:51 +0200)] 
Add named-lto option to meson build to named with LTO

Enabling LTO yields substantial performance gains on both authoritative
and resolver benchmarks.
But since LTO defers many optimization passes to link time, enabling LTO
across the board would cause an increase in compilation time, as passes
that would be run only once would need to be run for each executable.

As a compromise, this commit adds a named-lto build option, that
compiles the individual object files with the -ffat-lto-object option
and then enables LTO only for the named executable. Object files are
reused between lib*.so and the named executable.

7 months agoUse unique names for probes.d files
Alessio Podda [Thu, 17 Jul 2025 04:51:36 +0000 (06:51 +0200)] 
Use unique names for probes.d files

Enabling LTO in the subsequent commit requires the file names to be
unique and having same probes.d in each of the libraries breaks this
requirement.  Rename probes.d to probes-{isc,dns,ns}.d files and adjust
the includes.

7 months agochg: dev: refactor view creation/configuration loops in dedicated functions
Colin Vidal [Wed, 24 Sep 2025 09:46:38 +0000 (11:46 +0200)] 
chg: dev: refactor view creation/configuration loops in dedicated functions

Refactor a bit of `apply_configuration` by extracting (into respective dedicated function) the logic to build the keystores list, the KASP list as well as creating the view/zones and configuring those. This is the next step of MR !10895 and !10901

While the code is extracted, some global variables has been changed into a function parameters which enable to have a clear view of the dependency of the function, typically, to know if it depends on local configuration object or runtime "production" object. The end goal (not in this MR, but later on) is to move as much as possible initialization logic outside of the exclusive mode.

As a first step, latest commits move the keystores list, KASP list and view/zones creation outside of the exclusive mode. (The view/zone configuration remain in exclusive mode for now, because of a dependency to the runtime "cachelist". This is the target of a next MR.

For the record; while moving the keystores list, KASP list and view/zone creation doesn't have a significant impact on the time the exclusive mode is taken (from my experiment on a 1M small zones instance); moving `configure_views` did have a _massive_ impact (basically, the time spend in the exclusive mode is then non calculable). Configuring views outside the exclusive mode needs more work, which will be done in future MRs.

See #4673

Merge branch 'colin/refactor-applyconfig' into 'main'

See merge request isc-projects/bind9!10910

7 months agocomment about ifs scan twice the first time
Colin Vidal [Tue, 16 Sep 2025 13:49:42 +0000 (15:49 +0200)] 
comment about ifs scan twice the first time

Add comment message about why we're scanning interfaces twice during the
initial configuration (FreeBSD compatibility). See #3583

7 months agoapply_configuration: log subroutines for tests
Colin Vidal [Wed, 10 Sep 2025 13:17:11 +0000 (15:17 +0200)] 
apply_configuration: log subroutines for tests

In order to have a (minimal) test ensuring we don't move back
`apply_configuration` subroutines which can be done before the exclusive
lock is taken, `APPLY_CONFIGURATION_SUBROUTINE_LOG` macro is added and
used for the few subroutines already extracted from the exclusive mode.
Those expected logs are added in `configloading` system test checks.

7 months agocreation of client TLS ctx before exclusive mode
Colin Vidal [Tue, 9 Sep 2025 13:41:17 +0000 (15:41 +0200)] 
creation of client TLS ctx before exclusive mode

When the server is configured (inside `apply_configuration`) a client
TLS context cache is created and attached to the global server object.
It is then used by `configure_view` flow (and also during runtime though
the zone manager).

It is now created before the exclusive mode, and the swap of the
previous TLS cache ctx is done at the end of the exclusive mode, if
everything went well.

This allows us (among other follow-up changes) to move the
`configure_views` function outside of the exclusive mode.

7 months agomove creation of keystores, kasp list and view outside of exclusive mode
Colin Vidal [Mon, 8 Sep 2025 13:57:47 +0000 (15:57 +0200)] 
move creation of keystores, kasp list and view outside of exclusive mode

The keystores initialization, the KASP list initialization as well as
the initialization of the view no longer depends of any data shared by
running "production" objects during re-configuration of the server. This
allows us to move those outside (before) the exclusive mode is taken.

7 months agocfg_aclconfctx_t object is part of named_server
Colin Vidal [Mon, 8 Sep 2025 12:58:47 +0000 (14:58 +0200)] 
cfg_aclconfctx_t object is part of named_server

`named_g_actconfctx` is a global variable holding the ACL configuration
context alive (in particular, to dynamically load zones). However, this
object is build once per configuration (early) and is used only inside
server.c `apply_configuration` flow. (Two exceptions: the shutdown flow,
still in server.c and plugin check flow, which doesn't need it, so it's
NULL in such case).

Instead of leaving this global publicly exposed, it is now part of the
`named_server_t` object. This allows us to clearly see that, when
reconfigureing the server, the new instance of the ACL context is known
only by the newly built object and not currently used by "production"
object; and will help to move move logic before the exclusive mode is
taken.

The other advantage is that the ACL configuration context can now be
built before the exclusive lock as well.

7 months agoapply_configuration: bump config map before exclusive mode
Colin Vidal [Mon, 8 Sep 2025 09:07:29 +0000 (11:07 +0200)] 
apply_configuration: bump config map before exclusive mode

Moving the config map building outside of the exclusive mode, and this
is local data only and no runtime object uses it.

7 months agoapply_configuation: add configure_keystores
Colin Vidal [Mon, 8 Sep 2025 08:46:11 +0000 (10:46 +0200)] 
apply_configuation: add configure_keystores

The keystores list build logic was inlined in apply_configuration, this
commit extracts it into its own function.

7 months agoapply_configuration: add configure_kasplist
Colin Vidal [Thu, 28 Aug 2025 15:29:23 +0000 (17:29 +0200)] 
apply_configuration: add configure_kasplist

The kasplist (dnssec-policy defined in the builtin and global
configuration options) was built inside apply_configuration. This
commit extracts this logic into its separate function.

In order to make the view configuration independent of the global
`server` object, the newly built kasplist is now passed as parameter.
(This eventually will help to be able to configure the views outside of
the exclusive mode by limiting its dependency to the global
`server`/`named_g_server`).

7 months agoapply_configuration: remove builtin_viewlist
Colin Vidal [Tue, 26 Aug 2025 11:19:10 +0000 (13:19 +0200)] 
apply_configuration: remove builtin_viewlist

When creating/configuring the view, the user-defined views are built and
set into the viewlist, then builtin-view inside the builtin_viewlist.
But there is no seperate logic applied to those two lists, and they are
immediately merged into viewlist right after. This commit removes this
intermediate list and add builtin-views directly into the main viewlist
instead.

7 months agorefactor view creation/config in apply_configuration
Colin Vidal [Tue, 26 Aug 2025 10:35:56 +0000 (12:35 +0200)] 
refactor view creation/config in apply_configuration

In order to help splitting apply_configuration, the inline loops and bit
of logic around it for views creation and configuration, each of those
are now in a dedicatated function.

7 months agochg: dev: Use lock-free hashtable for storing resolver fetch contexts
Ondřej Surý [Tue, 23 Sep 2025 22:08:45 +0000 (00:08 +0200)] 
chg: dev: Use lock-free hashtable for storing resolver fetch contexts

Replace the locked hashmap with the lock-free hashtable from the RCU
library and protect the fetch contexts against reuse by replacing the
libisc reference counting with urcu_ref that can soft-fail in situation
where the reference count is already zero.  This allows us to easily
skip re-using the fetch context if it is already in process of being
destroyed.

Merge branch 'ondrej/use-urcu-lfht-for-resolver-tables' into 'main'

See merge request isc-projects/bind9!10653

7 months agofixup! Use lock-free hashtable for storing resolver fetch contexts
Ondřej Surý [Tue, 23 Sep 2025 10:04:35 +0000 (12:04 +0200)] 
fixup! Use lock-free hashtable for storing resolver fetch contexts

7 months agoUse lock-free hashtable for storing resolver fetch contexts
Ondřej Surý [Wed, 17 Sep 2025 13:08:10 +0000 (15:08 +0200)] 
Use lock-free hashtable for storing resolver fetch contexts

Previously, the fetch contexts were stored inside rwlocked hashmap
table.  This was one of the most contended places for the resolver,
especially in the cold cache situation.

Replace the locked hashmap with the lock-free hashtable from the RCU
library and protect the fetch contexts against reuse by replacing the
libisc reference counting with urcu_ref that can soft-fail in situation
where the reference count is already zero.  This allows us to easily
skip re-using the fetch context if it is already in process of being
destroyed.

7 months agochg: dev: Add a circular reference between slabtops for type and RRSIG(type)
Ondřej Surý [Tue, 23 Sep 2025 22:07:32 +0000 (00:07 +0200)] 
chg: dev: Add a circular reference between slabtops for type and RRSIG(type)

Previously, the slabtops for "type" and its signature was only loosely
coupled and the headers could expire at different time (both TTL and LRU
based expiry).  Add a .related member to the slabtop that allows us to
expire the headers in both related headers and also optimize the lookups
because now both slabtops are looked up at the same time.

Closes #3396

Merge branch '3396-bind-rrsigs-to-records' into 'main'

See merge request isc-projects/bind9!10985

7 months agoRefactor find headers to make use of related
Ondřej Surý [Tue, 23 Sep 2025 07:54:52 +0000 (09:54 +0200)] 
Refactor find headers to make use of related

Change the code of finding headers to make use of the related circular
reference.

Co-authored-by: Matthijs Mekking <matthijs@isc.org>
7 months agoExpire related headers at the same time
Ondřej Surý [Tue, 23 Sep 2025 07:54:45 +0000 (09:54 +0200)] 
Expire related headers at the same time

Previously, the slabtops for "type" and its signature was only loosely
coupled and the headers could expire at different time (both TTL and LRU
based expiry).  This commit expires the headers in both related
headers.

Co-authored-by: Matthijs Mekking <matthijs@isc.org>
7 months agoAdd a circular reference between slabtops for type and RRSIG(type)
Ondřej Surý [Tue, 23 Sep 2025 07:54:38 +0000 (09:54 +0200)] 
Add a circular reference between slabtops for type and RRSIG(type)

Previously, the slabtops for "type" and its signature was only loosely
coupled.  Add a .related member to the slabtop that allows us to
optimize the lookups because now both slabtops are looked up at the
same time.

Co-authored-by: Matthijs Mekking <matthijs@isc.org>
7 months agoRefactor find headers
Ondřej Surý [Tue, 23 Sep 2025 07:54:30 +0000 (09:54 +0200)] 
Refactor find headers

Another recurring code pattern that can be moved into a separate
function.

Co-authored-by: Matthijs Mekking <matthijs@isc.org>
7 months agoRefactor check header
Ondřej Surý [Tue, 23 Sep 2025 07:54:11 +0000 (09:54 +0200)] 
Refactor check header

There was a pattern where first the header was checked for NULL
and then for being stale. In both cases the code path is the same
so it makes sense to put them in a separate function.

Co-authored-by: Matthijs Mekking <matthijs@isc.org>
7 months agoMove the size of the expired data into expireheader
Ondřej Surý [Tue, 23 Sep 2025 07:53:41 +0000 (09:53 +0200)] 
Move the size of the expired data into expireheader

Co-authored-by: Matthijs Mekking <matthijs@isc.org>
7 months agochg: dev: Convert slabtop and slabheader to use the cds list
Ondřej Surý [Tue, 23 Sep 2025 22:06:35 +0000 (00:06 +0200)] 
chg: dev: Convert slabtop and slabheader to use the cds list

This is the first MR in series that aims to reduce the node locking
by replacing the single-linked list of slabtop(s) and slabheader(s)
with CDS linked list.  This commit doesn't do anything else beyond
replacing .next and .down links with the cds_list_head.  The RCU
semantics will be added later.

Merge branch 'ondrej/use-rcu-list-for-slabtop' into 'main'

See merge request isc-projects/bind9!10944

7 months agoConvert slabheader to use the cds_list
Ondřej Surý [Fri, 12 Sep 2025 16:08:23 +0000 (18:08 +0200)] 
Convert slabheader to use the cds_list

This is the second commit in series that aims to reduce the node locking
by replacing the single-linked list of slabheader(s) with CDS linked list.
This commit doesn't do anything else beyond replacing .next link with
the cds_list_head.  RCU semantics is going to be added in the subsequent
commits.

7 months agoConvert slabtop to use the cds_list
Ondřej Surý [Fri, 12 Sep 2025 09:25:40 +0000 (11:25 +0200)] 
Convert slabtop to use the cds_list

This is the first commit in series that aims to reduce the node locking
by replacing the single-linked list of slabtop(s) with CDS linked list.
This commit doesn't do anything else beyond replacing .next link with
the cds_list_head.  RCU semantics is going to be added in the subsequent
commits.

7 months agofix: dev: Fix datarace between unlocking fctx lock and shuttingdown fctx
Ondřej Surý [Tue, 23 Sep 2025 09:17:53 +0000 (11:17 +0200)] 
fix: dev: Fix datarace between unlocking fctx lock and shuttingdown fctx

There was a data race where new fetch response could be added to the
fetch context after we unlock the fetch context and before we shut it
down.  This could cause assertion failure when fctx__done() was called
with ISC_R_SUCCESS because there was originally no fetch response, but
new fetch response without associated dataset was added before we had a
chance to shutdown the fetch context.  This manifested in the
validated() callback, where cache_rrset() now returns ISC_R_SUCCESS
instead of DNS_R_UNCHANGED when cache was not changed.  However the data
race was wrong on a general level.

Add new argument to fctx__done() that allows to call it with fctx->lock
already acquired to prevent these data races.

Closes #5507

Merge branch '5507-dont-release-fctx-lock-on-done' into 'main'

See merge request isc-projects/bind9!10961

7 months agoFix datarace between unlocking fctx lock and shuttingdown fctx
Ondřej Surý [Thu, 11 Sep 2025 08:53:47 +0000 (10:53 +0200)] 
Fix datarace between unlocking fctx lock and shuttingdown fctx

There was a data race where new fetch response could be added to the
fetch context after we unlock the fetch context and before we shut it
down.  This could cause assertion failure when fctx__done() was called
with ISC_R_SUCCESS because there was originally no fetch response, but
new fetch response without associated dataset was added before we had a
chance to shutdown the fetch context.  This manifested in the
validated() callback, where cache_rrset() now returns ISC_R_SUCCESS
instead of DNS_R_UNCHANGED when cache was not changed.  However the data
race was wrong on a general level.

When the fctx__done() is called with ISC_R_SUCCESS as result is expects
the fctx->lock to be already acquired to prevent these data races.

7 months agoSplit the fctx_done() into success and failure variants
Ondřej Surý [Thu, 11 Sep 2025 08:53:47 +0000 (10:53 +0200)] 
Split the fctx_done() into success and failure variants

The split will allow us to call fctx__done() with fctx->lock acquired
when it is called with ISC_R_SUCESS to prevent data races when finishing
the fetch context.

7 months agochg: ci: Do not mangle named path in respdiff
Michal Nowak [Thu, 18 Sep 2025 13:51:14 +0000 (15:51 +0200)] 
chg: ci: Do not mangle named path in respdiff

Merge branch 'mnowak/respdiff-do-not-mangle-named-path' into 'main'

See merge request isc-projects/bind9!10855

7 months agoDo not mangle named path in respdiff
Michal Nowak [Wed, 13 Aug 2025 16:22:29 +0000 (18:22 +0200)] 
Do not mangle named path in respdiff

7 months agochg: ci: Only run relevant CI jobs based on the changes
Nicki Křížek [Thu, 18 Sep 2025 13:27:02 +0000 (15:27 +0200)] 
chg: ci: Only run relevant CI jobs based on the changes

Trigger selected CI jobs on MR automatically only if there are related
code changes. Otherwise, offer an option to run the jobs manually in
MRs. For other sources, like schedules, tags etc., execute the jobs as
usual.

Merge branch 'nicki/ci-restrict-rules-changes' into 'main'

See merge request isc-projects/bind9!10987

7 months agoRun shfmt on util/check-make-install.sh.in
Nicki Křížek [Thu, 18 Sep 2025 11:55:00 +0000 (13:55 +0200)] 
Run shfmt on util/check-make-install.sh.in

7 months agoOnly run relevant CI jobs based on the changes
Nicki Křížek [Wed, 17 Sep 2025 13:51:39 +0000 (15:51 +0200)] 
Only run relevant CI jobs based on the changes

Trigger selected CI jobs on MR automatically only if there are related
code changes. Otherwise, offer an option to run the jobs manually in
MRs. For other sources, like schedules, tags etc., execute the jobs as
usual.

7 months agoAdd .sh extension to shell scripts
Nicki Křížek [Thu, 18 Sep 2025 09:51:46 +0000 (11:51 +0200)] 
Add .sh extension to shell scripts

Use .sh(.in) file extension consistently for shell scripts
to allow more reliable detection of shell scripts based on their file
extension.

7 months agofix: usr: preserve cache when reload fails and reload the server again
Colin Vidal [Wed, 17 Sep 2025 15:38:54 +0000 (17:38 +0200)] 
fix: usr: preserve cache when reload fails and reload the server again

Fixes an issue where failing to reconfigure/reload the server would prevent to preserved the views caches on the subsequent server reconfiguration/reload.

Closes #5523

Merge branch 'colin/fix-cache-revert' into 'main'

See merge request isc-projects/bind9!10984

7 months agopreserve cache when reload fails
Colin Vidal [Tue, 16 Sep 2025 15:14:33 +0000 (17:14 +0200)] 
preserve cache when reload fails

If the server is reloaded, new views are created and preexisting cache
is attached to those _but_ something goes wrong later, the previous
views are restored but the previous cache list is destroyed. This makes
the subsequent reload to drop the existing cache. This fixes it by
avoiding a mutation of the old cache list.

7 months agotest that cache is preserved on reconfing failure
Colin Vidal [Tue, 16 Sep 2025 15:14:46 +0000 (17:14 +0200)] 
test that cache is preserved on reconfing failure

A named bug scrap the cache on a second reload after an initial reload
failure. Adds a test checking that the cache is preserved between server
reconfiguration/reloads even if it fails at some point (after attempting
to re-use the cache) and the server is re-loaded later.

7 months agochg: dev: Squash the qpcache tree and nsec tries
Ondřej Surý [Wed, 17 Sep 2025 13:59:13 +0000 (15:59 +0200)] 
chg: dev: Squash the qpcache tree and nsec tries

The dns_qpcache already had all the namespace changes needed to put the
normal data and auxiliary NSEC data into a single tree.  Remove the
extra nsec QP trie and use the single QP trie for all the cache data.

Merge branch 'ondrej/use-qp-namespace-in-cache' into 'main'

See merge request isc-projects/bind9!10975

7 months agoAdd more unit tests for dns_qp unit
Ondřej Surý [Tue, 16 Sep 2025 10:01:44 +0000 (12:01 +0200)] 
Add more unit tests for dns_qp unit

Add basic unit tests and add missing DbC checks for mandatory
dns_qp_create() arguments.

7 months agoRemove dns_dbtree_t and its usage
Ondřej Surý [Mon, 15 Sep 2025 16:07:07 +0000 (18:07 +0200)] 
Remove dns_dbtree_t and its usage

As we removed the ability to count nodes in the auxiliary trees (because
there are no auxiliary trees), we can also cleanup the API and
associated enum type (dns_dbtree_t).

7 months agoSquash the qpcache tree and nsec trees
Ondřej Surý [Mon, 15 Sep 2025 15:46:39 +0000 (17:46 +0200)] 
Squash the qpcache tree and nsec trees

The dns_qpcache already had all the namespace changes needed to put the
normal data and auxiliary NSEC data into a single tree.  Remove the
extra nsec QP trie and use the single QP trie for all the cache data.

7 months agoRemove the dbiterator_{last,prev} from the qpcache
Ondřej Surý [Tue, 16 Sep 2025 09:45:51 +0000 (11:45 +0200)] 
Remove the dbiterator_{last,prev} from the qpcache

The dbiterator_{last,prev} functions are not used in the cache, and the
implementation would get quite complicated when we squash the main and
nsec trees together.  It's easier to just not implement these.

7 months agoRemove CacheNSECNodes statistics counter
Ondřej Surý [Mon, 15 Sep 2025 16:02:08 +0000 (18:02 +0200)] 
Remove CacheNSECNodes statistics counter

There is no auxiliary NSEC tree, so we can't count the NSEC nodes
separately.  Remove the CacheNSECNodes statistics counter as it would be
always zero.