]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
7 months agochg: test: Properly process JSON and XML in tests
Michał Kępień [Sat, 25 Oct 2025 06:00:41 +0000 (08:00 +0200)] 
chg: test: Properly process JSON and XML in tests

Processing JSON and XML using `grep` and `sed` is error-prone, overly
lax in some ways, overly strict in others, and neither accurate nor
expressive.  Use `jq` and `xmllint` with XPath expressions to make
things right in system tests.

See #3304

Merge branch '3304-properly-process-json-and-xml-in-tests' into 'main'

See merge request isc-projects/bind9!10942

7 months agoRemove unused Perl scripts
Michał Kępień [Sat, 25 Oct 2025 05:37:48 +0000 (07:37 +0200)] 
Remove unused Perl scripts

The traffic-json.pl and traffic-xml.pl scripts that were used in the
"statschannel" system test in the past became dead code when commit
1202fd912a1baa9c299f17caf4494bc21234da85 rewrote parts of that test to
Python.  Remove those scripts.

7 months agoRemove unused xmllint-html.sh script
Michał Kępień [Sat, 25 Oct 2025 05:37:48 +0000 (07:37 +0200)] 
Remove unused xmllint-html.sh script

There are no longer any HTML files in the BIND 9 source repository.
Remove the xmllint-html.sh script that was used in the past to check
those for errors.

7 months agoUse xmllint in system tests inspecting XML data
Michał Kępień [Sat, 25 Oct 2025 05:37:48 +0000 (07:37 +0200)] 
Use xmllint in system tests inspecting XML data

Inspecting XML data using sed and grep is error-prone, overly lax in
some ways, overly strict in others, and neither accurate nor expressive.
Use xmllint and XPath expressions for inspecting XML data in the
"statistics", "statschannel", and "synthfromdnssec" system tests to
address these deficiencies.

7 months agoDetect xmllint at build time
Michał Kępień [Sat, 25 Oct 2025 05:37:48 +0000 (07:37 +0200)] 
Detect xmllint at build time

Detect whether and where the xmllint utility is available at build time,
so that it can be used in system tests.  If the tool is not found,
specific checks employing it will be skipped.

7 months agoUse jq in system tests inspecting JSON data
Michał Kępień [Sat, 25 Oct 2025 05:37:48 +0000 (07:37 +0200)] 
Use jq in system tests inspecting JSON data

Inspecting JSON data using grep is error-prone, overly lax in some ways,
overly strict in others, and neither accurate nor expressive.  Use jq
for inspecting JSON data in the "statschannel" and "synthfromdnssec"
system tests to address these deficiencies.

7 months agoDetect jq at build time
Michał Kępień [Sat, 25 Oct 2025 05:37:48 +0000 (07:37 +0200)] 
Detect jq at build time

Detect whether and where the jq utility is available at build time, so
that it can be used in system tests.  If the tool is not found, specific
checks employing it will be skipped.

7 months agochg: dev: Fix assertion failure from arc4random_uniform with invalid limit
Ondřej Surý [Fri, 24 Oct 2025 20:20:51 +0000 (22:20 +0200)] 
chg: dev: Fix assertion failure from arc4random_uniform with invalid limit

When the arc4random_uniform() is called on NetBSD with upper_bound that
makes no sense statistically (0 or 1), the call crashes the calling
program.  Fix this by returning 0 when upper bound is < 2 as does Linux,
FreeBSD and NetBSD.  (Hint: System CSPRNG should never crash.)

Closes #5596

Merge branch '5596-fix-isc_random_uniform-on-NetBSD' into 'main'

See merge request isc-projects/bind9!11147

7 months agoFix assertion failure from arc4random_uniform with invalid limit
Ondřej Surý [Fri, 24 Oct 2025 08:34:33 +0000 (11:34 +0300)] 
Fix assertion failure from arc4random_uniform with invalid limit

When the arc4random_uniform() is called on NetBSD with upper_bound that
makes no sense statistically (0 or 1), the call crashes the calling
program.  Fix this by returning 0 when upper bound is < 2 as does Linux,
FreeBSD and NetBSD.  (Hint: System CSPRNG should never crash.)

7 months agorem: test: Drop the unit test for testing randomness
Ondřej Surý [Fri, 24 Oct 2025 19:17:08 +0000 (21:17 +0200)] 
rem: test: Drop the unit test for testing randomness

Since we are using system routines for randomness, there's no point
in spending time and run the statistical suite for testing PRNG.

Merge branch 'ondrej/drop-random-unit-test' into 'main'

See merge request isc-projects/bind9!11137

7 months agoDrop the unit test for testing randomness
Ondřej Surý [Wed, 22 Oct 2025 16:25:18 +0000 (18:25 +0200)] 
Drop the unit test for testing randomness

Since we are using system routines for randomness, there's no point
in spending time and run the statistical suite for testing PRNG.

7 months agochg: pkg: minimal meson version required is 1.3.0
Michal Nowak [Fri, 24 Oct 2025 16:35:00 +0000 (18:35 +0200)] 
chg: pkg: minimal meson version required is 1.3.0

The minimal required meson version is 1.3.0.

Where distribution repositories don't provide meson 1.3.0 or newer, meson from PyPI may be used instead.

Merge branch 'aydin/meson-bump-version' into 'main'

See merge request isc-projects/bind9!10997

7 months agoadd muon's static analyzer to CI
Aydın Mercan [Mon, 20 Oct 2025 10:42:48 +0000 (13:42 +0300)] 
add muon's static analyzer to CI

Muon features a basic static analyzer that is functional enough to have
caught several meson mistakes.

7 months agoDrop the NO_BUILD_TEST_PREREQ hack
Michal Nowak [Wed, 8 Oct 2025 18:37:24 +0000 (20:37 +0200)] 
Drop the NO_BUILD_TEST_PREREQ hack

With the updated meson, jammy does not need to avoid the
"meson-test-prereq" target.

7 months agoget rid of unused meson variables
Aydın Mercan [Fri, 19 Sep 2025 08:06:07 +0000 (10:06 +0200)] 
get rid of unused meson variables

Found by muon's own static analyzer.

7 months agobump the minimum meson version to 1.3.0
Aydın Mercan [Thu, 18 Sep 2025 11:07:08 +0000 (13:07 +0200)] 
bump the minimum meson version to 1.3.0

After a couple releases, it appears that the minimum version can be
increased without much trouble.

Because meson only requires python 3.7 or greater, most supported
distributions can run a newer meson without having to deal with
additional dependencies or a new python version.

7 months agofix: pkg: fix fuzzing builds
Michal Nowak [Fri, 24 Oct 2025 13:37:36 +0000 (15:37 +0200)] 
fix: pkg: fix fuzzing builds

Previously fuzzing builds were broken due to some typos in the `meson.build`.

Merge branch 'aydin/fuzz-meson-fix' into 'main'

See merge request isc-projects/bind9!11052

7 months agoDrop doh and geoip from pairwise testing exclusion list
Michal Nowak [Wed, 22 Oct 2025 17:27:06 +0000 (19:27 +0200)] 
Drop doh and geoip from pairwise testing exclusion list

doh and geoip features can be part of pairwise testing. Their exclusion
was a misunderstanding.

7 months agofix fuzzing
Aydın Mercan [Fri, 3 Oct 2025 12:37:01 +0000 (15:37 +0300)] 
fix fuzzing

The fuzzing binary builds have been fixed and now is run as a part of
the test suite for sanity checks.

The `oss-fuzz` backend has been made functional with the addition of the
`oss-fuzz-args` option. It allows the setup script to pass the
LIB_FUZZING_ENGINE environment variable to meson.

7 months agofix: dev: Make libcap mandatory on Linux again
Michal Nowak [Fri, 24 Oct 2025 09:24:45 +0000 (11:24 +0200)] 
fix: dev: Make libcap mandatory on Linux again

When refactoring the BIND 9.21 build system to meson, libcap was
unintentionally made optional on Linux.

Closes #5590

Merge branch '5590-make-libcap-mandatory-on-linux-again' into 'main'

See merge request isc-projects/bind9!11136

7 months agoMake libcap mandatory on Linux again
Michal Nowak [Wed, 22 Oct 2025 14:13:27 +0000 (16:13 +0200)] 
Make libcap mandatory on Linux again

When refactoring the BIND 9.21 build system to meson, libcap was
unintentionally made optional on Linux.

7 months agonew: ci: Automatically trigger rebase of -sub branches
Michał Kępień [Fri, 24 Oct 2025 02:47:26 +0000 (04:47 +0200)] 
new: ci: Automatically trigger rebase of -sub branches

After a merge into the public project, trigger automatic rebase in the respective private branch of the private project.

Merge branch 'pspacek/auto-rebase-sub-branches' into 'main'

See merge request isc-projects/bind9!11012

7 months agoApply special git tag rules only in the private project
Petr Špaček [Thu, 25 Sep 2025 12:24:45 +0000 (14:24 +0200)] 
Apply special git tag rules only in the private project

We do not want to re-release tags we create in the private project
anyway. Moreover pushing tags back into the public project after release
caused to Gitlab to create tag pipelines which never finished, which was
only confusing thing.

7 months agoTrigger rebase in private project after merge into the public one
Petr Špaček [Thu, 18 Sep 2025 14:15:05 +0000 (16:15 +0200)] 
Trigger rebase in private project after merge into the public one

Actual rebase and push is handled by pipeline inside the private project.

7 months agoDo not fail post-merge jobs if merge request reference is missing
Petr Špaček [Thu, 25 Sep 2025 11:21:23 +0000 (13:21 +0200)] 
Do not fail post-merge jobs if merge request reference is missing

Push without merge request reference on top happens when merging tags
back into the public project so these failures would produce log noise.

7 months agoDo not fail post-merge jobs after force-push
Petr Špaček [Thu, 25 Sep 2025 10:22:41 +0000 (12:22 +0200)] 
Do not fail post-merge jobs after force-push

Rebase happens in -sub branches regularly so these failures would
produce log noice.

7 months agoDeduplicate Git NAME and EMAIL variables
Petr Špaček [Thu, 25 Sep 2025 10:20:24 +0000 (12:20 +0200)] 
Deduplicate Git NAME and EMAIL variables

As an additional perk, I hope JOB_ID will make it easier to debug it
something goes wrong with automated commits.

7 months agochg: dev: Refactoring in lib/isccfg
Evan Hunt [Thu, 23 Oct 2025 20:43:07 +0000 (20:43 +0000)] 
chg: dev: Refactoring in lib/isccfg

`cfg_obj_t` objects no longer depend on the `cfg_parser_t` life-cycle; they can now persist until the last reference is detached. The `file` field, which was previously a pointer to memory allocated in the parser, is now a pointer to a subsidiary `cfg_obj_t` of type string. The API calls for creating and detaching these objects have been simplified accordingly.

Since `cfg_obj_t` is now long-lived, a zone can hold a reference to its own configuration data, making it possible to use `rndc showzone` even if `allow-new-zones` is disabled.

Several API calls related to the parser have been removed or hidden. The `cfg_parse_file()` and `cfg_parse_buffer()` functions now internally create and destroy their own parsers, eliminating the need for the caller to do so.

Most of these changes are intended to simplify dumping of running configuration data in a future commit.

Merge branch 'colin/hide-cfg-parser' into 'main'

See merge request isc-projects/bind9!11132

7 months agorestore the former change_directory logging
Evan Hunt [Thu, 23 Oct 2025 18:44:15 +0000 (11:44 -0700)] 
restore the former change_directory logging

change_directory() now lives in libisccfg. when it was moved,
the logging behavior changed: previously it had been logged
by named only, in the general logging category, and without the
named.conf filename and line number. it was not logged by
named-checkconf. this behavior has now been restored.

7 months agotest rndc showzone works for named.conf zones
Colin Vidal [Thu, 23 Oct 2025 08:54:32 +0000 (10:54 +0200)] 
test rndc showzone works for named.conf zones

Since the zone now has a reference to their respective configuration
tree, `rndc showzone` can be used for any zones (including those
defined in namedconf), without `allow-new-zones` being enabled.
Add a test for this.

The test is part of the addzone suite because showzone used to be
related to addzone, but this could be moved elsewhere in the future
if more specific tests are needed for showzone.

7 months agoensure parser/cfg_obj log includes the line number
Colin Vidal [Thu, 23 Oct 2025 08:12:38 +0000 (10:12 +0200)] 
ensure parser/cfg_obj log includes the line number

Since the `file` property of cfg_obj_t can now be null (instead of
"none"), cfg_obj_t would take a fallback flow where the line was not
logged. This fixes it.

Also, add the log line when parser_complain is called and `file` is null
(which might happend when parsing buffer only) to also include the line
number.

7 months agosimplify and regularize cfg_* functions
Evan Hunt [Wed, 22 Oct 2025 21:51:15 +0000 (14:51 -0700)] 
simplify and regularize cfg_* functions

- several functions that can no longer fail have been changed to
  type void, and unnecessary 'cleanup' sections were removed
- renamed cfg_create_obj() to cfg_obj_create(), and cfg_create_tuple()
  to cfg_tuple_create(), to match typical nomenclature.
- fixed a memory leak bug, in which an element could be removed
  from a list in delete_zoneconf() without being freed. this has
  been addressed by adding a cfg_list_unlink() function.
  list elements are now allocated based on the list they will
  be stored in, using the same mctx.

7 months agosimplify cfg_parser API
Evan Hunt [Wed, 22 Oct 2025 17:41:05 +0000 (10:41 -0700)] 
simplify cfg_parser API

- the cfg_parser_create() and cfg_parser_destroy() calls are no
  longer used outside parser.c, so they are now static functions
- cfg_parser_attach(), cfg_parser_reset(), and cfg_parser_setflags()
  are no longer used at all, and have been removed.
- cfg_parser_mapadd() has been renamed for clarity to cfg_map_add().

7 months agocfg_parse_ functions internally handle the parser
Colin Vidal [Wed, 22 Oct 2025 09:49:09 +0000 (11:49 +0200)] 
cfg_parse_ functions internally handle the parser

Instead of (1) allocating a parser, (2) parsing a file/buffer then (3)
freeing the parser, the parser is now internally created/destroyed from
within the `cfg_parse_*` functions. This simplifies a lot the use cases,
especially around the error cases where the parser needs to be freed in
a cleanup goto.

The only trick was the parser callback mechanism, which would previously
have been set up between steps 1 and 2.  Since it's never been used for
any purpose other than the "directory" option, the chdir call has now
been moved inside the parser and the generic callback mechanism has been
removed, replacing CFG_CLAUSEFLAG_CALLBACK with CFG_CLAUSEFLAG_CHDIR.

7 months agostore the zone configuration object in the zone
Evan Hunt [Wed, 22 Oct 2025 05:56:27 +0000 (22:56 -0700)] 
store the zone configuration object in the zone

when configuring a zone, we can now save the zone's configuration
object in the zone itself by calling dns_zone_setcfg().  this can
then be used by "rndc showzone" to print the zone's configuration,
which is simpler than searching for it using the new-zones
configuration, and allows it to work even if "allow-new-zones"
is disabled.

7 months agoupdate cfg_obj_attach/destroy
Evan Hunt [Tue, 21 Oct 2025 23:41:11 +0000 (16:41 -0700)] 
update cfg_obj_attach/destroy

now that cfg_obj_destroy() has been simplified, we can use the
ISC_REFCOUNT macros to declare cfg_obj_attach() and _detach().

7 months agoremove all shared and global parsers
Colin Vidal [Tue, 21 Oct 2025 15:16:39 +0000 (17:16 +0200)] 
remove all shared and global parsers

Remove all global cfg_parser objects as well as shared parsers between
views to dynamically add zones. Instead, parser are transirently created
whenever needed.

7 months agoremove global named defaults parser
Colin Vidal [Tue, 21 Oct 2025 14:29:34 +0000 (16:29 +0200)] 
remove global named defaults parser

Remove the global named defaults parser. Instead, a parser is created
during the execution time of named_config_parsedefaults(). This
simplifies the API (no parser to pass around) and the life-cycle of the
default configuration tree (it doesn't depends on a parser instance).

7 months agoremove parser context field from cfg_obj_t
Colin Vidal [Tue, 21 Oct 2025 13:41:55 +0000 (15:41 +0200)] 
remove parser context field from cfg_obj_t

cfg_obj_t doesn't store a pointer to its a parser context anymore,
and does not depend on the parser's lifecycle. Instead, it stores a
reference to its own memory context (and in principle, each node
could have different memory context). This also slightly simplifies
the _destroy API as there is no need to pass a context through it
anymore.

7 months agocfg_obj_t file is now a refcounted string
Colin Vidal [Tue, 21 Oct 2025 13:08:47 +0000 (15:08 +0200)] 
cfg_obj_t file is now a refcounted string

In order to reduce the lifecycle dependency of a `cfg_obj_t` on its
parser, the `file` field needs its own reference count, so it isn't
deleted when the parser is.  It is now stored as a subsidiary
`cfg_obj_t` object of type string.

7 months agochg: test: Use isctest.asyncserver in the "nsupdate" test
Štěpán Balážik [Thu, 23 Oct 2025 12:25:56 +0000 (12:25 +0000)] 
chg: test: Use isctest.asyncserver in the "nsupdate" test

Reimplement the custom server written in Perl in Python using the AsyncDnsServer class.

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

See merge request isc-projects/bind9!10915

7 months agoUse isctest.asyncserver in the "nsupdate" test
Štěpán Balážik [Thu, 28 Aug 2025 16:13:36 +0000 (18:13 +0200)] 
Use isctest.asyncserver in the "nsupdate" test

Reimplement the custom server written in Perl in Python using the
AsyncDnsServer class.

7 months agoEnable ignoring TCP connections
Štěpán Balážik [Thu, 28 Aug 2025 16:10:19 +0000 (18:10 +0200)] 
Enable ignoring TCP connections

Add a TCP connection handler, IgnoreAllConnections that allows
establishing TCP connection but not reading anything from it.

This re-uses the horrible hack from ConnectionReset handler and might
break at any point in the future.

See the comments and e4078885073a6c5b59729f4313108e3e7637efdb for more
details.

7 months agoMerge tag 'v9.21.14'
Michał Kępień [Wed, 22 Oct 2025 16:13:34 +0000 (18:13 +0200)] 
Merge tag 'v9.21.14'

7 months agochg: ci: Fail when spatch can't process source code
Michal Nowak [Wed, 22 Oct 2025 11:27:45 +0000 (13:27 +0200)] 
chg: ci: Fail when spatch can't process source code

Sometimes spatch fails to process the source code:

    EXN: Failure("replacement: node 80: {7[1,2,30,31,32] in isc__nm_base64_to_base64url reachable by inconsistent control-flow paths") in ./lib/isc/netmgr/http.c

Closes #5567

Merge branch '5567-spatch-detect-more-error-conditions' into 'main'

See merge request isc-projects/bind9!11115

7 months agoUse DNS_SIGTYPEPAIR instead of DNS_SIGTYPE
Michal Nowak [Tue, 21 Oct 2025 09:34:54 +0000 (11:34 +0200)] 
Use DNS_SIGTYPEPAIR instead of DNS_SIGTYPE

After 74fe3db37c65e997b82b81e5685b65cf19818646, there's no such thing as
DNS_SIGTYPE.

7 months agoUse SET_IF_NOT_NULL in isc__nm_base64*
Michal Nowak [Tue, 21 Oct 2025 09:00:36 +0000 (11:00 +0200)] 
Use SET_IF_NOT_NULL in isc__nm_base64*

7 months agoSpawn coccinelle CI job when util/check-cocci.sh was touched
Michal Nowak [Mon, 20 Oct 2025 15:58:37 +0000 (17:58 +0200)] 
Spawn coccinelle CI job when util/check-cocci.sh was touched

7 months agoFail when spatch can't process source code
Michal Nowak [Mon, 20 Oct 2025 15:36:36 +0000 (17:36 +0200)] 
Fail when spatch can't process source code

Sometimes spatch fails to process the source code:

    EXN: Failure("replacement: node 80: {7[1,2,30,31,32] in isc__nm_base64_to_base64url reachable by inconsistent control-flow paths") in ./lib/isc/netmgr/http.c

7 months agonew: dev: run individual spatch form check-cocci.sh
Colin Vidal [Wed, 22 Oct 2025 07:16:52 +0000 (09:16 +0200)] 
new: dev: run individual spatch form check-cocci.sh

Add util/check-cocci.sh support for a command-line argument which is a
path to a spatch file. Running `util/check-cocci.sh` runs all the spatch
in `cocci` folder. Running `util/check-cocci.sh cocci/foo.spatch` only
run the spatch `cocci/foo.spatch`.

Any command line parameters after `--` are forwarded to `spatch`
command, for instance:

`util/check-cocci.sh -- --debug`
`util/check-cocci.sh cocci/foo.spatch -- --debug`

Will (1) run all spatch files in cocci/ with --debug spatch option and
(2) run only `cocci/foo.spatch` with --debug options.

Merge branch 'colin/check-cocci-individual-check' into 'main'

See merge request isc-projects/bind9!11096

7 months agorun individual spatch form check-cocci.sh
Colin Vidal [Tue, 14 Oct 2025 12:01:42 +0000 (14:01 +0200)] 
run individual spatch form check-cocci.sh

Add util/check-cocci.sh support for a command-line argument which is a
path to a spatch file. Running `util/check-cocci.sh` runs all the spatch
in `cocci` folder. Running `util/check-cocci.sh cocci/foo.spatch` only
run the spatch `cocci/foo.spatch`.

Any command line parameters after `--` are forwarded to `spatch`
command, for instance:

`util/check-cocci.sh -- --debug`
`util/check-cocci.sh cocci/foo.spatch -- --debug`

Will (1) run all spatch files in cocci/ with --debug spatch option and
(2) run only `cocci/foo.spatch` with --debug options.

7 months agofix: test: Fix typo in tools test's shell path
Mark Andrews [Wed, 22 Oct 2025 05:06:12 +0000 (16:06 +1100)] 
fix: test: Fix typo in tools test's shell path

Merge branch 'pspacek/fix-test-typo' into 'main'

See merge request isc-projects/bind9!10939

7 months agoFix typo in tools test's shell path
Petr Špaček [Wed, 3 Sep 2025 12:07:41 +0000 (14:07 +0200)] 
Fix typo in tools test's shell path

7 months agofix: usr: dnssec-verify now uses exit code 1 when failing due to illegal options
Mark Andrews [Wed, 22 Oct 2025 02:21:52 +0000 (13:21 +1100)] 
fix: usr: dnssec-verify now uses exit code 1 when failing due to illegal options

Previously, dnssec-verify exited with code 0 if the options could not be parsed. This has been fixed.

Closes #5574

Merge branch '5574-dnssec-verify-uses-exit-code-0-when-failing-due-to-illegal-option' into 'main'

See merge request isc-projects/bind9!11106

7 months agodnssec-verify now returns failure on bad arguments
Mark Andrews [Thu, 16 Oct 2025 05:52:57 +0000 (16:52 +1100)] 
dnssec-verify now returns failure on bad arguments

7 months agofix: usr: Fix dnssec-keygen key collision checking for KEY rrtype keys
Mark Andrews [Wed, 22 Oct 2025 01:44:26 +0000 (12:44 +1100)] 
fix: usr: Fix dnssec-keygen key collision checking for KEY rrtype keys

The :iscman:`dnssec-keygen` utility program failed to detect
possible Key ID collisions with the existing keys generated
using the non-default ``-T KEY`` option (e.g. for ``SIG(0)``).
This has been fixed.

Closes #5506

Merge branch '5506-dnssec-keygen-sig0-keys-collision-fix' into 'main'

See merge request isc-projects/bind9!11047

7 months agoDon't log spurious error "bad key type" in findmatchingkeys
Mark Andrews [Mon, 20 Oct 2025 05:17:38 +0000 (16:17 +1100)] 
Don't log spurious error "bad key type" in findmatchingkeys

7 months agoFix dnssec-keygen key collision checking for KEY rrtype keys
Aram Sargsyan [Thu, 2 Oct 2025 12:52:12 +0000 (12:52 +0000)] 
Fix dnssec-keygen key collision checking for KEY rrtype keys

When generating a new key, dnssec-keygen checks for possible
key ID collisions with existing keys. The dnssec.c:findmatchingkeys()
function, which is supposed to get the list of the existing keys,
fails to do that for the existing KEY rrtype keys (i.e. generated
using 'dnssec-keygen -T KEY') because it doesn't pass down to the
dst_key_fromnamedfile() -> dst_key_read_public() functions the type
of the keys it's interested in. Fix the issue by introducing a new
function parameter which tells in which type of keys the caller is
currently interested in.

7 months agonew: test: Add module-specific python setup to system tests
Nicki Křížek [Tue, 21 Oct 2025 14:04:30 +0000 (16:04 +0200)] 
new: test: Add module-specific python setup to system tests

During the system test execution, allow use of module-specific setup()
function in addition to the setup.sh script which this function should
ultimately replace.

The purpose of setup() is two-fold. First, it can execute any commands
needed to create the initial conditions for the test, such as creating
key materials, manipulating files etc. Second, it should return any
test-specific template values as a dictionary. Those will be used to
render the jinja2 templates.

Merge branch 'nicki/pytest-add-python-setup-func' into 'main'

See merge request isc-projects/bind9!10983

7 months agoUse common name for post-startup server functions
Nicki Křížek [Tue, 16 Sep 2025 14:28:24 +0000 (16:28 +0200)] 
Use common name for post-startup server functions

Unify the names of autouse module-wide fixtures that perform
after_servers_start() setup. The consistent naming doesn't just help
readability, but also makes it simpler for the vulture exception (since
it doesn't properly deal with autouse fixtures).

7 months agoUse bootstrap() in pytest where applicable
Nicki Křížek [Thu, 25 Sep 2025 15:30:12 +0000 (17:30 +0200)] 
Use bootstrap() in pytest where applicable

Replace the autouse fixtures which were only used to change the initial
server configuration into proper bootstrap() functions. This gets rid of
an extraneous reconfigure.

In the tests_validation_many_anchors.py, split the fixture into a proper
bootstrap() and a separate test for checking the expected log lines for
the ignored keys. Previously, the test was broken - it should check for
all the messages being present in the log, and some of the keys are
actually initial-key rather than static-key. This has been fixed in the
parametrized test.

7 months agoAdd module-specific python setup to system tests
Nicki Křížek [Wed, 10 Sep 2025 09:09:41 +0000 (11:09 +0200)] 
Add module-specific python setup to system tests

During the system test execution, allow use of module-specific
bootstrap() function in addition to the setup.sh script which this
function should ultimately replace.

The purpose of bootstrap() is two-fold. First, it can execute any
commands needed to create the initial conditions for the test, such as
creating key materials, manipulating files etc. Second, it should return
any test-specific template values as a dictionary. Those will be used to
render the jinja2 templates.

7 months agorem: doc: Remove stub chapter about load balancing from ARM
Petr Špaček [Tue, 21 Oct 2025 09:42:12 +0000 (09:42 +0000)] 
rem: doc: Remove stub chapter about load balancing from ARM

Related: !6610

Merge branch 'pspacek/doc-remove-load-balancing' into 'main'

See merge request isc-projects/bind9!11117

7 months agoRemove stub chapter about load balancing from ARM
Petr Špaček [Tue, 21 Oct 2025 07:18:03 +0000 (09:18 +0200)] 
Remove stub chapter about load balancing from ARM

Clearly Support wants this in Knowledge base, so let's comply.

Related: !6610

7 months agonew: ci: Update Clang to version 21
Michal Nowak [Tue, 21 Oct 2025 09:10:03 +0000 (11:10 +0200)] 
new: ci: Update Clang to version 21

Merge branch 'mnowak/llvm-21' into 'main'

See merge request isc-projects/bind9!10877

7 months agoUse clang-format-21 to update formatting
Michal Nowak [Thu, 21 Aug 2025 12:57:36 +0000 (14:57 +0200)] 
Use clang-format-21 to update formatting

7 months agoUpdate Clang to version 21
Michal Nowak [Thu, 21 Aug 2025 11:12:23 +0000 (13:12 +0200)] 
Update Clang to version 21

7 months agofix: nil: simplify dns_dumpctx API
Evan Hunt [Tue, 21 Oct 2025 04:58:27 +0000 (04:58 +0000)] 
fix: nil: simplify dns_dumpctx API

the functions dns_dumpctx_db() and dns_dumpctx_version() are used in
only one place, to get the serial number of the version being dumped.
it's simpler to expose the serial number through its own call,
dns_dumpctx_serial(), and remove the others.

Merge branch 'each-cleanup-dumpctx' into 'main'

See merge request isc-projects/bind9!10937

7 months agosimplify dns_dumpctx API
Evan Hunt [Wed, 3 Sep 2025 06:59:35 +0000 (23:59 -0700)] 
simplify dns_dumpctx API

the functions dns_dumpctx_db() and dns_dumpctx_version() are used in
only one place, to get the serial number of the version being dumped.
it's simpler to expose the serial number through its own call,
dns_dumpctx_serial(), and remove the others.

7 months agofix: nil: Fix parse_dnskey in bin/dnssec/dnssec-ksr.c was failing to reset comments
Mark Andrews [Mon, 20 Oct 2025 00:31:22 +0000 (11:31 +1100)] 
fix: nil: Fix parse_dnskey in bin/dnssec/dnssec-ksr.c was failing to reset comments

If dns_name_fromtext failed or the subsequent dns_name_compare
failed the lexer's comments state wasn't cleaned up.

Closes #5581

Merge branch '5581-parse_dnskey-in-lib-dns-skr-c-was-failing-to-reset-comments' into 'main'

See merge request isc-projects/bind9!11109

7 months agoFix parse_dnskey in bin/dnssec/dnssec-ksr.c was failing to reset comments
Mark Andrews [Fri, 17 Oct 2025 04:24:04 +0000 (15:24 +1100)] 
Fix parse_dnskey in bin/dnssec/dnssec-ksr.c was failing to reset comments

If dns_name_fromtext failed or the subsequent dns_name_compare
failed the lexer's comments state wasn't cleaned up.

7 months agofix: ci: Delete tarball after unpacking in CI jobs
Štěpán Balážik [Sun, 19 Oct 2025 19:46:56 +0000 (19:46 +0000)] 
fix: ci: Delete tarball after unpacking in CI jobs

This was overlooked in Meson migration.

Merge branch 'stepan/delete-tarball-after-unpacking' into 'main'

See merge request isc-projects/bind9!11111

7 months agoDelete tarball after unpacking in CI jobs
Štěpán Balážik [Wed, 15 Oct 2025 18:40:16 +0000 (20:40 +0200)] 
Delete tarball after unpacking in CI jobs

This was overlooked in Meson migration.

7 months agochg: dev: mem: checkfree assertion after debug list dump
Colin Vidal [Sun, 19 Oct 2025 08:38:18 +0000 (10:38 +0200)] 
chg: dev: mem: checkfree assertion after debug list dump

When a memory context is destroyed, if the `checkfree` property is set,
the program assert there is no remaining allocation. If there are and
assertions are enabled, the program immediately stops.

However, if memory trace/record debug is enabled, the dump of
outstanding allocation won't be printed as it is done after the
no remaining allocation assertion check.

This moves the no remaining allocation assertion check after the dump of
outstanding allocations, so it is still possible to figure out what's
still allocated by this memory context.

Merge branch 'colin/mem-checkfree-check-after-debuglist' into 'main'

See merge request isc-projects/bind9!11110

7 months agocheck memory context validity before mem_destory
Colin Vidal [Sat, 18 Oct 2025 15:44:27 +0000 (17:44 +0200)] 
check memory context validity before mem_destory

Add a magic number check to ensure the memory context validity before
destorying it.

This check is needed now as it was done before implicitly when
isc_mem_inuse was called, but isc_mem_inuse is now called later (to be
able to dump the outstanding allocations).

7 months agomem: checkfree assertion after debug list dump
Colin Vidal [Fri, 17 Oct 2025 08:54:09 +0000 (10:54 +0200)] 
mem: checkfree assertion after debug list dump

When a memory context is destroyed, if the `checkfree` property is set,
the program assert there is no remaining allocation. If there are and
assertions are enabled, the program immediately stops.

However, if memory trace/record debug is enabled, the dump of
outstanding allocation won't be printed as it is done after the
no remaining allocation assertion check.

This moves the no remaining allocation assertion check after the dump of
outstanding allocations, so it is still possible to figure out what's
still allocated by this memory context.

7 months agoUpdate BIND version for release v9.21.14
Michał Kępień [Sat, 18 Oct 2025 09:48:52 +0000 (11:48 +0200)] 
Update BIND version for release

7 months agonew: doc: Prepare documentation for BIND 9.21.14
Michał Kępień [Sat, 18 Oct 2025 09:46:04 +0000 (11:46 +0200)] 
new: doc: Prepare documentation for BIND 9.21.14

Merge branch 'michal/prepare-documentation-for-bind-9.21.14' into 'v9.21.14-release'

See merge request isc-private/bind9!867

7 months agoRemove reuse annotations for unused m4 libtool files
Nicki Křížek [Mon, 6 Oct 2025 15:45:07 +0000 (17:45 +0200)] 
Remove reuse annotations for unused m4 libtool files

The files in question are no longer included in the git tree and
distributed with the code. Remove the reuse annotations as they caused
issues with reuse 6.0.0, as multiline annotation for
SPDX-FileCopyrightText breaks the parsing.

(cherry picked from commit e77f349240d1f71953cfe26cf0a1417e5c085493)

7 months agoPrepare release notes for BIND 9.21.14
Michał Kępień [Sat, 18 Oct 2025 07:47:28 +0000 (09:47 +0200)] 
Prepare release notes for BIND 9.21.14

7 months agoPrepare changelog for BIND 9.21.14
Michał Kępień [Sat, 18 Oct 2025 07:47:28 +0000 (09:47 +0200)] 
Prepare changelog for BIND 9.21.14

7 months agofix: usr: Fix the assertion failure in the selfsigned DNSKEY handling
Michał Kępień [Sat, 18 Oct 2025 07:39:35 +0000 (09:39 +0200)] 
fix: usr: Fix the assertion failure in the selfsigned DNSKEY handling

The selfsigned_dnskey() function can now return all the return codes
that dns_dnssec_keyfromrdata() can return and this would cause an
assertion failure as we were not expecting new isc_result_t codes.

Closes isc-projects/bind9#5343

Merge branch 'ondrej/security-fix-crash-in-selfsigned-key-handling' into 'v9.21.14-release'

See merge request isc-private/bind9!865

7 months agofix: usr: Report when a zone reload is already in progress
Evan Hunt [Fri, 17 Oct 2025 20:36:32 +0000 (20:36 +0000)] 
fix: usr: Report when a zone reload is already in progress

If a zone reload was already in progress when `rndc reload <zone>` was
run, the message returned was "zone reload queued", which was technically
correct, but it was identical to the message returned when a reload
was not in progress. Consequently, a user could issue two reload commands
without realizing that only one reload had actually taken place. This has
been addressed by changing the message returned to "zone reload was already queued".

Closes #5140

Merge branch '5140-report-reload-in-progress' into 'main'

See merge request isc-projects/bind9!10849

7 months agoreport when zone reload already in progress
Evan Hunt [Wed, 13 Aug 2025 20:15:23 +0000 (13:15 -0700)] 
report when zone reload already in progress

if a zone reload is already in progress when 'rndc reload <zone>' is
run, currently the message returned in "zone reload queued", which
is correct, but it's identical to the message returned when a reload
was *not* in progress, so the user can't easily tell what happened.
a user could reload a zone twice and not realize that only one
reload actually took place.

this has been addressed by changing the message returned to
"zone reload was already queued".

a new result code ISC_R_LOADING has been added to signal this
condition, taking the place of ISC_R_RELOAD, which was obsolete
and has been removed.

7 months agofix: test: fix random failure on synthrecord system test
Colin Vidal [Fri, 17 Oct 2025 20:08:54 +0000 (22:08 +0200)] 
fix: test: fix random failure on synthrecord system test

One of the synthrecord system tests uses a test function to generate an expected name based on some randomly generated IPv6 (using Hypothesis). Turns out the test function generating the name didn't handle the case where the label which encodes the IPv6 could have a leading or trailing '-' character. (The plugin needs to add a leading or trailing 0 so as not to break IDN compatibility.)

Merge branch 'colin/fix-synthrecord-v6test' into 'main'

See merge request isc-projects/bind9!11073

7 months agofix random failure on synthrecord system test
Colin Vidal [Fri, 10 Oct 2025 07:35:05 +0000 (09:35 +0200)] 
fix random failure on synthrecord system test

One of the synthrecord system tests uses a test function to generate an
expected name based on some randomly generated IPv6 (using Hypothesis).
Turns out the test function generating the name didn't handle the case
where the label which encodes the IPv6 could have a leading or trailing
'-' character. (The plugin needs to add a leading or trailing 0 so as
not to break IDN compatibility.)

7 months agoFix the assertion failure in the selfsigned DNSKEY handling
Ondřej Surý [Mon, 13 Oct 2025 12:10:06 +0000 (14:10 +0200)] 
Fix the assertion failure in the selfsigned DNSKEY handling

The selfsigned_dnskey() function can now return all the return codes
that dns_dnssec_keyfromrdata() can return and this would cause an
assertion failure as we were not expecting new isc_result_t codes.

7 months agochg: dev: Change the CONTRIBUTING to use Developer's Certificate of Origin 1.1
Ondřej Surý [Thu, 16 Oct 2025 16:31:52 +0000 (18:31 +0200)] 
chg: dev: Change the CONTRIBUTING to use Developer's Certificate of Origin 1.1

Merge branch 'ondrej/developer-certificate-of-origin' into 'main'

See merge request isc-projects/bind9!11108

7 months agoChange the CONTRIBUTING to use Developer's Certificate of Origin 1.1
Ondřej Surý [Thu, 16 Oct 2025 16:23:17 +0000 (18:23 +0200)] 
Change the CONTRIBUTING to use Developer's Certificate of Origin 1.1

7 months agofix: nil: Fix the type in Feature Request template
Ondřej Surý [Thu, 16 Oct 2025 15:27:38 +0000 (17:27 +0200)] 
fix: nil: Fix the type in Feature Request template

Merge branch 'ondrej/no-ai-templates-fixup' into 'main'

See merge request isc-projects/bind9!11107

7 months agoFix the type in Feature Request template
Ondřej Surý [Thu, 16 Oct 2025 15:14:16 +0000 (17:14 +0200)] 
Fix the type in Feature Request template

7 months agofix: dev: Ensure correct result from check_signer()
Evan Hunt [Thu, 16 Oct 2025 05:42:15 +0000 (05:42 +0000)] 
fix: dev: Ensure correct result from check_signer()

It was possible for the result to be overwritten after a validation failure, causing `check_signer()` to return success when it should have returned an error.

Closes #5575

Merge branch '5575-ensure-correct-result-from-check_signer' into 'main'

See merge request isc-projects/bind9!11103

7 months agoEnsure correct result from check_signer()
Evan Hunt [Wed, 15 Oct 2025 15:06:25 +0000 (08:06 -0700)] 
Ensure correct result from check_signer()

It was possible for the result to be overwritten after a
validation failure, causing check_signer() to return success
when it should have returned an error.

Co-Authored-By: Ondřej Surý <ondrej@isc.org>
7 months agodoc: nil: Add a section about AI use in BIND 9 issue templates
Ondřej Surý [Thu, 16 Oct 2025 05:04:19 +0000 (07:04 +0200)] 
doc: nil: Add a section about AI use in BIND 9 issue templates

Generally speaking, no AI generated slop is permitted.  If AI has been
used to find an actual problem, the findings need to be verified by a
person, and the report should be written by the person.  No copy and
paste is allowed.  Anyone reporting the problem needs to be able to
verify the problem independently of the AI.

Merge branch 'ondrej/no-ai-templates' into 'main'

See merge request isc-projects/bind9!11105

7 months agoAdd a section about AI use in BIND 9 issue templates
Ondřej Surý [Thu, 16 Oct 2025 04:58:12 +0000 (06:58 +0200)] 
Add a section about AI use in BIND 9 issue templates

Generally speaking, no AI generated slop is permitted.  If AI has been
used to find an actual problem, the findings need to be verified by a
person, and the report should be written by the person.  No copy and
paste is allowed.  Anyone reporting the problem needs to be able to
verify the problem independently of the AI.

7 months agofix: test: multisigner test can leave created.* and unused.* files
Mark Andrews [Thu, 16 Oct 2025 00:34:11 +0000 (11:34 +1100)] 
fix: test: multisigner test can leave created.* and unused.* files

Expect created.* and unused.* files at the end of running
the multisigner test.

Closes #5565

Merge branch '5565-multisigner-test-can-leave-created-and-unused-files' into 'main'

See merge request isc-projects/bind9!11089

7 months agoExpect created.* and unused.* files
Mark Andrews [Tue, 14 Oct 2025 02:40:13 +0000 (13:40 +1100)] 
Expect created.* and unused.* files

7 months agofix: test: Fix synthrecord system test fails on MacOS
Nicki Křížek [Wed, 15 Oct 2025 08:54:01 +0000 (10:54 +0200)] 
fix: test: Fix synthrecord system test fails on MacOS

Don't hardcode shared library extension.

Closes #5573

Merge branch '5573-synthrecord-system-test-fails-on-macos' into 'main'

See merge request isc-projects/bind9!11098

7 months agoDon't hardcode shared library extension
Mark Andrews [Wed, 15 Oct 2025 06:51:55 +0000 (17:51 +1100)] 
Don't hardcode shared library extension

7 months agofix: test: "nextpart" piped to "grep -q" doesn't work as expected
Mark Andrews [Tue, 14 Oct 2025 07:27:46 +0000 (18:27 +1100)] 
fix: test: "nextpart" piped to "grep -q" doesn't work as expected

`nextpart file | grep -q` doesn't work as expected.  `grep -q` is not
required to read all of the input and that causes `nextpart` to fail.

Closes #5566

Merge branch '5566-nextpart-piped-to-grep-q-doesn-t-work-as-expected' into 'main'

See merge request isc-projects/bind9!11090