2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

43024 Commits

Author SHA1 Message Date
Michal Nowak
a88b44d945
Use clang-format-21 to update formatting 2025-08-21 15:03:28 +02:00
Michal Nowak
5ce402f698
DROPME: Use staging registry 2025-08-21 14:51:12 +02:00
Michal Nowak
c80fa5d9c5
Update Clang to version 21 2025-08-21 13:38:20 +02:00
Andoni Duarte Pintado
53cf8e0214 Merge tag 'v9.20.12' into bind-9.20 2025-08-20 18:08:55 +02:00
Matthijs Mekking
f91017fcec [9.20] new: test: Test migrating to dnsec-policy
Various test cases where legacy keys exist and are used to migrate to 'dnssec-policy'. These once existed as shell script but were removed because 'auto-dnssec' was removed. But the test cases are still useful if one wants to migrate to 'dnssec-policy' with such legacy keys, so it would be good to resurrect these tests.
    
Closes #3769

Backport of MR !10787

Merge branch 'backport-3769-migrate-zsk-ksk-plit-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10868
2025-08-19 15:02:28 +00:00
Matthijs Mekking
bf57c10dc6 Add a test case for no -P sync
This is a follow-up from the test cases that were added long time ago
that cover migrating to dnssec-policy.

The test covers legacy keys that do not have the SyncPublish timing
metadata set.

(cherry picked from commit dfdac550d823861edcf447899dc4957404e473e4)
2025-08-19 14:10:24 +00:00
Matthijs Mekking
accac0c16a Test migration to dnssec-policy
Various test cases where legacy keys exist and are used to migrate to
dnssec-policy. These once existed as shell script but were removed
because auto-dnssec was removed. But the test cases are still useful
if one wants to migrate to dnssec-policy with such legacy keys.

The tests were previously removed in commit
906dd57b68dab3526af82ec266f413e11391394d as part of MR !8085.

(cherry picked from commit 649981483575e3ddea26b9044c3cf4fa2502d2fa)
2025-08-19 14:10:24 +00:00
Matthijs Mekking
d9f90b7fd7 Allow for lifetime not set in state file
When migrating to dnssec-policy, keys that do not match will not have
a lifetime set. Adjust the test code to allow for that. Setting '-'
in a key properties string signals lifetime is expected not to be set.

(cherry picked from commit 89e90c30f89fc129b31b76768881f266087bf08a)
2025-08-19 14:10:24 +00:00
Matthijs Mekking
8e538518f4 Update set_expected_keytimes for migrate case
If we are migrating keys, we should take the existing key timing
metadata to initialise the state values. These tests will only setup
keys with Publish/Activate/SyncPublish times, because the Retire and
Remove timings will still need to be adjusted to the DNSSEC policy.

(cherry picked from commit 1a8cbf11fe03cf88a0e17095fe13a8e3bdb424fd)
2025-08-19 14:10:24 +00:00
Ondřej Surý
0c2c477c31 [9.20] chg: dev: Update clang-format style with options added in newer versions
Add and apply InsertBraces statement to add missing curly braces around one-line statements and use ControlStatementsExceptControlMacros for SpaceBeforeParens to remove space between foreach macro and the brace, e.g. `FOREACH (x) {` becomes `FOREACH(x) {`.

Backport of MR !10863

Merge branch 'backport-ondrej/update-clang-format-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10864
2025-08-19 09:06:14 +02:00
Ondřej Surý
87c926ade7
Ignore clang-format reformatting commits
(cherry picked from commit 255f484f4998822fe876fc512b79c502c4beb2d3)
2025-08-19 08:09:02 +02:00
Ondřej Surý
8f8fb10232
Use ControlStatementsExceptControlMacros for SpaceBeforeParens
> Put a space before opening parentheses only after control statement
> keywords (for/if/while...) except this option doesn’t apply to ForEach
> and If macros. This is useful in projects where ForEach/If macros are
> treated as function calls instead of control statements.

(cherry picked from commit 42496f3f4a8802c0ba8033a1bcabc8bebf5b0087)
2025-08-19 08:08:23 +02:00
Ondřej Surý
58791b5cfe
Add and apply InsertBraces statement
> Insert braces after control statements (if, else, for, do, and while)
> in C++ unless the control statements are inside macro definitions or
> the braces would enclose preprocessor directives.

(cherry picked from commit d051e1e8f8eea1400191e0fd20641394b7d438be)
2025-08-19 08:07:41 +02:00
Nicki Křížek
dcfcafde49 [9.20] fix: ci: Update DNS Shotgun parameters for an updated dataset
We've switched to an updated dataset for shotgun jobs. The change in
underlying traffic caused the more sensitive doh-get (and partially dot)
jobs to overload the resolver, making the jobs unstable and unreliable,
due to an increased number of timeouts.

Readjust the load parameters slightly to avoid exceeding ~2 % of
timeouts in the cold cache scenario to stabilize the job results.

Backport of MR !10841

Merge branch 'backport-nicki/ci-shotgun-load-new-dataset-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10856
2025-08-14 23:58:11 +02:00
Nicki Křížek
27c25ee56c Update DNS Shotgun parameters for an updated dataset
We've switched to an updated dataset for shotgun jobs. The change in
underlying traffic caused the more sensitive doh-get (and partially dot)
jobs to overload the resolver, making the jobs unstable and unreliable,
due to an increased number of timeouts.

Readjust the load parameters slightly to avoid exceeding ~2 % of
timeouts in the cold cache scenario to stabilize the job results.

(cherry picked from commit 338389b3eb410d347dc337fa27371cf808888854)
2025-08-14 23:18:06 +02:00
Mark Andrews
a64df9729b [9.20] fix: dev: Use DNS_RDATACOMMON_INIT to hide branch differences
Initialization of the common members of rdata type structures varies across branches. Standardize it by using the `DNS_RDATACOMMON_INIT` macro for all types, so that new types are more likely to use it, and hence backport more cleanly.

Closes #5467

Merge branch '5467-use-dns_rdatacommon_init-to-hide-branch-differences-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10834
2025-08-15 06:59:05 +10:00
Mark Andrews
afb019f3f0 Use DNS_RDATACOMMON_INIT to hide branch differences
Initialization of the common members of rdata type structures varies
across branches. Standardize it by using the DNS_RDATACOMMON_INIT
macro for all types, so that new types are more likely to use it,
and hence backport more cleanly.
2025-08-15 06:22:47 +10:00
Michal Nowak
6befa85bd1 [9.20] fix: ci: Set more lenient respdiff limits
After !9950, respdiff's maximal disagreement percentage needs to be
adjusted as target disagreements between the tested version of the
"main" branch and the reference one jumped for the respdiff,
respdiff:asan, and respdiff:tsan jobs from on average 0.07% to 0.16% and
from 0.12% to 0.17% for the respdiff-third-party job.

In !9950, we concluded setting MAX_DISAGREEMENTS_PERCENTAGE to double
the average disagreement percentage works fine in the CI.

(cherry picked from commit 9acc0c8543b6173c35019982bd6677a421204bff)

Backport of MR !10293

Merge branch 'backport-mnowak/more-lenient-respdiff-limits-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10847
2025-08-14 16:14:16 +02:00
Michal Nowak
0e90fdfe95 Set more lenient respdiff limits
After !9950, respdiff's maximal disagreement percentage needs to be
adjusted as target disagreements between the tested version of the
"main" branch and the reference one jumped for the respdiff,
respdiff:asan, and respdiff:tsan jobs from on average 0.07% to 0.16% and
from 0.12% to 0.17% for the respdiff-third-party job.

In !9950, we concluded setting MAX_DISAGREEMENTS_PERCENTAGE to double
the average disagreement percentage works fine in the CI.

(cherry picked from commit 9acc0c8543b6173c35019982bd6677a421204bff)
2025-08-14 16:12:06 +02:00
Andoni Duarte
57322af3ea chg: doc: Set up version for BIND 9.20.13
Merge branch 'andoni/set-up-version-for-bind-9.20.13' into 'bind-9.20'

See merge request isc-projects/bind9!10853
2025-08-14 11:07:11 +00:00
Andoni Duarte Pintado
37365f42b9 Update BIND version to 9.20.13-dev 2025-08-14 12:27:25 +02:00
Andoni Duarte Pintado
81f59f8283 Update BIND version for release stable v9.20.12 2025-08-13 19:09:56 +02:00
Andoni Duarte
f9491fb51d new: doc: Prepare documentation for BIND 9.20.12
Merge branch 'andoni/prepare-documentation-for-bind-9.20.12' into 'v9.20.12-release'

See merge request isc-private/bind9!825
2025-08-13 16:42:31 +00:00
Andoni Duarte Pintado
c06e227370 Tweak and reword release notes 2025-08-13 18:02:30 +02:00
Andoni Duarte Pintado
cbb1ff3936 Prepare release notes for BIND 9.20.12 2025-08-13 18:02:30 +02:00
Andoni Duarte Pintado
d2051add01 Generate changelog for BIND 9.20.12 2025-08-13 18:02:30 +02:00
Štěpán Balážik
0938b13ecd [9.20] fix: test: Fix the .hypothesis directory to bin/tests/system/.hypothesis
Previously the location of the .hypothesis directory would depend on the
current working directory when running pytest.

Set the HYPOTHESIS_STORAGE_DIRECTORY explicitly.

Closes #5424

Backport of MR !10825

Merge branch 'backport-5424-hypothesis-artifacts-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10828
2025-08-06 12:32:01 +00:00
Štěpán Balážik
dd6023ed4d Fix the .hypothesis directory to bin/tests/system/.hypothesis
Previously the location of the .hypothesis directory would depend on the
current working directory when running pytest.

Set the HYPOTHESIS_STORAGE_DIRECTORY explicitly.

(cherry picked from commit a4e74ab8cd51a514424aa01fa96344f0f9f918c2)
2025-08-06 11:58:06 +00:00
Evan Hunt
4793397ad5 [9.20] new: test: Update filter-aaaa test
Renamed the `filter-aaaa` system test to `filters`, converted it to python, and added test cases to exercise the `filter-a` plugin as well.

Backport of MR !10730

Merge branch 'backport-each-test-filter-a-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10832
2025-08-06 07:47:46 +00:00
Nicki Křížek
bd33597ab3 Use full path for shared test code imports in rollover tests
Previously, symlinks and relative directory imports were used in test
modules. This caused a name clash when a shared code module "common.py"
was introduced for a different test. To avoid the issue, use full paths
in imports.

(cherry picked from commit e49c467efb64229f536f2f116f402da176656ee7)
2025-08-06 00:23:23 -07:00
Nicki Křížek
f7d4213605 Split up and parametrize filters tests
Move tests which use different configuration to dedicated modules to
avoid possible interference with other tests.

Parametrize the test cases to have a dedicated test for each server
configuration.

Turn the check_filter() comments into log messages to help with
debugging.

(cherry picked from commit cbebeacec15a2716cce74f4a3f8544abd62b398f)
2025-08-06 00:23:23 -07:00
Evan Hunt
d7a7dc06e9 rename filter-aaaa to filters
since the test now covers both plugins, the filter-aaaa name is
misleading.

(cherry picked from commit 28a3706ec5206ff9e9cd9d09bb3ba168dc16c45b)
2025-08-06 00:23:11 -07:00
Evan Hunt
80cc68235d add filter-a tests
add test cases to exercise the filter-a plugin.

(cherry picked from commit 1c5363cf99c7df18d13cb01f1c7a51f31088d769)
2025-08-06 00:05:09 -07:00
Evan Hunt
a4e426d6c8 reduce code duplication in filter-aaaa test
cut down the number of identical lines in the filter-aaaa test:
- replace identical test cases with small check functions
  (check_aaaa_only, check_any, check_nodata, etc).
- group those together into large check functions (check_filter,
  check_filter_other_family) that have options for recursive and
  break_dnssec, then run those for each combination of options
  on servers connfigured with filter-aaaa-on-v4 and filter-aaaa-on-v6.

(cherry picked from commit 58fe984c9505a2052dfd572cdde836686f710bd1)
2025-08-06 00:05:09 -07:00
Evan Hunt
681e61817b convert filter-aaaa test to python
use pytest for the filter-aaaa test.

In order to implement this, isctest.mark can now test whether IPv6 is
configured by calling testsock6.pl.

(cherry picked from commit b234c6d954ef76d9e9ac226ae164bfe31dadc3d3)
2025-08-06 00:04:39 -07:00
Mark Andrews
f440fe712d [9.20] new: usr: Support for parsing the DSYNC record has been added
Closes #5440

Backport of MR !10776

Merge branch 'backport-5440-add-dsync-record-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10820
2025-08-06 15:17:57 +10:00
Mark Andrews
ae6704b4fb Add tests for DSYNC
(cherry picked from commit 53c8c5233ae9f7b04837e40e1517b1f0924658e3)
2025-08-06 13:47:33 +10:00
Mark Andrews
34c9dde184 Add support for parsing and displaying DSYNC rdata type
(cherry picked from commit c47615094e0b945cae14a81acc38baed21c6cee6)
2025-08-06 13:47:33 +10:00
Mark Andrews
ce6078d2b9 Add support for parsing DSYNC scheme mnemonics
Adds dns_dsyncscheme_fromtext, dns_dsyncscheme_totext and
dns_dsyncscheme_format.  Adds type dns_dsyncscheme_t.

(cherry picked from commit 6e1311c624d15e6c4d0184deea3bb670e8a5785d)
2025-08-06 13:13:34 +10:00
Alessio Podda
9a046cbed5 [9.20] chg: dev: Adaptive memory allocation strategy for qp-tries
qp-tries allocate their nodes (twigs) in chunks to reduce allocator pressure and improve memory locality. The choice of chunk size presents a tradeoff: larger chunks benefit qp-tries with many values (as seen in large zones and resolvers) but waste memory in smaller use cases.

Previously, our fixed chunk size of 2^10 twigs meant that even an empty qp-trie would consume 12KB of memory, while reducing this size would negatively impact resolver performance.

This MR implements an adaptive chunking strategy that tracks the size of the most recently allocated chunk and doubles the chunk size for each new allocation until reaching a predefined maximum.

This approach effectively balances memory efficiency for small tries while maintaining the performance benefits of larger chunk sizes for bigger data structures.

Backport of MR !10245

Closes #5445

Merge branch '5445-qp-small-alloc' into 'bind-9.20'

See merge request isc-projects/bind9!10804
2025-08-05 11:22:45 +00:00
Alessio Podda
2705e13339 Tune min and max chunk size
Before implementing adaptive chunk sizing, it was necessary to ensure
that a chunk could hold up to 48 twigs, but the new logic will size-up
new chunks to ensure that the current allocation can succeed.

We exploit the new logic in two ways:
 - We make the minimum chunk size smaller than the old limit of 2^6,
   reducing memory consumption.
 - We make the maximum chunk size larger, as it has been observed that
   it improves resolver performance.

(cherry picked from commit d7064c9b88555918778822881a156e6f8864ea98)
2025-08-05 12:48:19 +02:00
alessio
d21f63884a Adaptive memory allocation strategy for qp-tries
qp-tries allocate their nodes (twigs) in chunks to reduce allocator
pressure and improve memory locality. The choice of chunk size presents
a tradeoff: larger chunks benefit qp-tries with many values (as seen
in large zones and resolvers) but waste memory in smaller use cases.

Previously, our fixed chunk size of 2^10 twigs meant that even an
empty qp-trie would consume 12KB of memory, while reducing this size
would negatively impact resolver performance.

This commit implements an adaptive chunking strategy that:
 - Tracks the size of the most recently allocated chunk.
 - Doubles the chunk size for each new allocation until reaching a
   predefined maximum.

This approach effectively balances memory efficiency for small tries
while maintaining the performance benefits of larger chunk sizes for
bigger data structures.

This commit also splits the callback freeing qpmultis into two
phases, one that frees the underlying qptree, and one that reclaims
the qpmulti memory. In order to prevent races between the qpmulti
destructor and chunk garbage collection jobs, the second phase is
protected by reference counting.

(cherry picked from commit 70b1777d8aef75da1b184fe8155dc818ce66628a)
2025-08-05 12:48:19 +02:00
Matthijs Mekking
39ad2016c1 [9.20] fix: usr: Add RPZ extended DNS error for zones with a CNAME override policy configured
When the zone is configured with a CNAME override policy, or the response policy zone contains a wildcard CNAME, the extended DNS error code was not added. This has been fixed.

Closes #5342

Backport of MR !10777

Merge branch 'backport-5342-rpz-cname-override-ede-not-added-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10819
2025-08-05 10:45:54 +00:00
Matthijs Mekking
1936303158 Add ede for zone with rpz cname override policy
When the zone is configured with a CNAME override policy, also add the
configured EDE code.

When the zone is contains a wildcard CNAME, also add the configured
EDE code.

(cherry picked from commit 2f70a0ef12a4aea58098bd0ca9003c46146770fc)
2025-08-05 12:13:15 +02:00
Matthijs Mekking
7b9c524a5b Test adding ede with rpz cname override policy
When the zone is configured with a CNAME override policy, the EDE code
is not added as expected. Add a test case based on the issue in GitLab
(#5342).

When the zone contains a wildcard CNAME, the EDE code is not added as
expected. Also add a test case for this.

(cherry picked from commit 4ef00f97d6806622a833a9c7b9e414a5ddaa19f0)
2025-08-05 12:13:15 +02:00
Mark Andrews
3b98c7cc9d [9.20] fix: usr: Prevent spurious validation failures
Under rare circumstances, validation could fail if multiple clients simultaneously iterated the same set of signatures.

References #3014

Backport of MR !5578

Merge branch 'backport-3014-validator-c-check_signer-fails-to-call-dns_rdataset_clone-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10815
2025-08-02 00:12:01 +10:00
Mark Andrews
f78430bb74 validator.c:check_signer now clones val->sigrdataset
Spurious validation failures were traced back to check_signer looping
over val->sigrdataset directly.  Cloning val->sigrdataset prevents
check_signer from interacting with callers that are also looping
over val->sigrdataset.

(cherry picked from commit 8aa130f253b11e61d87dadea576e2c1430ce8dcc)
2025-08-01 21:56:33 +10:00
Petr Špaček
056d41166a [9.20] chg: ci: Log packages, test AlmaLinux 9
Backport of MR !10799

Merge branch 'backport-pspacek/ci-platforms-and-logging-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10806
2025-07-31 12:21:25 +00:00
Petr Špaček
6659c84f72 Log all installed system packages and Python libraries before build
(cherry picked from commit e702e091432d192c56d8e62d03f7a8334cd24c1e)
2025-07-31 12:21:18 +00:00
Petr Špaček
8dcdf15de4 Run MR pipelines also on AlmaLinux 9
Turns out Python version there is older than elsewhere.

(cherry picked from commit 8c71989a456432a04c3c7cd6872cda721517705c)
2025-07-31 12:21:18 +00:00