Commit graph

44836 commits

Author SHA1 Message Date
Nicki Křížek
6eb2088320 Fix a race condition in dnssec test
When dumpdb command is executed, it might take a while until the file is
written. Rather than checking the file once, use the WatchLog mechanism
to allow the desired line to appear before a timeout happens.

This affected test_validation_recovery and test_cache tests which have
been intermittently failing on EL8 in our CI.
2026-01-26 10:45:34 +01:00
Štěpán Balážik
11e6d1c0b9 chg: test: Use isctest.asyncserver in the "resolver" system test
Depends on !11403, !11419

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

See merge request isc-projects/bind9!11411
2026-01-24 15:23:35 +00:00
Štěpán Balážik
c336c1feab Fix bugs in 'resolver/ans2' and 'resolver/ans3'
There were multiple typos and omissions regarding query minimization.
2026-01-24 13:04:09 +01:00
Štěpán Balážik
cef851740b Reimplement 'resolver/ans10' server using AsyncDnsServer
Ensure packet-for-packet compatibility with the old server.
2026-01-24 13:04:09 +01:00
Štěpán Balážik
8f2526a27d Reimplement 'resolver/ans8' server using AsyncDnsServer
Ensure packet-for-packet compatibility with the old server.
2026-01-24 13:04:09 +01:00
Štěpán Balážik
5004d278e4 Reimplement 'resolver/ans3' server using AsyncDnsServer
Ensure packet-for-packet compatibility with the old server including
bugs.
2026-01-24 13:04:09 +01:00
Štěpán Balážik
d203a39314 Reimplement 'resolver/ans2' server using AsyncDnsServer
Ensure packet-for-packet compatibility with the old server including
bugs.
2026-01-24 13:04:09 +01:00
Štěpán Balážik
23d9055617 Add common parts of resolver test custom servers
These will be shared by all the ans*/ans.py files.
2026-01-24 13:04:09 +01:00
Štěpán Balážik
eba89fd38b Add StaticResponseHandler to isctest.asyncserver
It is used to prepare and yield one DNS response and avoid the
`get_responses` boiler-plate.
2026-01-24 13:04:09 +01:00
Štěpán Balážik
8a45f5b485 Add QnameQtypeHandler for matching QNAME, QTYPE pairs
This is a pattern in the resolver system test and also elsewhere.
2026-01-24 13:04:09 +01:00
Štěpán Balážik
7d5ec7167b Delete unused ResponseHandlers from statistics ans server
Turns out the original ans.pl implementation before (!10928) was a copy
of an old version of the ans2 server from the resolver system test.

I reimplemented it fully, even though only two ResponseHandlers are
actually used in the statistics test.
2026-01-23 16:39:00 +01:00
Štěpán Balážik
b89cc2bd86 Store the most specific matched domain in DomainHandler
Store the most specific matching domain in DomainHandler and
expose it through the `matched_domain` property for subclasses
to use in their implementations of `get_responses`.
2026-01-23 16:39:00 +01:00
Mark Andrews
7878281048 fix: test: unit test tsig_badsig was not being called
Additionally, the test was badly implemented. This has been fixed.

Closes #5712

Merge branch '5712-unit-test-tsig_badsig-was-not-being-called' into 'main'

See merge request isc-projects/bind9!11478
2026-01-24 02:27:34 +11:00
Mark Andrews
8da2310511 Fix and call tsig_badsig unit test 2026-01-24 01:25:55 +11:00
Mark Andrews
a20bbb629a fix: usr: DSYNC record incorrectly used two octets for the Scheme Field
When creating the `DSYNC` record from a structure, `uint16_tobuffer` was used instead of `uint8_tobuffer` when adding the scheme, causing a `DSYNC` record that was one octet too long. This has been fixed.

Closes #5711

Merge branch '5711-dsync_fromstruct-produces-an-invalid-record' into 'main'

See merge request isc-projects/bind9!11477
2026-01-24 01:24:04 +11:00
Mark Andrews
2159f74a1f Fix dsync unit test
The dsync unit test was not being run and the domain names in
the test data should have been fully qualified.
2026-01-24 00:38:51 +11:00
Mark Andrews
3180e50459 dsync_from struct produced an invalid record
uint16_tobuffer was used instead of uint8_tobuffer when adding the
scheme to the buffer.  This produced a record that was one octet
too long.  This has been fixed.
2026-01-24 00:38:51 +11:00
Matthijs Mekking
dd8651ff36 chg: usr: Lowercase the NSEC next owner name when signing
When building the NSEC rdata, lowercase the next owner name before
storing it in the Next Domain Name Field.

Note that this is not required according to RFC 6840, but since there
is inconsistency in the documents over time, having uppercase next
owner names in the NSEC records may cause validation failures if
validators are not following RFC 6840.

Closes #5702

Merge branch '5702-lowercase-nsec-next-owner-name' into 'main'

See merge request isc-projects/bind9!11442
2026-01-23 12:46:51 +00:00
Matthijs Mekking
bcb65f52f2 Add kasp test zone with uppercase characters
The test ensures that such zone is signed correctly.  In addition, test
that the next owner name field of the NSEC record is lowercased.
2026-01-23 11:52:59 +00:00
Matthijs Mekking
24aa490a9b Lower case the NSEC next owner name when signing
When building the NSEC rdata, lower case the next owner name before
storing it in the Next Domain Name Field.

Note that this is not required according to RFC 6840, Section 5.1:

  When canonicalizing DNS names (for both ordering and signing), DNS
  names in the RDATA section of NSEC resource records are not converted
  to lowercase.  DNS names in the RDATA section of RRSIG resource
  records are converted to lowercase.

  The guidance in the above paragraph differs from what has been
  published before but is consistent with current common practice.
  Item 3 of Section 6.2 of [RFC4034] says that names in both of these
  RR types should be converted to lowercase.  The earlier [RFC3755]
  says that they should not.

Since there is inconsistency in the documents over time, having
uppercase next owner names in the NSEC records may cause validation
failures if validators are not implementing RFC 6840.

Also, RFC 4034 section 6.2 is not about how NSEC record content is
created, but how RRset content is normalized in order to produce and
validate RRSIG records for a given RRset. Since the next owner name
of the NSEC record is about ordening, and the canonical DNS name order
requires that uppercase US-ASCII letters must be treated as if they
were lowercase US-ASCII letters, case is not meaningful for NSEC
next owner names, as it cannot be compressed on the wire, so we may
lowercase the next owner name in the NSEC rdata before signing, being
more kind to validators.
2026-01-23 11:52:59 +00:00
Andoni Duarte
a30fc2ded6 chg: ci: Use a small always-on runner for lightweight CI jobs
Some CI jobs spend more time pulling the docker image and setting up their environment than running the script. This MR adds a tag `smalljob` to jobs considered lightweight in order to run them on a dedicated small VM.

Merge branch 'andoni/try-small-vm-for-lightweight-ci-jobs' into 'main'

See merge request isc-projects/bind9!11266
2026-01-23 11:33:53 +00:00
Andoni Duarte Pintado
e9f2b7944e Add smalljob tag to small jobs not in the quick-checks stage
Jobs using the "post_merge" and "manual_release_job_qa" anchors also
complete in less than a minute, so they now include the "smalljob" tag.

Since the "release" job is also a fast one, but without an anchor, the
"smalljob" tag is added to its definition.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
66175b448c De-duplicate yaml for "other-checks" jobs
In .gitlab-ci.yml, since "&other_checks_job" has "needs: []", remove
that line from the jobs that use that anchor.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
432b7d7954 Move "needs: []" to the "quick_checks_job" anchor
Most jobs in this stage have it by default, so it makes sense to
add it to their common anchor. Jobs with different "needs:" will
override it.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
b3ac6b47d9 Group CI jobs in "quick-checks" stage together
Move the jobs in the "quick-checks" stage to the same place in
.gitlab-ci.yml.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
ae76829157 Add faster CI jobs to the "quick-checks" stage
Given the short runtime (<1min) of the "linkcheck" and
"generate-tsan-stress-test-configs" CI jobs, move them to the
"quick-checks" stage.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
4f89d32bff Move CI stage "other-checks" right after "quick-checks"
Move CI stage "other-checks" right after "quick-checks" and get the jobs
in it as close to each other as possible in .gitlab-ci.yml.

Since no job is allowed to depend (via "needs") on any job that is
assigned to a stage later than its own, move the "tsan:stress" and
"gcov" jobs to the "system" stage.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
ba5844a1de Move slower CI jobs out of "quick-checks" stage
Jobs with more than one minute of runtime are not considered for the
small VM.

The "tarball-create" job goes to the more appropriate "build" stage.

"coccinelle" and "checkbashisms" are moved to the generic
"other-checks".
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
e61bc3ad72 Create "other_checks_job" anchor in CI yaml
Use an anchor for the common parts of "other-checks" jobs in CI yaml.
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
6d442c4a06 Rename the "postcheck" stage to "other-checks" in CI
Rename the "postcheck" CI stage to the more generic "other-checks".
Slower jobs that still run in autoscaled runners belong here, as opposed
to the lightweight ones in "quick-checks".
2026-01-23 11:57:40 +01:00
Andoni Duarte Pintado
9aa5041a88 Rename the "precheck" stage in CI to "quick-checks"
Most jobs in the "precheck" stage spend more time setting up their
environment than running the script (seconds), this allows us to add a
small always on dedicated runner instead of the autoscaled ones.

Hence, the stage is renamed to "quick-checks", and a tag "smalljob" is
added to the anchor so that these jobs are picked by the dedicated
runner.
2026-01-23 11:57:40 +01:00
Matthijs Mekking
d0f4daac3c chg: nil: Refactor kasp attach and detach code
Use the now more common `ISC_REFCOUNT_IMPL`.

Merge branch 'matthijs-refactor-kasp-attach' into 'main'

See merge request isc-projects/bind9!11466
2026-01-23 10:37:48 +00:00
Matthijs Mekking
b68069f275 Refactor dns_kasp_attach/detach
Replace implementation with ISC_REFCOUNT_IMPL.
2026-01-23 09:59:52 +00:00
Andoni Duarte
fafe59c745 fix: ci: Read the Docs picking old version when stable tag is updated
Read the Docs fails to pick the latest version when updating the `stable` tag, i.e. a build is triggered but it takes the previous version of it. This is a known bug in RtD: https://github.com/readthedocs/readthedocs.org/issues/10838.

The only approach that seems to solve this on our end, is to wait some time and trigger the build again so that it picks the latest version of the tag.

Merge branch 'andoni/fix-rtd-picking-old-version-when-stable-branch-update' into 'main'

See merge request isc-projects/bind9!11475
2026-01-22 18:40:33 +00:00
Andoni Duarte Pintado
168b15cfd9 Fix Read the Docs stable branch update bug
Read the Docs fails to pick the latest version of the stable tag when
updated, i.e. a build is triggered but it takes the previous version.
This commit triggers a second build after 5 minutes to ensure that the
correct tag version is used for the documentation.

This is a known bug in RtD:
https://github.com/readthedocs/readthedocs.org/issues/10838.
2026-01-22 13:25:33 +01:00
Nicki Křížek
878ae0acd4 fix: nil: Add missing sources to named-checkconf
The included defaultconfig.h in named-checkconf uses bind.keys.h.

Closes #5709

Merge branch '5709-meson-freebsd-compilation' into 'main'

See merge request isc-projects/bind9!11474
2026-01-22 11:23:38 +01:00
Nicki Křížek
a5f0c6588c Add missing sources to named-checkconf
The included defaultconfig.h in named-checkconf uses bind.keys.h.
2026-01-22 09:57:54 +01:00
Nicki Křížek
d1813a2db1 fix: ci: Apply black formatting changes
Generated by black 26.1.0 which got updated in CI.

Merge branch 'nicki/python-black' into 'main'

See merge request isc-projects/bind9!11471
2026-01-22 09:41:31 +01:00
Nicki Křížek
bb6d7a0fc3 Apply black formatting changes
Generated by black 26.1.0 which got updated in CI.
2026-01-22 09:41:21 +01:00
Colin Vidal
60b2a5035c chg: nil: fix resolver doc in the response context
Fixes a couple of comment/documentation issues in the resolver.

Merge branch 'colin/resolver-doc' into 'main'

See merge request isc-projects/bind9!11465
2026-01-22 09:11:36 +01:00
Colin Vidal
bc1a66a1d0 resolver: add comment when recursing
When a fetch result gets a delegation, `rctx_referral()` sets the
`rctx->get_nameserver = true`, which tells the resolver to retry another
server, not because of an error with the current server, but simply to
follow the delegation.

Update the comment of `rctx_nextserver()` which is quite confusing here
(as it's not immediately obvious from the code how we recurse when
getting a delegation back from a query).

Also add a log line, which helps figuring out this is happening.
2026-01-22 07:31:00 +01:00
Colin Vidal
6e63d5d02a fix resolver query response doc
In case on positive response, the `rctx_authority_positive()` function
is called to scan the AUTHORITY section to find NS servers and related
RR (glues) to be cached.

The doc says the function was called `rctx_authority_scan()`, but it is
called `rctx_authority_positive()`.
2026-01-22 07:31:00 +01:00
Nicki Křížek
b0c2670cb8 chg: pkg: Update requirements for system test suite
Python 3.10 or newer is now required for running the system test suite. The required python packages and their version requirements are now tracked in `bin/tests/system/requirements.txt`.

Support for pytest 9.0.0 has been added its minimum supported version has been raised to 7.0.0. The minimum supported dnspython version has been raised to 2.3.0.

Closes #5690 

Closes #5614

Merge branch 'nicki/pytest-9-compat' into 'main'

See merge request isc-projects/bind9!11415
2026-01-21 16:11:25 +01:00
Nicki Křížek
08630ca744 Silence incorrect pylint warnings for hypothesis.assume()
With hypothesis>6.148.3, pylint generates

W0101: Unreachable code (unreachable)

when any code is present after hypothesis.assume(). Silence these until
it is fixed upstream.

See https://github.com/pylint-dev/pylint/issues/10785#issuecomment-3677224217
2026-01-21 16:07:31 +01:00
Nicki Křížek
1291fa1a6d Remove hypothesis version checks
The minimum required hypothesis version has been set in requirements.txt
and no longer needs to be checked at runtime.

Since the hypothesis package is now a mandatory prerequisite, include it
in isctest as the other subpackages.
2026-01-21 16:07:31 +01:00
Nicki Křížek
ce385d8100 Remove compatibility hacks for dnspython<2.7.0
The minimum required dnspython version is now 2.7.0 and those
compatibility hacks can be dropped.
2026-01-21 16:07:31 +01:00
Nicki Křížek
144779f3e5 Prefer Python 3.12 if available
This ensures that python3.12 is used testing on older distributions
like EL8 and EL9, where the platform default python3 is older.

python3.11 was explicitly added due to FreeBSD, which doesn't have that
binary symlinked to any other name (like python3). Previously, it worked
only incidentally - when python3 was listed first, it triggered special
meson code for python detection, which is no longer the case when
python3.12 is listed first.
2026-01-21 16:07:31 +01:00
Nicki Křížek
ac8e2905b8 Bump the minimum required python version to 3.10
Drop support of EoL python versions for running system tests. The
maintenance cost of supporting end of life ecosystem, especially Python
3.6 on EL8 and the related outdated packages (pytest, dnspython, ...),
has become unreasonable.
2026-01-21 16:07:31 +01:00
Nicki Křížek
e276c3d5bd Remove pytest<7 compatibility hacks
Minimum pytest version has been bumped to 7.0.0, thus these are no
longer needed.
2026-01-21 16:07:31 +01:00
Nicki Křížek
093bef9211 Add support for pytest>=9.0.0
Use collection_path rather than the deprecated path argument for
pytest_ignore_collect() hook.

The collection_path argument was added in pytest 7.0.0, which is the
minimum supported pytest version from now on.
2026-01-21 16:07:31 +01:00