]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 months agoUse CMocka generated JUnit reports where possible
Štěpán Balážik [Wed, 15 Oct 2025 17:23:59 +0000 (19:23 +0200)] 
Use CMocka generated JUnit reports where possible

Where applicable, use the more detailed CMocka generated JUnit
reports which include subtest results and timings instead of the
one generated by Meson.

Flaky tests also require retrying, so use a wrapper and mark them
with a environment variable. This is done to avoid the need to compute
an intersection of suites in Meson which is not supported out-of-the-box
(`meson test --suite=foo,bar` runs the union of foo and bar).

4 months agoReplace check_for_junit_xml anchor with a Python script
Štěpán Balážik [Wed, 15 Oct 2025 16:26:48 +0000 (18:26 +0200)] 
Replace check_for_junit_xml anchor with a Python script

This allows checking of multiple files with variable filenames rather
than insisting on harcoded `junit.xml`.

4 months agoCheck the validity of cross-version-config-test's XML output
Štěpán Balážik [Wed, 15 Oct 2025 16:33:18 +0000 (18:33 +0200)] 
Check the validity of cross-version-config-test's XML output

This was overlooked before.

4 months agoPut CMocka unit tests in a suite
Štěpán Balážik [Wed, 15 Oct 2025 15:15:12 +0000 (17:15 +0200)] 
Put CMocka unit tests in a suite

Distinguish them for JUnit report collection.

4 months agoSet unit test group name in CMocka tests
Štěpán Balážik [Wed, 15 Oct 2025 19:37:52 +0000 (21:37 +0200)] 
Set unit test group name in CMocka tests

CMocka uses group names in the JUnit output.

Use dirname_filename as the group name, as there duplicate testnames
(e.g. time exists both in isc/ and dns/)

4 months agoFactor the cloning of the QA repo into an anchor
Štěpán Balážik [Thu, 11 Dec 2025 21:28:04 +0000 (22:28 +0100)] 
Factor the cloning of the QA repo into an anchor

The unusual hyphen in the anchor name is used for symmetry with the
bind9-qa repo and directory name.

4 months agofix: usr: Reconfigure NSEC3 opt-out zone to NSEC causes zone to be invalid
Matthijs Mekking [Fri, 19 Dec 2025 16:33:53 +0000 (16:33 +0000)] 
fix: usr: Reconfigure NSEC3 opt-out zone to NSEC causes zone to be invalid

A zone that is signed with NSEC3, opt-out enabled, and then reconfigured to use NSEC, causes the zone to be published with missing NSEC records. This has been fixed.

Closes #5679

Merge branch '5679-nsec3-optout-to-nsec' into 'main'

See merge request isc-projects/bind9!11359

4 months agoRefactor code that checks if records are seen
Matthijs Mekking [Wed, 10 Dec 2025 10:42:41 +0000 (11:42 +0100)] 
Refactor code that checks if records are seen

There are three places that do roughly the same. Refactor the code to
a helper function.

4 months agoAdd NSEC for opt-out names
Matthijs Mekking [Tue, 9 Dec 2025 17:03:13 +0000 (18:03 +0100)] 
Add NSEC for opt-out names

When switching from NSEC3 opt-out to NSEC, add NSEC records if we saw an
RR. This corrects a mistake in style cleanups done in commit
308ab1b4a5c5239860ca06c64b0def9b98ae4b17.

4 months agoNit fix removing a newline in the logs
Matthijs Mekking [Tue, 9 Dec 2025 13:13:58 +0000 (14:13 +0100)] 
Nit fix removing a newline in the logs

4 months agoUpdate optout test to reconfig to NSEC
Matthijs Mekking [Tue, 9 Dec 2025 13:12:08 +0000 (14:12 +0100)] 
Update optout test to reconfig to NSEC

If we change from NSEC3 to NSEC we should not produce a zone with
missing NSEC records.

The code only considered having seen a record if there was previously
a signature present at the owner name. However with opt-out, insecure
delegations don't have a RRSIG record. Reconfiguring to NSEC causes
all insecure delegations to have a missing NSEC record.

Add a DNAME record to the test zone to also cover DNAME delegations.

4 months agofix: test: Revert "Add ans6 blackhole server to notify system test"
Michal Nowak [Fri, 19 Dec 2025 15:15:48 +0000 (16:15 +0100)] 
fix: test: Revert "Add ans6 blackhole server to notify system test"

Merge branch 'mnowak/revert-add-ans6-blackhole-server-to-notify-system-test' into 'main'

See merge request isc-projects/bind9!11400

4 months agoRevert "Add ans6 blackhole server to notify system test"
Michal Nowak [Fri, 19 Dec 2025 13:09:11 +0000 (14:09 +0100)] 
Revert "Add ans6 blackhole server to notify system test"

This reverts commit 21295bc18848edc8ec7d849baf85ea8f8390dd6f.

In a sense, the ans6 black holeserver, based on asyncserver, "does
nothing". In our case, it won't respond to any query, and if the
IgnoreAllConnections connection handler was installed, it would not read
anything from the client socket.

Previously, sending notifications to an unconfigured address resulted in
no communication from the target (10.53.10.53); hence, the ns3
configuration comment requested a "non-responsive notify recipient (no
reply, no ICMP errors)".

However, examining the PCAP of ans6 reveals some communication from the
10.53.0.6 server to the 10.53.0.3 client, including ICMP Destination
Unreachable (Port Unreachable), and TCP SYN/ACK.

The ans6 communication seems to be sufficiently different to touch
different code paths in named, resulting in the BIND 9.20 backport
failing in the "checking notify retries expire within 30 seconds" test.
But we better revert it from "main" as well.

4 months agonew: usr: Add support for Generalized DNS Notifications
Matthijs Mekking [Fri, 19 Dec 2025 14:46:23 +0000 (14:46 +0000)] 
new: usr: Add support for Generalized DNS Notifications

A new configuration option, ``notify-cfg CDS``, is added to enable Generalized DNS Notifications for CDS and/or CDNSKEY RRset changes, as specified in RFC 9859.

Closes #5611

Merge branch '5611-generalized-dns-notifications-rfc-9859' into 'main'

See merge request isc-projects/bind9!11315

4 months agoTest invalid DSYNC RRset is rejected
Matthijs Mekking [Fri, 12 Dec 2025 14:49:19 +0000 (15:49 +0100)] 
Test invalid DSYNC RRset is rejected

The RFC says There MUST NOT be more than one DSYNC record for each
combination of RRtype and Scheme. If we encounter more we should drop
the response, as the DSYNC RRset is invalid.

4 months agoTest sending NOTIFY(CDS) messages during rollover
Matthijs Mekking [Mon, 1 Dec 2025 13:20:01 +0000 (14:20 +0100)] 
Test sending NOTIFY(CDS) messages during rollover

When doing rollover and the CDS/CDNSKEY RRset is updated, test that a
NOTIFY(CDS) message is sent. For other steps in the rollover, prohibit
any dsyncfetch activity.

4 months agoTest sending NOTIFY(CDS) messages
Matthijs Mekking [Tue, 25 Nov 2025 07:56:32 +0000 (08:56 +0100)] 
Test sending NOTIFY(CDS) messages

When starting up the services, send notifies for the existing CDS RRset.
This requires setting up a chain of trust for the test, so the DSYNC
records can be retrieved and validated.

This feature requires enabling 'notify-cds' and 'dnssec-validation'.

In this test, the scanner is pointed to ns2. Since there is no code
for receiving NOTIFY(CDS) messages for delegations, this is treated
as "not authoritative". Checking for this log message ensures us that
the NOTIFY(CDS) message was actually sent.

4 months agoImplement NOTIFY(CDS) logic
Matthijs Mekking [Thu, 30 Oct 2025 08:48:35 +0000 (09:48 +0100)] 
Implement NOTIFY(CDS) logic

When the CDS/CDNSKEY RRset gets updated, schedule a NOTIFY(CDS) to be
sent to the parental agent. The parental agent is published in the
parent zone as a DSYNC RRset, so first we need to figure out the
parent owner name. This is done by finding the zonecut (querying for
NS RRset until we find a postive answer).

In nsfetch_dsync, we then schedule a zone fetch for the DSYNC record
at <child-labels>._dsync.<parent-labels>. Then we queue the notify
for each target in the DSYNC records that matches the NOTIFY scheme
and CDS RRtype.

4 months agoAdd a function to set NOTIFY(CDS) endpoints
Matthijs Mekking [Thu, 30 Oct 2025 08:17:32 +0000 (09:17 +0100)] 
Add a function to set NOTIFY(CDS) endpoints

This is similar to setting remote endpoints for primaries, secondaries
(NOTIFY(SOA)), and parental agents.

4 months agoAdjust tests to new notify logs
Matthijs Mekking [Mon, 1 Dec 2025 15:59:40 +0000 (16:59 +0100)] 
Adjust tests to new notify logs

Now that we log the type of the notify, some expected log messages
in the system tests need to be adjusted accordingly.

The bin/tests/system/nsec3/tests_nsec3_retransfer.py log is changed
to zone_needdump because it is more reliable.  Other tests were
adjusted similar in MR !11265, but !11226 introduced a new
"sending notify" log line.

4 months agoUse notify type in logging and for getting context
Matthijs Mekking [Tue, 25 Nov 2025 08:12:58 +0000 (09:12 +0100)] 
Use notify type in logging and for getting context

Add the notify type to the log messages for clarity, and use it to
retrieve the right notify context.

4 months agoAdd type parameter to dns_notify_create()
Matthijs Mekking [Tue, 18 Nov 2025 08:56:34 +0000 (09:56 +0100)] 
Add type parameter to dns_notify_create()

With Generalized DNS Notifications, a zone may need to send different
type of NOTIFY messages for different reasons. When creating a new
notify, allow for specifying the type.

4 months agoAdd port parameter to dns_notify_create()
Matthijs Mekking [Tue, 28 Oct 2025 14:25:29 +0000 (15:25 +0100)] 
Add port parameter to dns_notify_create()

The DSYNC record has a Port rdata field, so NOTIFY(CDS) messages may be
configured at different ports. When creating a new notify, allow for
specifying the port.

4 months agoDocument 'notify-cds' configuration option
Matthijs Mekking [Tue, 28 Oct 2025 10:37:47 +0000 (11:37 +0100)] 
Document 'notify-cds' configuration option

Add text about the 'notify-cds' option in the ARM reference.

4 months agoAdd new 'notify-cds' configuration option
Matthijs Mekking [Tue, 28 Oct 2025 09:59:04 +0000 (10:59 +0100)] 
Add new 'notify-cds' configuration option

Add a new configuration option to enable/disable sending NOTIFY(CDS)
messages.

4 months agoMaintain separate notify contexts for SOA and CDS
Matthijs Mekking [Tue, 28 Oct 2025 07:30:05 +0000 (08:30 +0100)] 
Maintain separate notify contexts for SOA and CDS

With Generalized DNS Notifications, a zone may need to send different
NOTIFY messages for different reasons. Introduce a method to
initialize a notify context and maintain a notify contexts per RRtype.

4 months agoUpdate dns_dnssec_sync(update|delete) return code
Matthijs Mekking [Mon, 27 Oct 2025 16:04:56 +0000 (17:04 +0100)] 
Update dns_dnssec_sync(update|delete) return code

Update the functions 'dns_dnssec_syncupdate()' and
'dns_dnssec_syncdelete()' to make a distinction between a changed RRset
and no changes made.

The return code will be used later to determine if we need to send a
NOTIFY(CDS) to DSYNC endpoints.

4 months agochg: test: Update rollover system tests with chain of trust
Matthijs Mekking [Fri, 19 Dec 2025 12:02:16 +0000 (12:02 +0000)] 
chg: test: Update rollover system tests with chain of trust

Merge branch 'matthijs-trust-chain-rollover-system-tests' into 'main'

See merge request isc-projects/bind9!11309

4 months agoDrop and replace CmdHelper with EnvCmd
Matthijs Mekking [Thu, 18 Dec 2025 07:52:09 +0000 (08:52 +0100)] 
Drop and replace CmdHelper with EnvCmd

A generic helper that calls environment-specified binaries has been added,
drop and replace the introduced CmdHelper for the more generic method.

4 months agorollover-zsk-prepub: From setup.sh to pytest bootstrap
Matthijs Mekking [Fri, 28 Nov 2025 12:42:28 +0000 (13:42 +0100)] 
rollover-zsk-prepub: From setup.sh to pytest bootstrap

Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

Since the bootstrapping is done before the templates are rendered
automatically, replace @DEFAULT_ALGORITHM@ in ns3/kasp.conf.j2 to
ecdsa256 and rename to ns3/kasp.conf.

4 months agorollover-straight2none: From setup.sh to pytest bootstrap
Matthijs Mekking [Fri, 28 Nov 2025 11:42:21 +0000 (12:42 +0100)] 
rollover-straight2none: From setup.sh to pytest bootstrap

Similar to rollover-going-insecure.

4 months agorollover-lifetime: Update templates
Matthijs Mekking [Fri, 28 Nov 2025 11:14:40 +0000 (12:14 +0100)] 
rollover-lifetime: Update templates

This test does not require a trust chain. Merely update the template
zone files to not point to the common template.

4 months agorollover-multisigner: Update templates
Matthijs Mekking [Fri, 28 Nov 2025 10:59:00 +0000 (11:59 +0100)] 
rollover-multisigner: Update templates

This test does not require a trust chain. However, it does have a setup
script. Rewrite the setup shell script to a pytest bootstrap method.

4 months agorollover-ksk-3crowd: From setup.sh to pytest bootstrap
Matthijs Mekking [Fri, 28 Nov 2025 10:49:59 +0000 (11:49 +0100)] 
rollover-ksk-3crowd: From setup.sh to pytest bootstrap

Similar to rollover-ksk-doubleksk.

4 months agorollover-ksk-doubleksk: From setup.sh to pytest bootstrap
Matthijs Mekking [Fri, 28 Nov 2025 10:38:06 +0000 (11:38 +0100)] 
rollover-ksk-doubleksk: From setup.sh to pytest bootstrap

Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

Since the bootstrapping is done before the templates are rendered
automatically, replace @DEFAULT_ALGORITHM@ in ns3/kasp.conf.j2 to
ecdsa256 and rename to ns3/kasp.conf.

4 months agorollover-going-insecure: From setup.sh to pytest bootstrap
Matthijs Mekking [Fri, 28 Nov 2025 09:43:42 +0000 (10:43 +0100)] 
rollover-going-insecure: From setup.sh to pytest bootstrap

Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

Since the bootstrapping is done before the templates are rendered
automatically, replace @DEFAULT_ALGORITHM@ in ns3/kasp.conf.j2 to
ecdsa256 and rename to ns3/kasp.conf.

Now we have to fake different lifetimes, so adjust fake_lifetime
to update a single key.

Note that we have changed the setup slightly: We also sign the
step2 zones, but with post validation disabled. This is more
accurate because we need to test that the public keys and signatures
are being removed from the zone.

4 months agorollover-enable-dnssec: From setup.sh to pytest bootstrap
Matthijs Mekking [Fri, 28 Nov 2025 08:59:51 +0000 (09:59 +0100)] 
rollover-enable-dnssec: From setup.sh to pytest bootstrap

Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

Since the bootstrapping is done before the templates are rendered
automatically, replace @DEFAULT_ALGORITHM_NUMBER@ in ns3/kasp.conf.j2 to
13 and rename to ns3/kasp.conf.

This test introduces an unsigned delegation, adjust render_and_sign_zone
and configure_tld accordingly.

4 months agorollover-dynamic2inline: Update templates
Matthijs Mekking [Fri, 28 Nov 2025 08:35:03 +0000 (09:35 +0100)] 
rollover-dynamic2inline: Update templates

This test does not require a trust chain. Merely update the template
zonefile to not point to the common template.

4 months agorollover-csk-roll2: From setup.sh to pytest bootstrap
Matthijs Mekking [Thu, 27 Nov 2025 13:36:07 +0000 (14:36 +0100)] 
rollover-csk-roll2: From setup.sh to pytest bootstrap

Similar to rollover-csk-roll1.

4 months agorollover-csk-roll1: From setup.sh to pytest bootstrap
Matthijs Mekking [Thu, 27 Nov 2025 13:01:28 +0000 (14:01 +0100)] 
rollover-csk-roll1: From setup.sh to pytest bootstrap

Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

Since the bootstrapping is done before the templates are rendered
automatically, replace @DEFAULT_ALGORITHM@ in ns3/kasp.conf.j2 to
ecdsa256 and rename to ns3/kasp.conf.

Write a python method to set the key predecessor/successor relationship
into the key state files.

4 months agorollover-algo-ksk-zsk: From setup.sh to pytest bootstrap
Matthijs Mekking [Thu, 27 Nov 2025 11:11:35 +0000 (12:11 +0100)] 
rollover-algo-ksk-zsk: From setup.sh to pytest bootstrap

Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

The RSASHA256 keys are generated with dnssec-keygen, without a policy
provided. Thus we have to fake the lifetime for these keys.

Signing has to be done without the -z option, because the KSK should
not sign all records in case of a KSK/ZSK split. Update the signing
code to allow for extra options when signing with CSK only.

4 months agorollover-algo-csk: From setup.sh to pytest bootstrap
Matthijs Mekking [Thu, 27 Nov 2025 09:37:22 +0000 (10:37 +0100)] 
rollover-algo-csk: From setup.sh to pytest bootstrap

Symlink ns1 and ns2 to rollover/ns1 and rollover/ns2.
Symlink ns3/template.db.j2.manual to rollover/ns3/template.db.j2.manual.

Since the bootstrapping is done before the templates are rendered
automatically, replace @DEFAULT_ALGORITHM@ in ns3/csk2.conf.j2 to
ecdsa256 and rename to ns3/csk2.conf.

4 months agorollover: From setup.sh to pytest bootstrap
Matthijs Mekking [Tue, 25 Nov 2025 10:17:40 +0000 (11:17 +0100)] 
rollover: From setup.sh to pytest bootstrap

Introduce rollover/setup.py for all setup related test code.

Introduce rollover/ns1 and rollover/ns2 to create a chain of trust to
all rollover related test zones. The tld zones in rollover/ns2 contain
a DSYNC record that at a later time will be used for testing Generalized
DNS Notifications.

Write a python version of private_type_record so we can put such
records in the zone via jinja2 templating.

4 months agoMove ns6 to ns3 in rollover tests
Matthijs Mekking [Tue, 25 Nov 2025 09:54:57 +0000 (10:54 +0100)] 
Move ns6 to ns3 in rollover tests

There is no difference, so we are going to make it consistent. This will
make it easier to add a chain of trust for these zones (to be done in
a future commit).

4 months agochg: ci: Drop "allow_failure: true" from respdiff:recent-named
Andoni Duarte [Thu, 18 Dec 2025 17:55:35 +0000 (17:55 +0000)] 
chg: ci: Drop "allow_failure: true" from respdiff:recent-named

After the 9.21.16 release, this is not needed anymore.

Merge branch 'andoni/drop-allow_failure-true-from-cross-version-config-tests' into 'main'

See merge request isc-projects/bind9!11387

4 months agoDrop "allow_failure: true" from respdiff:recent-named
Andoni Duarte Pintado [Wed, 17 Dec 2025 17:00:13 +0000 (18:00 +0100)] 
Drop "allow_failure: true" from respdiff:recent-named

After the 9.21.16 release, this is not needed anymore.

4 months agofix: test: Add ans6 blackhole server to notify system test
Michal Nowak [Thu, 18 Dec 2025 15:04:20 +0000 (16:04 +0100)] 
fix: test: Add ans6 blackhole server to notify system test

Closes #5618

Merge branch '5618-add-blackhole-server' into 'main'

See merge request isc-projects/bind9!11353

4 months agoAdd ans6 blackhole server to notify system test
Michal Nowak [Tue, 9 Dec 2025 11:47:06 +0000 (12:47 +0100)] 
Add ans6 blackhole server to notify system test

4 months agochg: test: Various isctest.asyncserver refactors
Štěpán Balážik [Thu, 18 Dec 2025 12:48:48 +0000 (12:48 +0000)] 
chg: test: Various isctest.asyncserver refactors

Several changes to the interface of isctest.asyncserver has been made
during the development of the rewrites, propagate these to all the others.

Others have become clear as well but have been deferred as multiple
rewrites have been in review at once.

Introduce all of these in this MR.

Merge branch 'stepan/asyncserver-improvements' into 'main'

See merge request isc-projects/bind9!11179

4 months agoUse new AsyncDnsServer features in xfer system test
Štěpán Balážik [Wed, 12 Nov 2025 15:48:32 +0000 (16:48 +0100)] 
Use new AsyncDnsServer features in xfer system test

Use `prepare_new_response()`, `default_aa` and `default_rcode`.

4 months agoUse new AsyncDnsServer features in cookie system test
Štěpán Balážik [Wed, 12 Nov 2025 15:35:40 +0000 (16:35 +0100)] 
Use new AsyncDnsServer features in cookie system test

Take advantage of `default_aa`, `default_rcode` and `keyring` arguments.

4 months agoAllow ResponseHandlers to roll back changes made to a response
Štěpán Balážik [Wed, 12 Nov 2025 15:19:25 +0000 (16:19 +0100)] 
Allow ResponseHandlers to roll back changes made to a response

Previously, this was only possible by making a new response by calling
make_response on qctx.query. This however ignored the `default_aa` and
`default_rcode` parameters of AsyncDnsServer.

Add prepare_new_response and save_initialized_response methods to
QueryContext.

4 months agoAdd TSIG keyring support to AsyncDnsServer
Štěpán Balážik [Wed, 12 Nov 2025 15:02:48 +0000 (16:02 +0100)] 
Add TSIG keyring support to AsyncDnsServer

Previously, ResponseHandlers had to reparse the queries themselves if
they wanted to use TSIG. This led to `default_aa` and `default_rcode`
information being lost from the newly created messages.

Add support for TSIG keyrings to the AsyncDnsServer class directly.

4 months agoRemove dnspython<2.0.0 compatibility hacks from custom servers
Štěpán Balážik [Thu, 30 Oct 2025 13:53:44 +0000 (14:53 +0100)] 
Remove dnspython<2.0.0 compatibility hacks from custom servers

isctest.asyncserver requires dnspython 2+ now.

4 months agoImport dnspython modules explicitly in custom servers
Štěpán Balážik [Thu, 30 Oct 2025 13:43:47 +0000 (14:43 +0100)] 
Import dnspython modules explicitly in custom servers

Previously, the server relied on the modules being imported by the
isctest.asyncserver module. This is fragile and confuses tooling.

Clean up stray imports in the process.

4 months agoAllow adding multiple ResponseHandlers at once
Štěpán Balážik [Thu, 30 Oct 2025 13:08:21 +0000 (14:08 +0100)] 
Allow adding multiple ResponseHandlers at once

Change this at call sites as well.

4 months agoUse default_rcode for AsyncDnsServer where applicable
Štěpán Balážik [Thu, 30 Oct 2025 13:07:12 +0000 (14:07 +0100)] 
Use default_rcode for AsyncDnsServer where applicable

Rule of thumb: If a RCode is set unconditionally in all
ResponseHandlers, set it in the server constructor.

4 months agoSet default_aa for AsyncDnsServer instances where suitable
Štěpán Balážik [Thu, 30 Oct 2025 12:51:31 +0000 (13:51 +0100)] 
Set default_aa for AsyncDnsServer instances where suitable

Rule of thumb: If all ResponseHandlers said authoritative=True, it
should be default_aa=True instead.

4 months agoAllow users of AsyncDnsServer to set AA bit for all responses
Štěpán Balážik [Wed, 29 Oct 2025 17:59:31 +0000 (18:59 +0100)] 
Allow users of AsyncDnsServer to set AA bit for all responses

Previously, all responses had to be set as authoritative explicitly
using DnsResponseSend(..., authoritative=True). After using this,
it became obvious that this is obnoxious.

Add an optional keyword-only parameter to AsyncDnsServer that sets the
default value of the AA bit on outgoing responses.

Make all the other parameters keyword-only as well.

4 months agoRefactor ControllableAsyncDnsServer setup
Štěpán Balážik [Thu, 30 Oct 2025 12:41:23 +0000 (13:41 +0100)] 
Refactor ControllableAsyncDnsServer setup

When this class was introduced, the constructor of its base class had no
parameters. This was changed in the meantime and these parameters were
not accessible by users of the subclass.

Don't override the constructor.
Move command setup to methods.
Move subclass-specific storage to cached properties.
Take instances of Command instead of the classes themselves for
symmetry with install_response_handler.

4 months agochg: ci: Drop "allow_failure: true" from cross-version-config-tests
Michal Nowak [Wed, 17 Dec 2025 22:43:39 +0000 (23:43 +0100)] 
chg: ci: Drop "allow_failure: true" from cross-version-config-tests

After the 9.21.16 release, this is not needed anymore.

Merge branch 'mnowak/drop-allow_failure-true-from-cross-version-config-tests' into 'main'

See merge request isc-projects/bind9!11257

4 months agoDrop "allow_failure: true" from cross-version-config-tests
Michal Nowak [Thu, 20 Nov 2025 11:30:07 +0000 (12:30 +0100)] 
Drop "allow_failure: true" from cross-version-config-tests

After the 9.21.16 release, this is not needed anymore.

4 months agoMerge tag 'v9.21.16'
Andoni Duarte [Wed, 17 Dec 2025 15:33:14 +0000 (15:33 +0000)] 
Merge tag 'v9.21.16'

4 months agofix: usr: Fix a possible catalog zone issue during reconfiguration
Arаm Sаrgsyаn [Wed, 17 Dec 2025 14:55:43 +0000 (14:55 +0000)] 
fix: usr: Fix a possible catalog zone issue during reconfiguration

The :iscman:`named` process could terminate unexpectedly during
reconfiguration when a catalog zone update was taking place at
the same time. This has been fixed.

Merge branch 'aram/catz-reconfig-crash-fix' into 'main'

See merge request isc-projects/bind9!11366

4 months agoLock the catalog zone when reconfiguring it
Aram Sargsyan [Fri, 5 Dec 2025 10:06:28 +0000 (10:06 +0000)] 
Lock the catalog zone when reconfiguring it

A catalog zone is updated in an offloaded thread, which is not
stopped during a reconfiguration in an exclusive mode, and so
can cause a race condition with it.

Waiting for the offloaded threads to complete their work before
entering into the exclusive mode can potentially cause unwanted
delays, because offloaded threads are generally "allowed" to take
a longer amount of time before they complete.

Add a dns_catz_zone_prereconfig()/dns_catz_zone_postreconfig() pair
of functions which currently just lock the catalog zone when
reconfiguring it. The change should eliminate the race.

As a side note, there was already a similar pair of functions,
dns_catz_prereconfig() and dns_catz_postreconfig() which are called
before and after reconfiguring a 'dns_catz_zones_t' object.

Below are the stack traces of the reconfiguration thread which has
asserted, and a catalog zone update thread which was caught in the
middle of its work despite the fact that the exclusive mode is
turned on.

                Stack trace of thread 23859:
                #0  0x00007f80e7b8e52f raise (libc.so.6)
                #1  0x00007f80e7b61e65 abort (libc.so.6)
                #2  0x0000000000422558 assertion_failed (named)
                #3  0x00007f80eaa6799e isc_assertion_failed (libisc-9.18.41.so)
                #4  0x00007f80ea5bc788 dns_catz_entry_getname (libdns-9.18.41.so)
                #5  0x000000000042ce0e catz_reconfigure (named)
                #6  0x000000000042d3c5 configure_catz_zone (named)
                #7  0x000000000042d7a4 configure_catz (named)
                #8  0x0000000000430645 configure_view (named)
                #9  0x000000000043d998 load_configuration (named)
                #10 0x000000000044184f loadconfig (named)
                #11 0x0000000000442525 named_server_reconfigcommand (named)
                #12 0x000000000041b277 named_control_docommand (named)
                #13 0x000000000041c74a control_command (named)
                #14 0x00007f80eaa912ae task_run (libisc-9.18.41.so)
                #15 0x00007f80eaa914cd isc_task_run (libisc-9.18.41.so)
                #16 0x00007f80eaa46435 isc__nm_async_task (libisc-9.18.41.so)
                #17 0x00007f80eaa467aa process_netievent (libisc-9.18.41.so)
                #18 0x00007f80eaa475a6 process_queue (libisc-9.18.41.so)
                #19 0x00007f80eaa46227 process_all_queues (libisc-9.18.41.so)
                #20 0x00007f80eaa462a1 async_cb (libisc-9.18.41.so)
                #21 0x00007f80e8d01893 uv__async_io.part.3 (libuv.so.1)
                #22 0x00007f80e8d13ac4 uv__io_poll (libuv.so.1)
                #23 0x00007f80e8d023fb uv_run (libuv.so.1)
                #24 0x00007f80eaa45ced nm_thread (libisc-9.18.41.so)
                #25 0x00007f80eaa9bda3 isc__trampoline_run (libisc-9.18.41.so)
                #26 0x00007f80e7f1e1ca start_thread (libpthread.so.0)
                #27 0x00007f80e7b798d3 __clone (libc.so.6)
    ...
    ...
                Stack trace of thread 23912:
                #0  0x00007f80ea5bc2da dns_catz_options_setdefault (libdns-9.18.41.so)
                #1  0x00007f80ea5bd411 dns__catz_zones_merge (libdns-9.18.41.so)
                #2  0x00007f80ea5c3c2f dns__catz_update_cb (libdns-9.18.41.so)
                #3  0x00007f80eaa4fee9 isc__nm_work_run (libisc-9.18.41.so)
                #4  0x00007f80eaa9bda3 isc__trampoline_run (libisc-9.18.41.so)
                #5  0x00007f80eaa4ff48 isc__nm_work_cb (libisc-9.18.41.so)
                #6  0x00007f80e8cfc75e worker (libuv.so.1)
                #7  0x00007f80e7f1e1ca start_thread (libpthread.so.0)
                #8  0x00007f80e7b798d3 __clone (libc.so.6)

4 months agochg: nil: Add dns_rdataset_cleanup() function to conditionally cleanup rdatasets
Ondřej Surý [Wed, 17 Dec 2025 14:20:14 +0000 (15:20 +0100)] 
chg: nil: Add dns_rdataset_cleanup() function to conditionally cleanup rdatasets

Merge branch 'ondrej/add-dns_rdataset_cleanup' into 'main'

See merge request isc-projects/bind9!11382

4 months agoCleanup the extra dns_rdataset_disassociate() code
Ondřej Surý [Wed, 17 Dec 2025 07:38:34 +0000 (08:38 +0100)] 
Cleanup the extra dns_rdataset_disassociate() code

Manually go through the code using dns_rdataset_isassociated() and
use dns_rdataset_cleanup() where appropriate in places that a simple
semantic patch is not able to find automatically.

4 months agoApply the dns_rdataset_cleanup patch through the codebase
Ondřej Surý [Wed, 17 Dec 2025 06:09:15 +0000 (07:09 +0100)] 
Apply the dns_rdataset_cleanup patch through the codebase

Add a semantic patch to turn the conditional rdataset disassociate into
dns_rdataset_cleanup() call and run it.

4 months agoAdd dns_rdataset_cleanup() that conditionally disassociate rdataset
Ondřej Surý [Wed, 17 Dec 2025 05:59:33 +0000 (06:59 +0100)] 
Add dns_rdataset_cleanup() that conditionally disassociate rdataset

We had a common pattern in the code that looks like this:

if (dns_rdataset_isassociated(rdataset)) {
dns_rdataset_disassociate(rdataset);
}

add a helper macro that checks for rdataset != NULL and the above
called dns_rdataset_cleanup(rdataset).

4 months agonew: ci: Add a tag pipeline CI job to update the stable tag after a release
Andoni Duarte [Wed, 17 Dec 2025 11:37:44 +0000 (11:37 +0000)] 
new: ci: Add a tag pipeline CI job to update the stable tag after a release

Add a tag pipeline CI job to update the stable tag after a release.

Merge branch 'andoni/add-ci-job-to-update-stable-tag-in-a-release' into 'main'

See merge request isc-projects/bind9!11291

4 months agoAdd a tag pipeline CI job to update the stable tag after a release
Andoni Duarte Pintado [Thu, 27 Nov 2025 11:45:30 +0000 (12:45 +0100)] 
Add a tag pipeline CI job to update the stable tag after a release

Introduce a CI job to update the "stable" tag with the latest released
stable version tag. This is a manual job that only runs in tag
pipelines in the context of a release.

4 months agonew: usr: Add support for Extended DNS Error 9 (Missing DNSKEY)
Colin Vidal [Wed, 17 Dec 2025 09:18:53 +0000 (10:18 +0100)] 
new: usr: Add support for Extended DNS Error 9 (Missing DNSKEY)

Extended DNS Error 9 (Missing DNSKEY) is now sent when a validating resolver attempts to validate a response but can't get the DNSKEY from the authoritative server of the zone, while the DS record is present in the parent zone.

See #2715

Merge branch '2715-missingdnskey' into 'main'

See merge request isc-projects/bind9!10296

4 months agoupdate SERVFAIL cache test
Colin Vidal [Tue, 16 Dec 2025 18:33:50 +0000 (19:33 +0100)] 
update SERVFAIL cache test

An existing SERVFAIL cache test is updated as it initially checks there
are no EDE (the first SERVFAIL) then immediately re-does the same query,
(still SERVFAIL), and expect the CACHED_ERROR EDE.

However, the configuration used for this test to generate a SERVFAIL is
a broken DNSSEC configuration, where the DNSKEY is not the expected one
(it's a ZSK instead of a KZK). As a result, the first attempt also now
raise an EDE (MISSING_DNSKEY).

4 months agoadd system tests covering EDE 9
Colin Vidal [Wed, 3 Dec 2025 13:22:43 +0000 (14:22 +0100)] 
add system tests covering EDE 9

The authoritative server on "missing-dnskey." zone is ns2, the zone is
initially signed normally, but then the DNSKEY are pulled out from the
signed generated zone file. As a consequence, a quering the resolver ns4
returns a SERVFAIL with EDE9 as the chain of trust is broken: the DS is
prsent in the parent zone (the root zone in ns1), but the DNSKEY is
missing from the zone.

A similar is "wrong-dnskey.", but here the zone is signed correctly,
but the DS points to a different DNSKEY. Hence no supported matching
DNSKEY record could be found for the child.

4 months agoadd support for EDE 9
Colin Vidal [Wed, 3 Dec 2025 13:20:20 +0000 (14:20 +0100)] 
add support for EDE 9

Extended DNS Error 9 (Missing DNSKEY) is now sent when a validating resolver
attempts to validate a response but can't get the DNSKEY from the authoritative
server of the zone, while the DS record is present in the parent zone.

Note the EDE 9 is send as part of the proveunsecure flow, after the
validator successfully fetched the DS of the zone from the parent. So if
the DS is also missing, the EDE 9 won't be sent.

4 months agochg: test: Temporarily change pytest.PytestRemovedIn9Warning error to warning
Michal Nowak [Tue, 16 Dec 2025 20:25:37 +0000 (21:25 +0100)] 
chg: test: Temporarily change pytest.PytestRemovedIn9Warning error to warning

We need this to be able to use pytest 9.0 from Debian "sid".

Additionally, this error needs to be addressed before pytest 9.1 is
released, as the filter will no longer work. Also, all pytests in CI
images need to be upgraded to version 7, where the new API is supported.

Related #5690

Merge branch 'mnowak/ignore-pytest-PytestRemovedIn9Warning' into 'main'

See merge request isc-projects/bind9!11379

4 months agoTemporarily change pytest.PytestRemovedIn9Warning error to warning
Michal Nowak [Tue, 16 Dec 2025 18:03:38 +0000 (19:03 +0100)] 
Temporarily change pytest.PytestRemovedIn9Warning error to warning

We need this to be able to use pytest 9.0 from Debian "sid".

Additionally, this error needs to be addressed before pytest 9.1 is
released, as the filter will no longer work. Also, all pytests in CI
images need to be upgraded to version 7, where the new API is supported.

We can't have the "filterwarnings" section in pytest.ini directly as
only pytest 8.0 knows about it.

4 months agofix: dev: Copy only raw data when we are copying dns_slab{header,vec}
Ondřej Surý [Tue, 16 Dec 2025 17:09:21 +0000 (18:09 +0100)] 
fix: dev: Copy only raw data when we are copying dns_slab{header,vec}

Fix the data race between reading source slabheader in `makeslab()`
and the heap (write) operation on the same header in the QPcache.

Closes #5627

Merge branch '5688-prevent-data-race-when-copying-slabheader-and-slabvecs' into 'main'

See merge request isc-projects/bind9!11375

4 months agoCopy only the raw data when we are copying dns_slab{header,vec}
Ondřej Surý [Tue, 16 Dec 2025 10:11:05 +0000 (11:11 +0100)] 
Copy only the raw data when we are copying dns_slab{header,vec}

The makeslab function in rdataslab.c contains an optimization for cases
where the source is already an rdataslab. In these cases, it copies the
entire slab using memmove.  However, this creates a race condition: while
the target slab is protected by a node lock, the source slab is not
protected.  This becomes problematic because the TTL heap needs to
modify the heap index stored in the slab header, potentially while the
memmove operation is reading from it.

A closer look at makeslab shows that copying the header part of the slab
is unnecessary, the header can be default-initialized instead. This MR
modifies makeslab to copy only the raw part of the slab, while
default-initializing the header, eliminating the race condition.  For
consistency, it also applies the same change to vecheader/makevec.

4 months agofix: dev: Unpack struct vecheader
Alessio Podda [Tue, 16 Dec 2025 17:06:12 +0000 (17:06 +0000)] 
fix: dev: Unpack struct vecheader

The bitset packing of the resign_lsb and heap_index in struct vecheader was causing a race condition, since both bindrdataset and heap operations tried to access the same byte (even though they are accessing different fields).

While heap operations are protected by the node lock of the header being inserted, they aren't protected by the node locks of the headers being displaced, leading to the race condition.

This MR fixes the issue by reverting the struct packing optimization.

Closes #5688

Merge branch '5688-no-heap-index-bitset' into 'main'

See merge request isc-projects/bind9!11378

4 months agoUnpack struct vecheader
Alessio Podda [Tue, 16 Dec 2025 14:39:45 +0000 (15:39 +0100)] 
Unpack struct vecheader

The bitset packing of the resign_lsb and heap_index in struct vecheader
was causing a race condition, since both bindrdataset and heap
operations tried to access the same byte (even though they are accessing
different fields).

While heap operations are protected by the node lock of the header being
inserted, they aren't protected by the node locks of the headers being
displaced, leading to the race condition.

This commit fixes the issue by reverting the struct packing
optimization.

4 months agoRename rdatavec flags
Alessio Podda [Tue, 16 Dec 2025 14:39:17 +0000 (15:39 +0100)] 
Rename rdatavec flags

Qpzone was still using the RDATASLAB constants, instead of the RDATAVEC
ones. While both have the same definition, using the RDATAVEC ones is
correct.

4 months agofix: test: Exclude f.f.f.f.ip6.arpa names from test_sythreverse_refused_v6
Mark Andrews [Tue, 16 Dec 2025 11:04:58 +0000 (22:04 +1100)] 
fix: test: Exclude f.f.f.f.ip6.arpa names from test_sythreverse_refused_v6

f.f.f.f.ip6.arpa is a configured zone so refused responses
are not expected.

Closes #5687

Merge branch '5687-synthrecord-test-failed' into 'main'

See merge request isc-projects/bind9!11373

4 months agoExclude f.f.f.f.ip6.arpa names from test_sythreverse_refused_v6
Mark Andrews [Tue, 16 Dec 2025 02:00:07 +0000 (13:00 +1100)] 
Exclude f.f.f.f.ip6.arpa names from test_sythreverse_refused_v6

f.f.f.f.ip6.arpa is a configured zone so refused responses
are not expected.

4 months agofix: nil: protoc-c is deprecated, use protoc if available over proto-c
Mark Andrews [Tue, 16 Dec 2025 00:54:54 +0000 (11:54 +1100)] 
fix: nil: protoc-c is deprecated, use protoc if available over proto-c

Closes #5684

Merge branch '5684-protoc-c-is-deprecated' into 'main'

See merge request isc-projects/bind9!11369

4 months agoproto-c is deprecated, use protoc if available over proto-c
Mark Andrews [Mon, 15 Dec 2025 04:32:38 +0000 (15:32 +1100)] 
proto-c is deprecated, use protoc if available over proto-c

4 months agochg: ci: Add TSAN report and core file globs to expected artifacts
Michal Nowak [Mon, 15 Dec 2025 19:25:09 +0000 (20:25 +0100)] 
chg: ci: Add TSAN report and core file globs to expected artifacts

Merge branch 'mnowak/add-tsan-reports-glob-to-expected-artifacts' into 'main'

See merge request isc-projects/bind9!11370

4 months agoAdd TSAN report and core file globs to expected artifacts
Michal Nowak [Mon, 15 Dec 2025 12:11:35 +0000 (13:11 +0100)] 
Add TSAN report and core file globs to expected artifacts

5 months agochg: test: Check delegation response to ANY query
Evan Hunt [Thu, 11 Dec 2025 19:57:12 +0000 (19:57 +0000)] 
chg: test: Check delegation response to ANY query

If mandatory glue is present, it should be returned when the query type is ANY.

Merge branch '5659-any-glue-test' into 'main'

See merge request isc-projects/bind9!11367

5 months agoCheck delegation response to ANY query
Evan Hunt [Thu, 11 Dec 2025 18:41:05 +0000 (10:41 -0800)] 
Check delegation response to ANY query

If mandatory glue is present, it should be returned when the query
type is ANY.

5 months agofix: usr: Fix the charts in the statistics channel
Arаm Sаrgsyаn [Wed, 10 Dec 2025 17:30:50 +0000 (17:30 +0000)] 
fix: usr: Fix the charts in the statistics channel

The charts in the statistics channel could sometimes fail
to render in the browser, and were completely disabled for
Mozilla-based browsers for historical reasons. This has
been fixed.

Merge branch 'aram/stats-channel-charts-fix' into 'main'

See merge request isc-projects/bind9!11018

5 months agoFix the charts in the statistics channel
Aram Sargsyan [Fri, 26 Sep 2025 12:51:37 +0000 (12:51 +0000)] 
Fix the charts in the statistics channel

The statistics channel's HTML presentation has charts, but it has
a couple of problems.

1. Because of an inconsistent condition, a chart's JS code might have
   been executed, while the HTML markup wasn't present, and this is
   causing a JS error.
2. The feature is turned off on Mozilla-based browsers.

Fix the inconsistency in conditions, remove the conditional rendering
which disabled the feature for Mozilla-based browsers by looking at
the XSLT processor's name, and fix indentation inconsistencies.

5 months agochg: nil: Log serial when IXFR version not in journal
Matthijs Mekking [Wed, 10 Dec 2025 15:24:41 +0000 (15:24 +0000)] 
chg: nil: Log serial when IXFR version not in journal

It may be useful to know which version (begin serial) is missing when the IXFR version cannot be found.

Closes #5669

Merge branch '5669-xfrout-log-serial' into 'main'

See merge request isc-projects/bind9!11323

5 months agoLog serial when IXFR version not in journal
Matthijs Mekking [Fri, 5 Dec 2025 08:49:01 +0000 (09:49 +0100)] 
Log serial when IXFR version not in journal

It may be useful to know which version (begin serial) is missing when
the IXFR version cannot be found.

5 months agofix: usr: Fix slow speed of NSEC3 optout large delegation zone signing
Matthijs Mekking [Wed, 10 Dec 2025 13:54:46 +0000 (13:54 +0000)] 
fix: usr: Fix slow speed of NSEC3 optout large delegation zone signing

BIND 9.20 takes much more time signing a large delegation zone with NSEC3 optout compared to version 9.18. This has been restored.

Closes #5672

Merge branch '5672-nsec3-optout-takes-too-long' into 'main'

See merge request isc-projects/bind9!11354

5 months agoDon't create NSEC3 nodes for unsigned delegations
Matthijs Mekking [Tue, 9 Dec 2025 12:45:40 +0000 (13:45 +0100)] 
Don't create NSEC3 nodes for unsigned delegations

Instead of creating new nodes for every possible NSEC3 record, only
create them if we are actually going to add a new NSEC3 record.

5 months agoImplement dns_dbiterator_seek3
Matthijs Mekking [Tue, 9 Dec 2025 11:37:20 +0000 (12:37 +0100)] 
Implement dns_dbiterator_seek3

This is a new seek function for dbiterator that is meant to find an
NSEC3 node in a zone database. The difference with dns_dbiterator_seek
is that if the node does not exist, this seek function will point the
iterator to the next NSEC3 name.

5 months agoAdd NSEC3 optout large delegation zone test case
Matthijs Mekking [Fri, 5 Dec 2025 16:01:00 +0000 (17:01 +0100)] 
Add NSEC3 optout large delegation zone test case

This test signs a large delegation with mostly insecure delegations
with NSEC3 optout. Once the NSEC3PARAM record is published, run
dnssec-verify to ensure the zone is correctly signed.

5 months agochg: dev: Compact rdataset implementation for authoritative
Alessio Podda [Wed, 10 Dec 2025 12:22:09 +0000 (12:22 +0000)] 
chg: dev: Compact rdataset implementation for authoritative

This MR introduces a specialized rdataset implementation for authoritative workloads, which leads to substantial memory savings in our perflab tests.

Merge branch 'alessio/auth-compact-slabs' into 'main'

See merge request isc-projects/bind9!11269

5 months agoFix formatting
Alessio Podda [Tue, 9 Dec 2025 21:49:16 +0000 (22:49 +0100)] 
Fix formatting