]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 months agoremove need_hints parameters to configure_view
Colin Vidal [Mon, 17 Nov 2025 14:23:58 +0000 (15:23 +0100)] 
remove need_hints parameters to configure_view

The `configure_view()` `need_hints` is removed as it this function was
always called with the value `true`.

The `need_hints` wasn't even used in the function. The only thing it was
actually used was to throw a warning which can be done simply in an
`else` condition branch.

Moreoever, in the case of catalog zones and response-policy, it fixes a
possible bug that would affect root zones, as those wouldn't be reverted
back to their previous version in case of the view fails to load
(during a server reconfiguration).

5 months agofix: nil: Add showconf in RNDC usage
Colin Vidal [Tue, 18 Nov 2025 09:07:20 +0000 (10:07 +0100)] 
fix: nil: Add showconf in RNDC usage

The `rndc -h` command was missing the newly introduced `showconf`
commands. Adding it.

Merge branch 'colin/fix-rndc-usage' into 'main'

See merge request isc-projects/bind9!11246

5 months agoadd showconf in RNDC usage
Colin Vidal [Tue, 18 Nov 2025 08:23:10 +0000 (09:23 +0100)] 
add showconf in RNDC usage

The `rndc -h` command was missing the newly introduced `showconf`
commands. Adding it.

5 months agochg: dev: No effective config as text if allow-new-zones is yes
Colin Vidal [Tue, 18 Nov 2025 08:16:57 +0000 (09:16 +0100)] 
chg: dev: No effective config as text if allow-new-zones is yes

Do not save the text version of the effective configuration when
`allow-new-zones` is enabled, as in that case the object tree can
be printed on demand, reducing unnecessary memory consumption.

Merge branch 'colin/no-effective-config-as-text-allownewzones' into 'main'

See merge request isc-projects/bind9!11242

5 months agono effective config as text if allow-new-zones is yes
Colin Vidal [Mon, 17 Nov 2025 10:06:34 +0000 (11:06 +0100)] 
no effective config as text if allow-new-zones is yes

Do not save the textual version of the effective configuration when
`allow-new-zones` is enabled, as it can be printed on-demand. This
enable to reduce the memory footprint of ~70MB on huge configurations
(1M zones).

6 months agofix: dev: Remove holes in `dns_zoneflg_t` enum
Colin Vidal [Thu, 13 Nov 2025 14:33:02 +0000 (15:33 +0100)] 
fix: dev: Remove holes in `dns_zoneflg_t` enum

The `dns_zoneflg_t` enum defined multiple possible flags for a zone, but
contains numerous holes (likely from flag removed in the past). This
fixes the holes, and use a bit-shift and decimal notation to make holes
easier to spot.

Merge branch 'colin/remove-zoneflag-holes' into 'main'

See merge request isc-projects/bind9!11189

6 months agoremove holes in `dns_zoneflg_t` enum
Colin Vidal [Fri, 31 Oct 2025 09:32:53 +0000 (10:32 +0100)] 
remove holes in `dns_zoneflg_t` enum

`dns_zoneflg_t` enum defined multiple possible flags for a zone, but
contains numerous holes (likely from flag removed in the past). This
fixes the holes, and use a bit-shift and decimal notation to make holes
easier to spot.

6 months agofix: dev: Save configuration as text
Colin Vidal [Wed, 12 Nov 2025 10:40:33 +0000 (11:40 +0100)] 
fix: dev: Save configuration as text

A `cfg_obj_t` object tree structure takes up considerably more space than the equivalent canonical text. If `allow-new-zones` is disabled and catalog zones are not in use, then we don't need the object tree. By storing the configuration in text format, we can use less memory, and `rndc showconf` and `rndc showzone` still work.

Merge branch 'each-cfg-as-text' into 'main'

See merge request isc-projects/bind9!11236

6 months agosave effective configuration as text
Evan Hunt [Wed, 12 Nov 2025 02:50:23 +0000 (18:50 -0800)] 
save effective configuration as text

the effective configuration tree is now detached if allow-new-zones
or catalog-zones aren't enabled in any views. this reduces memory
consumption while still allowing "rndc showconf -effective" to work.

6 months agosave zone configuration as text
Evan Hunt [Tue, 11 Nov 2025 23:46:23 +0000 (15:46 -0800)] 
save zone configuration as text

as previously mentioned in commit c65b2868ab, a cfg_obj_t
configuration tree structure takes up considerably more space than
the canonical text. since the zone configuration saved in the zone
object using dns_zone_setcfg() is only currently used for "rndc
showzone", it can be saved as text more efficiently than as an
object tree. (and, if a tree were needed, the text could be
re-parsed quickly; zone configuration text is generally small.)

6 months agonew: dev: Add spatch to detect implicit bool/int/result cast
Colin Vidal [Wed, 12 Nov 2025 10:31:37 +0000 (11:31 +0100)] 
new: dev: Add spatch to detect implicit bool/int/result cast

Detection of implicit cast from a boolean into an int, or an
isc_result_t into a boolean (either in an assignement or return
position).

If such pattern is found, a warning comment is added into the code (and
the CI will fails) so the error can be spotted and manually fixed.

Merge branch 'colin/cocci-detect-iscresult-int-implicit-casts' into 'main'

See merge request isc-projects/bind9!11095

6 months agocheck-cocci fails in WARNING is found on stderr
Colin Vidal [Wed, 15 Oct 2025 13:35:59 +0000 (15:35 +0200)] 
check-cocci fails in WARNING is found on stderr

As the implicit cast check print "WARNING: ..." on stderr, add a pattern
to make sure that check-cocci would fails if such warning is found on
stderr. This is generic (not specific like the existing "parse error")
so it should be able to support future Coccinelle spatch warnings.

6 months agomdig: fix implicit bool to int cast
Colin Vidal [Tue, 14 Oct 2025 11:31:44 +0000 (13:31 +0200)] 
mdig: fix implicit bool to int cast

The `display_rrcomments` is a tri-state (-1, 0, 1) which is (in some
cases) initialized with `state`, a boolean, through an implicit cast.
This was spot by Coccinelle. Remove the implcit cast by explicitly
assigning 0 or 1 to `display_rrcomments` based on `state` value.

6 months agoadd spatch to detect implicit bool/int/result cast
Colin Vidal [Tue, 14 Oct 2025 10:45:21 +0000 (12:45 +0200)] 
add spatch to detect implicit bool/int/result cast

Detection of implicit cast from a boolean into an int, or an
isc_result_t into a boolean (either in an assignement or return
position).

If such pattern is found, a warning comment is added into the code (and
the CI will fails) so the error can be spotted and manually fixed.

6 months agonew: test: Add isctest.check.ede() helper for pytest
Nicki Křížek [Mon, 10 Nov 2025 15:21:52 +0000 (16:21 +0100)] 
new: test: Add isctest.check.ede() helper for pytest

Add a utility function to check for EDE codes present in the DNS
message. The primary benefit of this helper function is that it
handles the compatibility issues with different dnspython versions
and the actual test code doesn't have to deal with that any more.

Merge branch 'nicki/isctest-check-ede-helper' into 'main'

See merge request isc-projects/bind9!11182

6 months agoFix CI trigger for system test modications
Nicki Křížek [Fri, 7 Nov 2025 10:30:23 +0000 (11:30 +0100)] 
Fix CI trigger for system test modications

Use bin/tests/system/**/* to detect changes to files not just directly
inside the directory, but also all of its subdirectories.

See https://docs.gitlab.com/ci/yaml/#ruleschanges

6 months agoUse new EDE helper in existing system tests
Nicki Křížek [Thu, 30 Oct 2025 17:12:25 +0000 (18:12 +0100)] 
Use new EDE helper in existing system tests

Previously, hasattr("extended_errors") was used as a check to detect a
mimumum required dnspython version in order to only perform the EDE
check if a new-enough dnspython was present. This is now abstracted into
isctest.check.ede().

In order to support dnspython<2.2.0, use isctest.compat.EDECode rather
than using dns.edns.EDECode directly.

6 months agoAdd isctest.check.ede() helper for pytest
Nicki Křížek [Thu, 30 Oct 2025 17:08:01 +0000 (18:08 +0100)] 
Add isctest.check.ede() helper for pytest

Add a utility function to check for EDE options present in the DNS
message. The primary benefit of this helper function is that it
handles the compatibility issues with different dnspython versions
and the actual test code doesn't have to deal with that any more.

Rather than using the convenience .extended_errors() method
introduced in dnspython 2.7.0, iterate over the options and find
EDEOption types, which is supported from 2.2.0 onwards.

To work around the issue of using dns.edns.EDECode to specify EDE codes
in our tests, create an isctest.compat.EDECode wrapper. This can be used
even with dnspython versions prior to 2.2.0 and will simply result in
no-op, since EDE isn't supported in the older dnspython anyway.

6 months agorem: nil: Remove maybe_cancel_validators() function
Ondřej Surý [Sat, 8 Nov 2025 23:37:23 +0000 (00:37 +0100)] 
rem: nil: Remove maybe_cancel_validators() function

When shutting down an fctx, validators can just be canceled
without checking whether there are pending finds.

Merge branch 'ondrej/remove-maybe_cancel_validators' into 'main'

See merge request isc-projects/bind9!11229

6 months agoRemove maybe_cancel_validators() function
Evan Hunt [Sat, 25 Oct 2025 00:01:14 +0000 (17:01 -0700)] 
Remove maybe_cancel_validators() function

When shutting down an fctx, validators can just be canceled
without checking whether there are pending finds.

6 months agofix: test: Rewrite views/addzone in loop system test
Colin Vidal [Fri, 7 Nov 2025 14:46:15 +0000 (15:46 +0100)] 
fix: test: Rewrite views/addzone in loop system test

A part of the `views` system test attempts to add multiples zones in a
loop, and after each zone being added, reconfig the server.

However, the test didn't take into account the fact that the server
might take a bit more time to reload than the script to move to the next
iteration, and in some case the test was re-requesting the server reload
when it was still reloading.

Since `b49f83a3`, `named` explicitly fails to reload when a load/reload
is pending, which is (unless proved otherwise) the reason of the test
was now randomly failing.

That part of the test is now waiting for the server log message saying
the server has added the new zone and is running. Also, that part of the
test has been rewrote in Python.

Closes #5617

Merge branch '5617-rewrite-reload-view-test' into 'main'

See merge request isc-projects/bind9!11225

6 months agorewrite views/addzone in loop system test
Colin Vidal [Fri, 7 Nov 2025 09:45:09 +0000 (10:45 +0100)] 
rewrite views/addzone in loop system test

A part of the `views` system test attempts to add multiples zones in a
loop, and after each zone being added, reconfig the server.

However, the test didn't take into account the fact that the server
might take a bit more time to reload than the script to move to the next
iteration, and in some case the test was re-requesting the server reload
when it was still reloading.

Since `b49f83a3`, `named` explicitly fails to reload when a load/reload
is pending, which is (unless proved otherwise) the reason of the test
was now randomly failing.

That part of the test is now waiting for the server log message saying
the server has added the new zone and is running. Also, that part of the
test has been rewrote in Python.

6 months agofix: test: Harden EDE 24 system tests
Colin Vidal [Thu, 6 Nov 2025 15:13:29 +0000 (16:13 +0100)] 
fix: test: Harden EDE 24 system tests

Harden `ede24` system test in order to avoid random failures, likely caused by timing issues. Also remove expiration-related dead-code (which should have been done in the original ede24 changes) as well as printing the query ID, as this should be useful to debug further flaky system test issues. (In particular, this one, if the changes made here are not enough).

Closes #5625

Merge branch '5625-fix-ede24-test' into 'main'

See merge request isc-projects/bind9!11217

6 months agosplit ede24 system test into separate modules
Colin Vidal [Thu, 6 Nov 2025 13:35:33 +0000 (14:35 +0100)] 
split ede24 system test into separate modules

Because ede24 system tests require stopping/restarting server, there is
always the risk that the test ends (with a failure) with server in an
wrong and impredictible state. This would make the other tests to fail
in a strange way as well.

To avoid this problem, split the test into different modules, so if a
module fails, the other module is not impacted as it uses separate
server instances.

6 months agoharden ede24 system test
Colin Vidal [Wed, 5 Nov 2025 14:08:51 +0000 (15:08 +0100)] 
harden ede24 system test

There was a random failure of ede24 system test. While this is still a
bit speculative, the two reasons were:

- in the case of `test_ede24_noloaded` the test might attempt to early
  (before the zone actually transfered on the secondary server) to query
  ns2.

- still in the case of `test_ede24_noloaded`, even after waiting for
  transfer succeed logs, if the CI machine is slow, the zone could be
  expired before the request checking the secondary zone works because
  the expiration time of the zone was very short (1s). Moving this
  expiration time to 3 seconds should be enough (while not making the
  test execution too much longer when waiting for the zone expiration).

- in the case of `test_ede24_expired`, the zone expired flag is flipped
  and the log message is printed immediately after. However, it is
  possible that because the flag is set using a relaxed atomic
  operation, another thread process the query and gets the previous
  (non-expired) value of the flag. In order to workaround this, the
  test now also expects another log written after the zone expiration
  (stop timers) on the next UV tick.

6 months agoadd query ID to the query trace message
Colin Vidal [Wed, 5 Nov 2025 14:06:03 +0000 (15:06 +0100)] 
add query ID to the query trace message

Adding the query ID to the query trace message. The log is now as the
following (id is at the end):

    query client=0x7f75c5017000 thread=0x7f75c6dfe680(foo.fr/A): \
      client attr:0x22300, query attr:0x700, restarts:0, \
      origqname:foo.fr, timer:0, authdb:0, referral:0, id:21338

This should help debugging tests, in particular to quickly get a
specific query from the logs.

6 months agoremove dns_zone_expire dead code
Colin Vidal [Wed, 5 Nov 2025 13:57:33 +0000 (14:57 +0100)] 
remove dns_zone_expire dead code

Removing `dns_zone_expire` function which is never called (the zone
expiration is detected internally in `lib/dns/zone.c`).

6 months agochg: dev: Refactor zone fetch code
Matthijs Mekking [Thu, 6 Nov 2025 12:01:55 +0000 (12:01 +0000)] 
chg: dev: Refactor zone fetch code

There is code duplication between `keyfetch` and `nsfetch`, refactor to allow common code paths to differentiate between them. This is in preparation for support of generalized DNS notifications, that will require fetching DSYNC records.

Merge branch 'matthijs-refactor-zone-fetch' into 'main'

See merge request isc-projects/bind9!11176

6 months agoSchedule a zonefetch
Matthijs Mekking [Thu, 6 Nov 2025 09:41:50 +0000 (10:41 +0100)] 
Schedule a zonefetch

Scheduling and rescheduling a zonefetch is also similar.  Refactor into
zonefetch functions.  This also increments and decrements the zone's
internal reference counter in the same module, which may be less
confusing when reading the code.

6 months agoFix comment in lib/ns/query.c
Matthijs Mekking [Tue, 4 Nov 2025 16:17:13 +0000 (17:17 +0100)] 
Fix comment in lib/ns/query.c

While renaming exit_check() to dns__zone_free_check() in lib/dns/zone.c,
a dead reference to exit_check() in the comments was found in
lib/ns/query.c.

6 months agoA unified way to verify the zone fetch
Matthijs Mekking [Fri, 31 Oct 2025 08:04:13 +0000 (09:04 +0100)] 
A unified way to verify the zone fetch

There is a lot of similarity when checking the completed fetch is legit.
Create a new function to verify the fetch and to reduce code
duplication.

6 months agoCount per fetch type
Matthijs Mekking [Thu, 30 Oct 2025 10:01:04 +0000 (11:01 +0100)] 
Count per fetch type

Track fetch counts per type in an array, rather than special named
variables within the zone structure.

6 months agoRefactor zone fetch code
Matthijs Mekking [Wed, 29 Oct 2025 13:02:45 +0000 (14:02 +0100)] 
Refactor zone fetch code

There is code duplication between keyfetch and nsfetch, refactor to
allow common code paths to differentiate between them.

6 months agoExport zone functions
Matthijs Mekking [Wed, 29 Oct 2025 14:30:46 +0000 (15:30 +0100)] 
Export zone functions

Make some zone functions available that we are going to need in the
zonefetch code.

6 months agochg: ci: Run system tests on all platforms on MR that touches system tests
Štěpán Balážik [Thu, 6 Nov 2025 09:08:30 +0000 (09:08 +0000)] 
chg: ci: Run system tests on all platforms on MR that touches system tests

Not doing this has lead to breakage caused by different dnspython
versions on different platforms only discovered in full nightly
pipelines.

Add a triggering rule for MRs changing code in bin/test/system.
Apply this rule to all nightly-only system test jobs.

Merge branch 'stepan/run-all-system-tests-on-system-test-change' into 'main'

See merge request isc-projects/bind9!11214

6 months agoRun system tests on all platforms on MR that touches system tests
Štěpán Balážik [Wed, 5 Nov 2025 10:19:04 +0000 (11:19 +0100)] 
Run system tests on all platforms on MR that touches system tests

Not doing this has lead to breakage caused by different dnspython
versions on different platforms only discovered in full nightly
pipelines.

Add a triggering rule for MRs changing code in bin/test/system.
Apply this rule to all nightly-only system test jobs.

6 months agochg: doc: Set up version for BIND 9.21.16
Michal Nowak [Wed, 5 Nov 2025 18:38:15 +0000 (19:38 +0100)] 
chg: doc: Set up version for BIND 9.21.16

Merge branch 'mnowak/set-up-version-for-bind-9.21.16' into 'main'

See merge request isc-projects/bind9!11218

6 months agoUpdate BIND version to 9.21.16-dev
Michal Nowak [Wed, 5 Nov 2025 18:32:17 +0000 (19:32 +0100)] 
Update BIND version to 9.21.16-dev

6 months agofix: dev: Fix parser test (missing string termination)
Colin Vidal [Wed, 5 Nov 2025 12:59:23 +0000 (13:59 +0100)] 
fix: dev: Fix parser test (missing string termination)

Compare only the dumped configuration as the `cfg_printx` does not NULL-terminate the configuration strings.

Merge branch 'colin/fix-parser-test' into 'main'

See merge request isc-projects/bind9!11215

6 months agoFix parser test (missing string termination)
Ondřej Surý [Wed, 5 Nov 2025 11:39:43 +0000 (12:39 +0100)] 
Fix parser test (missing string termination)

Parser test could crash because the `dumpb2` buffer hasn't explicit C
NULL string termination after dumping the configuration tree in it.
`cfg_printx` does not doing this by default.

Fix the test by comparing only the strings written with strncmp.

6 months agofix: test: Fix NSEC3HASH system test on jammy
Štěpán Balážik [Wed, 5 Nov 2025 11:54:23 +0000 (11:54 +0000)] 
fix: test: Fix NSEC3HASH system test on jammy

a94aab94404201a662c1e1d3e53cdeae0f5c8db5 removed importorskip call from
isctest.name on which the functionality of this test relied.

Add an explicit importorskip call to the test.

Merge branch 'stepan/fix-tools-nsec3hash-on-jammy' into 'main'

See merge request isc-projects/bind9!11213

6 months agoFix NSEC3HASH system test on jammy
Štěpán Balážik [Wed, 5 Nov 2025 09:51:26 +0000 (10:51 +0100)] 
Fix NSEC3HASH system test on jammy

a94aab94404201a662c1e1d3e53cdeae0f5c8db5 removed importorskip call from
isctest.name on which the functionality of this test relied.

Add an explicit importorskip call to the test.

6 months agofix: usr: Skip unsupported algorithms when looking for signing key
Ondřej Surý [Tue, 4 Nov 2025 19:30:08 +0000 (20:30 +0100)] 
fix: usr: Skip unsupported algorithms when looking for signing key

A mix of supported and unsupported DNSSEC algorithms in the same zone could have caused validation failures. Ignore the DNSSEC keys with unsupported algorithm when looking for the signing keys.

Closes #5622

Merge branch '5622-dont-fail-on-unsupported-algorithms' into 'main'

See merge request isc-projects/bind9!11208

6 months agoSkip unsupported algorithms when looking for signing key
Ondřej Surý [Tue, 4 Nov 2025 01:09:38 +0000 (02:09 +0100)] 
Skip unsupported algorithms when looking for signing key

When looking for a signing key in select_signing_key(), the result code
indicating unsupported algorithm would abort the search.  Instead, skip
such keys and continue searching for the right key.

Co-Authored-By: Aram Sargsyan <aram@isc.org>
Co-Authored-By: Petr Menšík <pemensik@redhat.com>
6 months agoAdd a system test with one good and one bad algorithm
Ondřej Surý [Sat, 1 Nov 2025 11:00:59 +0000 (12:00 +0100)] 
Add a system test with one good and one bad algorithm

The case where there would be one supported algorithm and one already
unsupported (like RSAMD5 or RSASHA1) was missing.

6 months agofix: dev: Only unlink from SIEVE LRU if it is still linked
Ondřej Surý [Tue, 4 Nov 2025 18:53:09 +0000 (19:53 +0100)] 
fix: dev: Only unlink from SIEVE LRU if it is still linked

Under the overmem conditions, the header could get unlinked from the
SIEVE LRU using a different path.  This could lead to double-unlink
which causes assertion failure.  Add a guard to ISC_SIEVE_UNLINK() to
unlink only still linked headers.

Closes #5606

Merge branch '5606-fix-assertion-failure-in-overmem-cleaning' into 'main'

See merge request isc-projects/bind9!11166

6 months agoOnly unlink from SIEVE LRU if it is still linked
Ondřej Surý [Wed, 29 Oct 2025 06:18:55 +0000 (07:18 +0100)] 
Only unlink from SIEVE LRU if it is still linked

Under the overmem conditions, the header could get unlinked from the
SIEVE LRU using a different path.  This could lead to double-unlink
which causes assertion failure.  Add a guard to ISC_SIEVE_UNLINK() to
unlink only still linked headers.

6 months agofix: test: Require dnspython>2.0.0 in system tests using asyncserver
Štěpán Balážik [Tue, 4 Nov 2025 17:14:35 +0000 (17:14 +0000)] 
fix: test: Require dnspython>2.0.0 in system tests using asyncserver

Maintaining compatibility with pre-2.0.0 dnspython became cumbersome
leading to failure in nightly CI jobs which are the only ones that run
with dnspython this old.

Abort all AsyncServer instances when running with old dnspython. Add an
importor skip for all system tests using isctest.asyncserver.

Full removal of pre-2.0.0 `dnspython` support is planned for after 9.18
goes EoL.

Merge branch 'stepan/require-dnspython-2-for-asyncserver' into 'main'

See merge request isc-projects/bind9!11191

6 months agoRun system tests on AlmaLinux 8 on merge requests in CI
Štěpán Balážik [Fri, 31 Oct 2025 12:10:46 +0000 (13:10 +0100)] 
Run system tests on AlmaLinux 8 on merge requests in CI

Ensure that system tests don't blow up completely with pre-2.0.0
dnspython.

6 months agoRequire dnspython>2.0.0 in system tests using asyncserver
Štěpán Balážik [Fri, 31 Oct 2025 11:04:39 +0000 (12:04 +0100)] 
Require dnspython>2.0.0 in system tests using asyncserver

Maintaining compatibility with pre-2.0.0 dnspython became cumbersome
leading to failure in nightly CI jobs which are the only ones that run
with dnspython this old.

Abort all AsyncServer instances when running with old dnspython. Add an
importor skip for all system tests using isctest.asyncserver.

6 months agoDon't use pytest.importorskip in isctest.name
Štěpán Balážik [Tue, 4 Nov 2025 12:40:26 +0000 (13:40 +0100)] 
Don't use pytest.importorskip in isctest.name

They can be used outside of test modules (like ans.py custom servers)
which leads to pytest.outcomes.Skipped being raised in weird places and
skipping of tests which don't need dnspython this new.

Remove pytest.importskip from top scope in isctest.name, only run the
check when ZoneAnalyzer is used.

6 months agonew: ci: Add vulnerability-related jobs
Michał Kępień [Tue, 4 Nov 2025 11:53:46 +0000 (12:53 +0100)] 
new: ci: Add vulnerability-related jobs

Merge branch 'michal/add-vulnerability-related-jobs-to-ci' into 'main'

See merge request isc-projects/bind9!11188

6 months agoAdd a job preparing post-disclosure notifications
Michał Kępień [Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)] 
Add a job preparing post-disclosure notifications

Add a new GitLab CI job that automatically generates post-disclosure
notifications for BIND 9 security releases based on the metadata for the
current release cycle.

6 months agoAdd a job preparing packager notifications
Michał Kępień [Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)] 
Add a job preparing packager notifications

Add a new GitLab CI job that automatically generates T-1 packager
notifications for BIND 9 security releases based on the metadata for the
current release cycle.

6 months agoAdd a job preparing security pre-announcements
Michał Kępień [Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)] 
Add a job preparing security pre-announcements

Add a new GitLab CI job that automatically generates public T-5
pre-announcements for BIND 9 security releases based on the metadata for
the current release cycle.

6 months agoAdd a job preparing EVNs
Michał Kępień [Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)] 
Add a job preparing EVNs

Add a new GitLab CI job that automatically generates BIND 9 Early
Vulnerability Notifications based on the metadata for the current
release cycle.

6 months agoEnable overriding the list of security releases
Michał Kępień [Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)] 
Enable overriding the list of security releases

Enable manually providing (via an optional CI variable) Printing Press
jobs with the list of security releases in a given release cycle in case
autodetection fails for any reason.

6 months agoEnable overriding the list of fixed CVE IDs
Michał Kępień [Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)] 
Enable overriding the list of fixed CVE IDs

Enable manually providing (via an optional CI variable) Printing Press
jobs with the list of CVE IDs fixed in a given release cycle in case
autodetection fails for any reason.

6 months agoDeduplicate definitions of release-related jobs
Michał Kępień [Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)] 
Deduplicate definitions of release-related jobs

Extract common YAML keys used by release-related job definitions into
reusable anchors to ensure consistency and limit repetition across
multiple similar jobs.

6 months agoChange the script generating release announcements
Michał Kępień [Tue, 4 Nov 2025 11:51:35 +0000 (12:51 +0100)] 
Change the script generating release announcements

Use a different, generic script for preparing release announcements.

6 months agonew: usr: "named-checkconf -b" dumps the built-in configuration
Colin Vidal [Tue, 4 Nov 2025 09:04:31 +0000 (10:04 +0100)] 
new: usr: "named-checkconf -b" dumps the built-in configuration

`named-checkconf` now supports the command line switch `-b`,  which prints the default built-in configuration used by `named`.

When `-b` is in use, other options are ignored.

Closes #1326

Merge branch '1326-named-checkconf-builtin' into 'main'

See merge request isc-projects/bind9!11177

6 months ago"named-checkconf -b" dumps built-in config
Colin Vidal [Thu, 30 Oct 2025 09:00:59 +0000 (10:00 +0100)] 
"named-checkconf -b" dumps built-in config

`named-checkconf` now supports the command line switch `-b`,  which
prints the default built-in configuration used by `named`.

When `-b` is in use, other options are ignored.

6 months agofix: usr: Prevent assertion failures of dig when server is specified before the ...
Arаm Sаrgsyаn [Tue, 4 Nov 2025 08:00:25 +0000 (08:00 +0000)] 
fix: usr: Prevent assertion failures of dig when server is specified before the -b option

Previously, :iscman:`dig` could exit with an assertion failure when the server was specified before the :option:`dig -b` option. This has been fixed.

Closes #5609

Merge branch '5609-fix-dig-crash-with-at-and-dash-b-on-main' into 'main'

See merge request isc-projects/bind9!11183

6 months agoTest dig with a IPv4 source address and a IPv4+IPv6 server
Aram Sargsyan [Fri, 31 Oct 2025 16:34:47 +0000 (16:34 +0000)] 
Test dig with a IPv4 source address and a IPv4+IPv6 server

Check that dig doesn't exit with an assertion failure when a IPv4
source address is defined after defining a server address which has
both IPv4 and IPv6 addresses (in this case, @localhost).

6 months agoavoid retrying a server if its address is unusable
JINMEI Tatuya [Thu, 30 Oct 2025 04:58:18 +0000 (21:58 -0700)] 
avoid retrying a server if its address is unusable

Previously, if there's no more server to try in force_next,
it attempted to retry the current server similar to a query
timeout case. But, force_next() is called only when the
current server's address is unusable and the query was not
even sent, so recvcount was not incremented, causing an
assertion failure.

We might be able to fix it so the retry doesn't cause a crash,
but it doesn't make sense to retry the server when its address
is known to be unusable. So, simply avoiding the retry would be
the easiest and safest way to prevent the crash.

6 months agomake sure current_query is detached before trying next server
JINMEI Tatuya [Thu, 30 Oct 2025 00:51:59 +0000 (17:51 -0700)] 
make sure current_query is detached before trying next server

Without this, start_udp or start_tcp would trigger an assertion
failure. Detaching it at this point is also consistent with
other failure handling cases, such as in recv_done.

6 months agonew: usr: Add support for Extended DNS Error 24 (Invalid Data)
Colin Vidal [Mon, 3 Nov 2025 17:25:38 +0000 (18:25 +0100)] 
new: usr: Add support for Extended DNS Error 24 (Invalid Data)

Extended DNS Error 24 (Invalid Data) is returned when the server cannot answer data for a zone it is configured for. This occurs typically when an authoritative server does not have loaded the DB of a configured zone, or a secondary server zone is expired.

See RFC 8914 section 4.25.

See #1836

Merge branch 'colin/ede24' into 'main'

See merge request isc-projects/bind9!11169

6 months agolog that a zone is expired after setting the flag
Colin Vidal [Mon, 3 Nov 2025 16:31:26 +0000 (17:31 +0100)] 
log that a zone is expired after setting the flag

When a (secondary) zone is expired, the log message `<zone> expired` is
printed and the flag `DNS_ZONEFLG_EXPIRED` is set. Change the order by
setting the expired flag first, then printing the log.

This should fixes (rare but persistent) timing-related CI error when the
EDE 24 tests expect the zone to be expired (from the log) and
immediately after request and expect an EDE 24 error. (In some rare
cases, the server was still answering the response).

6 months agoadd tests for EDE 24 support
Colin Vidal [Wed, 29 Oct 2025 16:32:29 +0000 (17:32 +0100)] 
add tests for EDE 24 support

Add system test covering EDE 24 being added in the response in both
common cases: when the server has not loaded the DB of a zone and when
the zone has expired (secondary).

6 months agosupport EDE 24 (Invalid Data)
Colin Vidal [Fri, 31 Oct 2025 11:16:54 +0000 (12:16 +0100)] 
support EDE 24 (Invalid Data)

Extended DNS Error 24 (Invalid Data) is returned when the server cannot
answer data for a zone it is configured for. This occurs typically when
an authoritative server does not have loaded the DB of a configured
zone, or a secondary server zone is expired.

See RFC 8914 section 4.25.

6 months agoquery_getzonedb can returns DNS_R_EXPIRED
Colin Vidal [Fri, 31 Oct 2025 11:15:00 +0000 (12:15 +0100)] 
query_getzonedb can returns DNS_R_EXPIRED

If `query_getzonedb()` finds a zone but the zone is expired it
immediately returns `DNS_R_EXPIRED` and doesn't attempt to get the zone
DB (which would be NULL in this case).

This enable caller to have a more precise reason of why getting the DB
has failed.

6 months agoadd dns_zone_isexpired API
Colin Vidal [Fri, 31 Oct 2025 11:12:20 +0000 (12:12 +0100)] 
add dns_zone_isexpired API

Introduce the `dns_zone_isexpired()` API which returns `true` when a
secondary, mirror, etc. zone is expired.

This internally use the `DNS_ZONEFLG_EXPIRED` which was already set when
the zone gets expired, but never used.

The flag `DNS_ZONEFLG_EXPIRED` is also now cleared when the expiration
time of the zone is updated and in the future.

6 months agorem: nil: Remove leftover FCTX_ATTR_NEEDEDNS0
Petr Špaček [Mon, 3 Nov 2025 15:25:20 +0000 (15:25 +0000)] 
rem: nil: Remove leftover FCTX_ATTR_NEEDEDNS0

Merge branch 'pspacek/remove-dead-NEEDEDNS0' into 'main'

See merge request isc-projects/bind9!11198

6 months agoRemove leftover FCTX_ATTR_NEEDEDNS0
Petr Špaček [Sat, 1 Nov 2025 22:35:35 +0000 (18:35 -0400)] 
Remove leftover FCTX_ATTR_NEEDEDNS0

This is leftover from commit b6309ed962c4988a314d61742c4fbc4935467d68
which removed support for bitstring labels back in 2002.

6 months agofix: dev: Remove unused dns_zone_getnotifyacl() function
Matthijs Mekking [Mon, 3 Nov 2025 14:38:12 +0000 (14:38 +0000)] 
fix: dev: Remove unused dns_zone_getnotifyacl() function

Deals with Coverity issues:
- CID 638286: Concurrent data access violations (MISSING_LOCK).
- CID 638287: Concurrent data access violations (MISSING_LOCK).

Merge branch 'matthijs-cid-638286-missing-lock' into 'main'

See merge request isc-projects/bind9!11200

6 months agoRemove unused dns_zone_getnotifyacl() function
Matthijs Mekking [Mon, 3 Nov 2025 11:45:39 +0000 (12:45 +0100)] 
Remove unused dns_zone_getnotifyacl() function

CID 638286: Concurrent data access violations (MISSING_LOCK).  This
complains about accessing "zone->notifyctx.notify_acl" without holding
the lock "dns_zone.lock".  Elsewhere, reading this data does have the
lock, so it makes sense that in the getter function this must also be
so.  However, the function is unused so we can just remove it.

CID 638287: Concurrent data access violations (MISSING_LOCK).  This
complains about accessing "zone->locked" without holding the lock
"dns_zone.lock". I think this is a false positive as "dns__zone_lock()"
and "dns__zone_unlock() are wrappers around "LOCK_ZONE()" and
"UNLOCK_ZONE()" and where these macros were used they were only
replaced with the internal zone functions. Moreover, "zone->locked"
is only accessed in these macros (and "TRYLOCK_ZONE()" and
"LOCKED_ZONE()").

6 months agofix: dev: restore reuseport to yes by default on supported platforms
Colin Vidal [Fri, 31 Oct 2025 14:50:56 +0000 (15:50 +0100)] 
fix: dev: restore reuseport to yes by default on supported platforms

Changes introduced by 72862c2a moved the
default configuration from within `bin/named` to a central place
`bin/includes`.

The default configuration is conditioned by several compile-time macro.
While for most of them it's fine because they are defined in the global
`config.h` file included by default to all binaries (by meson), one
specific is not defined here. `HAVE_SO_REUSEPORT_LB` was defined in
`lib/isc/include/isc/netmgr.h` which is of course not included in
`bin/includes/defaultconfig.h`.

As a result, reuseport was disabled for all platform by default, even
the supported ones. This fixes the problem by checking if reuseport is
available on the platform from meson `config.h` generation directly,
which makes `HAVE_SO_REUSEPORT_LB` available everywhere.

Merge branch 'colin/fix-reuseport-default' into 'main'

See merge request isc-projects/bind9!11180

6 months agorestore reuseport to yes by default on supported platforms
Colin Vidal [Thu, 30 Oct 2025 14:02:10 +0000 (15:02 +0100)] 
restore reuseport to yes by default on supported platforms

Changes introduced by 72862c2abc0bc6e87de08918bf21a7fc8fc4b1f7 moved the
default configuration from within `bin/named` to a central place
`bin/includes`.

The default configuration is conditioned by several compile-time macro.
While for most of them it's fine because they are defined in the global
`config.h` file included by default to all binaries (by meson), one
specific is not defined here. `HAVE_SO_REUSEPORT_LB` was defined in
`lib/isc/include/isc/netmgr.h` which is of course not included in
`bin/includes/defaultconfig.h`.

As a result, reuseport was disabled for all platform by default, even
the supported ones. This fixes the problem by checking if reuseport is
available on the platform from meson `config.h` generation directly,
which makes `HAVE_SO_REUSEPORT_LB` available everywhere.

6 months agochg: dev: Refactor notify code
Matthijs Mekking [Fri, 31 Oct 2025 13:47:19 +0000 (13:47 +0000)] 
chg: dev: Refactor notify code

Move notify code in separate source files in preparation for support of generalized DNS notifications.

Merge branch 'matthijs-refactor-notify-code-2' into 'main'

See merge request isc-projects/bind9!11146

6 months agoMove notify functions to notify source files
Matthijs Mekking [Fri, 24 Oct 2025 12:21:25 +0000 (14:21 +0200)] 
Move notify functions to notify source files

Move dns_notify_destroy, dns_notify_log, dns_notify_cancel,
dns_notify_queue, dns_notify_isqueued, dns_notify_find_address, and
notify related static functions over to the notify source files.

6 months agoExport zone functions
Matthijs Mekking [Fri, 17 Oct 2025 14:14:09 +0000 (16:14 +0200)] 
Export zone functions

Make some zone functions available that we are going to need in the
notify code.

6 months agoIntroduce notify source code files
Matthijs Mekking [Thu, 16 Oct 2025 15:01:57 +0000 (17:01 +0200)] 
Introduce notify source code files

Part of refactoring zone.c is to move the notify code into its own
source files. This commit initiates this work by creating notify.[c,h]
and move notify_create() and the notify state and context there.

The function notify_create() cannot fail, so it can return void instead
of isc_result_t.

6 months agoRename notify remote to alsonotify
Matthijs Mekking [Fri, 17 Oct 2025 13:55:00 +0000 (15:55 +0200)] 
Rename notify remote to alsonotify

Make it more clear it is tied to the 'also-notify' option.

6 months agofix: usr: Skip buffer allocations if not logging
Alessio Podda [Fri, 31 Oct 2025 12:16:03 +0000 (12:16 +0000)] 
fix: usr: Skip buffer allocations if not logging

Currently, during IXFR we allocate a 2KB buffer for IXFR change logging
regardless of the log level. This commit introduces an early check
on the log level in dns_diff_print to avoid this.

Results in a speedup from 28% in the test case from issue #5442.

Merge branch '5442-ixfr-no-log-alloc' into 'main'

See merge request isc-projects/bind9!11178

6 months agoSkip buffer allocations if not logging
Alessio Podda [Thu, 30 Oct 2025 10:45:09 +0000 (11:45 +0100)] 
Skip buffer allocations if not logging

Currently, during IXFR we allocate a 2KB buffer for IXFR change logging
regardless of the log level. This commit introduces an early check
on the log level in dns_diff_print to avoid this.

Results in a speedup from 28% in the test case from issue #5442.

6 months agochg: dev: Don't retain the default configuration tree
Colin Vidal [Fri, 31 Oct 2025 08:25:36 +0000 (09:25 +0100)] 
chg: dev: Don't retain the default configuration tree

The built-in configuration is actually used in two cases: first, when the server is loaded (or reloaded), and second when `rndc showconf -builtin` is called.

Considering the parsing of the builtin configuration is quick and does not occur during exclusive mode, but the configuration tree takes considerable memory space, the built-in configuration is no longer kept in memory once it has been used; instead it is re-parsed on demand.

Merge branch 'colin/not-persist-builtin-config' into 'main'

See merge request isc-projects/bind9!11187

6 months agodon't retain the default configuration
Colin Vidal [Thu, 30 Oct 2025 22:18:54 +0000 (23:18 +0100)] 
don't retain the default configuration

The built-in configuration is actually used in two cases: first, when
the server is loaded (or reloaded), and second when
'rndc showconf -builtin' is called.

Considering the parsing of the builtin configuration is quick and does
not occur during exclusive mode, but the configuration tree takes
considerable memory space, the built-in configuration is no longer kept
in memory once it has been used; instead it is re-parsed on demand.

6 months agofix: dev: Save userconfig as text instead of a cfg_obj tree
Evan Hunt [Thu, 30 Oct 2025 23:31:50 +0000 (23:31 +0000)] 
fix: dev: Save userconfig as text instead of a cfg_obj tree

Once the user configuration has been merged into the effective configuration, it no longer needs to be accessed as a configuration tree, but we still want to be able to show it with `rndc showconf -user`.

Because the recursive strucure of `cfg_obj` objects is fairly large, the canonical text form is a fraction of the size of the configuration tree, so we now save it in that form instead.

Merge branch 'each-userconfig-text' into 'main'

See merge request isc-projects/bind9!11185

6 months agosave userconfig as text instead of a cfg_obj tree
Evan Hunt [Thu, 30 Oct 2025 20:01:44 +0000 (13:01 -0700)] 
save userconfig as text instead of a cfg_obj tree

once the user configuration has been merged into the effective
configuration, it no longer needs to be accessed as a configuration
tree, but we still want to be able to show it with 'rndc showconf -user'.

because the recursive strucure of cfg_obj objects is fairly large, the
canonical text form is a fraction of the size of the configuration
tree, so we now save it in that form instead.

6 months agofix: dev: Reduce the size of cfg_obj_t
Evan Hunt [Thu, 30 Oct 2025 22:54:49 +0000 (22:54 +0000)] 
fix: dev: Reduce the size of cfg_obj_t

Instead of having `isc_sockaddr`, `isc_netaddr`, and `isccfg_duration` members in the `cfg_obj->value`
union, we now just keep pointers to them, and allocate memory when parsing these types. This reduces the
size of `cfg_obj_t` from 112 bytes to 72.

Merge branch 'each-refactor-cfg-obj' into 'main'

See merge request isc-projects/bind9!11186

6 months agofurther shrink cfg_obj_t by using a pointer for duration
Evan Hunt [Thu, 30 Oct 2025 21:07:44 +0000 (14:07 -0700)] 
further shrink cfg_obj_t by using a pointer for duration

not storing the isccfg_duration object inside cfg_obj reduces
its size from 80 to 72 bytes.

6 months agoreduce the size of cfg_obj by using pointers for addresses
Evan Hunt [Thu, 30 Oct 2025 20:40:10 +0000 (13:40 -0700)] 
reduce the size of cfg_obj by using pointers for addresses

instead of having sockaddr and netaddr members in the cfg_obj->value
union, we now just keep pointers, and allocate memory when parsing
these types. this reduces the size of cfg_obj_t from 112 to 80 bytes.

6 months agofix: dev: Remove sun_path field from isc_netaddr
Evan Hunt [Thu, 30 Oct 2025 19:46:50 +0000 (19:46 +0000)] 
fix: dev: Remove sun_path field from isc_netaddr

The `sun_path` field is not used anymore, and consumes over a hundred bytes for every `isc_netaddr_t` object. Remove it.

As `isc_netaddr_t` is used in `cfg_obj_t`, in some huge configuration trees (e.g., a million zones), the gain is almost 1GB of resident memory.

Merge branch 'colin/remove-sun-path' into 'main'

See merge request isc-projects/bind9!11184

6 months agoremove sun_path field from isc_netaddr
Colin Vidal [Thu, 30 Oct 2025 18:37:05 +0000 (19:37 +0100)] 
remove sun_path field from isc_netaddr

The sun_path field is not used anymore, and consumes over a hundred
bytes for every isc_netaddr_t object. Remove it.

As isc_netaddr_t is used in cfg_obj_t, in some huge configuration trees
(e.g., a million zones), the gain is almost 1GB of resident memory.

6 months agonew: usr: New "rndc showconf" command
Colin Vidal [Wed, 29 Oct 2025 22:49:58 +0000 (23:49 +0100)] 
new: usr: New "rndc showconf" command

The new `rndc showconf` command prints the running server configuration. There are three options:
- `rndc showconf -user` displays the user configuration (i.e., the contents of `named.conf`).
- `rndc showconf -builtin` displays the default settings, similar to `named -H`.
- `rndc showconf -effective` displays the effective configuration. This is the merged combination of the `-user` and `-builtin` configurations.

Closes #1075

Merge branch 'colin/effective-config-rndc' into 'main'

See merge request isc-projects/bind9!11123

6 months agoadd system test for rndc showconf
Colin Vidal [Tue, 21 Oct 2025 10:10:34 +0000 (12:10 +0200)] 
add system test for rndc showconf

Add system tests covering the rndc showconf command. It doesn't
attempt to check the whole effective configuration (as any change to the
builtin configuration would break it) but instead ensures that some parts
of the user config are present, as well as some parts of the builtin
config as well.

It also checks that the effective config (in this context of running
named instance) is about static configuration: a newly added zone is not
visible in the effective configuration.

6 months agoimplement "rndc showconf"
Evan Hunt [Fri, 24 Oct 2025 07:42:33 +0000 (00:42 -0700)] 
implement "rndc showconf"

add a new rndc command to dump server configuration info:
- "rndc showconf -user" dumps the contents of named.conf
- "rndc showconf -builtin" dumps named_g_defaltconfig
- "rndc showconf -effective" dumps the effective configuration,
  i.e., the merger of the builtin and the user configurations.

6 months agorefactor newzones configuration
Evan Hunt [Thu, 23 Oct 2025 20:44:56 +0000 (13:44 -0700)] 
refactor newzones configuration

instead of using an opaque ns_cfgctx pointer to store the configuration
data to be used by addzone and modzone, there are now fields in the
dns_view object to store the view configuration and LMDB database
environment. the global configuration is now stored in the named_server
object, along with the ACL context.

6 months agonew: usr: named-checkconf -e prints the effective configuration
Colin Vidal [Wed, 29 Oct 2025 22:49:37 +0000 (23:49 +0100)] 
new: usr: named-checkconf -e prints the effective configuration

The new `named-checkconf -e` option prints the effective server configuration, including all the default settings, that would result from loading the specified configuration file into `named`.

Closes #2798

Merge branch 'colin/effective-config-checkconf' into 'main'

See merge request isc-projects/bind9!11122

6 months agoadd system test for named-checkconf -e
Colin Vidal [Tue, 21 Oct 2025 09:53:56 +0000 (11:53 +0200)] 
add system test for named-checkconf -e

Add a system test checking the command line switch -e of
named-checkconf. The test doesn't care about the whole output of the
effective configuration (in particular to avoid breaking the test for
each default statement that would change) but instead just ensure the
effective configuration is actually returned by checking the presence of
the _bind chaos builtin view as well a user provided view and option
change.