]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 days agoPrevent duplicate StreamDNS read jobs
Ondřej Surý [Sat, 8 Aug 2026 05:24:26 +0000 (07:24 +0200)] 
Prevent duplicate StreamDNS read jobs

Coalesce repeated reads while an asynchronous StreamDNS job is pending.

7 days agofix: usr: Tighten EUI48 and EUI48 text parsing
Mark Andrews [Thu, 6 Aug 2026 15:40:02 +0000 (01:40 +1000)] 
fix: usr: Tighten EUI48 and EUI48 text parsing

Malformed EUI48 and EUI64 records could be accepted.  This
has been fixed.

Closes #6082

Merge branch '6082-tighten-eui48-and-eui64-parsing' into 'main'

See merge request isc-projects/bind9!12490

8 days agoCheck that bad EUI48 and EUI64 are caught 12490/head
Mark Andrews [Mon, 3 Aug 2026 04:58:22 +0000 (14:58 +1000)] 
Check that bad EUI48 and EUI64 are caught

Checks that missing leading zeros and trailing garbage is detected.

8 days agoTighten EUI48 and EUI64 text parser
Mark Andrews [Mon, 3 Aug 2026 04:42:51 +0000 (14:42 +1000)] 
Tighten EUI48 and EUI64 text parser

Check that leading zeros were present and that there wasn't
any garbage at the end of the token by generating the record
in canonical form and checking that the input matched.

8 days agofix: test: Fix named-checkzone 'CNAME and other data' tests
Mark Andrews [Thu, 6 Aug 2026 12:56:06 +0000 (22:56 +1000)] 
fix: test: Fix named-checkzone 'CNAME and other data' tests

Closes #6282

Merge branch '6282-fix-named-checkzone-cname-and-other-data-tests' into 'main'

See merge request isc-projects/bind9!12497

8 days agoCheck for expected error messages from named-checkzone 12497/head
Mark Andrews [Thu, 6 Aug 2026 02:29:28 +0000 (12:29 +1000)] 
Check for expected error messages from named-checkzone

Also fail any zone of with name bad-* that does not have
a expected error message.

8 days agoFix checkzone 'cname and other data' tests
Mark Andrews [Tue, 4 Aug 2026 05:44:20 +0000 (15:44 +1000)] 
Fix checkzone 'cname and other data' tests

* Fix path name pattern for 'cname and other data' tests.
* Fix errors in test files for AFSDB, OPENGPG and SMIMEA.
* Add test files for DSYNC, HHIT and BRID.
* Use TYPE69 for unknown type now the DSYNC (66) has been allocated.

8 days agochg: test: Deduplicate and unify named.conf.j2 in system tests
Nicki Křížek [Thu, 6 Aug 2026 11:50:25 +0000 (13:50 +0200)] 
chg: test: Deduplicate and unify named.conf.j2 in system tests

named.conf.j2 templates were unified across the system test code base.

Changes with possible functional impact:
- use a common template for root.hints which use `a.root-server.nil. IN A 10.53.0.1`: this may change the TTL of the record - I don't think the affected tests rely on it
- add missing `*-source` options: unless the tests are intentionally about testing `*-source` options, I believe it's just a copy-paste omission
- add missing `listen-on-v6 { none; }`: not specifying those is misconfiguration. tests that want IPv6 must explicitly specify which IPv6 to use
- set the `port @PORT@` if missing: not setting the port is clearly not intended, as that would default to port 53, which shouldn't be used in tests (with the exception of a couple of live internet tests)

Changes without any functional impact:
- drop `directory .` default option
- drop `recursive yes` default option
- drop `notify yes` default option
- replace space indentation with tabs
- introduce jinja2 templates for shared options and root hints and use those

Closes #5398

Merge branch '5398-named-conf-boilterplate' into 'main'

See merge request isc-projects/bind9!12474

8 days agoAdd meson lint check rejecting hand-indented template includes 12474/head
Nicki Křížek [Fri, 31 Jul 2026 13:56:39 +0000 (13:56 +0000)] 
Add meson lint check rejecting hand-indented template includes

An indented plain {% include %} pastes the included file at column zero
and a {% filter indent %} wrapper repeats the depth by hand;
{% include_indented %} replaces both. Reject them in CI so the system
test templates stay consistent.

Assisted-by: Claude:claude-fable-5
8 days agoDocument the ns template variable in the cookbook
Martin Basti [Wed, 29 Jul 2026 15:44:06 +0000 (15:44 +0000)] 
Document the ns template variable in the cookbook

The explanation of the auto-injected ns variable was dropped when the
shared plumbing templates were documented, leaving @ns.ip@ and
@ns.ip6@ undocumented while the _common/options/ partials are built
on them. Restore it to the cookbook.

Assisted-by: Claude:claude-fable-5
8 days agoAdd meson lint check enforcing tab indentation in test configs
Nicki Křížek [Tue, 28 Jul 2026 17:51:44 +0000 (17:51 +0000)] 
Add meson lint check enforcing tab indentation in test configs

Ensure the named.conf.j2 templates in system test stay consistent in the
future by adding a lint check that runs in CI.

Assisted-by: Claude:claude-fable-5
8 days agoUse tabs for indentation in system test named configs
Nicki Křížek [Tue, 28 Jul 2026 17:15:05 +0000 (17:15 +0000)] 
Use tabs for indentation in system test named configs

The system test named configs indented blocks with a mix of tabs,
spaces, and tab/space combinations. Reindent the space-indented lines
to one tab per block level to make the style uniform across all
tests.

Assisted-by: Claude:claude-fable-5
8 days agoDocument the shared _common config templates
Nicki Křížek [Thu, 23 Jul 2026 17:14:25 +0000 (17:14 +0000)] 
Document the shared _common config templates

Assisted-by: Claude:claude-fable-5
8 days agoUse the ns variable for instance addresses in config templates
Nicki Křížek [Thu, 23 Jul 2026 17:14:14 +0000 (17:14 +0000)] 
Use the ns variable for instance addresses in config templates

Statements referring to the instance's own address were switched to use
the @ns.ip@ and @ns.ip6@ variable syntax. References to other nsX
servers are kept as plain addresses.

Assisted-by: Claude:claude-fable-5
8 days agoUse the shared root hint file where local copies matched
Nicki Křížek [Thu, 23 Jul 2026 16:52:14 +0000 (16:52 +0000)] 
Use the shared root hint file where local copies matched

Use a shared root hint file and template in tests which had an identical
local copy of a root hint file.

Assisted-by: Claude:claude-fable-5
8 days agoUse the root-hint template for indented hint configs
Nicki Křížek [Tue, 28 Jul 2026 18:11:50 +0000 (20:11 +0200)] 
Use the root-hint template for indented hint configs

Replace the root hints boilerplate with a template in configs where the
config section should be indented, i.e. in view statements. While named
doesn't care about whitespace, use the ident filter to make the final
rendered config more readable.

Assisted-by: Claude:claude-fable-5
8 days agoUse the root-hint template for identical hint configs
Nicki Křížek [Tue, 28 Jul 2026 18:11:34 +0000 (20:11 +0200)] 
Use the root-hint template for identical hint configs

Replace hand-written root hint zone with the template in cases where it
exactly matches the reference.

Assisted-by: Claude:claude-fable-5
8 days agoUse partial options templates for non-standard named configs
Nicki Křížek [Thu, 23 Jul 2026 16:51:29 +0000 (16:51 +0000)] 
Use partial options templates for non-standard named configs

The divergence from the standard plumbing is relevant for these tests
and needs to stay in place. Use partial templates for the common
statements which can be templated.

Assisted-by: Claude:claude-fable-5
8 days agoUse the dual-stack options template where instances listen on IPv6
Nicki Křížek [Thu, 23 Jul 2026 16:51:20 +0000 (16:51 +0000)] 
Use the dual-stack options template where instances listen on IPv6

Options blocks whose plumbing matches the standard except for
listening on the instance's own IPv6 address get the
_common/options-dual.conf.j2 template.

Assisted-by: Claude:claude-fable-5
8 days agoUse the shared options template for standard plumbing
Nicki Křížek [Thu, 23 Jul 2026 16:51:10 +0000 (16:51 +0000)] 
Use the shared options template for standard plumbing

Every options block carrying all seven standard plumbing statements
gets the _common/options.conf.j2 umbrella include at the top of the
block instead. Statement order inside options has no meaning to named,
so rendered configs are equivalent.

Assisted-by: Claude:claude-fable-5
8 days agoAdd shared templates for the named.conf options plumbing
Nicki Křížek [Thu, 23 Jul 2026 16:25:04 +0000 (16:25 +0000)] 
Add shared templates for the named.conf options plumbing

Almost every test instance's options block starts with the same seven
statements varying only in the instance address: the source-address
trio, port, pid-file, and the listen-on pair. Provide them as jinja2
partials in _common/options/ plus two umbrellas built on the
auto-injected per-instance `ns` variable: options.conf.j2 for the
v4-only case and options-dual.conf.j2 for dual-stack instances.

The partials carry no indentation of their own: consumers pull them in
with {% include_indented %} at the desired depth, so the templates do
not hardcode the block structure they are used in.

Semantic options (recursion, dnssec-validation, notify, allow-*) stay
in the individual config files by design.

Assisted-by: Claude:claude-fable-5
8 days agoAdd an include_indented tag for indented template includes
Nicki Křížek [Mon, 3 Aug 2026 12:21:37 +0000 (12:21 +0000)] 
Add an include_indented tag for indented template includes

jinja2's {% include %} inserts the rendered file verbatim, so includes
inside view statements have to be wrapped in a three-line
{% filter indent %} block with the depth repeated by hand. Add a small
jinja2 extension providing {% include_indented "..." %}, which detects
the tag's own leading whitespace at parse time and expands to the
builtin include wrapped in the builtin indent filter, keeping stock
jinja2 runtime semantics. Detection needs the tag alone on its line in
a loader-backed template; anything else fails at parse time instead of
misrendering.

Co-Authored-By: Martin Basti <mbasti@isc.org>
Assisted-by: Claude:claude-fable-5
8 days agoDrop options-level recursion yes statements
Nicki Křížek [Thu, 23 Jul 2026 16:45:40 +0000 (16:45 +0000)] 
Drop options-level recursion yes statements

Recursion is on by default, so an options-level `recursion yes;`
restates the default; view-level statements and `recursion no;` are
untouched.

Assisted-by: Claude:claude-fable-5
8 days agoDrop options-level notify yes statements
Nicki Křížek [Thu, 23 Jul 2026 16:45:32 +0000 (16:45 +0000)] 
Drop options-level notify yes statements

DNS NOTIFY is on by default, so an options-level `notify yes;` just
restates the default. The zone- and view-level statements and
non-default values are untouched.

Assisted-by: Claude:claude-fable-5
8 days agoDrop the no-op directory option
Nicki Křížek [Thu, 23 Jul 2026 16:45:23 +0000 (16:45 +0000)] 
Drop the no-op directory option

`directory "."` chdirs to the current working directory, which is where
named already runs. This option is the default, so drop it from the
config.

Assisted-by: Claude:claude-fable-5
8 days agoDisable IPv6 listening explicitly on v4-only instances
Nicki Křížek [Thu, 23 Jul 2026 16:37:02 +0000 (16:37 +0000)] 
Disable IPv6 listening explicitly on v4-only instances

Instances without a listen-on-v6 statement listened on every IPv6
address at the assigned port. No test relies on it, nor could it, as all
of the tests instances will be listening on all the IPv6 addresses,
making it unpredictable which packet would arrive to which instance.

The configuration makes no sense and is most likely a copy-paste error.
Explicitly disable IPv6 on IPv4-only test named instances.

Assisted-by: Claude:claude-fable-5
8 days agoSet the listening port through the options-level port statement
Nicki Křížek [Thu, 23 Jul 2026 16:31:01 +0000 (16:31 +0000)] 
Set the listening port through the options-level port statement

Some instances configured the assigned port only as a listen-on
qualifier. Where the file had no options-level port at all, that also
left named's default destination port for queries, notifies, and
transfers at 53 — on the test network every instance runs on the
assigned port, so this only worked for setups that never needed to
reach another instance. Set `port @PORT@;` at options level and use
plain listen-on statements; files with a deliberate non-standard port
statement (dns64's and notify/ns4's dual-port setups) are skipped.

Assisted-by: Claude:claude-fable-5
8 days agoKeep the live-internet test instances on the standard DNS port
Nicki Křížek [Wed, 5 Aug 2026 12:53:26 +0000 (12:53 +0000)] 
Keep the live-internet test instances on the standard DNS port

The ns1 instances in mirror_root_zone and rfc5011 talk to the root
servers on the live internet: the options-level port must remain 53
for outgoing queries to reach the real servers, and the *-source
addresses must remain unset so that a routable source address is
picked. Exempt these two configs from the standard plumbing and
spell out the intent in a comment.

Assisted-by: Claude:claude-fable-5
8 days agoAdd missing standard IPv6 source address statements
Nicki Křížek [Tue, 4 Aug 2026 16:01:12 +0000 (16:01 +0000)] 
Add missing standard IPv6 source address statements

Instances that listen on IPv6 pin their query/notify/transfer source
addresses to their own fd92:7065:b8e:ffff::N, but in some configs the
*-source-v6 statements were left unset. Explicitly add the missing
statements to make the configuration of IPv6-capable instances uniform.

Assisted-by: Claude:claude-fable-5
8 days agoAdd missing standard source address statements
Nicki Křížek [Thu, 23 Jul 2026 16:25:33 +0000 (16:25 +0000)] 
Add missing standard source address statements

Most instances pin their query/notify/transfer source addresses to
their own 10.53.0.N. Explicitly add the missing source statements across
all named config templates to make the configuration uniform.

Assisted-by: Claude:claude-fable-5
8 days agochg: ci: Split ci/freebsd.ini into per-release machine files
Michal Nowak [Thu, 6 Aug 2026 10:08:01 +0000 (12:08 +0200)] 
chg: ci: Split ci/freebsd.ini into per-release machine files

FreeBSD 15 replaced base Heimdal with MIT Kerberos 5, so pointing
krb5-config at the MIT port is no longer necessary there; FreeBSD 14
still ships Heimdal and needs the override.  A single shared machine
file cannot express that difference, so give each release its own.

Assisted-by: Claude:claude-opus-5[1m]
Merge branch 'mnowak/split-freebsd-ci-machine-files' into 'main'

See merge request isc-projects/bind9!12510

8 days agoSplit ci/freebsd.ini into per-release machine files 12510/head
Michal Nowak [Wed, 5 Aug 2026 16:35:16 +0000 (18:35 +0200)] 
Split ci/freebsd.ini into per-release machine files

FreeBSD 15 replaced base Heimdal with MIT Kerberos 5, so pointing
krb5-config at the MIT port is no longer necessary there; FreeBSD 14
still ships Heimdal and needs the override.  A single shared machine
file cannot express that difference, so give each release its own.

Assisted-by: Claude:claude-opus-5[1m]
8 days agochg: ci: Do not question obvious human Co-Authored-By trailers
Michal Nowak [Thu, 6 Aug 2026 09:54:39 +0000 (11:54 +0200)] 
chg: ci: Do not question obvious human Co-Authored-By trailers

Danger asks the reviewer to confirm that the person named in every
`Co-Authored-By` trailer is a human.  A trailer which gives a name, a
surname and an @isc.org address leaves no room for doubt, so stop
emitting that message for those and keep it for everything else.

Assisted-by: Claude:claude-opus-5[1m]
Merge branch 'mnowak/danger-human-coauthored-by' into 'main'

See merge request isc-projects/bind9!12473

8 days agoDo not question obvious human Co-Authored-By trailers 12473/head
Michal Nowak [Tue, 28 Jul 2026 14:57:47 +0000 (16:57 +0200)] 
Do not question obvious human Co-Authored-By trailers

Danger asks the reviewer to confirm that the person named in every
`Co-Authored-By` trailer is a human.  A trailer pointing at an
@isc.org address leaves no room for doubt, so stop emitting that
message for those and keep it for everything else.

Assisted-by: Claude:claude-opus-5[1m]
8 days agofix: usr: Check "asnum" validity in GeoIP ACLs
Evan Hunt [Wed, 5 Aug 2026 18:10:23 +0000 (18:10 +0000)] 
fix: usr: Check "asnum" validity in GeoIP ACLs

We now check the validity of autonomous system (AS) numbers when
parsing GeoIP ACLs that use `asnum` elements at configuration time.

`asnum` values start with an optional case-insensitive "AS" prefix, followed only by decimal digits, with no spaces or other extraneous characters. The value represented cannot exceed 2^32.

Closes #6255

Merge branch '6255-check-asnum' into 'main'

See merge request isc-projects/bind9!12438

8 days agocheck asnum validity in geoip ACLs 12438/head
Evan Hunt [Wed, 22 Jul 2026 19:59:17 +0000 (12:59 -0700)] 
check asnum validity in geoip ACLs

We now check the validity of autonomous system (AS) numbers when
parsing geoip ACLs that use "asnum" elements at configuration time.

"asnum" values start with an optional case-insensitive "AS" prefix,
followed only by decimal digits, with no spaces or other extraneous
characters. The value represented cannot exceed MAXUINT32.

9 days agochg: doc: Set up version for BIND 9.21.26
Petr Špaček [Wed, 5 Aug 2026 09:25:08 +0000 (09:25 +0000)] 
chg: doc: Set up version for BIND 9.21.26

Merge branch 'nicki/set-up-version-for-bind-9.21.26' into 'main'

See merge request isc-projects/bind9!12504

9 days agoUpdate BIND version to 9.21.26-dev 12504/head
Nicki Křížek [Wed, 5 Aug 2026 09:13:50 +0000 (11:13 +0200)] 
Update BIND version to 9.21.26-dev

9 days agofix: usr: dnssec-signzone had a potential heap bounds overflow write
Mark Andrews [Wed, 5 Aug 2026 01:12:16 +0000 (11:12 +1000)] 
fix: usr: dnssec-signzone had a potential heap bounds overflow write

It was possible for `dnssec-signzone` to overflow array bounds while signing.  This has been fixed.

Closes #6076

Merge branch '6076-dnssec-signzone-concurrent-key-loading-heap-overflow' into 'main'

See merge request isc-projects/bind9!12491

9 days agoGrow arrays in signset if key->index is too big 12491/head
Mark Andrews [Mon, 3 Aug 2026 05:48:59 +0000 (15:48 +1000)] 
Grow arrays in signset if key->index is too big

The arrays in signset are sized to allow for one additional
key per RRSIG however the list of known keys is updated in
parallel which means that the index of the returned key can
be too big for the arrays.  Grow the arrays if this happens.

Additionally ensure that the keylist and keycount are locked
when they are being read.

10 days agochg: test: Use asyncserver in the reclimit system test
Štěpán Balážik [Tue, 4 Aug 2026 11:56:29 +0000 (11:56 +0000)] 
chg: test: Use asyncserver in the reclimit system test

Replace the Perl servers with Python reimplementations.

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

See merge request isc-projects/bind9!11822

10 days agoRequire IPv6 in the reclimit system test 11822/head
Štěpán Balážik [Mon, 3 Aug 2026 11:01:13 +0000 (13:01 +0200)] 
Require IPv6 in the reclimit system test

The number of queries ns3 sends to the ans2 and ans4 servers depends
on whether it issues AAAA fetches, i.e. on IPv6 runtime support.  The
test handled both cases by grepping ns3's log for AAAA fetches and
branching between two sets of expected query counts, which was
fragile.

Require IPv6 at runtime instead and drop the branching, making the
expected query counts unconditional.  The test is skipped where IPv6
is unavailable.

Assisted-by: Claude:claude-opus-4-8
10 days agoReimplement 'reclimit/ans2' server using ControllableAsyncServer
Štěpán Balážik [Tue, 4 Aug 2026 11:11:57 +0000 (13:11 +0200)] 
Reimplement 'reclimit/ans2' server using ControllableAsyncServer

Replace the Perl implementation with a Python one. Two behaviors of
the old server are dropped: the responses driving the NS explosion
are no longer truncated to 512 bytes, which only mattered for builds
without IPv6 support, and the AA flag is only cleared on referrals
rather than on every response with an empty answer section.

10 days agoReimplement 'reclimit/ans4' using ControllableAsyncServer
Štěpán Balážik [Wed, 1 Apr 2026 12:41:51 +0000 (14:41 +0200)] 
Reimplement 'reclimit/ans4' using ControllableAsyncServer

Replace the Perl implementation with a Python one. One behavior of
the old server is dropped: the AA flag is only cleared on referrals
rather than on every response with an empty answer section.

10 days agoReimplement 'reclimit/ans7' server using AsyncDnsServer
Štěpán Balážik [Fri, 16 Jan 2026 09:14:30 +0000 (10:14 +0100)] 
Reimplement 'reclimit/ans7' server using AsyncDnsServer

Replace the Perl implementation with a Python one. The old server's
query counter doesn't work properly. Make no attempt at imitating this.

10 days agoAdd common parts of reclimit test custom servers
Štěpán Balážik [Fri, 16 Jan 2026 09:14:04 +0000 (10:14 +0100)] 
Add common parts of reclimit test custom servers

These will be shared by all the ans*/ans.py files.

10 days agofix: test: Wait for the committed NSEC3 chain state in the nsec3 tests ondrej/dns_message-region-based-allocator-baseline
Nicki Křížek [Tue, 4 Aug 2026 08:09:37 +0000 (10:09 +0200)] 
fix: test: Wait for the committed NSEC3 chain state in the nsec3 tests

Prior to this fix, the `nsec3` system test could fail due to a test race. The NSEC3 chain is updated asynchronously, and waiting for the keymgr to be done with the zone isn't sufficient to check that the NSEC3 chain has been updated. Wait for the NSEC3PARAM to be published to ensure the zone is in its final signed state.

Example failure: https://gitlab.isc.org/isc-projects/bind9/-/jobs/7819249

Merge branch 'nicki/nsec3-wait-for-committed-chain' into 'main'

See merge request isc-projects/bind9!12487

10 days agoWait for the committed NSEC3 chain state in the nsec3 tests 12487/head
Nicki Křížek [Thu, 30 Jul 2026 12:41:07 +0000 (12:41 +0000)] 
Wait for the committed NSEC3 chain state in the nsec3 tests

The nsec3 tests synchronized on the "keymgr: <zone> done" log line
before checking NSEC3PARAM presence, but that line only covers key
management.  NSEC3 chain changes are committed later, asynchronously,
by zone maintenance.

There are no log events to indicate it has finished.  Instead, poll the
served NSEC3PARAM RRset until it matches the chain state the zone's
policy calls for.  Check the salt length as well to detect a salt change
used by some of the zones.

Remove the obsolete log-check in tests_nsec3_change.py and use the
new wait_for_nsec3param() mechanism in all the places where zone is
expected to have finished signing. Move the keymgr/wait_for_nsec3param
checks into after_servers_start where applicable, rather than repeating
those checks in individual test functions.

Assisted-by: Claude:claude-fable-5
10 days agofix: usr: Fix compilation on GNU/Hurd
Mark Andrews [Tue, 4 Aug 2026 02:39:33 +0000 (12:39 +1000)] 
fix: usr: Fix compilation on GNU/Hurd

Fix compilation issues on GNU/Hurd.

Closes #6285

Merge branch '6285-fix-compilation-on-gnu-hurd' into 'main'

See merge request isc-projects/bind9!12489

10 days agoInclude <isc/dir.h> for GNU/Hurd compilation 12489/head
Mattias Ellert [Mon, 3 Aug 2026 03:24:45 +0000 (13:24 +1000)] 
Include <isc/dir.h> for GNU/Hurd compilation

10 days agoDefine IOV_MAX if not already defined
Mattias Ellert [Mon, 3 Aug 2026 03:23:11 +0000 (13:23 +1000)] 
Define IOV_MAX if not already defined

Needed for GNU/Hurd

10 days agoRemove UNUSED for non existing arguments
Mattias Ellert [Mon, 3 Aug 2026 03:10:03 +0000 (13:10 +1000)] 
Remove UNUSED for non existing arguments

10 days agoOnly compile need_rescan if RTM_NEWADDR and RTM_DELADDR are defined
Mattias Ellert [Mon, 3 Aug 2026 03:07:16 +0000 (13:07 +1000)] 
Only compile need_rescan if RTM_NEWADDR and RTM_DELADDR are defined

10 days agofix: dev: Fix recognition of DNSSEC keys using the PRIVATEDNS private algorithm
Mark Andrews [Tue, 4 Aug 2026 01:31:21 +0000 (11:31 +1000)] 
fix: dev: Fix recognition of DNSSEC keys using the PRIVATEDNS private algorithm

`dst_algorithm_fromprivatedns()` parses the algorithm name with `dns_name_fromwire()`,
which reads only the buffer's active region; the callers in frombuffer() and the
resolver never set it, so PRIVATEDNS keys were always rejected as unsupported.

Merge branch '5871-followup-fix-privatedns-algorithm-extraction' into 'main'

See merge request isc-projects/bind9!12485

10 days agoAdd minimal testing for the PRIVATEDNS algorithm mapping 12485/head
Mark Andrews [Tue, 30 Jun 2026 01:46:28 +0000 (11:46 +1000)] 
Add minimal testing for the PRIVATEDNS algorithm mapping

Enable the example PRIVATEDNS mappings (rsasha256.example.org and
rsasha512.example.org) in developer builds via TEST_PRIVATEDNS and use
them to test dst_algorithm_fromdata().

The test algorithms take the DST algorithm numbers 258 and 259, so
DST_MAX_ALGS has to grow to cover them: arrays sized by it are indexed
with the numbers dst_algorithm_fromdata() returns, and a value past the
bound would overflow them. Also map the new numbers back to
DNS_KEYALG_PRIVATEDNS in dst_algorithm_tosecalg() so the round trip
stays consistent.

10 days agoSet the active region for the dst_algorithm_fromprivatedns() call
Mark Andrews [Mon, 29 Jun 2026 22:40:15 +0000 (08:40 +1000)] 
Set the active region for the dst_algorithm_fromprivatedns() call

dst_algorithm_fromprivatedns() reads the name with dns_name_fromwire(),
which parses only the active region of the buffer. frombuffer() did not
set it, so the name could never be parsed and every PRIVATEDNS key was
rejected with DST_R_UNSUPPORTEDALG. Document the requirement in dst.h.

10 days agoUse dst_algorithm_fromdata() to extract DST algorithm numbers
Mark Andrews [Tue, 30 Jun 2026 01:54:51 +0000 (11:54 +1000)] 
Use dst_algorithm_fromdata() to extract DST algorithm numbers

dns_resolver_algorithm_supported() open-coded the extraction for
PRIVATEDNS and PRIVATEOID keys, and the PRIVATEDNS copy never set the
active region on the buffer, so dns_name_fromwire() failed and every
PRIVATEDNS key was treated as unsupported.

Replace both copies with dst_algorithm_fromdata(), which sets up the
buffer correctly and passes other algorithms through unchanged.

10 days agofix: usr: Fix NULL pointer dereference in dnstap-read
Mark Andrews [Mon, 3 Aug 2026 23:38:29 +0000 (09:38 +1000)] 
fix: usr: Fix NULL pointer dereference in dnstap-read

It was possible to dereference a NULL pointer in dnstap-read
causing it to exit on a malformed DNSTAP file.  This has been
fixed.

Closes #6124

Merge branch '6124-dnstap-parse-missing-message-null-deref-md' into 'main'

See merge request isc-projects/bind9!12463

10 days agoCheck that the message is non NULL in dns_dt_parse 12463/head
Mark Andrews [Tue, 28 Jul 2026 06:42:08 +0000 (16:42 +1000)] 
Check that the message is non NULL in dns_dt_parse

It was possible to dereference a NULL pointer in dns_dt_parse
if it was reading a malformed DNSTAP file.  This would could
cause dnstap-read to exit.  This has been fixed.

10 days agochg: dev: Move wire-test to bin/tools/named-wireformat
Evan Hunt [Mon, 3 Aug 2026 20:28:01 +0000 (20:28 +0000)] 
chg: dev: Move wire-test to bin/tools/named-wireformat

`wire-test`, a testing tool which parses wire-format DNS data and displays it in human-readable form, has been renamed to `named-wireformat` and moved from `bin/tests/system` to `bin/tools`.

Closes #2098

Merge branch '2098-wireformat-tool' into 'main'

See merge request isc-projects/bind9!12442

10 days agomove wire-test to bin/tools/named-wireformat 12442/head
Evan Hunt [Thu, 23 Jul 2026 05:04:50 +0000 (22:04 -0700)] 
move wire-test to bin/tools/named-wireformat

The wire-test has been renamed to named-wireformat and moved from
bin/tests/system to bin/tools.

10 days agomove wire-test to bin/tools
Evan Hunt [Wed, 22 Jul 2026 22:38:29 +0000 (15:38 -0700)] 
move wire-test to bin/tools

11 days agochg: usr: Batch qp transaction for RPZ updates
Alessio Podda [Mon, 3 Aug 2026 13:04:20 +0000 (13:04 +0000)] 
chg: usr: Batch qp transaction for RPZ updates

RPZ was built around fine-grained locking, but that forces the use of many small qp transactions. With this MR, we switch qp transaction to handle the
full update to the rpz summary structure.
While this serializes the RPZ updates, the reduced overhead from batching qp transactions more than compensates for it and results in improvements for big RPZ zones.

Closes #5787, #6270

Merge branch '5787-batch-rpz' into 'main'

See merge request isc-projects/bind9!12411

11 days agoAtomic rpz shutdown 12411/head
Alessio Podda [Mon, 13 Jul 2026 15:44:48 +0000 (17:44 +0200)] 
Atomic rpz shutdown

The shutdown flag is monotonic (it always starts false, eventually
becomes true and stays that way), so it does not need mutex protection.

11 days agoSplit rpz maint_lock into two
Alessio Podda [Mon, 13 Jul 2026 15:40:06 +0000 (17:40 +0200)] 
Split rpz maint_lock into two

Before this commit, maint_lock jointly protected both the "summary
structure" dns_rpz_zones_t and the individual zones. In particular,
locking maint_lock would block timer callbacks and shutdown requests,
which is undesirable.

Now that the update state has been moved to the baton, there is no
longer a reason to have a lock shared among all zones. This commit
splits the old rpzs->maint_lock into two.

First, rpz->update_lock protects callbacks and timers for individual
RPZ zones. Second, rpzs->data_lock protects joint operations on the QP
and CIDR trees. The latter replaces the old maint_lock.

11 days agoMove rpz, db an dbversion to the baton
Alessio Podda [Mon, 13 Jul 2026 15:26:41 +0000 (17:26 +0200)] 
Move rpz, db an dbversion to the baton

Instead of embedding the "in progress" database inside the RPZ zone
struct, we can attach it to the baton passed to libuv. This simplifies
lifetimes and will make refactoring the locking possible.

11 days agoDelete optimistically from rpz nodes hashtable
Alessio Podda [Mon, 9 Mar 2026 23:12:54 +0000 (00:12 +0100)] 
Delete optimistically from rpz nodes hashtable

Instead of checking whether an element is present and then deleting it,
we can try to delete it optimistically and then rely on the result to
know if the element was present or not.

11 days agoBatch qp transaction
Alessio Podda [Thu, 5 Mar 2026 15:55:00 +0000 (16:55 +0100)] 
Batch qp transaction

Qp write transactions have a setup cost, so going from many small
transactions to a single one that covers the whole rpz zone processing
is a performance win, especially with big rpz zones.
Move from many small transactions to a single big transaction.

11 days agoIncrease lock scope in rpzs construction
Alessio Podda [Thu, 5 Mar 2026 14:09:08 +0000 (15:09 +0100)] 
Increase lock scope in rpzs construction

RPZ was built around fine-grained locking, but that forces the use of
many small qp transactions. This commit increases the scope of
rpzs->maint_lock to encompass the full processing of an RPZ zone.
Done as a preparation for a later commit.

11 days agochg: test: Rewrite the `tcp` system test in Python
Štěpán Balážik [Mon, 3 Aug 2026 12:12:08 +0000 (12:12 +0000)] 
chg: test: Rewrite the `tcp` system test in Python

Merge branch 'stepan/tcp-system-test-python' into 'main'

See merge request isc-projects/bind9!11890

11 days agoRemove forgotten compatibility check 11890/head
Štěpán Balážik [Sat, 25 Apr 2026 18:19:18 +0000 (20:19 +0200)] 
Remove forgotten compatibility check

dnspython >= 2.7.0 is now required everywhere.

11 days agoPort the long TCP stream test to Python
Štěpán Balážik [Sat, 25 Apr 2026 14:13:59 +0000 (16:13 +0200)] 
Port the long TCP stream test to Python

Previously, the packet.pl script was used to send the a series of frames
to named; this worked by accident as most of these were refused by the
kernel with EAGAIN. packet.pl prints a dot every 1000 packets, so this
slowed the script down and allowed some frames to get through.

Reimplement the test in Python: build the packet with dnspython, send
~6 MiB of data over TCP discarding all replies and then check if the
server is still alive.

The server may close the connection before we have written the whole
stream. This shows up notably on Alma Linux 8: under concurrent load
its small default TCP buffers let the flow control between us and named
wedge, named then hits its idle timeout and resets the connection
mid-write, and drain() raises ConnectionError.

That is fine -- the connection being torn down is acceptable and the
only thing this test asserts is that named survives the flood, which
the final query checks -- so tolerate the server closing the connection
early.

11 days agoPort TCP high-water checks to Python
Štěpán Balážik [Sat, 25 Apr 2026 14:03:37 +0000 (16:03 +0200)] 
Port TCP high-water checks to Python

Add Python helpers for inspecting `rndc status`, opening probe
connections, and waiting for counter changes, then use them to port the
TCP and recursive high-water checks from the shell script.

Connections are now managed by the test script directly removing the
need for the ans6 server. This also removes the need for the send.pl
script and the respective shell test helper as they were used to control
said server.

11 days agoPort TCP request statistics checks to Python
Štěpán Balážik [Sat, 25 Apr 2026 14:00:38 +0000 (16:00 +0200)] 
Port TCP request statistics checks to Python

Add a helper that runs `rndc stats` and reads the TCP request counter
from named.stats, then use it to port the resolver and forwarder checks
from the shell script to tests_tcp.py. Record named.stats as an extra
artifact so the generated statistics remain available after test runs.

11 days agoRefactor the existing Python TCP system tests
Štěpán Balážik [Sat, 25 Apr 2026 13:58:03 +0000 (15:58 +0200)] 
Refactor the existing Python TCP system tests

Use isctest.query.create() and a shared round-trip helper in
bin/tests/system/tcp/tests_tcp.py, add type hints, and reorganize the
existing tests to follow current style.

11 days agonew: usr: Add a RPZ mode to named-checkzone
Mark Andrews [Mon, 3 Aug 2026 08:34:18 +0000 (18:34 +1000)] 
new: usr: Add a RPZ mode to named-checkzone

Provides a command line switch (named-checkzone -P) to treat the zone
being loaded as an RPZ zone and check if the owner names are valid.

Closes #262

Merge branch '262-add-a-rpz-mode-to-named-checkzone' into 'main'

See merge request isc-projects/bind9!12455

11 days agoTest that "named-checkzone -P" detects invalid RPZ IP prefixes 12455/head
Mark Andrews [Mon, 27 Jul 2026 06:37:33 +0000 (16:37 +1000)] 
Test that "named-checkzone -P" detects invalid RPZ IP prefixes

Also check that a well formed RPZ IP prefix does not generate
an error when in RPZ mode (-P).

11 days agoAdd a RPZ checking mode to named-checkzone
Mark Andrews [Thu, 23 Jul 2026 13:51:51 +0000 (23:51 +1000)] 
Add a RPZ checking mode to named-checkzone

Check that the zone will not produce errors when it is loaded.

11 days agofix: nil: Address out of bounds memory read in dnstap-read
Mark Andrews [Sun, 2 Aug 2026 21:38:10 +0000 (07:38 +1000)] 
fix: nil: Address out of bounds memory read in dnstap-read

If dnstap-read is processing a malformed file it could read
past the end of the address buffer in yaml mode.  This has
been fixed.

Closes #6077

Merge branch '6077-dnstap-read-yaml-address-oob-read' into 'main'

See merge request isc-projects/bind9!12476

11 days agoAddress out of bounds memory read in dnstap-read 12476/head
Mark Andrews [Wed, 29 Jul 2026 03:30:47 +0000 (13:30 +1000)] 
Address out of bounds memory read in dnstap-read

If dnstap-read is processing a malformed file it could read
past the end of the address buffer in yaml mode.  This has
been fixed.

13 days agochg: dev: Unify the internal representation of negative cache entries
Ondřej Surý [Fri, 31 Jul 2026 19:46:07 +0000 (21:46 +0200)] 
chg: dev: Unify the internal representation of negative cache entries

Negative cache entries are now stored and exposed under the type whose nonexistence they prove instead of the old inverted encoding.

Merge branch 'ondrej/unify-rdataset-negative-handling' into 'main'

See merge request isc-projects/bind9!12481

13 days agoStore negative cache entries under their natural type 12481/head
Ondřej Surý [Thu, 30 Jul 2026 15:42:26 +0000 (17:42 +0200)] 
Store negative cache entries under their natural type

Negative cache entries were exposed through dns_rdataset_t in an
inverted shape (type=none, covers=<qtype>) while the cache internally
stored them under (<qtype>, none) with a NEGATIVE flag, so every
consumer had to convert between the two representations, and several
places relied on type==0 as an implicit negativity test.

Expose negative entries in their natural shape instead: type holds the
RR type whose nonexistence is cached (dns_rdatatype_any for NXDOMAIN
and NODATA(QTYPE=ANY) proofs), covers stays none, and the negative
attribute marks the entry.  The implicit type==0 tests become explicit
attribute checks, and the cache database now rejects meta-types other
than ANY, which remains valid as a lookup type and as a negative
entry.

2 weeks agochg: dev: Delete cache rdatasets directly instead of tombstoning them
Ondřej Surý [Fri, 31 Jul 2026 05:21:10 +0000 (07:21 +0200)] 
chg: dev: Delete cache rdatasets directly instead of tombstoning them

Deleting an rdataset from the cache left a placeholder entry
behind that every lookup had to skip until it aged out. Deletion
now removes the entry outright, and the placeholder mechanism is gone.

Merge branch 'ondrej/qpcache-cleanup-delete-tombstone' into 'main'

See merge request isc-projects/bind9!12454

2 weeks agoDelete cache rdatasets directly instead of tombstoning them
Ondřej Surý [Fri, 24 Jul 2026 18:46:36 +0000 (20:46 +0200)] 
Delete cache rdatasets directly instead of tombstoning them

The refactoring that cleans the previous headers immediately from the
cache allows additional cleanup.  The cache now does not require the
NONEXISTENT tombstone and dns_db_deleterdataset() can directly remove
the header with associate type from the cache.  This simplifies all the
other code working with headers as the cache now only contains header
that carry information, so the only check we need to do now is ACTIVE()
check whether the TTL is still ok (+ serve-stale hacks).

2 weeks agofix: dev: dig with IDN output could leak memory on ISC_R_NOSPACE retry
Mark Andrews [Thu, 30 Jul 2026 21:14:54 +0000 (07:14 +1000)] 
fix: dev: dig with IDN output could leak memory on ISC_R_NOSPACE  retry

The IDN to text display call back could leak the memory holding the
converted name if it did not fit into the buffer.  This has been fixed.

Closes #6073

Merge branch '6073-dig-idn-output-no-space-retry-memory-leak' into 'main'

See merge request isc-projects/bind9!12462

2 weeks agodig with IDN output could leak memory on ISC_R_NOSPACE retry
Mark Andrews [Tue, 28 Jul 2026 06:23:24 +0000 (16:23 +1000)] 
dig with IDN output could leak memory on ISC_R_NOSPACE retry

The IDN to text display call back could leak the memory holding the
converted name if it did not fit into the buffer.  This has been fixed.

2 weeks agofix: usr: Treat non canonical RPZ prefixes as any other failure
Mark Andrews [Thu, 30 Jul 2026 20:38:21 +0000 (06:38 +1000)] 
fix: usr: Treat non canonical RPZ prefixes as any other failure

RPZ prefixes that were not encoded in canonical form do not
work.  Treat them as any other encoding error.

Closes #6043

Merge branch '6043-treat-non-canonical-rpz-prefixes-as-any-other-failure' into 'main'

See merge request isc-projects/bind9!12441

2 weeks agoReport RPZ prefixes in not canonical form as error
Mark Andrews [Thu, 23 Jul 2026 05:06:20 +0000 (15:06 +1000)] 
Report RPZ prefixes in not canonical form as error

RPZ prefixes in not canonical form where not effective but were not
reported as an error like other parsing errors.  This has been
fixed.

2 weeks agochg: ci: Use meson native files for CI build configure flags
Nicki Křížek [Thu, 30 Jul 2026 15:15:04 +0000 (17:15 +0200)] 
chg: ci: Use meson native files for CI build configure flags

Make it easier to reproduce failed CI builds locally by using meson native files to configure the jobs, rather than composing variables in `.gitlab-ci.yml`.

To reproduce a build locally, the following can be used now: (with `$EXTRA_SETUP_FILES` being set per-job in `.gitlab-ci.yml`, single variable, no composition)

```
meson setup --native-file ci/common.ini $EXTRA_SETUP_FILES build
```

Closes #5470

Merge branch '5470-meson-native-files' into 'main'

See merge request isc-projects/bind9!12357

2 weeks agoAllow failure for respdiff:recent-named
Nicki Křížek [Wed, 1 Jul 2026 14:29:04 +0000 (16:29 +0200)] 
Allow failure for respdiff:recent-named

Due to the lack of the ci/*.ini files in the prior releases, the
recent-named job fails to compile the previous version.

After a release with ci/*.ini files is published, the job will restore
to normal and this can be reverted.

2 weeks agoInclude required meson native files in tarball
Nicki Křížek [Thu, 2 Jul 2026 14:53:10 +0000 (16:53 +0200)] 
Include required meson native files in tarball

The `*tarball*` CI jobs build directly from the unpacked tarball, but
the entire ci/ directory was export-ignored. Add the required ci/*.ini
scripts so these jobs can pass in CI.

2 weeks agoUse meson native files for CI build configure flags
Nicki Křížek [Thu, 2 Jul 2026 14:50:06 +0000 (16:50 +0200)] 
Use meson native files for CI build configure flags

CI build jobs carried compiler flags and project options as YAML
variables and EXTRA_CONFIGURE strings composed through inheritance and
shell interpolation, which is awkward to reproduce locally.  Move the
shared flags into meson native files under ci/ so a build can be
reproduced directly:

    meson setup --native-file ci/common.ini [--native-file ci/<job>.ini] build

ci/common.ini exports cflags_common as a [constants] value so per-job
overlays can extend rather than replace it:

    c_args = cflags_common + ['-DDEBUG']

The cross build file ci/amd64cross32.ini repeats the c_args from
ci/common.ini, because that file only configures the host and the
[constants] section is not visible for the cross build.

ci/scan-build.ini likewise repeats ci/common.ini instead of layering on
it, and notably declares no [binaries] section.  scan-build substitutes
its analyzer wrapper by setting $CC via --use-cc, but a machine file's
[binaries] c takes precedence over $CC; inheriting the c = 'gcc' from
ci/common.ini would pin the compiler back to gcc and leave the analyzer
unused, undoing 23a722db57.

ci/reprotest.ini is standalone too.  `meson reprotest` builds twice
and compares the results byte for byte, so it configures the smallest
build that still exercises the compiler rather than the full CI option
set.

The tumbleweed and tumbleed-libuv options were unified. The only
difference was gssapi=disabled, which seems like it should apply to all
tumbleweed builds as per 1b2c191bed4097e1095de3bc2f3854b6db894a8e.

Assisted-by: Claude:claude-opus-4-8
2 weeks agoRemove STRESS_CONFIGURE_FLAGS from .gitlab-ci.yml
Nicki Křížek [Wed, 1 Jul 2026 08:57:20 +0000 (10:57 +0200)] 
Remove STRESS_CONFIGURE_FLAGS from .gitlab-ci.yml

This variable was introduced during meson refactoring and seems to be an
unused leftover - it isn't used anywhere in CI.

2 weeks agoDrop the redundant readline configuration check from CI
Nicki Křížek [Tue, 30 Jun 2026 15:00:36 +0000 (15:00 +0000)] 
Drop the redundant readline configuration check from CI

.check_readline_setup grepped build/config.h to confirm the requested
libedit/readline backend was actually selected.  It dates to 2020
(bc1c0d2ef4), the autotools era, when several backends
(readline/editline/libedit) were selectable and autoconf's detection
could silently fall back to a different one or to none.

main builds only with meson now, where "line" is a strict feature
option: -Dline=enabled makes libedit a hard dependency (configure fails
if it is missing) and -Dline=disabled guarantees HAVE_LIBEDIT is never
set.  Both assertions the check makes are therefore tautological -- the
silent-misdetection failure mode it guarded against can no longer occur.

Assisted-by: Claude:claude-opus-4-8
2 weeks agofix: test: Ignore comments when comparing built-in root hints to named.root
Nicki Křížek [Thu, 30 Jul 2026 12:23:16 +0000 (14:23 +0200)] 
fix: test: Ignore comments when comparing built-in root hints to named.root

Ignore comment-churn in the root hints file. Otherwise, frequent pointless update would be needed:

- https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/12445
- https://gitlab.isc.org/isc-private/bind9/-/jobs/7862160

Merge branch 'nicki/root-hints-ignore-comments' into 'main'

See merge request isc-projects/bind9!12479

2 weeks agoIgnore comments when comparing built-in root hints to named.root
Nicki Křížek [Thu, 30 Jul 2026 08:40:16 +0000 (08:40 +0000)] 
Ignore comments when comparing built-in root hints to named.root

InterNIC periodically republishes named.root with only the "last
update" and "related version of root zone" comments changed, which
failed the live-internet check even though the actual records were
unchanged. Updating the built-in hints for comment-only churn is
pointless, so compare just the resource records.

Assisted-by: Claude:claude-fable-5
2 weeks agochg: dev: Reduce the memory used by each record set in the cache
Ondřej Surý [Thu, 30 Jul 2026 04:43:36 +0000 (06:43 +0200)] 
chg: dev: Reduce the memory used by each record set in the cache

Each record set in the cache carried a 32-byte table for
restoring its owner name's letter case, unused since the
case handling was reworked. Removing it makes every cache
entry 32 bytes smaller.

Merge branch 'ondrej/remove-upper-from-slabheader' into 'main'

See merge request isc-projects/bind9!12478

2 weeks agoRemove the ownercase bitmap from dns_slabheader_t
Ondřej Surý [Wed, 29 Jul 2026 14:03:48 +0000 (16:03 +0200)] 
Remove the ownercase bitmap from dns_slabheader_t

Since the database ownercase became modifiable only through
dns_db_addrdataset(), nothing ever sets the CASESET attribute on a
slabheader, so the upper[] case bitmap was never written and the slab
getownercase method could never restore anything.  Remove both,
shrinking every cache slabheader by 32 bytes.

2 weeks agochg: test: Convert the digdelv system test from shell to pytest
Martin Basti [Wed, 29 Jul 2026 12:31:57 +0000 (12:31 +0000)] 
chg: test: Convert the digdelv system test from shell to pytest

The digdelv system test was a 2000-line tests.sh script run through the shell-test wrapper. It is now four native pytest modules — tests_dig.py, tests_delv.py, tests_mdig.py and tests_others.py (nslookup, host, nsupdate) — with shared helpers in common.py, repeated checks parametrized, and the yamlget.py helper script replaced by direct PyYAML parsing. PyYAML is now a required test dependency: the +yaml checks fail instead of being skipped when it is missing, and each module is skipped as a whole when its tool is not built.

Merge branch 'mbasti/digdelv-tests-to-py' into 'main'

See merge request isc-projects/bind9!12446

2 weeks agoDrop executable-availability skips from the digdelv tests
Martin Basti [Mon, 27 Jul 2026 14:51:02 +0000 (14:51 +0000)] 
Drop executable-availability skips from the digdelv tests

The digdelv modules skipped themselves when the tool under test was
not built, but dig, delv, mdig, nslookup, host and nsupdate are
always built on the main branch, so the guards could never trigger
and would only hide genuine breakage as a skip.

Assisted-by: Claude:claude-fable-5