Commit graph

43034 commits

Author SHA1 Message Date
Ondřej Surý
8171bf01ed
Deprecate max-rsa-exponent-size, always use 4096 instead
The `max-rsa-exponent-size` could limit the exponents of the RSA
public keys during the DNSSEC verification.  Instead of providing
a cryptic (not cryptographic) knob, hardcode the max exponent to
be 4096 (the theoretical maximum for DNSSEC).
2025-05-21 00:50:08 +02:00
Ondřej Surý
841b25fb62
Cleanup the DST cryptographic API
The DST API has been cleaned up, duplicate functions has been squashed
into single call (verify and verify2 functions), and couple of unused
functions have been completely removed (createctx2, computesecret,
paramcompare, and cleanup).
2025-05-20 09:52:35 +02:00
Arаm Sаrgsyаn
10a02e84eb new: usr: Implement a new 'notify-defer' configuration option
This new option sets a delay (in seconds) to wait before sending
a set of NOTIFY messages for a zone. Whenever a NOTIFY message is
ready to be sent, sending will be deferred for this duration. This
option is not to be confused with the :any:`notify-delay` option.
The default is 0 seconds.

Closes #5259

Merge branch '5259-implement-zone-notify-defer' into 'main'

See merge request isc-projects/bind9!10419
2025-05-15 13:26:44 +00:00
Aram Sargsyan
e42d6b4810 Implement a new 'notify-defer' configuration option
This new option sets the delay, in seconds, to wait before sending
a set of NOTIFY messages for a zone. Whenever a NOTIFY message is
ready to be sent, sending will be deferred for this duration.
2025-05-15 12:24:13 +00:00
Aram Sargsyan
d79b14ff5d Update the dns_zone_setnotifydelay() function's documentation
Add a note that the delay is in seconds.
2025-05-15 12:21:30 +00:00
Aram Sargsyan
62f66c0be0 Delete the unused dns_zone_getnotifydelete() function
The function is unused, delete it.
2025-05-15 12:21:30 +00:00
Arаm Sаrgsyаn
9c73285a6c fix: test: Fix catz system test errors
Merge branch 'aram/catz-system-test-errors-fix' into 'main'

See merge request isc-projects/bind9!10444
2025-05-15 12:19:46 +00:00
Aram Sargsyan
52ac03f064 Fix more catz system test errors
A quick grep check discovered a couple of more errors similar to the
one fixed in the previous commit. Fix them too.
2025-05-15 11:28:39 +00:00
Aram Sargsyan
f200b1ac18 Fix catz system test error
The '|| ret=1' is omitted from the check. This was introduced in the
b171cacf4f commit. Fix the error.
2025-05-15 11:28:39 +00:00
Michał Kępień
229a47afdb chg: test: Mark test_idle_timeout as flaky on FreeBSD 13
The test_idle_timeout check in the "timeouts" system test has been
failing often on FreeBSD 13 AWS hosts.  Adding timestamped debug logging
shows that the time.sleep() calls used in that check are returning
significantly later than asked to on that platform (e.g. after 4 seconds
when just 1 second is requested), breaking the test's timing assumptions
and triggering false positives.  These failures are not an indication of
a bug in named and have not been observed on any other platform.  Mark
the problematic check as flaky, but only on FreeBSD 13, so that other
failure modes are caught appropriately.

Merge branch 'michal/mark-test_idle_timeout-as-flaky-on-freebsd-13' into 'main'

See merge request isc-projects/bind9!10459
2025-05-14 17:17:11 +00:00
Michał Kępień
cb76b3729e
Mark test_idle_timeout as flaky on FreeBSD 13
The test_idle_timeout check in the "timeouts" system test has been
failing often on FreeBSD 13 AWS hosts.  Adding timestamped debug logging
shows that the time.sleep() calls used in that check are returning
significantly later than asked to on that platform (e.g. after 4 seconds
when just 1 second is requested), breaking the test's timing assumptions
and triggering false positives.  These failures are not an indication of
a bug in named and have not been observed on any other platform.  Mark
the problematic check as flaky, but only on FreeBSD 13, so that other
failure modes are caught appropriately.
2025-05-14 09:50:33 +02:00
Evan Hunt
870c9b6a91 fix: dev: Debug level was ignored when logging to stderr
The debug level (set with the `-d` option) was ignored when running `named` with the `-g` and `-u` options.

Merge branch 'each-fix-debug-level' into 'main'

See merge request isc-projects/bind9!10453
2025-05-13 20:56:32 +00:00
Evan Hunt
96333bc6d7 debug level was ignored when logging to stderr
In commit cc167266aa, the -g option was changed so it sets both
named_g_logstderr and also named_g_logflags to use ISO style timestamps
with tzinfo. Together with an error in named_log_setsafechannels(), that
change could cause the debugging level to be ignored.
2025-05-13 12:47:23 -07:00
Michal Nowak
99b6914a94 rem: ci: Drop Ubuntu 20.04 Focal Fossa
Focal-specific ./configure options were moved to Jammy.

Merge branch 'mnowak/drop-ubuntu-focal' into 'main'

See merge request isc-projects/bind9!9899
2025-05-13 16:24:41 +00:00
Michal Nowak
84c565878e
Revert "Ignore .hypothesis files created by system tests"
This reverts commit f413ddbe5f.
2025-05-13 17:03:21 +02:00
Michal Nowak
ff39441874
Make FreeBSD 12.x part of Community-Maintained platforms 2025-05-13 17:01:33 +02:00
Michal Nowak
326e19a65a
Drop Ubuntu 20.04 Focal Fossa
Focal-specific ./configure options were moved to Jammy.
2025-05-13 17:00:43 +02:00
Michał Kępień
73e56aa991 chg: doc: Set up version for BIND 9.21.9
Merge branch 'michal/set-up-version-for-bind-9.21.9' into 'main'

See merge request isc-projects/bind9!10450
2025-05-12 18:38:52 +00:00
Michał Kępień
a79dec8971 Update BIND version to 9.21.9-dev 2025-05-12 20:24:12 +02:00
Michał Kępień
1ec1535827 fix: usr: Return the correct NSEC3 records for NXDOMAIN responses
The wrong NSEC3 records were sometimes returned as proof that the QNAME
did not exist. This has been fixed.

Closes #5292

Merge branch '5292-wrong-nsec3-chosen-for-no-qname-proof' into 'main'

See merge request isc-projects/bind9!10447
2025-05-08 20:42:09 +00:00
Mark Andrews
9bb93520f1
Wrong NSEC3 chosen for NO QNAME proof
When we optimised the closest encloser NSEC3 discovery the maxlabels
variable was used in the binary search. The updated value was later
used to add the NO QNAME NSEC3 but that block of code needed the
original value. This resulted in the wrong NSEC3 sometimes being
chosen to perform this role.
2025-05-08 21:48:11 +02:00
Michal Nowak
5be38ee615 chg: ci: Run linkchecker only on Wednesdays
Some domains tested by linkchecker may think that we connect to them too
often and will refuse connection or reply with an error code, which makes
this job fail. Let's check links only on Wednesdays.

Merge branch 'mnowak/run-linkchecker-only-sometimes' into 'main'

See merge request isc-projects/bind9!10439
2025-05-05 14:53:16 +00:00
Michal Nowak
f745a9212a
Run linkchecker only on Wednesdays
Some domains tested by linkchecker may think that we connect to them too
often and will refuse connection or reply with and error code, which
makes this job fail. Let's check links only on Wednesdays.
2025-05-05 16:35:58 +02:00
Michal Nowak
a97c03c846 chg: ci: Disable linkcheck on www.gnu.org
The check fails with the following error for some time:

    broken    https://www.gnu.org/software/libidn/#libidn2 - HTTPSConnectionPool(host='www.gnu.org', port=443): Max retries exceeded with url: /software/libidn/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5bd4c14590>: Failed to establish a new connection: [Errno 111] Connection refused'))

Merge branch 'mnowak/linkcheck-disable-www-gnu-org' into 'main'

See merge request isc-projects/bind9!10436
2025-05-05 10:00:01 +00:00
Michal Nowak
0ea4ebf7d1
Disable linkcheck on www.gnu.org
The check fails with the following error for some time:

    broken    https://www.gnu.org/software/libidn/#libidn2 - HTTPSConnectionPool(host='www.gnu.org', port=443): Max retries exceeded with url: /software/libidn/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5bd4c14590>: Failed to establish a new connection: [Errno 111] Connection refused'))
2025-05-05 11:50:03 +02:00
Mark Andrews
405f8a7bd8 fix: dev: fix the ksr two-tone test
The two-tone ksr subtest (test_ksr_twotone) depended on the dnssec-policy keys algorithm values in named.conf being entered in numerical order.  As the algorithms used in the test can be selected randomly this does not always happen. Sort the dnssec-policy keys by algorithm when adding them to the key list from named.conf.

Closes #5286

Merge branch '5286-ksr-two-tone-test-only-work-by-luck' into 'main'

See merge request isc-projects/bind9!10395
2025-05-02 07:09:56 +00:00
Mark Andrews
92a50dab28 Don't depend on keys being sorted
Extract each section of the bundle and check that the expected
records are there.  The old code was assuming that the records in
each section where in a particular order which didn't happen in
practice.
2025-05-02 09:44:34 +10:00
Mark Andrews
fad97e3cd1 fix: dev: fix the error handling of put_yamlstr calls
The return value was sometimes being ignored when it shouldn't
have been.

Closes #5301

Merge branch '5301-cid-550216-remove-dead-code' into 'main'

See merge request isc-projects/bind9!10432
2025-05-01 06:17:42 +00:00
Mark Andrews
c0fcb9fd0e Fix the error handling of put_yamlstr calls
The return value was sometimes being ignored when it shouldn't
have been.
2025-04-30 15:39:52 +10:00
Michał Kępień
b4b00748bc chg: ci: Revise merge request pipeline job triggering rules
Over the past few years, some of the initial decisions made about which
GitLab CI jobs to run for all merge requests and which of them to run
just for scheduled/web-triggered pipelines turned out to be less than
ideal in practice: test coverage was found to be too lax in some areas
and on the other hand unnecessarily repetitive in others.  For example,
compilation failures for certain build types that are not exercised for
every merge request (e.g. FIPS-enabled builds) turned out to be much
more common in practice than e.g. test failures happening only on a
subset of releases of a given Linux distribution.

To limit excessive resource use while retaining broad test coverage,
adjust GitLab CI job triggering rules for merge request pipelines as
follows:

- run all possible build jobs for every merge request; compilation
failures triggered for build flavors that were only tested in
scheduled pipelines turned out to be surprisingly commonplace and
became a nuisance over time, particularly given that the run times
of build jobs are much lower than those of test jobs,

- for every merge request, run at least one system & unit test job for
each build flavor (e.g. sanitizer-enabled, FIPS-enabled,
out-of-tree, tarball-based, etc.),

- limit the amount of test jobs run for each distinct operating
system; for example, only run system & unit test jobs for Ubuntu
24.04 Noble Numbat in merge request pipelines, skipping those for
Ubuntu 22.04 Jammy Jellyfish and Ubuntu 20.04 Focal Fossa (while
still running them in other pipeline types, e.g. in scheduled
pipelines),

- ensure every merge request is tested on Oracle Linux 8, which is the
operating system with the oldest package versions out of the systems
that are still supported by this BIND 9 branch,

- decrease the number of test jobs run with sanitizers enabled while
still testing with both ASAN and TSAN and both GCC and Clang for
every merge request.

These changes do not affect the set of jobs created for any other
pipeline type (triggered by a schedule, by a GitLab API call, by the web
interface, etc.); only merge request pipelines are affected.

---

Since understanding the impact of this MR just by looking at the diff is
arguably challenging, I prepared some tables showing which jobs are
currently triggered for every merge request and what the new state of
things will be after this MR gets merged.

**Legend:**

  - 📈 - job was *not* run for every merge
    request before, but will be

  - 📉 - job was run for every merge request
    before, but will *not* be any longer

| Change | Job | Stage | Before | After | cff39d32455 | 2f1995c7136 / 4ad8c86cf2 |
| ------ | --- | ----- | ------ | ----- | ----------- | ----------- |
| | `docs` |  `docs` |  |  |  |  |
| | `docs:tarball` |  `docs` |  |  |  |  |
| | `clang:asan` |  `build` |  |  |  |  |
| | `clang:bookworm:amd64` |  `build` |  |  |  |  |
| | `clang:freebsd13:amd64` |  `build` |  |  |  |  |
| | `clang:freebsd14:amd64` |  `build` |  |  |  |  |
| | `clang:openbsd:amd64` |  `build` |  |  |  |  |
| | `clang:tsan` |  `build` |  |  |  |  |
| 📈| `gcc:8fips:amd64` |  `build` |  |  |  |  |
| 📈| `gcc:9fips:amd64` |  `build` |  |  |  |  |
| | `gcc:alpine3.21:amd64` |  `build` |  |  |  |  |
| | `gcc:asan` |  `build` |  |  |  |  |
| | `gcc:bookworm:amd64` |  `build` |  |  |  |  |
| | `gcc:bookworm:amd64cross32` |  `build` |  |  |  |  |
| | `gcc:bookworm:rbt:amd64` |  `build` |  |  |  |  |
| | `gcc:focal:amd64` |  `build` |  |  |  |  |
| | `gcc:jammy:amd64` |  `build` |  |  |  |  |
| | `gcc:noble:amd64` |  `build` |  |  |  |  |
| | `gcc:oraclelinux8:amd64` |  `build` |  |  |  |  |
| | `gcc:oraclelinux9:amd64` |  `build` |  |  |  |  |
| | `gcc:ossl3:sid:amd64` |  `build` |  |  |  |  |
| | `gcc:out-of-tree` |  `build` |  |  |  |  |
| | `gcc:sid:amd64` |  `build` |  |  |  |  |
| | `gcc:tarball` |  `build` |  |  |  |  |
| | `gcc:tarball:nosphinx` |  `build` |  |  |  |  |
| | `gcc:tsan` |  `build` |  |  |  |  |
| | `gcc:tumbleweed:amd64` |  `build` |  |  |  |  |
| | `cross-version-config-tests` |  `system` |  |  |  |  |
| | `respdiff` |  `system` |  |  |  |  |
| | `respdiff-third-party` |  `system` |  |  |  |  |
| | `respdiff:asan` |  `system` |  |  |  |  |
| | `respdiff:tsan` |  `system` |  |  |  |  |
| 📉| `system:clang:asan` |  `system` |  |  |  |  |
| 📉| `system:clang:bookworm:amd64` |  `system` |  |  |  |  |
| 📉| `system:clang:freebsd13:amd64` |  `system` |  |  |  |  |
| | `system:clang:freebsd14:amd64` |  `system` |  |  |  |  |
| | `system:clang:tsan` |  `system` |  |  |  |  |
| 📈| `system:gcc:8fips:amd64` |  `system` |  |  |  |  |
| | `system:gcc:9fips:amd64` |  `system` |  |  |  |  |
| | `system:gcc:alpine3.21:amd64` |  `system` |  |  |  |  |
| | `system:gcc:asan` |  `system` |  |  |  |  |
| | `system:gcc:bookworm:amd64` |  `system` |  |  |  |  |
| | `system:gcc:bookworm:rbt:amd64` |  `system` |  |  |  |  |
| 📉| `system:gcc:focal:amd64` |  `system` |  |  |  |  |
| 📉| `system:gcc:jammy:amd64` |  `system` |  |  |  |  |
| | `system:gcc:noble:amd64` |  `system` |  |  |  |  |
| 📉| `system:gcc:oraclelinux8:amd64` |  `system` |  |  |  |  |
| | `system:gcc:oraclelinux9:amd64` |  `system` |  |  |  |  |
| | `system:gcc:ossl3:sid:amd64` |  `system` |  |  |  |  |
| 📈| `system:gcc:out-of-tree` |  `system` |  |  |  |  |
| 📉| `system:gcc:sid:amd64` |  `system` |  |  |  |  |
| 📈| `system:gcc:tarball` |  `system` |  |  |  |  |
| 📉| `system:gcc:tsan` |  `system` |  |  |  |  |
| | `system:gcc:tumbleweed:amd64` |  `system` |  |  |  |  |
| 📉| `unit:clang:asan` |  `unit` |  |  |  |  |
| 📉| `unit:clang:bookworm:amd64` |  `unit` |  |  |  |  |
| 📉| `unit:clang:freebsd13:amd64` |  `unit` |  |  |  |  |
| | `unit:clang:freebsd14:amd64` |  `unit` |  |  |  |  |
| | `unit:clang:openbsd:amd64` |  `unit` |  |  |  |  |
| | `unit:clang:tsan` |  `unit` |  |  |  |  |
| 📈| `unit:gcc:8fips:amd64` |  `unit` |  |  |  |  |
| | `unit:gcc:9fips:amd64` |  `unit` |  |  |  |  |
| | `unit:gcc:alpine3.21:amd64` |  `unit` |  |  |  |  |
| | `unit:gcc:asan` |  `unit` |  |  |  |  |
| | `unit:gcc:bookworm:amd64` |  `unit` |  |  |  |  |
| | `unit:gcc:bookworm:rbt:amd64` |  `unit` |  |  |  |  |
| 📉| `unit:gcc:focal:amd64` |  `unit` |  |  |  |  |
| 📉| `unit:gcc:jammy:amd64` |  `unit` |  |  |  |  |
| | `unit:gcc:noble:amd64` |  `unit` |  |  |  |  |
| 📉| `unit:gcc:oraclelinux8:amd64` |  `unit` |  |  |  |  |
| | `unit:gcc:oraclelinux9:amd64` |  `unit` |  |  |  |  |
| | `unit:gcc:ossl3:amd64` |  `unit` |  |  |  |  |
| 📈| `unit:gcc:out-of-tree` |  `unit` |  |  |  |  |
| 📉| `unit:gcc:sid:amd64` |  `unit` |  |  |  |  |
| 📈| `unit:gcc:tarball` |  `unit` |  |  |  |  |
| 📉| `unit:gcc:tsan` |  `unit` |  |  |  |  |
| | `unit:gcc:tumbleweed:amd64` |  `unit` |  |  |  |  |

And a short statistical summary of the changes proposed:

| Stage | Before | After | Diff |
| ----- | ------ | ----- | ---- |
| `docs` | 2 | 2 | **0** |
| `build` | 23 | 25 | **+2** |
| `system` | 23 | 18 | **-5** |
| `unit` | 19 | 14 | **-5** |
| **TOTAL** | **67** | **59** | **-8** |

Mattermost thread (sparked by @pspacek):
https://mattermost.isc.org/isc/pl/z6nymnu4m3dhzr3rxtjkzzgk7a

Merge branch 'michal/revise-ci-job-triggering-rules' into 'main'

See merge request isc-projects/bind9!10349
2025-04-29 16:19:36 +00:00
Michał Kępień
4ad8c86cf2
Revise merge request pipeline job triggering rules
Over the past few years, some of the initial decisions made about which
GitLab CI jobs to run for all merge requests and which of them to run
just for scheduled/web-triggered pipelines turned out to be less than
ideal in practice: test coverage was found to be too lax in some areas
and on the other hand unnecessarily repetitive in others.  For example,
compilation failures for certain build types that are not exercised for
every merge request (e.g. FIPS-enabled builds) turned out to be much
more common in practice than e.g. test failures happening only on a
subset of releases of a given Linux distribution.

To limit excessive resource use while retaining broad test coverage,
adjust GitLab CI job triggering rules for merge request pipelines as
follows:

  - run all possible build jobs for every merge request; compilation
    failures triggered for build flavors that were only tested in
    scheduled pipelines turned out to be surprisingly commonplace and
    became a nuisance over time, particularly given that the run times
    of build jobs are much lower than those of test jobs,

  - for every merge request, run at least one system & unit test job for
    each build flavor (e.g. sanitizer-enabled, FIPS-enabled,
    out-of-tree, tarball-based, etc.),

  - limit the amount of test jobs run for each distinct operating
    system; for example, only run system & unit test jobs for Ubuntu
    24.04 Noble Numbat in merge request pipelines, skipping those for
    Ubuntu 22.04 Jammy Jellyfish and Ubuntu 20.04 Focal Fossa (while
    still running them in other pipeline types, e.g. in scheduled
    pipelines),

  - ensure every merge request is tested on Oracle Linux 8, which is the
    operating system with the oldest package versions out of the systems
    that are still supported by this BIND 9 branch,

  - decrease the number of test jobs run with sanitizers enabled while
    still testing with both ASAN and TSAN and both GCC and Clang for
    every merge request.

These changes do not affect the set of jobs created for any other
pipeline type (triggered by a schedule, by a GitLab API call, by the web
interface, etc.); only merge request pipelines are affected.
2025-04-29 18:12:49 +02:00
Michal Nowak
f710562c36 rem: ci: Drop OpenBSD from the CI
With the ongoing process of moving CI workloads to AWS, OpenBSD poses a
challenge, as there is no OpenBSD AMI image in the AWS catalog. Building
our image from scratch is disproportionately complicated, given that
OpenBSD is not a common deployment platform for BIND 9. Otherwise,
OpenBSD stays at the "Best-Effort" level of support.

Merge branch 'mnowak/drop-openbsd-from-ci' into 'main'

See merge request isc-projects/bind9!10375
2025-04-29 10:55:28 +00:00
Michal Nowak
0dc9b4573d Drop OpenBSD from the CI
With the ongoing process of moving CI workloads to AWS, OpenBSD poses a
challenge, as there is no OpenBSD AMI image in the AWS catalog. Building
our image from scratch is disproportionately complicated, given that
OpenBSD is not a common deployment platform for BIND 9. Otherwise,
OpenBSD stays at the "Best-Effort" level of support.
2025-04-29 10:54:31 +00:00
Alessio Podda
962b75dca4 fix: dev: Call rcu_barrier earlier in the destructor
If a call_rcu thread is running, there is a possible race condition
where the destructors run before all call_rcu callbacks have finished
running. This can happen, for example, if the call_rcu callback tries to
log something after the logging context has been torn down.

In !10394, we tried to counter this by explicitely creating a call_rcu
thread an shutting it down before running the destructors, but it is
possible for things to "slip" and end up on the default call_rcu thread.

As a quickfix, this commit moves an rcu_barrier() that was in the mem
context destructor earlier, so that it "protects" all libisc
destructors.

Closes #5296

Merge branch '5296-join-rcu-thread-on-shutdown' into 'main'

See merge request isc-projects/bind9!10423
2025-04-25 12:30:49 +00:00
Your Name
59086c33e2 Call rcu_barrier earlier in the destructor
If a call_rcu thread is running, there is a possible race condition
where the destructors run before all call_rcu callbacks have finished
running. This can happen, for example, if the call_rcu callback tries to
log something after the logging context has been torn down.

In !10394, we tried to counter this by explicitely creating a call_rcu
thread an shutting it down before running the destructors, but it is
possible for things to "slip" and end up on the default call_rcu thread.

As a quickfix, this commit moves an rcu_barrier() that was in the mem
context destructor earlier, so that it "protects" all libisc
destructors.
2025-04-25 13:13:44 +02:00
Matthijs Mekking
336c9d5114 chg: test: Rewrite kasp system test to pytest (4)
These tests do not easily fit in the standard test case framework, so they go into their own suite.
- zsk retired case
- checkds cases
- reload/restart
- inheritance tests

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

See merge request isc-projects/bind9!10278
2025-04-25 10:23:59 +00:00
Matthijs Mekking
2e4cc70626 Convert kasp inheritance tests
These tests ensure that if dnssec-policy is set on a higher level, the
zone is still signed (or unsigned) as expected. Or if a higher level
has an override, the new policy is honored as expected.
2025-04-25 10:20:46 +02:00
Matthijs Mekking
bff7453e50 Convert reload/restart kasp test case
This test checks that the SOA SERIAL and TTL are adjusted correctly
after a reload/restart.
2025-04-25 10:20:46 +02:00
Matthijs Mekking
44b4d5ebd6 Convert kasp checkds test cases to pytest
This converts the checkds test cases that deal with the 'rndc checkds'
command and setting the 'DSPublish' and 'DSRemoved' metadata.
2025-04-25 10:20:46 +02:00
Matthijs Mekking
1940aa1d0b Convert kasp zsk retired test case
This test case does not easily fit in the standard test case framework,
so it goes into its own suite.
2025-04-25 10:20:46 +02:00
Arаm Sаrgsyаn
2054186f40 new: usr: Implement tcp-primaries-timeout
The new `tcp-primaries-timeout` configuration option works the same way
as the older `tcp-initial-timeout` option, but applies only to the TCP
connections made to the primary servers, so that the timeout value can
be set separately for them. By default, it's set to 150, which is 15
seconds.

Closes #3649

Merge branch '3649-configurable-xfr-tcp-timeouts' into 'main'

See merge request isc-projects/bind9!9376
2025-04-23 18:26:34 +00:00
Aram Sargsyan
e3417d55fd Fix delv default timeout value
The isc_nm_getinitialtimeout() function (and also the previously used
isc_nm_gettimeouts() function) returns timeout value(s) in milliseconds,
while the dns_request_create() function expects timeout values in
seconds. Fix the bug by dividing the timeout value by MS_PER_SEC.

There is no added test, because it turns out delv doesn't support
setting custom timeout values (as opposed to what is suggested in
its man page). Tests should be added later when the '+timeout=T'
option is implemented.
2025-04-23 17:03:05 +00:00
Aram Sargsyan
74a8acdc8d Separate the single setter/getter functions for TCP timeouts
Previously all kinds of TCP timeouts had a single getter and setter
functions. Separate each timeout to its own getter/setter functions,
because in majority of cases only one is required at a time, and it's
not optimal expanding those functions every time a new timeout value
is implemented.
2025-04-23 17:03:05 +00:00
Aram Sargsyan
797d865121 Fix the notify system test after the newly applied timeout value
Since notify messages now use the configured 'tcp-initial-timeout'
connect timeout value, the existing "checking notify retries expire
within 30 seconds" check in the "notify" system test is failing. Set
the 'tcp-initial-timeout' option for ns3 to the previously hardcoded
value of 15 seconds for the test to pass successfully.
2025-04-23 17:03:05 +00:00
Aram Sargsyan
b9e9b98d55 Use the configured TCP connect timeout in checkds_send_toaddr()
The checkds_send_toaddr() function uses hardcoded timeout values
for both UDP and TCP, however, with TCP named has configurable
timeout values. Slightly refactor the timeouts calculation part
and use the configured 'tcp-initial-timeout' value as the connect
timeout.
2025-04-23 17:03:05 +00:00
Aram Sargsyan
daede6876b Use the configured TCP connect timeout in notify_send_toaddr()
The notify_send_toaddr() function uses hardcoded timeout values
for both UDP and TCP, however, with TCP named has configurable
timeout values. Slightly refactor the timeouts calculation part
and use the configured 'tcp-initial-timeout' value as the connect
timeout.
2025-04-23 17:03:05 +00:00
Aram Sargsyan
70ad94257d Implement tcp-primaries-timeout
The new 'tcp-primaries-timeout' configuration option works the same way
as the existing 'tcp-initial-timeout' option, but applies only to the
TCP connections made to the primary servers, so that the timeout value
can be set separately for them. The default is 15 seconds.

Also, while accommodating zone.c's code to support the new option, make
a light refactoring with the way UDP timeouts are calculated by using
definitions instead of hardcoded values.
2025-04-23 17:03:05 +00:00
Matthijs Mekking
699db3b5b9 chg: test: Rewrite kasp system test to pytest (3)
Write python-based tests for the many test cases from the kasp system test with the same pattern.

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

See merge request isc-projects/bind9!10268
2025-04-23 15:52:50 +00:00
Matthijs Mekking
7d670b7fe7 Parametrize the default kasp test cases
Make use of pytest.mark.parametrize to split up the many default kasp
test cases into separate tests.
2025-04-23 15:22:04 +00:00
Matthijs Mekking
ee7120eb34 Convert keystore and rumoured kasp test cases
For 'keystore.kasp', a setting 'key-directories' is used. If set, this
will expect a list of two directories, the first one is where the KSKs
will be stored, the second in the list is the ZSK key directory. This
may be expanded in the future to test more complex key storage cases.

The 'rumoured.kasp' zone is weird, the key timings can never match
those key states. But it is a regression test for an early day bug,
so we convert it, but skip the expected key times check.
2025-04-23 15:22:04 +00:00