Commit graph

43653 commits

Author SHA1 Message Date
Petr Špaček
d60532ce6c new: doc: Prepare documentation for BIND 9.20.19
Merge branch 'pspacek/prepare-documentation-for-bind-9.20.19' into 'v9.20.19-release'

See merge request isc-private/bind9!907
2026-02-04 13:58:39 +00:00
Petr Špaček
aa33bcd7dc Tweak and reword release notes 2026-02-04 14:52:33 +01:00
Petr Špaček
2804c4a35e Prepare release notes for BIND 9.20.19 2026-02-04 14:40:59 +01:00
Petr Špaček
0503d77b8f Generate changelog for BIND 9.20.19 2026-02-04 14:40:21 +01:00
Alessio Podda
318a7535d2 [9.20] fix: usr: Fix inbound IXFR performance regression.
Very large inbound IXFR transfers were much slower compared to BIND
9.18. The performance was improved by adding specialized logic to
handle IXFR transfers.

Closes #5442

Backport of MR !11077

Merge branch 'backport-5442-ixfr-batch-transaction-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11355
2026-02-02 10:24:36 +00:00
Alessio Podda
66222337b4 Disable respdiff-recent-named
The respdiff-recent-named test is currently broken with autotools.
Disable the test to allow #GL!11355 to be merged.
2026-02-02 10:32:38 +01:00
Alessio Podda
1ae892f54d Handle databases with no update methods
Non qp/rbt databases might not implement the
dns_db_(begin|commit|abort)update methods. This commit ensures that we
return ISC_R_NOTIMPLEMENTED in those cases.
2026-02-02 10:32:38 +01:00
Alessio Podda
97f2816947 Fix formatting
Cleanup formatting after IXFR changes.

(cherry picked from commit ad0a382092)
2026-02-02 10:32:38 +01:00
Alessio Podda
62a8d325bd Add unit tests
Add diffop unit tests.

(cherry picked from commit fb72ebcdd8)
2026-02-02 10:32:38 +01:00
Alessio Podda
0a5e27deef Implement qpzone specific update path
This commit implements a batch update function for qpzone. The main
reason for this is speed: using addrdataset would cause a qp transaction
per rrdataset added, leading to a substantial slowdown compared to
RBTDB. The new API results in a qp transaction per applied diff.

(cherry picked from commit da53708dcb)
2026-02-02 10:32:38 +01:00
Alessio Podda
9d7dd08ef3 Implement RBTDB update path
This commit implements dns_db_{begin,commit,abort}update for rbt-zonedb
using the default diff shim.
2026-01-29 09:13:02 +01:00
Alessio Podda
1d4ad50e81 Abstract updates into a vtable
This commit adds a layer of indirection to the apply_diff logic used by
IXFR and resigning by having the database updates go through a vtable.

We do this in three steps:
 - We extend dns_rdatacallbacks_t vtable to allow subtraction and
   resigning.
 - We add a new set of api (begin|commit|abort)update to the dbmethods
   vtable, that model an incremental update that can be aborted.
 - We extract the core logic of diff_apply into a function that
   satisfies the new interface.
 - We make diff_apply use this new function, and log the results.

The intent of this commit is to allow databases to expose a batch
incremental update implementation, just like they expose a custom
batch creation implementation through (begin|end)load.

(cherry picked from commit e36dc0ca76)
2026-01-29 09:13:02 +01:00
Alessio Podda
019e70db4d Move setresign to rdataset.c and rename it
The setresign method is not diff specific, it only returns the minimum
resign time of an rdataset. Move it to rdataset.c to simplify late
refactoring.

(cherry picked from commit 6f726ae3db)
2026-01-29 09:13:02 +01:00
Alessio Podda
1124a10f97 Clean up ixfr transaction API
Make the API tighter. The idea of this commit is to highlight the
distinction between a database transaction and a journal transaction,
and ensure we run dns_zone_verifydb on error.

Done to simplify a later refactor.

(cherry picked from commit 399f0c191a)
2026-01-29 09:13:02 +01:00
Mark Andrews
11db6feb45 [9.20] fix: test: ISC_RUN_TEST_IMPL should use a static declaration
These functions don't need to be called from multiple places and
by making them static we will detect when they are not added to the
list functions to be tested.

Closes #5715

Backport of MR !11480

Merge branch 'backport-5715-isc_run_test_impl-should-use-a-static-declaration-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11502
2026-01-29 01:06:54 +11:00
Mark Andrews
84f955a972 ISC_RUN_TEST_IMPL should use a static declaration
These functions don't need to be called from multiple places and
by making them static we will detect when they are not added to the
list functions to be tested.

(cherry picked from commit 22d664aa15)
2026-01-29 00:26:35 +11:00
Mark Andrews
47b8ca5ac7 [9.20] chg: dev: Use enum rather than numbers for isc_base64_tobuffer and isc_hex_tobuffer
Use isc_one_or_more and isc_zero_or_more rather than (-2) and
(-1) when calling isc_base64_tobuffer. Similarly for
isc_hex_tobuffer. This should help reduce the probability
that the wrong number is used and it makes the intent clearer.

Closes #5713

Backport of MR !11479

Merge branch 'backport-5713-use-macros-with-isc_base64_tobuffer-and-isc_hex_tobuffer-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11498
2026-01-28 08:40:42 +11:00
Mark Andrews
37e03b004e Add spatch for isc_one_or_more and isc_zero_or_more
(cherry picked from commit d92369cc8f)
2026-01-28 08:02:06 +11:00
Mark Andrews
5bb645a24c Use isc__zero_or_more when calling isc_base64_tobuffer
(cherry picked from commit 5843289550)
2026-01-28 08:02:06 +11:00
Mark Andrews
f4e04e098a Use isc_one_or_more when calling isc_base64_tobuffer
(cherry picked from commit 62fd89d4a1)
2026-01-28 08:02:06 +11:00
Mark Andrews
e8f2bae031 Use isc_one_or_more when calling isc_hex_tobuffer
(cherry picked from commit 7feb0f5b53)
2026-01-28 08:02:06 +11:00
Mark Andrews
fd76b90126 Add enum for use with isc_base64_tobuffer and isc_hex_tobuffer
This adds the following enum isc_one_or_more and isc_zero_or_more
which specify if one or more or zeror or more bytes are required
when reading the unbounded base64 / hex encoded data.

(cherry picked from commit 07610f8566)
2026-01-28 08:02:00 +11:00
Arаm Sаrgsyаn
3d0823ee68 [9.20] fix: usr: Fix a possible issue with reponse policy zones and catalog zones
If a response policy zone (RPZ) or a catalog zone contained an
`$INCLUDE` directive, then manually reloading that zone could
fail to process the changes in the response policy or in the
catalog, respectively. This has been fixed.

Closes #5714

Backport of MR !11489

Merge branch 'backport-5714-zone_loaddone-rpz-and-catz-bugfix-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11496
2026-01-27 13:28:33 +00:00
Aram Sargsyan
074a152c4f Add a new check in the RPZ system test
Check that reloading a response policy zone which has an '$INCLUDE'
directive defined is working as expected.

(cherry picked from commit d81a2457d6)
2026-01-27 12:45:48 +00:00
Aram Sargsyan
0ae305c952 Fix a bug in zone_loaddone()
The zone_loaddone() function disables database notifications for
a catalog zones and response policy zones (RPZ) when loading had
failed. Howerer, the 'result != ISC_R_SUCCESS' check is insufficient,
because the DNS_R_SEENINCLUDE result also indicates success.

Add a second condition for the "if" block.

(cherry picked from commit 31290eccb1)
2026-01-27 12:45:48 +00:00
Nicki Křížek
08c6ecd442 [9.20] fix: test: Resolve the system_test_dir in pytest
If the system_test_dir contains a symlink, then it might cause issues
further down when using relative_to(), unless it is resolved first. This
has been observed on FreeBSD13 in CI where /home is a symlink to
/usr/home.

Backport of MR !11490

Merge branch 'backport-nicki/pytest-freebsd13-artifacts-path-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11494
2026-01-27 13:20:24 +01:00
Nicki Křížek
566f15b039 Resolve the system_test_dir in pytest
If the system_test_dir contains a symlink, then it might cause issues
further down when using relative_to(), unless it is resolved first. This
has been observed on FreeBSD13 in CI where /home is a symlink to
/usr/home.

(cherry picked from commit b1e3469059)
2026-01-27 12:32:37 +01:00
Štěpán Balážik
07695728ca [9.20] chg: test: Use isctest.asyncserver in the "resolver" system test
Depends on !11403, !11419

Backport of MR !11411

Merge branch 'backport-stepan/resolver-asyncserver-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11486
2026-01-27 11:29:38 +00:00
Štěpán Balážik
7a70608cfd Fix bugs in 'resolver/ans2' and 'resolver/ans3'
There were multiple typos and omissions regarding query minimization.

(cherry picked from commit c336c1feab)
2026-01-27 11:49:34 +01:00
Štěpán Balážik
a190f65c43 Reimplement 'resolver/ans10' server using AsyncDnsServer
Ensure packet-for-packet compatibility with the old server.

(cherry picked from commit cef851740b)
2026-01-27 11:48:57 +01:00
Štěpán Balážik
fabad54501 Reimplement 'resolver/ans8' server using AsyncDnsServer
Ensure packet-for-packet compatibility with the old server.

(cherry picked from commit 8f2526a27d)
2026-01-27 11:48:57 +01:00
Štěpán Balážik
fdcdcbc0e2 Reimplement 'resolver/ans3' server using AsyncDnsServer
Ensure packet-for-packet compatibility with the old server including
bugs.

(cherry picked from commit 5004d278e4)
2026-01-27 11:48:57 +01:00
Štěpán Balážik
aa658f80d7 Reimplement 'resolver/ans2' server using AsyncDnsServer
Ensure packet-for-packet compatibility with the old server including
bugs.

(cherry picked from commit d203a39314)
2026-01-27 11:48:48 +01:00
Štěpán Balážik
c11a7877b9 Add common parts of resolver test custom servers
These will be shared by all the ans*/ans.py files.

(cherry picked from commit 23d9055617)
2026-01-27 11:02:31 +01:00
Štěpán Balážik
e466fedcc4 Add StaticResponseHandler to isctest.asyncserver
It is used to prepare and yield one DNS response and avoid the
`get_responses` boiler-plate.

(cherry picked from commit eba89fd38b)
2026-01-27 11:02:31 +01:00
Štěpán Balážik
faec3cb1e1 Add QnameQtypeHandler for matching QNAME, QTYPE pairs
This is a pattern in the resolver system test and also elsewhere.

(cherry picked from commit 8a45f5b485)
2026-01-27 11:02:31 +01:00
Štěpán Balážik
9acda27250 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.

(cherry picked from commit 7d5ec7167b)
2026-01-27 11:02:31 +01:00
Štěpán Balážik
f82168a994 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`.

(cherry picked from commit b89cc2bd86)
2026-01-27 11:02:31 +01:00
Mark Andrews
f73ef3b24f [9.20] fix: usr: Fix brid and hhit implementation
Fix bugs in BRID and HHIT implementation and enable
the unit tests.

Closes #5710

Backport of MR !11491

Merge branch 'backport-5710-fix-hhit-and-brid-issues-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11492
2026-01-27 17:30:48 +11:00
Mark Andrews
016baaa06c Fix brid and hhit unit tests
These tests were not being run.

(cherry picked from commit 97af8fc519)
2026-01-27 05:46:17 +00:00
Mark Andrews
9f7577f207 Remove extraneous space at start of brid and hhit records
(cherry picked from commit 10366e4f4e)
2026-01-27 05:46:17 +00:00
Mark Andrews
651e3c32f2 Fix isc_base64_tobuffer call for brid and hhit
Zero length records were not being rejected.

(cherry picked from commit bdb9c838a8)
2026-01-27 05:46:17 +00:00
Mark Andrews
d192c7c33a [9.20] fix: test: unit test tsig_badsig was not being called
Additionally, the test was badly implemented. This has been fixed.

Closes #5712

Backport of MR !11478

Merge branch 'backport-5712-unit-test-tsig_badsig-was-not-being-called-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11485
2026-01-24 09:08:36 +11:00
Mark Andrews
1c32c8dba2 Fix and call tsig_badsig unit test
(cherry picked from commit 8da2310511)
2026-01-24 07:29:59 +11:00
Mark Andrews
bd9f73c705 [9.20] 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

Backport of MR !11477

Merge branch 'backport-5711-dsync_fromstruct-produces-an-invalid-record-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11483
2026-01-24 02:19:23 +11:00
Mark Andrews
5b4e36fbfc 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.

(cherry picked from commit 2159f74a1f)
2026-01-23 14:24:27 +00:00
Mark Andrews
19cf7bb2cd 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.

(cherry picked from commit 3180e50459)
2026-01-23 14:24:27 +00:00
Andoni Duarte
963737fa3f [9.20] 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.

Backport of MR !11266

Merge branch 'backport-andoni/try-small-vm-for-lightweight-ci-jobs-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11481
2026-01-23 12:38:56 +00:00
Andoni Duarte Pintado
b9106402cb
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.

The "autoconf_job" definion also includes the tag and it is kept in its
own stage.

(cherry picked from commit e9f2b7944e)
2026-01-23 12:50:50 +01:00
Andoni Duarte Pintado
760f95bafa
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.

(cherry picked from commit 66175b448c)
2026-01-23 12:50:50 +01:00