]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
7 weeks agofix: test: Fix pytest-xdist loadscope splitting on "::" in params
Michal Nowak [Thu, 28 May 2026 16:01:39 +0000 (18:01 +0200)] 
fix: test: Fix pytest-xdist loadscope splitting on "::" in params

LoadScopeScheduling._split_scope() uses rsplit("::", 1) to
extract the test file scope from a node ID.  When parametrized
test values contain "::" (IPv6 addresses like "cafe:cafe::cafe"
or "::1"), the split lands inside the parameter instead of at
the .py:: boundary.  This creates spurious scopes that get
assigned to different workers, each triggering a full fixture
setup (starting named instances).

Override _split_scope() in conftest.py to split on ".py::"
which is unambiguous.

Six tests in synthrecord/tests_synthrecord.py are affected.
A verification script is included in util/.

Assisted-by: Claude:claude-opus-4-7
Merge branch 'mnowak/fix-xdist-loadscope-split' into 'main'

See merge request isc-projects/bind9!12103

7 weeks agoFix pytest-xdist loadscope splitting on "::" in params
Michal Nowak [Tue, 26 May 2026 16:09:21 +0000 (16:09 +0000)] 
Fix pytest-xdist loadscope splitting on "::" in params

LoadScopeScheduling._split_scope() uses rsplit("::", 1) to
extract the test file scope from a node ID.  When parametrized
test values contain "::" (IPv6 addresses like "cafe:cafe::cafe"
or "::1"), the split lands inside the parameter instead of at
the .py:: boundary.  This creates spurious scopes that get
assigned to different workers, each triggering a full fixture
setup (starting named instances).

Override _split_scope() in conftest.py to split on ".py::"
which is unambiguous.

Six tests in synthrecord/tests_synthrecord.py are affected.
A verification script is included in util/.

Assisted-by: Claude:claude-opus-4-7
7 weeks agofix: ci: Make cross-version-config-tests allow_failure: true
Michal Nowak [Thu, 28 May 2026 15:59:30 +0000 (17:59 +0200)] 
fix: ci: Make cross-version-config-tests allow_failure: true

The issue #6007 failed to mark cross-version-config-tests with
allow_failure: true. This should be reverted when the June release is
out.

Closes #6007

Merge branch '6007-allow-failure-cross-version-config-tests' into 'main'

See merge request isc-projects/bind9!12136

7 weeks agoMake cross-version-config-tests allow_failure: true
Michal Nowak [Thu, 28 May 2026 15:49:22 +0000 (17:49 +0200)] 
Make cross-version-config-tests allow_failure: true

The issue #6007 failed to mark cross-version-config-tests with
allow_failure: true. This should be reverted when the June release is
out.

7 weeks agochg: test: Prioritize the 10 slowest system test scopes
Michal Nowak [Thu, 28 May 2026 14:54:58 +0000 (16:54 +0200)] 
chg: test: Prioritize the 10 slowest system test scopes

Update PRIORITY_TESTS with the 10 longest-running test
scopes measured from CI (job 7468217).  These get scheduled
first so that with --dist=loadscope they land on separate
workers instead of piling up at the end.

Also fix "serve-stale/" to "serve_stale/" to match the
actual directory name, and add a startup check that fails
if any PRIORITY_TESTS entry does not match an existing
directory.

Assisted-by: Claude:claude-opus-4-7
Merge branch 'mnowak/prioritize-slow-system-tests' into 'main'

See merge request isc-projects/bind9!12104

7 weeks agoPrioritize the 10 slowest system test scopes
Michal Nowak [Tue, 26 May 2026 16:40:13 +0000 (16:40 +0000)] 
Prioritize the 10 slowest system test scopes

Update PRIORITY_TESTS with the 10 longest-running test
scopes measured from CI (job 7468217).  These get scheduled
first so that with --dist=loadscope they land on separate
workers instead of piling up at the end.

Also fix "serve-stale/" to "serve_stale/" to match the
actual directory name, and add a startup check that fails
if any PRIORITY_TESTS entry does not match an existing
directory.

Assisted-by: Claude:claude-opus-4-7
7 weeks agofix: dev: Check options in templates that must be non-zero
Matthijs Mekking [Thu, 28 May 2026 14:26:03 +0000 (14:26 +0000)] 
fix: dev: Check options in templates that must be non-zero

`named-checkconf` should reject a template that has options that must be non-zero
(`max-refresh-time`, `max-retry-time`, `min-refresh-time`, `min-retry-time`).

`rndc addzone` with a zone that refers to such template should fail cleanly.

Closes #6041

Merge branch '6041-check-nonzero-skips-templates' into 'main'

See merge request isc-projects/bind9!12126

7 weeks agoCheck options in templates that must be non-zero
Matthijs Mekking [Thu, 28 May 2026 09:51:04 +0000 (11:51 +0200)] 
Check options in templates that must be non-zero

Without this, named-checkconf falsely accepts badly configured zones,
and rndc addzone would abort on adding a zone referring to such
templates.

7 weeks agoTest checkconf and addzone with bad templates
Matthijs Mekking [Thu, 28 May 2026 09:46:39 +0000 (11:46 +0200)] 
Test checkconf and addzone with bad templates

named-checkconf should reject a template that has options that must be
non-zero (max-refresh-time, max-retry-time, min-refresh-time,
min-retry-time).

rndc addzone with a zone that refers to such template should fail
cleanly.

7 weeks agofix: ci: Drop ccache support from CI
Michal Nowak [Thu, 28 May 2026 12:21:39 +0000 (14:21 +0200)] 
fix: ci: Drop ccache support from CI

The population of the compile cache is so slow, that a BIND 9 build can
take 20 minutes.

Assisted-by: Claude:claude-opus-4-7
Merge branch 'mnowak/drop-ccache-support' into 'main'

See merge request isc-projects/bind9!12127

7 weeks agoDrop ccache support from CI
Michal Nowak [Thu, 28 May 2026 10:24:14 +0000 (12:24 +0200)] 
Drop ccache support from CI

The population of the compile cache is so slow, that a BIND 9 build can
take 20 minutes.

Assisted-by: Claude:claude-opus-4-7
7 weeks agofix: usr: Restore delegdb size after `rndc flush`
Colin Vidal [Thu, 28 May 2026 11:59:46 +0000 (13:59 +0200)] 
fix: usr: Restore delegdb size after `rndc flush`

When the delegation database was flushed using `rndc flush`, its size was also reset but not restored. As a result, after `rndc flush` was used at least once, the delegation database size could grow unbounded. This has now been fixed.

Merge branch 'colin/delegdb-config' into 'main'

See merge request isc-projects/bind9!12101

7 weeks agoAdd system test for delegdb size preservation across `rndc flush`
Colin Vidal [Wed, 27 May 2026 08:50:42 +0000 (10:50 +0200)] 
Add system test for delegdb size preservation across `rndc flush`

Test that flushing the delegdb via `rndc flush` preserves its
configured size limit.  The test checks delegdb watermarks after
`named` startup, flushes caches, and verifies that the delegdb
watermarks are correctly restored afterwards.

To distinguish between the previous `delegdb` memory contexts and the
new ones, we need to know exactly when the previous `delegdb` memory
contexts are removed (this is not immediate, since those are removed
during RCU reclamation phase). A trace is therefore added when a memory
context is destroyed, if `ISC_MEM_DEBUGTRACE` is set.

7 weeks agoFix delegdb flush API
Colin Vidal [Tue, 26 May 2026 16:13:44 +0000 (18:13 +0200)] 
Fix delegdb flush API

The `rndc flush` command flushes the delegdb by deleting the
existing database and creating a new one. In the process, the
delegdb was losing its configured size limit; as a result, once
flushed, the delegdb size became unbounded.

This is now fixed by using `dns_delegdb_getconfig()` to back up the
current configuration before instantiating a new delegdb, then
restoring it with `dns_delegdb_setconfig()`.

7 weeks agoAdd delegdb configuration struct
Colin Vidal [Tue, 26 May 2026 16:11:12 +0000 (18:11 +0200)] 
Add delegdb configuration struct

Instead of having independent APIs to configure various aspects of the
delegdb (i.e. cache size, other settings that may come up later), a
single configuration struct is passed to `dns_delegdb_setconfig()`, which
internally does all the plumbing. To avoid relying on
atomics/synchronization, `dns_delegdb_setconfig()` must be called from
exclusive mode (for now).

The configuration can be retrieved at any time (not necessarily from
exclusive mode) using `dns_delegdb_getconfig()`. This is useful, for
instance, to flush the delegdb without losing its parameters.

7 weeks agorem: usr: Remove legacy special handling for SIG, NXT, and KEY records
Ondřej Surý [Thu, 28 May 2026 11:21:07 +0000 (13:21 +0200)] 
rem: usr: Remove legacy special handling for SIG, NXT, and KEY records

BIND no longer applies legacy RFC 2535 handling to the obsolete ``SIG``, ``NXT``
and ``KEY`` record types; they are now served as plain zone data. Zones with
both a ``CNAME`` and a ``KEY`` and or ``NXT`` at the same name — invalid under
:rfc:`2181` — will now fail to load and must be corrected.

Closes #6007

Merge branch '6007-remove-SIG-and-NXT-special-handling' into 'main'

See merge request isc-projects/bind9!12056

7 weeks agoDrop RFC 2535 special-casing of the KEY record type
Ondřej Surý [Tue, 19 May 2026 13:58:54 +0000 (15:58 +0200)] 
Drop RFC 2535 special-casing of the KEY record type

After SIG and NXT lost their special handling, KEY remained the only
RFC 2535-era type still receiving coexistence allowances: KEY
alongside CNAME at the same owner, KEY answered from the parent side
of a zone cut, KEY kept across CNAME eviction in the cache.  RFC 3755
retains type 25 only for SIG(0) and TKEY transaction signatures, and
neither relies on those allowances in practice.  The in-tree comment
that flagged the RFC 3007 parent-side carve-out as "unclear" predicted
this cleanup.

Zones that publish CNAME and KEY at the same owner — already invalid
under RFC 2181 — now fail to load.  System test fixtures are updated
accordingly, and a new test asserts that SIG, NXT, and KEY records
pick up covering RRSIGs when their zone is signed.

7 weeks agoStop treating SIG and NXT records specially
Ondřej Surý [Tue, 19 May 2026 13:38:28 +0000 (15:38 +0200)] 
Stop treating SIG and NXT records specially

RFC 3755 retired SIG and NXT in favour of RRSIG and NSEC.  BIND still
warned about them at zone load, refused them in dynamic updates,
parsed SIG with a non-zero "type covered" field as a signature on an
RRset, and tracked them via dns_rdatatype_issig().  Those carve-outs
were the sole path that made the GL#5818 crash class reachable.

Treat both types as ordinary unknown rdata: they load, transfer, sign
and answer like any other record, and dynamic updates carry them
through the generic path.  SIG(0) is unaffected; its message-parsing
carve-out is preserved.

7 weeks agonew: test: Add isctest.mark.with_developer pytest mark
Nicki Křížek [Thu, 28 May 2026 09:37:56 +0000 (11:37 +0200)] 
new: test: Add isctest.mark.with_developer pytest mark

Merge branch 'nicki/systest-with-developer' into 'main'

See merge request isc-projects/bind9!12118

7 weeks agoAdd isctest.mark.with_developer pytest mark
Nicki Křížek [Wed, 27 May 2026 15:28:07 +0000 (15:28 +0000)] 
Add isctest.mark.with_developer pytest mark

Tests that exercise instrumentation, log output, or other behaviour
that only exists in developer builds (the gcc:almalinux9:amd64 CI job
sets -Ddeveloper=disabled to guard against such accidental coupling)
can now decorate themselves with isctest.mark.with_developer to skip on
non-developer builds.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoAdd FEATURE_DEVELOPER variable to isctest
Nicki Křížek [Wed, 27 May 2026 15:27:17 +0000 (15:27 +0000)] 
Add FEATURE_DEVELOPER variable to isctest

System tests can check FEATURE_DEVELOPER in the environment, but the
recommended pattern is the with_developer pytest marker added next.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoAdd --enable-developer probe to feature-test
Nicki Křížek [Wed, 27 May 2026 15:26:47 +0000 (15:26 +0000)] 
Add --enable-developer probe to feature-test

System tests that depend on log output, instrumentation, or other
behaviour only present in developer builds can use this probe to detect
the build configuration at runtime.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoDefine DEVELOPER_MODE in developer-mode builds
Nicki Křížek [Wed, 27 May 2026 15:26:15 +0000 (15:26 +0000)] 
Define DEVELOPER_MODE in developer-mode builds

So that build-time consumers (e.g. feature-test) can detect developer
mode through a single dedicated symbol rather than proxying through
implementation-detail defines like ISC_MEM_TRACKLINES.

Assisted-by: Claude:claude-opus-4-7
7 weeks agofix: usr: Fix nxdomain-redirect combined with dns64
Ondřej Surý [Thu, 28 May 2026 09:11:57 +0000 (11:11 +0200)] 
fix: usr: Fix nxdomain-redirect combined with dns64

When a resolver was configured with both `nxdomain-redirect` and `dns64`
in the same view, an AAAA query for a nonexistent name could abort
`named`. The combination failed whenever the redirect zone held A
records but no AAAA records.  The server now serves the empty AAAA
response from the redirect zone as-is, instead of attempting DNS64
synthesis on top of it.

Closes #5789

Merge branch '5789-fix-nxdomain-redirect-dns64-assert' into 'main'

See merge request isc-projects/bind9!12059

7 weeks agoSkip DNS64 synthesis when answering a redirected response
Ondřej Surý [Wed, 20 May 2026 16:28:15 +0000 (18:28 +0200)] 
Skip DNS64 synthesis when answering a redirected response

redirect2() swaps qctx->db to the redirect zone before
query_nodata() runs. The DNS64 fallback there issues an A lookup
for the original query name, which is out of zone for the
redirect db, and the resulting query_notfound() trips
INSIST(!is_zone). The cached NCACHENXRRSET variant trips a
REQUIRE in dns_rdataset_first() on a disassociated rdataset.
The synth-from-dnssec entry reaches the same fallback via
query_coveringnsec(). Guarding the fallback with
!qctx->redirected leaves the nxdomain-redirect NXRRSET answer to
be served as-is.

7 weeks agoSystem test for nxdomain-redirect combined with dns64
Ondřej Surý [Wed, 20 May 2026 16:28:15 +0000 (18:28 +0200)] 
System test for nxdomain-redirect combined with dns64

An AAAA query for a non-existent name into a view that combines
nxdomain-redirect with dns64 used to abort named via the DNS64
fallback in query_nodata(). The new module exercises all three
documented entry paths into query_redirect(): the authoritative
NXDOMAIN path (ns7, tripping INSIST(!is_zone) in
query_notfound()), the recursive NCACHENXRRSET path (ns8,
tripping REQUIRE in dns_rdataset_first() on a disassociated
rdataset), and the synth-from-dnssec path (ns10 validating
against ns9's signed root, with a primer A query so the second
AAAA reaches query_redirect() via query_coveringnsec()). ns9
serves as a neutral upstream so the cached and synthesized
negatives land real NXRRSETs.

Assisted-by: Claude:claude-opus-4-7
7 weeks agorem: dev: Remove useless PR-Agent jobs
Ondřej Surý [Thu, 28 May 2026 07:50:56 +0000 (09:50 +0200)] 
rem: dev: Remove useless PR-Agent jobs

The experiment was a failure, the PR-Agent doesn't send a full context
to the AI Agents and the results are abysmal because of that.

Merge branch 'ondrej/remove-useless-pr-agent' into 'main'

See merge request isc-projects/bind9!12119

7 weeks agoRemove useless PR-Agent jobs
Ondřej Surý [Thu, 28 May 2026 07:35:13 +0000 (09:35 +0200)] 
Remove useless PR-Agent jobs

The experiment was a failure, the PR-Agent doesn't send a full context
to the AI Agents and the results are abysmal because of that.

7 weeks agochg: test: Improve pytest jinja2 templates
Nicki Křížek [Wed, 27 May 2026 15:54:34 +0000 (17:54 +0200)] 
chg: test: Improve pytest jinja2 templates

- Enable rendering ns-specific data in jinja2 templates using the `ns` varible.
- Add common zone/config snippets an `_common` templates.
- Allow jinja2 imports from `_common`.
- Improve the `_common/controls.conf.j2` snippet to render ns-specific IP rather than hardocded one.

Merge branch 'nicki/pytest-template-improvements' into 'main'

See merge request isc-projects/bind9!11805

7 weeks agoRestrict cross-test jinja2 includes to _common/
Nicki Křížek [Wed, 20 May 2026 14:34:02 +0000 (14:34 +0000)] 
Restrict cross-test jinja2 includes to _common/

The previous loader was a FileSystemLoader rooted at $srcdir, which
allowed any system test to include any other test's templates -- a
wider scope than intended. Every existing cross-test include already
targets _common/, so make that the only path.

ChoiceLoader + PrefixLoader keeps the existing '_common/foo.j2' path
convention working without changes to call sites. The '_common/'
prefix is deliberately kept rather than dropping it by rooting the
FileSystemLoader at _common/ directly:

  - It signals at the include site that the file is a shared
    template, not a sibling of the current test; readers don't need
    to know the loader configuration to understand where the file
    lives.
  - It prevents shadowing: a test-local 'controls.conf.j2' would
    not collide with the shared one, and the unqualified name keeps
    its test-local meaning.
  - It makes the dependency greppable: 'grep -rl _common/'
    identifies every test that consumes shared snippets.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoCreate common templates for test zones
Nicki Křížek [Fri, 20 Mar 2026 09:09:55 +0000 (10:09 +0100)] 
Create common templates for test zones

Add commonly used zone-related data (config snippet and zone file
snippets) as templates which can be reused by filling in different data.

Adjust the isctest.template.Zone to use filepath argument rather than
filename for clarity.

7 weeks agoInclude controls.conf as jinja2 template
Nicki Křížek [Wed, 1 Apr 2026 16:25:28 +0000 (18:25 +0200)] 
Include controls.conf as jinja2 template

Rather than using named.conf include, render the controls directly into
the config using jinja2 template include.

7 weeks agoAdd _common dir to jinja2 template loader
Nicki Křížek [Tue, 7 Apr 2026 12:43:11 +0000 (14:43 +0200)] 
Add _common dir to jinja2 template loader

This allows include of template snippets from _common/ directory.

7 weeks agoReduce whitespace in jinja2 templates
Nicki Křížek [Tue, 7 Apr 2026 12:40:33 +0000 (14:40 +0200)] 
Reduce whitespace in jinja2 templates

Omit extra newlines when combining and including templates.

Adjust the xfer/ns8/small.db.j2 so it doesn't trim the endline twice
(as that would join the two subsequent records on the same line).

7 weeks agoAllow instantiating template dataclasses in jinja2 templates
Nicki Křížek [Wed, 1 Apr 2026 17:42:38 +0000 (19:42 +0200)] 
Allow instantiating template dataclasses in jinja2 templates

In some cases, the template data might need to be set directly in the
jinja2 templates using `{% set %}`. Expose the template dataclasses to
the templates so we can use these existing classes, rather than creating
ad-hoc data containers.

7 weeks agoAdd a directory-specific nameserver data to templates
Nicki Křížek [Wed, 1 Apr 2026 15:10:08 +0000 (17:10 +0200)] 
Add a directory-specific nameserver data to templates

If a template is being rendered into a directory that represents a
nameserver (e.g. "ns1"), include a nameserver-specific information in
the data - variable called "ns" which has information about the
nameserver this file belongs to.

Ensure the "ns" variable is only exposed to the template when rendered,
without affecting the environment variables (always work with a copy of
the env_vars).

7 weeks agoImprove isctest.template dataclasses' defaults
Nicki Křížek [Wed, 1 Apr 2026 15:04:22 +0000 (17:04 +0200)] 
Improve isctest.template dataclasses' defaults

Extend the Nameserver to generate the default IPv4/IPv6 values, add NSX
values for the predefined nameservers (there are 11 of them, as per
bin/tests/system/ifconfig.sh.in max value). Add the missing ns11
fixture.

Extend the Zone to derive the zone filename by default, unless
specified.

Adjust the existing uses of these classes to utilize the simplified
defaults.

7 weeks agofix: usr: Fix crash on badly configured secondary signer
Matthijs Mekking [Wed, 27 May 2026 09:45:23 +0000 (09:45 +0000)] 
fix: usr: Fix crash on badly configured secondary signer

A badly configured secondary signer that was missing the 'file' entry caused the server to crash, rather than to reject the configuration. This has been fixed.

Closes #5993

Merge branch '5993-fix-bump-in-the-wire-crash' into 'main'

See merge request isc-projects/bind9!12045

7 weeks agoFix startup crash on bump in the wire signer
Matthijs Mekking [Mon, 18 May 2026 13:15:39 +0000 (15:15 +0200)] 
Fix startup crash on bump in the wire signer

A secondary server that is configured as a bump in the wire signer
with inline-signing implicitly enabled via dnssec-policy requires
a 'file' entry.

7 weeks agoCheck conf dnssec-policy inline-signing secondary
Matthijs Mekking [Mon, 18 May 2026 13:13:38 +0000 (15:13 +0200)] 
Check conf dnssec-policy inline-signing secondary

Add a variant of checking configuration where inline-signing is
enabled on the secondary, requiring the 'file' entry. This time,
inline-signing is implicitly enabled via dnssec-policy.

7 weeks agofix: doc: Ignore gitlab.gnome.org links in Sphinx linkcheck
Michal Nowak [Wed, 27 May 2026 09:20:49 +0000 (11:20 +0200)] 
fix: doc: Ignore gitlab.gnome.org links in Sphinx linkcheck

Merge branch 'mnowak/linkcheck-fix' into 'main'

See merge request isc-projects/bind9!12109

7 weeks agoClean up OpenSSL/BoringSSL/LibreSSL reference URLs in changelog
Michal Nowak [Wed, 27 May 2026 08:51:53 +0000 (10:51 +0200)] 
Clean up OpenSSL/BoringSSL/LibreSSL reference URLs in changelog

Drop the #Lxxx-Lyyy fragments (replaced with prose line numbers) and
unwrap the line-broken URLs so Sphinx linkcheck can validate them.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoIgnore gitlab.gnome.org links in Sphinx linkcheck
Michal Nowak [Wed, 27 May 2026 08:51:46 +0000 (10:51 +0200)] 
Ignore gitlab.gnome.org links in Sphinx linkcheck

GNOME GitLab returns HTTP 406 to Sphinx's linkcheck requests, the
same behavior already worked around for gitlab.isc.org.

Assisted-by: Claude:claude-opus-4-7
7 weeks agochg: ci: Add rule for stable tags in CI and use it in the update-stable-tag job
Andoni Duarte [Wed, 27 May 2026 08:24:38 +0000 (08:24 +0000)] 
chg: ci: Add rule for stable tags in CI and use it in the update-stable-tag job

Add a rule to match open source stable tags in CI and apply it to the
update-stable-tag job.

Merge branch 'andoni/show-update-stable-tag-job-in-stable-versions' into 'main'

See merge request isc-projects/bind9!11646

7 weeks agoAdd rule for the stable tags in CI and use for job update-stable-tag
Andoni Duarte Pintado [Mon, 9 Mar 2026 16:30:09 +0000 (17:30 +0100)] 
Add rule for the stable tags in CI and use for job update-stable-tag

The update-stable-tag job should only be run for the stable tag, which
is used by Read the Docs to build the docs for the "stable" version.

A new rule called rule_tag_open_source_stable is introduced, in order to
prevent the job from appearing in the pipeline for non-stable versions.
Having this rule in YAML is necessary, because if it were in the script
itself, the job would show up in the pipeline.

Besides, the new rule allows other jobs to be run only for the stable
tag in the future, without modifying their internal logic.

The CI variable STABLE_VERSION contains a regular expression in
Gitlab CI sense[1]: it uses the RE2 syntax[2] and must be enclosed by
slashes (i.e. /.../). It must be updated every time the minor version
is changed: releasing v9.22 will require changing STABLE_VERSION from
"/v9.20/" to "/v9.22/".

The variable is imported from common Gitlab CI YAML in the project
isc-projects/bind9-qa, so as to maintain it in a central place.

[1]: https://docs.gitlab.com/ci/jobs/job_rules/#compare-a-variable-to-a-regular-expression
[2]: https://github.com/google/re2/wiki/Syntax

7 weeks agoInclude common Gitlab CI YAML from isc-projects/bind9-qa
Andoni Duarte Pintado [Fri, 22 May 2026 15:38:40 +0000 (17:38 +0200)] 
Include common Gitlab CI YAML from isc-projects/bind9-qa

The template file .gitlab-ci-common.yml is to be used across ISC
projects, while it is maintained in the isc-projects/bind9-qa project.

7 weeks agochg: test: Move requirement checks to `pytest_configure` hook
Štěpán Balážik [Tue, 26 May 2026 17:04:05 +0000 (17:04 +0000)] 
chg: test: Move requirement checks to `pytest_configure` hook

This leads to nicer logging if requirements aren't met.

Merge branch 'stepan/dont-run-system-tests-without-requirements' into 'main'

See merge request isc-projects/bind9!11551

7 weeks agoMove pytest requirements check to pytest_configure hook
Štěpán Balážik [Fri, 13 Feb 2026 10:53:16 +0000 (11:53 +0100)] 
Move pytest requirements check to pytest_configure hook

Logging from a pytest hook looks better.

Reorder the check for presence of `featuretest` before `init_vars` to
produce more sensible errors.

7 weeks agochg: ci: Run unit tests with PKCS#11-aware OpenSSL
Michal Nowak [Tue, 26 May 2026 15:01:06 +0000 (17:01 +0200)] 
chg: ci: Run unit tests with PKCS#11-aware OpenSSL

Closes isc-projects/bind9#4958

Closes isc-projects/bind9#4957

Merge branch 'mnowak/pkcs11-aware-unit-gcc-ossl3-amd64' into 'main'

See merge request isc-projects/bind9!9543

7 weeks agoCall tzset() after setenv("TZ", ...) in unit tests
Michal Nowak [Thu, 14 May 2026 12:28:06 +0000 (12:28 +0000)] 
Call tzset() after setenv("TZ", ...) in unit tests

POSIX does not require localtime_r() to behave as if tzset() was called,
so the TZ environment change isn't picked up if some library has already
primed libc's tz cache.  Loading pkcs11-provider during OpenSSL init
does exactly that, causing the time and dnstap cmocka tests to format
timestamps in UTC instead of the requested zone.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoRun unit tests with PKCS#11-aware OpenSSL
Michal Nowak [Mon, 23 Sep 2024 18:15:05 +0000 (20:15 +0200)] 
Run unit tests with PKCS#11-aware OpenSSL

7 weeks agofix: test: Handle large query IDs in xfer/ans5 properly
Štěpán Balážik [Tue, 26 May 2026 13:49:04 +0000 (13:49 +0000)] 
fix: test: Handle large query IDs in xfer/ans5 properly

Previously, the server would crash if it received a query with an ID
close to 65535 in the badmessageid case, as adding 50 to it would not
fit in uint16.

This was an oversight in porting it from Perl to Python in
f9ed3650acdc2c5b38d8b36729b045ca63f983ef.

Fixes #6025.

Merge branch 'stepan/fix-xfer-large-qid' into 'main'

See merge request isc-projects/bind9!12097

7 weeks agoHandle large query IDs in xfer/ans5 properly
Štěpán Balážik [Tue, 26 May 2026 12:57:47 +0000 (14:57 +0200)] 
Handle large query IDs in xfer/ans5 properly

Previously, the server would crash if it received a query with an ID
close to 65535 in the badmessageid case, as adding 50 to it would not
fit in uint16.

This was an oversight in porting it from Perl to Python in
f9ed3650acdc2c5b38d8b36729b045ca63f983ef.

7 weeks agofix:usr: Enable Edwards curves with PKCS#11
Michal Nowak [Tue, 26 May 2026 13:35:03 +0000 (15:35 +0200)] 
fix:usr: Enable Edwards curves with PKCS#11

Ed25519 and Ed448 curves did not work in PKCS#11. This has been fixed.

Closes isc-projects/bind9#5762

Merge branch 'mnowak/pkcs11-enable-edwards-curves' into 'main'

See merge request isc-projects/bind9!11591

7 weeks agoGenerate Ed25519/Ed448 keys via PKCS#11 when a label is set
Michal Nowak [Thu, 14 May 2026 14:50:58 +0000 (14:50 +0000)] 
Generate Ed25519/Ed448 keys via PKCS#11 when a label is set

When a dst_key_t carries a PKCS#11 URI in key->label (as named
does for dnssec-policy zones backed by a key-store "hsm"), key
generation must happen inside the HSM, not in software.
opensslecdsa_generate already branches on key->label and calls
the matching pkcs11 wrapper; the EDDSA generator silently ignored
the label and produced a software key, which named then wrote to
the .private file with both a Label: line and the raw PrivateKey:
bytes -- a corrupt hybrid record that prevented zone signing.

Add the missing wrapper:

  - lib/isc/ossl_wrap/ossl3.c gains generate_pkcs11_eddsa_key()
    and the public isc_ossl_wrap_generate_pkcs11_ed25519_key() /
    isc_ossl_wrap_generate_pkcs11_ed448_key() entry points.  They
    use EVP_PKEY_CTX_new_from_name(NULL, "ED25519" or "ED448",
    "provider=pkcs11") with the pkcs11_uri and pkcs11_key_usage
    parameters, mirroring the existing EC wrapper.
  - lib/isc/ossl_wrap/ossl1_1.c provides stubs returning
    ISC_R_NOTIMPLEMENTED for the new EDDSA wrappers; the
    pkcs11-provider stack requires OpenSSL 3.  The pre-existing
    isc_ossl_wrap_generate_pkcs11_rsa_key() stub used to silently
    delegate to software keygen -- that hid the same "HSM label
    on a software key" hazard for RSA on OpenSSL 1.1 builds, so
    align it with the EDDSA stubs and return ISC_R_NOTIMPLEMENTED
    too.
  - lib/isc/include/isc/ossl_wrap.h declares the new wrappers.
  - lib/dns/openssleddsa_link.c routes openssleddsa_generate()
    through the new wrappers when key->label is non-NULL, leaving
    the existing EVP_PKEY_keygen() path untouched for software
    keys.  The Ed448 case is guarded by HAVE_OPENSSL_ED448 to
    match the surrounding code.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoTolerate non-extractable Ed25519/Ed448 private keys in tofile
Michal Nowak [Thu, 14 May 2026 14:50:18 +0000 (14:50 +0000)] 
Tolerate non-extractable Ed25519/Ed448 private keys in tofile

openssleddsa_tofile() called EVP_PKEY_get_raw_private_key()
unconditionally whenever the dst_key_t had a private EVP_PKEY
attached and aborted with ISC_R_FAILURE on any error.  That is
wrong for keys whose private material lives in a hardware token
(PKCS#11): the provider deliberately refuses to export the raw
bytes, but the keypair is still valid and the .private file
should be written containing only the PKCS#11 label, with no raw
key material.  Without this, "dnssec-keyfromlabel -a ed25519 -l
pkcs11:..." fails with "failed to write key ...: failure" even
though pkcs11-tool has generated a valid Ed25519 key in SoftHSM.

Mirror the behaviour already implemented in opensslecdsa_tofile():
if the raw private key cannot be retrieved AND the key has a
PKCS#11 label to fall back on, clear the OpenSSL error queue and
fall through to writing just the Label element.

If extraction fails and there is no label to fall back on, return
the OpenSSL failure rather than silently producing a .private
file with neither raw key material nor a label, which would be
unusable on the next load.

Consolidate buffer cleanup into a single cleanup: path, freeing
with the original allocation size (alginfo->key_size) rather than
the potentially-modified len output parameter.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoEnable Edwards curves with PKCS#11
Michal Nowak [Mon, 23 Feb 2026 16:30:50 +0000 (17:30 +0100)] 
Enable Edwards curves with PKCS#11

Ed25519 and Ed448 support (PKCS#11 v3.2) was added to libp11-0.4.17.

7 weeks agofix: ci: Misc .gitlab-ci.yml fixes
Michal Nowak [Mon, 25 May 2026 16:35:24 +0000 (18:35 +0200)] 
fix: ci: Misc .gitlab-ci.yml fixes

The meson-format job had two `rules:` blocks. YAML silently overwrites
the first with the second, so the job only ran on MRs with meson.build
changes. The intended rules (tags, schedules, other pipeline sources)
were silently discarded. Remove the duplicate to restore the original
intent.

Assisted-by: Claude:claude-opus-4-7
Merge branch 'mnowak/fix-gitlab-ci' into 'main'

See merge request isc-projects/bind9!12093

7 weeks agoAdd missing autorebase rule to meson-format CI job
Michal Nowak [Sun, 24 May 2026 19:16:17 +0000 (19:16 +0000)] 
Add missing autorebase rule to meson-format CI job

The clang-format and coccinelle jobs both include
*rule_branch_after_autorebase in their rules, but meson-format
did not. This meant meson-format would not run after autorebase
operations push new commits.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoRemove duplicate <<: *build_job merge in clang:tsan CI job
Michal Nowak [Sun, 24 May 2026 19:15:52 +0000 (19:15 +0000)] 
Remove duplicate <<: *build_job merge in clang:tsan CI job

The clang:tsan job merged *build_job twice (lines 1723 and 1729).
The second merge is redundant — copy-paste artifact.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoAdd missing TSAN_SYMBOLIZER_PATH in system:gcc:tsan CI job
Michal Nowak [Sun, 24 May 2026 19:15:40 +0000 (19:15 +0000)] 
Add missing TSAN_SYMBOLIZER_PATH in system:gcc:tsan CI job

The system:gcc:tsan job had an empty variables: block, unlike its
three sibling TSAN jobs (unit:gcc:tsan, system:clang:tsan,
unit:clang:tsan) which all set TSAN_SYMBOLIZER_PATH.

Assisted-by: Claude:claude-opus-4-7
7 weeks agoFix duplicate rules: key in meson-format CI job
Michal Nowak [Sun, 24 May 2026 17:50:49 +0000 (17:50 +0000)] 
Fix duplicate rules: key in meson-format CI job

The meson-format job had two `rules:` blocks. YAML silently overwrites
the first with the second, so the job only ran on MRs with meson.build
changes. The intended rules (tags, schedules, other pipeline sources)
were silently discarded. Remove the duplicate to restore the original
intent.

Assisted-by: Claude:claude-opus-4-7
7 weeks agofix: nil: Fix mypy var-annotated error on FEATURE_VARS
Nicki Křížek [Mon, 25 May 2026 13:03:19 +0000 (15:03 +0200)] 
fix: nil: Fix mypy var-annotated error on FEATURE_VARS

Mypy reports 'Need type annotation for "FEATURE_VARS"'; init_features()
populates it with str->str entries.

Assisted-by: Claude:claude-opus-4-7
Merge branch 'nicki/fix-isctest-vars-mypy-annotation' into 'main'

See merge request isc-projects/bind9!12086

7 weeks agoFix mypy var-annotated error on FEATURE_VARS
Nicki Křížek [Mon, 25 May 2026 12:23:03 +0000 (12:23 +0000)] 
Fix mypy var-annotated error on FEATURE_VARS

Mypy reports 'Need type annotation for "FEATURE_VARS"'; init_features()
populates it with str->str entries.

Assisted-by: Claude:claude-opus-4-7
8 weeks agonew: ci: Add Debian "trixie" (386)
Michal Nowak [Fri, 22 May 2026 16:30:49 +0000 (18:30 +0200)] 
new: ci: Add Debian "trixie" (386)

Merge branch 'mnowak/add-debian-trixie-386' into 'main'

See merge request isc-projects/bind9!12079

8 weeks agoTolerate dnspython post-2038 timestamp overflow on 32-bit
Michal Nowak [Thu, 21 May 2026 07:31:15 +0000 (07:31 +0000)] 
Tolerate dnspython post-2038 timestamp overflow on 32-bit

dnspython's RRSIG.to_text() converts the signature inception/expiration
fields by calling time.gmtime(), which on 32-bit platforms raises
OverflowError for values past 2038-01-19 (INT32_MAX). Several DNSSEC
test fixtures use far-future expirations: the precomputed RRSIGs in
the dnssec test's rsasha1.example.db.in zone expire in 2093, ans4 of
the chain test hardcodes 2090, and ans10 of the dnssec test uses
2**32-1 (year 2106). Whenever a response carrying such an RRSIG is
formatted with str()/to_text() the overflow propagates out and either
fails the test (when triggered in isctest.query's debug logging) or
kills the asyncserver-based ans* server (when triggered in its
response logger), which in turn cascades into "Failed to stop
servers" teardown errors and SERVFAIL responses for subsequent tests.

Wrap the to_text() calls in isctest/query.py and the str(response)
call in asyncserver's _log_response() with try/except OverflowError,
falling back to a placeholder message. The conversions are only used
for debug logging, so losing the human-readable form there does not
affect what the tests actually validate.

Assisted-by: Claude:claude-opus-4-7
8 weeks agoFix stack corruption in copy_initfile() on 32-bit
Michal Nowak [Thu, 21 May 2026 07:31:03 +0000 (07:31 +0000)] 
Fix stack corruption in copy_initfile() on 32-bit

copy_initfile() declared a size_t local variable to receive the size of
the initial file and passed it to isc_file_getsizefd() with an explicit
(off_t *) cast. On 32-bit platforms with _FILE_OFFSET_BITS=64, off_t is
8 bytes while size_t is only 4 bytes, so isc_file_getsizefd()'s
"*size = stats.st_size;" writes 8 bytes into the 4-byte slot and
clobbers the adjacent "output" FILE * on the stack. The next iteration
of the read/write loop then calls clearerr() through a NULL pointer and
named crashes with SIGSEGV.

This is triggered whenever a zone with an initial-file (e.g. one
configured via a template) is loaded for the first time, so on 32-bit
the addzone and masterfile system tests crash named in ns2 with cores.

Declare "len" as off_t to match the API and drop the unsafe cast.

Assisted-by: Claude:claude-opus-4-7
8 weeks agoAdd Debian "trixie" (386)
Michal Nowak [Thu, 21 May 2026 04:32:23 +0000 (06:32 +0200)] 
Add Debian "trixie" (386)

8 weeks agofix: dev: fix possible NULL dereference in `cfg_map_findclause()`
Colin Vidal [Thu, 21 May 2026 14:04:17 +0000 (16:04 +0200)] 
fix: dev: fix possible NULL dereference in `cfg_map_findclause()`

`cfg_map_findclause()` did not check whether a clause existed before dereferencing it, which could lead to a NULL dereference. Add the missing check to prevent this.

In practice, this was not triggering any known bug, since `cfg_map_findclause()` is only called in contexts where the clause is known to exist.

Closes #5997

Merge branch '5997-findclause' into 'main'

See merge request isc-projects/bind9!12052

8 weeks agorenamed `cfg_map_addclone()` into `cfg_map_add()`
Colin Vidal [Thu, 21 May 2026 07:53:59 +0000 (09:53 +0200)] 
renamed `cfg_map_addclone()` into `cfg_map_add()`

Since there is no `cfg_map_add()` anymore, and `cfg_map_addclone()`
wasn't quite clear, let's rename to `cfg_map_addclone()` into
`cfg_map_add()`, as this is fundamentally what this function is doing.

8 weeks agoadd test for `cfg_map_findclause()`
Colin Vidal [Tue, 19 May 2026 13:12:36 +0000 (15:12 +0200)] 
add test for `cfg_map_findclause()`

Add a test for `cfg_map_findclause()` ensuring its correct behaviour
(returning NULL) if a clause does not exists.

8 weeks agofix possible NULL dereference in `cfg_map_findclause()`
Colin Vidal [Tue, 19 May 2026 13:04:11 +0000 (15:04 +0200)] 
fix possible NULL dereference in `cfg_map_findclause()`

`cfg_map_findclause()` did not check whether a clause existed before
dereferencing it, which could lead to a NULL dereference. Add the
missing check to prevent this.

In practice, this was not triggering any known bug, since
`cfg_map_findclause()` is only called in contexts where the clause is
known to exist.

8 weeks agoremove unused `cfg_map_add()` function
Colin Vidal [Tue, 19 May 2026 13:03:36 +0000 (15:03 +0200)] 
remove unused `cfg_map_add()` function

Function `cfg_map_add()` was unused, it is now removed.

8 weeks agofix: dev: Move last_purge declaration under the same #ifdef as its user
Michal Nowak [Thu, 21 May 2026 13:10:57 +0000 (15:10 +0200)] 
fix: dev: Move last_purge declaration under the same #ifdef as its user

The static atomic last_purge is only read and written from mem_purge(),
which is compiled only when JEMALLOC_API_SUPPORTED or __GLIBC__ is
defined. This used to fail on OpenBSD:

    ../lib/isc/mem.c:405:31: error: unused variable 'last_purge' [-Werror,-Wunused-variable]
      405 | static _Atomic(isc_stdtime_t) last_purge = 0;
          |                               ^~~~~~~~~~

Merge branch 'mnowak/move-last_purge-to-ifdef' into 'main'

See merge request isc-projects/bind9!12058

8 weeks agoMove last_purge declaration under the same #ifdef as its user
Michal Nowak [Tue, 19 May 2026 19:06:38 +0000 (21:06 +0200)] 
Move last_purge declaration under the same #ifdef as its user

The static atomic last_purge is only read and written from mem_purge(),
which is compiled only when JEMALLOC_API_SUPPORTED or __GLIBC__ is
defined. This used to fail on OpenBSD:

    ../lib/isc/mem.c:405:31: error: unused variable 'last_purge' [-Werror,-Wunused-variable]
      405 | static _Atomic(isc_stdtime_t) last_purge = 0;
          |                               ^~~~~~~~~~

8 weeks agofix: usr: Clear REDIRECT flag when it isn't needed
Michał Kępień [Thu, 21 May 2026 13:00:31 +0000 (15:00 +0200)] 
fix: usr: Clear REDIRECT flag when it isn't needed

When `nxdomain-redirect` is in use, and a recursive query is used to get the redirected answer, a flag is set to distinguish it from a normal recursive response. Previously, that flag was left set afterward, which could trigger an assertion if a normal recursive query was sent later on behalf of the same client: for example, because the `filter-aaaa` plugin was in use.  This has been fixed.

Closes #5936

Merge branch '5936-clear-redirect-flag' into 'main'

See merge request isc-projects/bind9!12073

8 weeks agoClear REDIRECT flag when it isn't needed
Evan Hunt [Tue, 5 May 2026 00:05:11 +0000 (17:05 -0700)] 
Clear REDIRECT flag when it isn't needed

The NS_QUERYATTR_REDIRECT flag is set when processing a recursive
NXDOMAIN redirection lookup, so that if that lookup also returns
NXDOMAIN we don't end up looping.

Previously, the flag was left active after use, but if the
same client triggered a subsequent recursive lookup (for example,
in the filter-aaaa plugin), then the wrong branch could be reached
in query_resume(), potentially leading to an assertion failure.  This
has been fixed.

8 weeks agofix: dev: Validate nsec3hash arguments instead of relying on atoi()
Michal Nowak [Thu, 21 May 2026 11:36:46 +0000 (13:36 +0200)] 
fix: dev: Validate nsec3hash arguments instead of relying on atoi()

The nsec3hash tool parsed its algorithm, flags, and iterations
arguments with atoi(), then range-checked the result. For values
that overflow int during digit-by-digit accumulation, atoi() is
undefined; in practice on musl libc the modular wrap leaves
n == 0, which silently passes the "iterations > 0xffffU" check.
On Alpine Linux this made nsec3hash succeed with iterations
treated as 0 for inputs like 4294967296 (2^32).

The latent bug only surfaced when the recent image rebuild pulled
in Hypothesis 6.152.9 (2026-05-19), which unified the distribution
used for bounded and unbounded integers() strategies. The new
smoother distribution explores the 2^32 boundary on unbounded
ranges like integers(min_value=65536); earlier versions did not
reach there, so test_nsec3hash_too_many_iterations only started
failing on Alpine after the image refresh.

Replace the three atoi() calls with isc_parse_uint8 /
isc_parse_uint16, which uniformly reject overflow, trailing
garbage, leading sign, and non-numeric input across libc
implementations. As a side effect, error messages now include
the offending argument and a specific reason ("out of range" vs
"not a valid number").

Assisted-by: Claude:claude-opus-4-7
Closes #6013

Merge branch '6013-nsec3hash-iterations-overflow' into 'main'

See merge request isc-projects/bind9!12062

8 weeks agoValidate nsec3hash arguments instead of relying on atoi()
Michal Nowak [Wed, 20 May 2026 17:58:41 +0000 (17:58 +0000)] 
Validate nsec3hash arguments instead of relying on atoi()

The nsec3hash tool parsed its algorithm, flags, and iterations
arguments with atoi(), then range-checked the result. For values
that overflow int during digit-by-digit accumulation, atoi() is
undefined; in practice on musl libc the modular wrap leaves
n == 0, which silently passes the "iterations > 0xffffU" check.
On Alpine Linux this made nsec3hash succeed with iterations
treated as 0 for inputs like 4294967296 (2^32).

The latent bug only surfaced when the recent image rebuild pulled
in Hypothesis 6.152.9 (2026-05-19), which unified the distribution
used for bounded and unbounded integers() strategies. The new
smoother distribution explores the 2^32 boundary on unbounded
ranges like integers(min_value=65536); earlier versions did not
reach there, so test_nsec3hash_too_many_iterations only started
failing on Alpine after the image refresh.

Replace the three atoi() calls with isc_parse_uint8 /
isc_parse_uint16, which uniformly reject overflow, trailing
garbage, leading sign, and non-numeric input across libc
implementations. As a side effect, error messages now include
the offending argument and a specific reason ("out of range" vs
"not a valid number").

Assisted-by: Claude:claude-opus-4-7
8 weeks agochg: test: Clean up custom server code in the "resend_loop" system test
Michał Kępień [Thu, 21 May 2026 09:56:34 +0000 (11:56 +0200)] 
chg: test: Clean up custom server code in the "resend_loop" system test

Apply assorted cleanups to `bin/tests/system/resend_loop/ans3/ans.py`.

Merge branch 'michal/resend_loop-test-ans3-cleanup' into 'main'

See merge request isc-projects/bind9!12063

8 weeks agoFollow common naming and coding conventions
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Follow common naming and coding conventions

Make the handlers defined in bin/tests/system/resend_loop/ans3/ans.py
follow canonical naming conventions used in other system tests.  Keep
all server initialization code in the main() function.

8 weeks agoTurn _get_cookie() into a method
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Turn _get_cookie() into a method

Since the _get_cookie() function is only used by the CookieHandler
class, make the former a method of the latter to keep related logic
close in the source code.

8 weeks agoTweak the _get_cookie() method
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Tweak the _get_cookie() method

The "len(cookie.server) == 0" condition is superfluous for the
"resend_loop" system test, so remove it.  Add a return type annotation
to the _get_cookie() function.

8 weeks agoRemove workarounds for dnspython < 2.7.0
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Remove workarounds for dnspython < 2.7.0

dnspython 2.7.0 is now required to run the BIND 9 system test suite.
Drop the workarounds for older dnspython versions as they are now
redundant.

8 weeks agoFix flawed response logic for COOKIE-less queries
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Fix flawed response logic for COOKIE-less queries

The "yield" keyword does not cause a function to return.  By design,
get_responses() may yield multiple DNS responses in a single call.  As
currently implemented, CookieHandler.get_responses() sends two responses
to each client query that does not contain a COOKIE option.  Make the
logic in that method consistent with code comments by only sending one
response to every query - either SERVFAIL or BADCOOKIE, never both.

8 weeks agoDrop redundant uses of authoritative=True
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Drop redundant uses of authoritative=True

The ans3 custom server instance is created with default_aa=True.  Do not
pass the authoritative=True keyword argument to the DnsResponseSend
constructor in CookieHandler.get_responses() as it is redundant.

8 weeks agoDrop unnecessary qctx.prepare_new_response() call
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Drop unnecessary qctx.prepare_new_response() call

The ans3 custom server does not have any zones defined, so the responses
passed to its handlers by core isctest.asyncserver code are guaranteed
to be empty.  Remove a call to qctx.prepare_new_response() from
CookieHandler.get_responses() as it is redundant.

8 weeks agoRemove NoErrorHandler
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Remove NoErrorHandler

The NoErrorHandler class does not get matched to any query sent by ns4
in the "resend_loop" test.  Remove it as it is redundant.

8 weeks agoSimplify match criteria for CookieHandler
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Simplify match criteria for CookieHandler

The CookieHandler class handles all traffic for the "example." domain.
Make it a subclass of DomainHandler to simplify its definition.

8 weeks agoMake static response handlers more specific
Michał Kępień [Thu, 21 May 2026 09:52:56 +0000 (11:52 +0200)] 
Make static response handlers more specific

The RootNSHandler and ExampleNSHandler classes are only equipped to
respond to specific QNAME/QTYPE tuples, not all queries for a specific
QNAME.  Turn them into subclasses of QnameQtypeHandler and make them
only respond to QTYPE=NS queries to prevent sending NS responses for
non-NS queries.

8 weeks agochg: ci: Various autorebase improvements
Michał Kępień [Thu, 21 May 2026 09:22:25 +0000 (11:22 +0200)] 
chg: ci: Various autorebase improvements

  - Rewrite cherry-pick references during autorebases
  - Fix autorebase error reporting
  - Limit post-push pipelines for autorebased branches
  - Only autorebase when there is anything to rebase
  - Conflate missing commit reference notifications
  - Support autorebasing backported security MRs

Merge branch 'michal/autorebase-improvements' into 'main'

See merge request isc-projects/bind9!12024

8 weeks agoSupport autorebasing backported security MRs
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Support autorebasing backported security MRs

Autorebasing a backported security fix enables convenient refreshing of
cherry-pick references, which makes it trivial for developers to satisfy
Danger rules just before the merge request is merged.  Add a manual CI
job that is only created for backported merge requests targeting
security-* branches.

8 weeks agoConflate missing commit reference notifications
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Conflate missing commit reference notifications

Instead of creating a separate (potentially lengthy) Danger notification
for every missing commit reference in a backport, produce a single
notification with a list of all unreferenced commit hashes.  This makes
Danger output more concise while retaining all the relevant feedback for
the developer.

8 weeks agoOnly autorebase when there is anything to rebase
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Only autorebase when there is anything to rebase

In an optimistic future, security-* branches will become empty, at least
intermittently.  When that happens, there will be nothing left to rebase
on those branches, so when something gets merged into their base
branches, an autorebase will effectively be a fast-forward.  While the
existing autorebase logic would handle such a case perfectly fine, it is
prudent to avoid creating a test pipeline after pushing such a
fast-forward update as the code revision getting pushed will have
already been tested by other pipelines.  However, the push should still
happen as non-empty downstream autorebased branches may exist and those
will still need to be rebased.  Achieve both of these objectives by
checking early whether there is anything to rebase and pushing the
fast-forwarded version of the branch without setting the AUTOREBASE CI
variable if there is not.

8 weeks agoLimit post-push pipelines for autorebased branches
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Limit post-push pipelines for autorebased branches

Current CI job triggering rules cause a full pipeline to be started
after every push to security-* branches.  In this context, "push" means
"branch update", which covers both "git push" invocations and merging a
merge request.  Meanwhile, running a test pipeline is only desired after
a rebase; if a branch is fast-forwarded, it means that a merge request
has been merged into it and a pipeline should have already been run for
that merge request itself.  Limit resource use by only triggering
pipelines for security-* branches when they are pushed to with a "magic"
CI variable that is only set in autorebase jobs.  Leave all the other
triggering rules (for scheduled/manual pipelines) intact.

8 weeks agoFix autorebase error reporting
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Fix autorebase error reporting

The logic used for detecting the commit breaking an autorebase does not
work correctly if the offending commit is not the first one applied
during the "reverse rebase".  Fix by using REBASE_HEAD instead of
processing the output of "git status" in a convoluted way.

Furthermore, the approach used for identifying the first offending merge
request in the case of a successful autorebase followed by a failed
build only works correctly if the base branch is not autorebased itself.
Since a solution that would work correctly for a branch autorebased on
top of a branch that only moves forward does not work correctly for a
branch autorebased on top of another autorebased branch and vice versa,
accurately identifying the most likely culprit after a successful
autorebase is a very complicated and brittle task.  Since reporting no
details at all is arguably better than reporting false details, only
produce a minimal error notification if the build fails after a
successful autorebase.

8 weeks agoRewrite cherry-pick references during autorebases
Michał Kępień [Thu, 21 May 2026 09:13:30 +0000 (11:13 +0200)] 
Rewrite cherry-pick references during autorebases

Use a custom rebasing script instead of "git rebase" to enable rewriting
cherry-pick references during autorebases.

8 weeks agonew: ci: Add Fedora 44
Michal Nowak [Thu, 21 May 2026 05:48:11 +0000 (07:48 +0200)] 
new: ci: Add Fedora 44

Merge branch 'mnowak/fedora-44' into 'main'

See merge request isc-projects/bind9!12064

8 weeks agoAdd Fedora 44
Michal Nowak [Thu, 9 Apr 2026 04:52:40 +0000 (06:52 +0200)] 
Add Fedora 44

8 weeks agofix: test: Make deleg cleanuptests memory assertions 32-bit-safe
Michal Nowak [Wed, 20 May 2026 16:55:34 +0000 (18:55 +0200)] 
fix: test: Make deleg cleanuptests memory assertions 32-bit-safe

Each address entry stored by dns_delegset_addaddr() is an
isc_netaddrlink_t, whose size depends on sizeof(void *) via the
ISC_LINK macro (24 bytes of address + two prev/next pointers): 40
bytes on 64-bit, 32 bytes on 32-bit. The hardcoded 4 MB / 8 MB
ranges only held on 64-bit, so dns_deleg_cleanuptests failed on
armv7l with isc_mem_inuse() returning ~3.2 MB.

Express the expected ranges in terms of sizeof(isc_netaddrlink_t)
so they scale with pointer width, and pull the 99999 entry count
out into a NENTRIES macro.

Close isc-projects/bind9#6012

Merge branch 'mnowak/armv7l-fix-dns_deleg_cleanuptests' into 'main'

See merge request isc-projects/bind9!12061