]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
11 months agofix: test: unstable rollover/tests_rollover.py::test_rollover_manual
Mark Andrews [Tue, 17 Jun 2025 07:54:09 +0000 (07:54 +0000)] 
fix: test: unstable rollover/tests_rollover.py::test_rollover_manual

The state files need to be written before trying to identify zsk/ksk
keys.  Wait for "keymgr: manual-rollover.kasp done" to appear in
named.run first.

Closes #5371

Merge branch '5371-unstable-rollover-tests_rollover-py-test_rollover_manual' into 'main'

See merge request isc-projects/bind9!10587

11 months agounstable rollover/tests_rollover.py::test_rollover_manual
Mark Andrews [Tue, 17 Jun 2025 04:32:49 +0000 (14:32 +1000)] 
unstable rollover/tests_rollover.py::test_rollover_manual

The state files need to be written before trying to identify zsk/ksk
keys.  Wait for "keymgr: manual-rollover.kasp done" to appear in
named.run first.

11 months agofix: test: digdelv tests failing on system:gcc:almalinux9:amd64
Mark Andrews [Sun, 15 Jun 2025 04:18:32 +0000 (04:18 +0000)] 
fix: test: digdelv tests failing on system:gcc:almalinux9:amd64

Closes #5369

Merge branch '5369-digdelv-tests-failing-on-system-gcc-almalinux9-amd64' into 'main'

See merge request isc-projects/bind9!10583

11 months agoFix "sending packet from" test
Mark Andrews [Sat, 14 Jun 2025 02:38:59 +0000 (12:38 +1000)] 
Fix "sending packet from" test

The specific address is not always available.

11 months agonew: usr: add "named-makejournal" tool
Evan Hunt [Sat, 14 Jun 2025 06:27:09 +0000 (06:27 +0000)] 
new: usr: add "named-makejournal" tool

The `named-makejournal` tool reads two zone files for the same domain, compares them, and generates a journal file from the differences.

Closes #5164

Merge branch '5164-makejournal' into 'main'

See merge request isc-projects/bind9!10081

11 months agoexercise named-makejournal with multiple transactions
Evan Hunt [Sat, 15 Feb 2025 02:12:09 +0000 (18:12 -0800)] 
exercise named-makejournal with multiple transactions

the journal system test now checks that named-makejournal is
able to create journal files with multiple transactions.

11 months agoload the journal file if it already exists
Evan Hunt [Thu, 6 Feb 2025 07:08:27 +0000 (23:08 -0800)] 
load the journal file if it already exists

apply the existing journal file, if any, to the old version of the
database before diffing it against the new version. then, append
the diff to the end of the journal. this allows easy creation of
a journal file with multiple deltas, by running named-makejournal
successively.

11 months agoimprovements to named-makejournal
Evan Hunt [Thu, 6 Feb 2025 04:28:31 +0000 (20:28 -0800)] 
improvements to named-makejournal

- write the journal to a default location (file1.jnl) if it was not
  specified on the commandline.
- exit with a clear error message if file2's SOA serial number is
  not changed from file1.

11 months agomove makejournal to bin/tools
Evan Hunt [Thu, 6 Feb 2025 01:15:09 +0000 (17:15 -0800)] 
move makejournal to bin/tools

move the "makejournal" tool from bin/tests/system to bin/tools
and rename it to "named-makejournal". add a man page. update
tests to use the new file location.

11 months agofix: dev: Add rdata type header files to dns_header_depfiles macro
Mark Andrews [Fri, 13 Jun 2025 14:23:08 +0000 (14:23 +0000)] 
fix: dev: Add rdata type header files to dns_header_depfiles macro

The header file dns/rdatastruct.h was not being rebuilt when the
rdata type header files where modified.

Removed proforma.c from the list.  It is a starting point for new
types.

Closes #5368

Merge branch '5368-add-rdata-header-files-to-dns_header_depfiles' into 'main'

See merge request isc-projects/bind9!10574

11 months agoAdd rdata type header files to dns_header_depfiles macro
Mark Andrews [Fri, 13 Jun 2025 06:17:27 +0000 (16:17 +1000)] 
Add rdata type header files to dns_header_depfiles macro

The header file dns/rdatastruct.h was not being rebuilt when the
rdata type header files where modified.

Removed proforma.c from the list.  It is a starting point for new
types.

11 months agonew: usr: Add support to set and display the CO flag
Mark Andrews [Fri, 13 Jun 2025 09:50:06 +0000 (09:50 +0000)] 
new: usr: Add support to set and display the CO flag

Add support to display the CO (Compact denial of existence Ok flag) when displaying messages.

Add support to set the CO flag when making queries in dig (+coflag).

Closes #5319

Merge branch '5319-add-support-to-set-and-display-the-co-flag' into 'main'

See merge request isc-projects/bind9!10482

11 months agoAdd "undefined" to +ednsflags description
Mark Andrews [Tue, 3 Jun 2025 00:04:01 +0000 (10:04 +1000)] 
Add "undefined" to +ednsflags description

Reflow help message.

11 months agoAdd tests for 'dig +coflag'
Mark Andrews [Tue, 27 May 2025 05:12:53 +0000 (15:12 +1000)] 
Add tests for 'dig +coflag'

11 months agoAdd CO support to dig
Mark Andrews [Tue, 27 May 2025 04:41:24 +0000 (14:41 +1000)] 
Add CO support to dig

Dig now support setting the EDNS CO as flag using "+coflag" /
"+nocoflag" rather than as part of +ednsflags.

11 months agofix: test: nsec3 test updates nsec3-ent.kasp.db too fast
Mark Andrews [Fri, 13 Jun 2025 07:44:02 +0000 (07:44 +0000)] 
fix: test: nsec3 test updates nsec3-ent.kasp.db too fast

Add a 1 second delay to ensure file time stamp is different
from last load.

Closes #5365

Merge branch '5365-nsec3-test-updates-nsec3-ent-kasp-db-too-fast' into 'main'

See merge request isc-projects/bind9!10570

11 months agonsec3-ent.kasp.db is updated too fast for rndc reload
Mark Andrews [Wed, 11 Jun 2025 12:30:49 +0000 (22:30 +1000)] 
nsec3-ent.kasp.db is updated too fast for rndc reload

ensure a second has elasped before updating the zone file
by adding 'sleep 1' to test.sh

11 months agofix: test: test_xferquota.py reloads zone file too fast
Mark Andrews [Fri, 13 Jun 2025 07:08:00 +0000 (07:08 +0000)] 
fix: test: test_xferquota.py reloads zone file too fast

Add a 1 second delay to ensure file time stamp is different
from last load.

Closes #5366

Merge branch '5366-test_xferquota-py-reloads-zone-file-too-fast' into 'main'

See merge request isc-projects/bind9!10571

11 months agochanging.db is updated too fast
Mark Andrews [Wed, 11 Jun 2025 13:58:28 +0000 (23:58 +1000)] 
changing.db is updated too fast

ensure a second has elasped before updating the zone file
by adding 'time.sleep(1)' to xferquota/tests_xferquota.py

11 months agofix: usr: Use IPv6 queries in delv +ns
Evan Hunt [Fri, 13 Jun 2025 03:12:18 +0000 (03:12 +0000)] 
fix: usr: Use IPv6 queries in delv +ns

`delv +ns` invokes the same code to perform name resolution as `named`,
but it neglected to set up an IPv6 dispatch object first. Consequently,
it was behaving more like `named -4`. It now sets up dispatch objects
for both address families, and performs resolver queries to both v4 and v6
addresses, except when one of the address families has been suppressed
by using `delv -4` or `delv -6`.

Closes #5352

Merge branch '5352-delv-ipv6' into 'main'

See merge request isc-projects/bind9!10563

11 months agoadd tests for 'delv +ns -4' and '-6'
Evan Hunt [Thu, 5 Jun 2025 21:10:21 +0000 (14:10 -0700)] 
add tests for 'delv +ns -4' and '-6'

check that `delv +ns` sends iterative queries over both address
families when -4 and -6 are not used, and suppresses queries
appropriately when they are.

11 months agoUse ipv6 queries in delv +ns
Evan Hunt [Thu, 5 Jun 2025 18:41:17 +0000 (11:41 -0700)] 
Use ipv6 queries in delv +ns

`delv +ns` invokes the same code to perform name resolution as `named`,
but it neglected to set up an IPv6 dispatch object first. Consequently,
it was behaving more like `named -4`.

It now sets up dispatch objects for both address families, and performs
resolver queries to both v4 and v6 addresses, except when one of the
address families has been suppressed by using `delv -4` or `delv -6`.

11 months agofix: dev: Remove zone keyopts field
Evan Hunt [Fri, 13 Jun 2025 02:43:30 +0000 (02:43 +0000)] 
fix: dev: Remove zone keyopts field

The "keyopts" field of the dns_zone object was added to support
"auto-dnssec"; at that time the "options" field already had most of
its 32 bits in use by other flags, so it made sense to add a new
field.

Since then, "options" has been widened to 64 bits, and "auto-dnssec"
has been obsoleted and removed. Most of the DNS_ZONEKEY flags are no
longer needed. The one that still seems useful (_FULLSIGN) has been
moved into DNS_ZONEOPT and the rest have been removed, along with
"keyopts" and its setter/getter functions.

Merge branch 'each-cleanup-zonekey-opts' into 'main'

See merge request isc-projects/bind9!10564

11 months agoRemove zone keyopts field
Evan Hunt [Sat, 7 Jun 2025 21:57:54 +0000 (14:57 -0700)] 
Remove zone keyopts field

The "keyopts" field of the dns_zone object was added to support
"auto-dnssec"; at that time the "options" field already had most of
its 32 bits in use by other flags, so it made sense to add a new
field.

Since then, "options" has been widened to 64 bits, and "auto-dnssec"
has been obsoleted and removed. Most of the DNS_ZONEKEY flags are no
longer needed. The one that still seems useful (_FULLSIGN) has been
moved into DNS_ZONEOPT and the rest have been removed, along with
"keyopts" and its setter/getter functions.

11 months agofix: dev: Clean up CFG_ZONE_DELEGATION
Evan Hunt [Fri, 13 Jun 2025 01:28:42 +0000 (01:28 +0000)] 
fix: dev: Clean up CFG_ZONE_DELEGATION

`type delegation-only` has been obsolete for some time
(see #3953) but the zone type flag for it was still defined
in libisccfg. It has now been removed.

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

See merge request isc-projects/bind9!10558

11 months agoClean up CFG_ZONE_DELEGATION
Evan Hunt [Thu, 5 Jun 2025 00:06:25 +0000 (17:06 -0700)] 
Clean up CFG_ZONE_DELEGATION

"type delegation-only" has been obsolete for some time
(see #3953) but the zone type flag for it was still defined
in libisccfg. It has now been removed.

11 months agonew: dev: replace the build system with meson alessio/first-meson-commit
Aydın Mercan [Wed, 11 Jun 2025 08:01:15 +0000 (08:01 +0000)] 
new: dev: replace the build system with meson

This MR replaces the build system with meson.

Speed: Meson is noticeably faster to setup and build than automake/autoconf.
The improvements will likely add up in CI and development over time.

Readability: Readability is a subjective criteria but meson is generally regarded as easier to read compared to CMake and automake/autoconf.

Developer Ergonomics: Meson produces a compilation database, doesn't require libtool wrapping of executables/debuggers and offers JSON based build introspection.

WrapDB and downloading dependencies is a non-issue for us since it requires writing wrap files explicitly and has been disabled by default via the `wrap_mode=nofallback` project option as a measure.

Merge branch 'aydin/meson-experiment' into 'main'

See merge request isc-projects/bind9!8989

11 months agoreplace the build system with meson
Aydın Mercan [Tue, 16 Apr 2024 12:13:53 +0000 (15:13 +0300)] 
replace the build system with meson

Meson is a modern build system that has seen a rise in adoption and some
version of it is available in almost every platform supported.

Compared to automake, meson has the following advantages:

* Meson provides a significant boost to the build and configuration time
  by better exploiting parallelism.

* Meson is subjectively considered to be better in readability.

These merits alone justify experimenting with meson as a way of
improving development time and ergonomics. However, there are some
compromises to ensure the transition goes relatively smooth:

* The system tests currently rely on various files within the source
  directory. Changing this requirement is a non-trivial task that can't
  be currently justified. Currently the last compiled build directory
  writes into the source tree which is in turn used by pytest.

* The minimum version supported has been fixed at 0.61. Increasing this
  value will require choosing a baseline of distributions that can
  package with meson. On the contrary, there will likely be an attempt
  to decrease this value to ensure almost universal support for building
  BIND 9 with meson.

11 months agochg: doc: Set up version for BIND 9.21.10
Michal Nowak [Wed, 11 Jun 2025 07:23:17 +0000 (07:23 +0000)] 
chg: doc: Set up version for BIND 9.21.10

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

See merge request isc-projects/bind9!10567

11 months agoUpdate BIND version to 9.21.10-dev alessio/last-autotools-commit
Michal Nowak [Wed, 11 Jun 2025 07:05:07 +0000 (09:05 +0200)] 
Update BIND version to 9.21.10-dev

11 months agoUpdate BIND version for release v9.21.9
Michal Nowak [Fri, 6 Jun 2025 08:57:23 +0000 (10:57 +0200)] 
Update BIND version for release

11 months agonew: doc: Prepare documentation for BIND 9.21.9
Michal Nowak [Fri, 6 Jun 2025 08:53:23 +0000 (08:53 +0000)] 
new: doc: Prepare documentation for BIND 9.21.9

Merge branch 'mnowak/prepare-documentation-for-bind-9.21.9' into 'v9.21.9-release'

See merge request isc-private/bind9!805

11 months agoTweak and reword release notes
Michal Nowak [Thu, 5 Jun 2025 13:34:39 +0000 (15:34 +0200)] 
Tweak and reword release notes

11 months agoPrepare release notes for BIND 9.21.9
Michal Nowak [Thu, 5 Jun 2025 10:01:37 +0000 (12:01 +0200)] 
Prepare release notes for BIND 9.21.9

11 months agoGenerate changelog for BIND 9.21.9
Michal Nowak [Thu, 5 Jun 2025 09:58:49 +0000 (11:58 +0200)] 
Generate changelog for BIND 9.21.9

11 months agofix: dev: Try to skip lock on fully lower names
Ondřej Surý [Wed, 4 Jun 2025 10:48:18 +0000 (10:48 +0000)] 
fix: dev: Try to skip lock on fully lower names

If the name is fully lowercase, we don't need to access the case bitmap in order to set the case. Therefore, we can check for the FULLYLOWERCASE flag using only atomic operations, and skip a lock in the hot path, provided we clear the FULLYLOWERCASE flag before changing the case bitmap.

Merge branch 'alessio/skip-lock-on-fully-lower-names' into 'main'

See merge request isc-projects/bind9!10497

11 months agoTry to skip lock on fully lower names
Alessio Podda [Wed, 28 May 2025 12:33:04 +0000 (14:33 +0200)] 
Try to skip lock on fully lower names

If the name is fully lowercase, we don't need to access the case bitmap
in order to set the case. Therefore, we can check for the FULLYLOWERCASE
flag using only atomic operations, and skip a lock in the hot path,
provided we clear the FULLYLOWERCASE flag before changing the case
bitmap.

11 months agonew: usr: Redesign the unreachable primaries cache
Arаm Sаrgsyаn [Wed, 4 Jun 2025 10:22:38 +0000 (10:22 +0000)] 
new: usr: Redesign the unreachable primaries cache

Previously, the cache for the unreachable primary servers was limited
to 10 entries (LRU) and a fixed 10 minutes delay for each entry, unless
removed forcibly by a new entry. The cache is now redesigned to remove the
10 entry limitation and to introduce delay values with exponential
backoff time - initially an unreachable primary server is cached as
being unreachable for 10 seconds, but each time the cache entry is expired
and the same server is added again during the eligibility period of the next
120 seconds, the delay time is doubled up until to the maximum of 640
seconds.

Closes #3992

Merge branch '3992-unreachable-cache-redesign' into 'main'

See merge request isc-projects/bind9!10393

11 months agoDocument the new unreachable cache behavior
Aram Sargsyan [Tue, 15 Apr 2025 14:57:52 +0000 (14:57 +0000)] 
Document the new unreachable cache behavior

Update the documentaion to include information about how the cache's
exponential backoff works, and how to clear the cache.

11 months agoRedesign the unreachable primaries cache
Aram Sargsyan [Tue, 18 Feb 2025 08:34:41 +0000 (08:34 +0000)] 
Redesign the unreachable primaries cache

The cache for unreachable primaries was added to BIND 9 in 2006 via
1372e172d0e0b08996376b782a9041d1e3542489. It features a 10-slot LRU
array with 600 seconds (10 minutes) fixed delay. During this time, any
primary with a hiccup would be blocked for the whole block duration
(unless overwritten by a different entry).

As this design is not very flexible (i.e. the fixed delay and the fixed
amount of the slots), redesign it based on the badcache.c module, which
was implemented earlier for a similar mechanism.

The differences between the new code and the badcache module were large
enough to create a new module instead of trying to make the badcache
module universal, which could complicate the implementation.

The new design implements an exponential backoff for entries which are
added again soon after expiring, i.e. the next expiration happens in
double the amount of time of the previous expiration, but in no more
time than the defined maximum value.

The initial and the maximum expiration values are hard-coded, but, if
required, it should be trivial to implement configurable knobs.

11 months agofix: dev: initialize queryonacl dns_view_t property
Colin Vidal [Wed, 4 Jun 2025 08:24:18 +0000 (08:24 +0000)] 
fix: dev: initialize queryonacl dns_view_t property

A dns_view_t has a queryonacl property, which is supposed to hold the
ACL matching the configuration "allow-query-on". However the code
parsing this configuration ACL was missing (or removed by mistake?),
hence this property was always NULL. The ACL was still built but
individually for each zone (which checks if the property exists in the
zone definition, view definition, and finally options definition).

We now create the ACL instance at the view level, enabling zones to
share the same (identical) ACL instead of having their own copies.

Merge branch 'colin/view-allowqueryon' into 'main'

See merge request isc-projects/bind9!10551

11 months agoinitialize queryonacl dns_view_t property
Colin Vidal [Tue, 3 Jun 2025 14:12:59 +0000 (16:12 +0200)] 
initialize queryonacl dns_view_t property

A dns_view_t has a queryonacl property, which is supposed to hold the
ACL matching the configuration "allow-query-on". However the code
parsing this configuration ACL was missing (or removed by mistake?),
hence this property was always NULL. The ACL was still built but
individually for each zone (which checks if the property exists in the
zone definition, view definition, and finally options definition).

It now create the ACL instance at the view level, enabling zones to
share the same (identical) ACL instead of having their own copies.

11 months agonew: usr: Add support for zone templates
Evan Hunt [Tue, 3 Jun 2025 19:45:06 +0000 (19:45 +0000)] 
new: usr: Add support for zone templates

To simplify the configuration of multiple similar zones, BIND now supports a zone template mechanism. `template` blocks containing zone options can be defined at the top level of the configuration file; they can then be referenced in `zone` statements. A zone referencing a template will use the options in the specified `template` block as defaults. (Options locally defined in the `zone` statement override the template.)

The filename for a zone can now be generated parametrically from a format specified in the `file` option. The first occurrences of `$name`, `$type` and `$view` in `file` are replaced with the zone origin, the zone type (i.e., primary, secondary, etc), and the view name, respectively.

Primary zones can now take an `initial-file` option, specifying the path to a generic zone file that will be copied into the zone's `file` path when the zone is first loaded, if the `file` does not already exist.

For example, the following template can be used for primary zones:
```
        template primary {
                type primary;
                file "$name.db";
                initial-file "generic.db";
        };
```

With this template in place, a new primary zone could be added using a single `rndc addzone` command:

```
        $ rndc addzone example.com '{ template primary; };'
```

The zone would be created using the filename `example.com.db`, which would be copied into place from `generic.db`.

Closes #2964

Merge branch '2964-zone-templates' into 'main'

See merge request isc-projects/bind9!10407

11 months agoAdd support for zone templates
Evan Hunt [Tue, 15 Apr 2025 20:39:57 +0000 (13:39 -0700)] 
Add support for zone templates

A "template" statement can contain the same configuration clauses
as a "zone" statement.  A "zone" statement can now reference a
template, and all the clauses in that template will be used as
default values for the zone. For example:

    template primary {
        type primary;
        file "$name.db";
        initial-file "primary.db";
    };

    zone example.com {
        template primary;
        file "different-name.db"; // overrides the template
    };

11 months agoAllow zone names to be generated parametrically
Evan Hunt [Wed, 16 Apr 2025 04:17:44 +0000 (21:17 -0700)] 
Allow zone names to be generated parametrically

Special tokens can now be specified in a zone "file" option
in order to generate the filename parametrically. The first
instead of "$name" in the "file" option is replaced with the
zone origin, the first instance of "$type" is replaced with the
zone type (i.e., primary, secondary, etc), and the first instance
of "$view" is replaced with the view name..

This simplifies the creation of zones using initial-file templates.
For example:

   $ rndc addzone <zonename> \
     { type primary; file "$name.db"; initial-file "template.db"

11 months agoAdd zone "initial-file" option
Evan Hunt [Sun, 13 Apr 2025 07:28:49 +0000 (00:28 -0700)] 
Add zone "initial-file" option

When loading a primary zone for the first time, if the zonefile
does not exist but an "initial-file" option has been set, then a
new file will be copied into place from the path specified by
"initial-file".

This can be used to simplify the process of adding new zones. For
instance, a template zonefile could be used by running:

    $ rndc addzone example.com \
        '{ type primary; file "example.db"; initial-file "template.db"; };'

11 months agofix: dev: Call zone syntax checks when running rndc addzone/modzone
Evan Hunt [Tue, 3 Jun 2025 19:01:19 +0000 (19:01 +0000)] 
fix: dev: Call zone syntax checks when running rndc addzone/modzone

The function that checks zone syntax in libisccfg was previously
only called when loading `named.conf`, not when parsing an an
`rndc addzone` or `rndc modzone` command. This has been corrected.

Closes #5338

Merge branch '5338-check-zoneconf' into 'main'

See merge request isc-projects/bind9!10520

11 months agonormalize syntax checks between named and libisccfg
Evan Hunt [Sat, 31 May 2025 06:11:14 +0000 (23:11 -0700)] 
normalize syntax checks between named and libisccfg

there were some duplicated syntax checks in named_zone_configure()
that are no longer needed, now that we perform those same checks
using isccfg_check_zoneconf().

there were also some syntax checks that were *only* in
named_zone_configure(), which have now been moved to
isccfg_check_zoneconf(). test cases for them have been
added to the checkconf system test.

11 months agocall zone syntax checks when running rndc addzone/modzone
Evan Hunt [Fri, 30 May 2025 00:27:12 +0000 (17:27 -0700)] 
call zone syntax checks when running rndc addzone/modzone

the function that checks zone syntax in libisccfg was previously
only called when loading named.conf, not when parsing an an
"rndc addzone" or "rndc modzone" command. this has been corrected.

note that some checks are still skipped: those that check for
duplication of filenames, key directories, etc.  to fix this, we'd need
to export the symbol tables that are set up when loading named.conf and
preserve them so they could be reused later.

11 months agofix: dev: Fix builds for the OSS-Fuzz project
Ondřej Surý [Tue, 3 Jun 2025 18:03:51 +0000 (18:03 +0000)] 
fix: dev: Fix builds for the OSS-Fuzz project

Add the `size` argument to the fuzzing version of the `chunk_get_raw()` function.

Merge branch '5353-fix-ossfuzz-build' into 'main'

See merge request isc-projects/bind9!10553

11 months agoFix builds for the OSS-Fuzz project
Miltos Allamanis [Tue, 3 Jun 2025 15:30:43 +0000 (15:30 +0000)] 
Fix builds for the OSS-Fuzz project

Since 70b1777d8aef75da1b184fe8155dc818ce66628a was commited the OSS-Fuzz
build was broken because the `chunk_get_raw()` was not updated in the
`FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION`-enabled area.  Add the `size`
argument to the fuzzing version of the `chunk_get_raw()` function.

11 months agofix: test: Prevent .hypothesis artifacts in system test directories
Evan Hunt [Tue, 3 Jun 2025 07:35:38 +0000 (07:35 +0000)] 
fix: test: Prevent .hypothesis artifacts in system test directories

Merge branch 'each-hypothesis-artifacts' into 'main'

See merge request isc-projects/bind9!10518

11 months agoPrevent .hypothesis artifacts in system test directories
Evan Hunt [Thu, 29 May 2025 17:55:25 +0000 (10:55 -0700)] 
Prevent .hypothesis artifacts in system test directories

The "run.sh" script, used by "make test", changes the working
directory to the system test directory before executing pytest.
If the test drops hypothesis artifacts while running, this
can cause spurious test failures due to an apparent mismatch
between the contents of the system test directory and the
temporary pytest directory. This has been addressed by having
"run.sh" call pytest from the parent directory instead.

11 months agofix: nil: Extend named-rrchecker multi-line parsing support
Mark Andrews [Tue, 3 Jun 2025 02:27:03 +0000 (02:27 +0000)] 
fix: nil: Extend named-rrchecker multi-line parsing support

named-rrchecker now parses the braces which support multi-line input
from the beginning of the input rather than only when reading the
data fields of the record.

Closes #5336

Merge branch '5336-extend-named-rrchecker-multiline-support' into 'main'

See merge request isc-projects/bind9!10521

11 months agoAdd various multi-line inputs to named-rrchecker
Mark Andrews [Mon, 2 Jun 2025 04:37:45 +0000 (14:37 +1000)] 
Add various multi-line inputs to named-rrchecker

11 months agoExtend named-rrchecker multi-line parsing support
Mark Andrews [Fri, 30 May 2025 03:03:16 +0000 (13:03 +1000)] 
Extend named-rrchecker multi-line parsing support

named-rrchecker now parses the braces which support multi-line input
from the beginning of the input rather than only when reading the
data fields of the record.

11 months agofix: nil: Silence potential divide by zero warning in qpmulti.c
Mark Andrews [Mon, 2 Jun 2025 23:40:43 +0000 (23:40 +0000)] 
fix: nil: Silence potential divide by zero warning in qpmulti.c

Coverity flagged a potential divide by zero error in collect in
qpmulti.c when the elapsed time is zero but that is only called
once the elapsed time is greater than or equal to RUNTIME (1/4
second) so INSIST this is the case.

Closes #5329

Merge branch '5329-potential-divide-by-zero-in-qpmulti-c' into 'main'

See merge request isc-projects/bind9!10519

11 months agoSilence potential divide by zero warning in qpmulti.c
Mark Andrews [Fri, 30 May 2025 00:51:21 +0000 (10:51 +1000)] 
Silence potential divide by zero warning in qpmulti.c

Coverity flagged a potential divide by zero error in collect in
qpmulti.c when the elapsed time is zero but that is only called
once the elapsed time is greater than or equal to RUNTIME (1/4
second) so INSIST this is the case.

11 months agochg: ci: Revert Run CI danger job even if user canceled it while it was running
Petr Špaček [Mon, 2 Jun 2025 16:11:51 +0000 (16:11 +0000)] 
chg: ci: Revert Run CI danger job even if user canceled it while it was running

Unexpectedly this broke CI job generator which parses gitlab-ci.yaml
and cannot handle `!reference` YAML tags.

This reverts merge request !10490

Merge branch 'revert-0a1a599f' into 'main'

See merge request isc-projects/bind9!10540

11 months agoRevert "chg: ci: Run CI danger job even if user canceled it while it was running"
Petr Špaček [Mon, 2 Jun 2025 15:58:52 +0000 (15:58 +0000)] 
Revert "chg: ci: Run CI danger job even if user canceled it while it was running"

This reverts merge request !10490

11 months agofix: doc: named-rrchecker doc improvements
Petr Špaček [Mon, 2 Jun 2025 14:20:43 +0000 (14:20 +0000)] 
fix: doc: named-rrchecker doc improvements

Merge branch 'pspacek/named-rrchecker-docs' into 'main'

See merge request isc-projects/bind9!10516

11 months agoFix link to TXT RRtype specification
Petr Špaček [Mon, 2 Jun 2025 09:59:23 +0000 (11:59 +0200)] 
Fix link to TXT RRtype specification

The odd-looking "\ " escape is required to italicize <character-string>
without italicizing the final "s". See reStructuredText Markup
Specification, sections "Inline markup recognition rules" and "Escaping
Mechanism". Most importantly:

Escaped whitespace characters are removed from the output document
together with the escaping backslash. This allows for character-level
inline markup.

11 months agoAdd exhaustive examples for named-rrchecker
Petr Špaček [Thu, 29 May 2025 15:27:10 +0000 (17:27 +0200)] 
Add exhaustive examples for named-rrchecker

11 months agoClarify named-rrchecker return codes
Petr Špaček [Thu, 29 May 2025 15:26:30 +0000 (17:26 +0200)] 
Clarify named-rrchecker return codes

11 months agoClarify named-rrchecker command line parameters
Petr Špaček [Thu, 29 May 2025 15:26:05 +0000 (17:26 +0200)] 
Clarify named-rrchecker command line parameters

11 months agoClarify named-rrchecker input format
Petr Špaček [Thu, 29 May 2025 15:24:39 +0000 (17:24 +0200)] 
Clarify named-rrchecker input format

11 months agochg: ci: Run CI danger job even if user canceled it while it was running
Petr Špaček [Mon, 2 Jun 2025 11:52:35 +0000 (11:52 +0000)] 
chg: ci: Run CI danger job even if user canceled it while it was running

Merge branch 'pspacek/always-hazard' into 'main'

See merge request isc-projects/bind9!10490

11 months agoRun CI danger job even if user canceled it while it was running
Petr Špaček [Wed, 28 May 2025 13:46:14 +0000 (15:46 +0200)] 
Run CI danger job even if user canceled it while it was running

Limitation: The after_script is not executed if the job did not start at
all, i.e. if the user canceled the job before it got onto a runner.
See https://gitlab.com/groups/gitlab-org/-/epics/10158

11 months agochg: test: Use "digit" class instead of character range in rndc_dumpdb()
Michal Nowak [Mon, 2 Jun 2025 11:03:17 +0000 (11:03 +0000)] 
chg: test: Use "digit" class instead of character range in rndc_dumpdb()

The tr range did not work on Solaris 11.4. Let's use a class that is
defined in POSIX.

Closes #5326

Merge branch '5326-make-rndc_dumpdb-work-on-solaris' into 'main'

See merge request isc-projects/bind9!10530

11 months agoUse "digit" class instead of character range in rndc_dumpdb()
Michal Nowak [Fri, 30 May 2025 10:26:42 +0000 (12:26 +0200)] 
Use "digit" class instead of character range in rndc_dumpdb()

The tr range did not work on Solaris 11.4. Let's use a class that is
defined in POSIX.

11 months agochg: test: Rewrite kasp system test to pytest (5)
Matthijs Mekking [Mon, 2 Jun 2025 09:21:21 +0000 (09:21 +0000)] 
chg: test: Rewrite kasp system test to pytest (5)

Rollover scenarios.

Merge branch 'matthijs-pytest-rewrite-kasp-system-test-5' into 'main'

See merge request isc-projects/bind9!10292

11 months agoAdd dynamic update facility to NamedInstance
Nicki Křížek [Mon, 26 May 2025 15:10:15 +0000 (17:10 +0200)] 
Add dynamic update facility to NamedInstance

Deduplicate the code for dynamic updates and increase code clarity by
using an actual dns.update.UpdateMessage rather than an undefined
intermediary format passed around as a list of arguments.

11 months agoConvert csk rollover test cases to pytest
Matthijs Mekking [Wed, 19 Mar 2025 09:10:13 +0000 (10:10 +0100)] 
Convert csk rollover test cases to pytest

Move the 'csk-roll1' and 'csk-roll2' zones to the rollover test dir and
convert CSK rollover tests to pytest.

The DS swap spans multiple steps. Only the first time we should check
if the "CDS is now published" log is there, and only the first time we
should run 'rndc dnssec -checkds' on the keys. Add a new key to the
step dictionary to disable the DS swap checks.

This made me realize that we need to check for "is not None" in case
the value in the dictionary is False. Update check_rollover_step()
accordingly, and also add a log message which step/zone we are currently
checking.

11 months agoConvert the 'three is a crowd' test case to pytest
Matthijs Mekking [Tue, 18 Mar 2025 14:13:17 +0000 (15:13 +0100)] 
Convert the 'three is a crowd' test case to pytest

This test shows similarities with the Double KSK rollover method, so
put the test in there.

11 months agoConvert ksk rollover test case to pytest
Matthijs Mekking [Tue, 18 Mar 2025 13:20:54 +0000 (14:20 +0100)] 
Convert ksk rollover test case to pytest

Move the 'ksk-doubleksk' zones to the rollover test dir and convert KSK
rollover test to pytest.

Since the 'ksk-doubleksk' policy publishes different CDNSKEY/CDS RRsets,
update the 'check_rollover_step' to check which CDNSKEY/CDS RRsets should
be published and which should be prohibited. Update 'isctest.kasp'
accordingly.

We are changing the ZSK lifetime to unlimited in this test case as it
is of no importance (this actually discovered a bug in setting the
next time the keymgr should run).

11 months agoConvert zsk rollover test case to pytest
Matthijs Mekking [Tue, 18 Mar 2025 11:18:34 +0000 (12:18 +0100)] 
Convert zsk rollover test case to pytest

Move the 'zsk-prepub' zones to the rollover test dir and convert ZSK
rollover test to pytest.

We need a way to signal a smooth rollover is going on. Signatures are
being replaced gradually during a ZSK rollover, so the existing
signatures of the predecessor ZSK are still being used. Add a smooth
operator to set the right expectations on what signatures are being
used.

Setting expected key relationships is a bit crude: a list of two
elements where the first element is the index of the expected keys that
is the predecessor, and the second element is the index of the expected
keys that is the successor.

We are changing the KSK lifetime to unlimited in this test case as it
is of no importance.

11 months agoConvert enable dnssec test case to pytest
Matthijs Mekking [Tue, 18 Mar 2025 09:34:53 +0000 (10:34 +0100)] 
Convert enable dnssec test case to pytest

Move the 'enable-dnssec' to the rollover test dir and convert to pytest.

This requires new test functionality to check that "CDS is published"
messages are logged (or prohibited).

The setup part is slightly adapted such that it no longer needs to
set the '-P sync' value in most cases (this is then set by 'named'),
and to adjust for the inappropriate safety intervals fix.

11 months agoConvert kasp multi-signer tests to pytest
Matthijs Mekking [Tue, 18 Mar 2025 07:41:02 +0000 (08:41 +0100)] 
Convert kasp multi-signer tests to pytest

Move the multi-signer test scenarios to the rollover directory and
convert tests to pytest.

- If the KeyProperties set the "legacy" to True, don't set expected
  key times, nor check them. Also, when a matching key is found, set
  key.external to True.
- External keys don't show up in the 'rndc dnssec -status' output so
  skip them in the 'check_dnssecstatus' function. External keys never
  sign RRsets, so also skip those keys in the '_check_signatures'
  function.
- Key properties strings now can set expected key tag ranges, and if
  KeyProperties have tag ranges set, they are checked.

11 months agoMove rollover test cases to separate test dir
Matthijs Mekking [Fri, 28 Feb 2025 14:52:20 +0000 (15:52 +0100)] 
Move rollover test cases to separate test dir

In order to keep the kasp system test somewhat approachable, let's
move all rollover scenarios to its own test directory. Starting with
the manual rollover test cases.

A new test function is added to 'isctest.kasp', to verify that the
relationship metadata (Predecessor, Successor) is set correctly.

The configuration and setup for the zone 'manual-rollover.kasp' are
almost copied verbatim, the only exception is the keytimes. Similar
to the test kasp cases, we no longer set "SyncPublish/PublishCDS" in
the setup script. In addition to that, the offset is changed from one
day ago to one week ago, so that the key states match the timing
metadata (one day is too short to move a key from "hidden" to
"omnipresent").

11 months agofix: dev: Allow commandline.c to compile on Solaris
Michal Nowak [Mon, 2 Jun 2025 09:01:09 +0000 (09:01 +0000)] 
fix: dev: Allow commandline.c to compile on Solaris

commandline.c failed to compile on Solaris because NAME_MAX was
undefined.  Include 'isc/dir.h' which defines NAME_MAX for platforms
that don't define it.

    In file included from commandline.c:54:
    ./include/isc/commandline.h:31:38: error: 'NAME_MAX' undeclared here (not in a function)
       31 | extern char isc_commandline_progname[NAME_MAX];
          |                                      ^~~~~~~~

Merge branch 'mnowak/fix-solaris-commandline-h' into 'main'

See merge request isc-projects/bind9!10524

11 months agoAllow commandline.c to compile on Solaris
Michal Nowak [Fri, 30 May 2025 08:22:48 +0000 (10:22 +0200)] 
Allow commandline.c to compile on Solaris

commandline.c failed to compile on Solaris because NAME_MAX was
undefined.  Include 'isc/dir.h' which defines NAME_MAX for platforms
that don't define it.

    In file included from commandline.c:54:
    ./include/isc/commandline.h:31:38: error: 'NAME_MAX' undeclared here (not in a function)
       31 | extern char isc_commandline_progname[NAME_MAX];
          |                                      ^~~~~~~~

11 months agochg: doc: Add text about no bug bounties
Petr Špaček [Mon, 2 Jun 2025 07:02:59 +0000 (07:02 +0000)] 
chg: doc: Add text about no bug bounties

Vicky and Ondrej have agreed that we should add text to explain that we do not give bug bounties.

Merge branch 'sgoldlust-main-bug-bounty' into 'main'

See merge request isc-projects/bind9!10246

11 months agoUpdate URL for bug reports
Suzanne Goldlust [Fri, 14 Mar 2025 15:27:14 +0000 (15:27 +0000)] 
Update URL for bug reports

11 months agoAdd text about no bug bounties
Suzanne Goldlust [Thu, 13 Mar 2025 17:56:01 +0000 (17:56 +0000)] 
Add text about no bug bounties

11 months agochg: test: Use isctest.asyncserver in the "chain" test
Michał Kępień [Fri, 30 May 2025 17:37:53 +0000 (17:37 +0000)] 
chg: test: Use isctest.asyncserver in the "chain" test

Replace the custom DNS servers used in the "chain" system test with
new code based on the isctest.asyncserver module.

For ans3, replace the sequence of logical conditions present in Perl
code with zone files and a limited amount of custom logic applied on top
of them where necessary.

For ans4, replace the ctl_channel() and create_response() functions with
a custom control command handler coupled with a dynamically instantiated
response handler, making the code more robust and readable.

Migrate sendcmd() and its uses to the new way of sending control queries
to custom servers used in system tests.

Depends on !10409

Merge branch 'michal/chain-asyncserver' into 'main'

See merge request isc-projects/bind9!10410

11 months agoUse isctest.asyncserver in the "chain" test
Michał Kępień [Fri, 30 May 2025 16:23:21 +0000 (18:23 +0200)] 
Use isctest.asyncserver in the "chain" test

Replace the custom DNS servers used in the "chain" system test with
new code based on the isctest.asyncserver module.

For ans3, replace the sequence of logical conditions present in Perl
code with zone files and a limited amount of custom logic applied on top
of them where necessary.

For ans4, replace the ctl_channel() and create_response() functions with
a custom control command handler coupled with a dynamically instantiated
response handler, making the code more robust and readable.

Migrate sendcmd() and its uses to the new way of sending control queries
to custom servers used in system tests.

11 months agoImprove readability of sendcmd() calls
Michał Kępień [Fri, 30 May 2025 16:23:21 +0000 (18:23 +0200)] 
Improve readability of sendcmd() calls

To improve readability of sendcmd() calls used for controlling
isctest.asyncserver-based custom DNS servers, pass the command's name
and arguments as separate parameters.

11 months agonew: test: Handle alias records in zone files loaded by AsyncDnsServer
Michał Kępień [Fri, 30 May 2025 16:18:07 +0000 (16:18 +0000)] 
new: test: Handle alias records in zone files loaded by AsyncDnsServer

dnspython does not treat CNAME records in zone files in any special way;
they are just RRsets belonging to zone nodes.  Process CNAMEs when
preparing zone-based responses just like a normal authoritative DNS
server would.

Adding proper DNAME support to AsyncDnsServer would add complexity to
its code for little gain: DNAME use in custom system test servers is
limited to crafting responses that attempt to trigger bugs in named.

This fact will not be obvious to AsyncDnsServer users as it
automatically loads all zone files it finds and handles CNAME records
like a normal authoritative DNS server would.

Therefore, to prevent surprises:

- raise an exception whenever DNAME records are found in any of the
zone files loaded by AsyncDnsServer,

- add a new optional argument to the AsyncDnsServer constructor that
enables suppressing this new behavior, enabling zones with DNAME
records to be loaded anyway.

This enables response handlers to use the DNAME records present in zone
files in arbitrary ways without complicating the "base" code.

Merge branch 'michal/asyncserver-alias-records' into 'main'

See merge request isc-projects/bind9!10409

11 months agoForce manual DNAME handling to be acknowledged
Michał Kępień [Fri, 30 May 2025 16:08:54 +0000 (18:08 +0200)] 
Force manual DNAME handling to be acknowledged

Adding proper DNAME support to AsyncDnsServer would add complexity to
its code for little gain: DNAME use in custom system test servers is
limited to crafting responses that attempt to trigger bugs in named.

This fact will not be obvious to AsyncDnsServer users as it
automatically loads all zone files it finds and handles CNAME records
like a normal authoritative DNS server would.

Therefore, to prevent surprises:

  - raise an exception whenever DNAME records are found in any of the
    zone files loaded by AsyncDnsServer,

  - add a new optional argument to the AsyncDnsServer constructor that
    enables suppressing this new behavior, enabling zones with DNAME
    records to be loaded anyway.

This enables response handlers to use the DNAME records present in zone
files in arbitrary ways without complicating the "base" code.

11 months agoDrop unused AsyncDnsServer constructor argument
Michał Kępień [Fri, 30 May 2025 16:08:54 +0000 (18:08 +0200)] 
Drop unused AsyncDnsServer constructor argument

The constructor for the AsyncDnsServer class takes a 'load_zones'
argument that is not used anywhere and is not expected to be useful in
the future: zone files are not required for an AsyncDnsServer instance
to start and, if necessary, zone-based answers can be suppressed or
modified by installing a custom response handler.

11 months agoProperly handle CNAMEs when preparing responses
Michał Kępień [Fri, 30 May 2025 16:08:54 +0000 (18:08 +0200)] 
Properly handle CNAMEs when preparing responses

dnspython does not treat CNAME records in zone files in any special way;
they are just RRsets belonging to zone nodes.  Process CNAMEs when
preparing zone-based responses just like a normal authoritative DNS
server would.

11 months agoAdd debug logs for outgoing DNS messages
Michał Kępień [Fri, 30 May 2025 16:08:54 +0000 (18:08 +0200)] 
Add debug logs for outgoing DNS messages

Since AsyncDnsServer logs incoming DNS messages as seen on the wire, do
the same for the responses sent by the server.

11 months agofix: dev: use proper flexible arrays in rrl
Aydın Mercan [Fri, 30 May 2025 11:18:08 +0000 (11:18 +0000)] 
fix: dev: use proper flexible arrays in rrl

The single-element array hack can trip newer sanitizers or fortification levels.

Found with UBSAN triggering the RRL system test with meson.

Merge branch 'aydin/rrl-flex-array' into 'main'

See merge request isc-projects/bind9!10509

11 months agouse proper flexible arrays in rrl
Aydın Mercan [Thu, 29 May 2025 11:03:11 +0000 (11:03 +0000)] 
use proper flexible arrays in rrl

The single-element array hack can trip newer sanitizers or fortification
levels.

11 months agoadd attribute macro for counted_by
Aydın Mercan [Thu, 29 May 2025 10:50:25 +0000 (10:50 +0000)] 
add attribute macro for counted_by

Using C23 attributes for `counted_by` is broken with clang.

`__has_attribute` is used since `__has_c_attribute` only works with C23
attributes, (`gnu::counted_by`/`clang::counted_by`)

11 months agofix: dev: Allow keystore.c to compile on Solaris
Mark Andrews [Fri, 30 May 2025 06:34:57 +0000 (06:34 +0000)] 
fix: dev: Allow keystore.c to compile on Solaris

keystore.c failed to compile on Solaris because NAME_MAX was
undefined.  Include 'isc/dir.h' which defines NAME_MAX for platforms
that don't define it.

Closes #5327

Merge branch '5327-fix-solaris-keystore-build' into 'main'

See merge request isc-projects/bind9!10522

11 months agoAllow keystore.c to compile on Solaris
Mark Andrews [Fri, 30 May 2025 05:14:38 +0000 (15:14 +1000)] 
Allow keystore.c to compile on Solaris

keystore.c failed to compile on Solaris because NAME_MAX was
undefined.  Include 'isc/dir.h' which defines NAME_MAX for platforms
that don't define it.

11 months agochg: ci: Use AlmaLinux for FIPS testing in AWS
Michal Nowak [Thu, 29 May 2025 17:15:58 +0000 (17:15 +0000)] 
chg: ci: Use AlmaLinux for FIPS testing in AWS

Merge branch 'mnowak/alma-linux-with-fips' into 'main'

See merge request isc-projects/bind9!10433

11 months agoCheck system is FIPS-aware when BIND 9 FIPS mode is enabled
Michal Nowak [Wed, 30 Apr 2025 11:47:21 +0000 (13:47 +0200)] 
Check system is FIPS-aware when BIND 9 FIPS mode is enabled

11 months agoUse AlmaLinux for FIPS testing in AWS
Michal Nowak [Wed, 30 Apr 2025 11:46:57 +0000 (13:46 +0200)] 
Use AlmaLinux for FIPS testing in AWS