Commit graph

43141 commits

Author SHA1 Message Date
Matthijs Mekking
c2c6f60928 Minor refactor of dst code
Convert the defines to enums. Initialize the tags more explicitly and
less ugly.

(cherry picked from commit 4a0c829584)
2025-10-01 12:26:40 +00:00
Colin Vidal
e2260b8070 [9.20] fix: dev: check plugin config before registering
In `named_config_parsefile()`, when checking the validity of
`named.conf`, the checking of plugin correctness was deliberately
postponed until the plugin is loaded and registered. However,
the checking was never actually done: the `plugin_register()`
implementation was called, but `plugin_check()` was not.

`ns_plugin_register()` (used by `named`) now calls the check function
before the register function, and aborts if either one fails.
`ns_plugin_check()` (used by `named-checkconf`) calls only
the check function.

Backport of MR !11031

Merge branch 'backport-each-check-plugin-named-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11032
2025-10-01 11:55:48 +02:00
Colin Vidal
5a98141a00 check plugin config before registering
In named_config_parsefile(), when checking the validity of
named.conf, the checking of plugin correctness was deliberately
postponed until the plugin is loaded and registered. However,
when the plugin was registered, the checking was never actually
done: the plugin_register() implementation was called, but
plugin_check() was not.

This made it necessary to duplicate the correctness checking in both
functions, so that both named-checkconf and named could catch errors.
That should not be required.

ns_plugin_register() now calls the check function before the register
function, and aborts if either one fails.  ns_plugin_check() calls only
the check function.  ns_plugin_check() is used by named-checkconf, and
ns_plugin_register() is used by named. (Note: this design has a
side effect that a call to ns_plugin_register() will result in the
plugin parameters being parsed twice at registration time.)

Partial backport of !11031
2025-10-01 11:16:11 +02:00
Nicki Křížek
acbdfec68d [9.20] chg: test: Don't check the EDE extra text in dnssec tests
While the extra text field in EDE can be useful debug information, it
doesn't need to be checked in the tests. In some cases, differences in
caching could lead to slightly different messages which would trigger a
false positive test result. Omit these checks, as they're no longer
checked for anyway in 9.21+ where the test has been rewritten to python.

Closes #5512

Merge branch '5512-dont-check-ede-text-in-tests' into 'bind-9.20'

See merge request isc-projects/bind9!11026
2025-09-29 16:20:06 +02:00
Nicki Křížek
db1e7c5332 Don't check the EDE extra text in dnssec tests
While the extra text field in EDE can be useful debug information, it
doesn't need to be checked in the tests. In some cases, differences in
caching could lead to slightly different messages which would trigger a
false positive test result. Omit these checks, as they're no longer
checked for anyway in 9.21+ where the test has been rewritten to python.
2025-09-29 15:42:20 +02:00
Michał Kępień
1f5a0405f7 [9.20] new: usr: Add dnssec-policy keys configuration check to named-checkconf
A new option `-k` is added to `named-checkconf` that allows checking the `dnssec-policy` `keys` configuration against the configured key stores. If the found key files are not in sync with the given `dnssec-policy`, the check will fail.

This is useful to run before migrating to `dnssec-policy`.

Closes #5486

Backport of MR !10907

Merge branch 'backport-5486-named-checkconf-dnssec-policy-key-directory-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11011
2025-09-29 15:13:55 +02:00
Matthijs Mekking
c1bf603bb6
Change checkconf to include built-in dnssec-policy
The configuration should also take into account the built-in
DNSSEC policies when verifying the keys in the key-directory match the
given policy. Update the code accordingly and add some good and
failure test cases.

(cherry picked from commit dcd49f2ead)
2025-09-29 15:13:26 +02:00
Matthijs Mekking
bde4f699ab
Test named-checkconf -k
Test named-checkconf -k option, that checks the dnssec-policy against
the configured keystores.

(cherry picked from commit 3918a8ca4c)
2025-09-29 15:13:26 +02:00
Matthijs Mekking
079898cbf6
Implement named-checkconf -k (check keys)
With named-checkconf -k you can check your configuration including
checking the dnssec-policy keys against the configured keystores. If
there is a mismatch in the key files versus the policy, named-checkconf
will fail. This is useful for running before migrating to dnssec-policy.

For logging purposes, introduce a function that writes the identifying
information about a policy key into a string.

Allow a dnssec key to be initialized outside the keymgr code.

Add 'log_errors' to 'cfg_kasp_fromconfig' to avoid duplicate error
logs.

(cherry picked from commit 9fe520ece9)
2025-09-29 15:13:26 +02:00
Andoni Duarte
8090fbb5b6 [9.20] new: ci: Merge tag back to its base branch in tag pipeline
Add a CI job to merge tags back to the respective base branch in tag pipelines.

Backport of MR !11001

Merge branch 'backport-andoni/add-merge-tag-to-tag-pipeline-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11024
2025-09-29 12:56:55 +00:00
Andoni Duarte Pintado
beab1db789 Merge tag back to its base branch in tag pipeline
Merging a tag to its base branch will now be a manual job in its tag
pipeline.

(cherry picked from commit 22bc6a7063)
2025-09-29 12:02:38 +00:00
Michał Kępień
64b4f5abd2 [9.20] fix: nil: Reformat strings broken by successive clang-format runs
Backport of MR !11002

Merge branch 'backport-marka-re-format-strings-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11006
2025-09-29 13:17:12 +02:00
Mark Andrews
2ce20f6e49
re-split STATIC_ASSERT message
(cherry picked from commit ccc41c7044)
2025-09-29 13:08:04 +02:00
Mark Andrews
0c1dc9a3eb
re-split log message text
(cherry picked from commit a64c350523)
2025-09-29 13:08:04 +02:00
Mark Andrews
986816baa7 [9.20] fix: usr: Use signer name when disabling DNSSEC algorithms
``disable-algorithms`` could cause DNSSEC validation failures when the parent zone was
signed with the algorithms that were being disabled for the child zone.
This has been fixed; `disable-algorithms` now works
on a whole-of-zone basis.

If the zone's name is at or below the ``disable-algorithms`` name the algorithm
is disabled for that zone, using deepest match when there are multiple
``disable-algorithms`` clauses. 

Closes #5165

Backport of MR !10837

Merge branch 'backport-5165-use-signer-name-when-disabling-dnssec-algorithms-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11014
2025-09-29 11:52:00 +10:00
Matthijs Mekking
dd891dd761 Check disable-algorithms with non-zone names
Test that if disable-algorithms is configured on a name that is below
the zonecut, it still validates (z.secure.example).

Test that if disable-algorithms is configured on a name that is above
the zonecut, it is treated as insecure (zonecut.ent.secure.example).

(cherry picked from commit 81d3a29e4e)
2025-09-29 11:16:24 +10:00
Mark Andrews
3ddf4e957b Make it clearer that disable-algorithms applies to zone names
(cherry picked from commit 28848ab578)
2025-09-29 11:16:24 +10:00
Mark Andrews
3a6021beb3 Check that badalg.secure.example resolves
Previously, badalg.secure.example would return SERVFAIL because the DS
records (from the parent) could not be validated.

(cherry picked from commit 21934102d3)
2025-09-29 11:16:24 +10:00
Mark Andrews
2554a724d4 Use signer name when disabling DNSSEC algorithms
When disabling algorithms, use the signer name to determine if the
algorithm is disabled or not.  This allows for algorithms to be
cleanly disabled on a zone level basis.  Previously, just using the
records owner name, "disable-algorithms" could impact resolution of
names that where not disabled.  This does now mean that
"disable-algorithms" can not be used to disable part of a zone anymore.

(cherry picked from commit a0945f6337)
2025-09-29 11:16:24 +10:00
Matthijs Mekking
d2f551140c [9.20] fix: usr: rndc sign during ZSK rollover will now replace signatures
When performing a ZSK rollover, if the new DNSKEY is omnipresent, the :option:`rndc sign` command now signs the zone completely with the successor key, replacing all zone signatures from the predecessor key with new ones.

Closes #5483

Backport of MR !10867

Merge branch 'backport-5483-smooth-operator-bug-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11017
2025-09-26 13:11:45 +00:00
Matthijs Mekking
bd13d0d2af Update the retire interval after full sign
After a full sign we no longer have to need to take the sign delay into
account. Update the timing checks in keymgr_transition_time to determine
the start of the interval: Either the last change, or if SigPublish/
SigDelete is set. The latter case indicates a full sign was done and
so we no longer have to take the sign delay into account.

(cherry picked from commit 489752eb1f)
2025-09-26 14:36:25 +02:00
Matthijs Mekking
aea6f4f18b Test the next key event after full sign
After a full sign we no longer have to need to take the sign delay into
account.

(cherry picked from commit acbf110b18)
2025-09-26 14:19:22 +02:00
Matthijs Mekking
76ecde48af Force full sign to generate new signatures
When introducing the kasp logic, a full sign of the zone did not
generate new signatures for the new active keys during a ZSK rollover.

The introduced kasp logic ensured that the rollover is performed
smoothly, as in the signatures are only replaced if the old signature
is close to expiring (depending on the signatures-refresh option).

Fix by maintaining a fullsign boolean value in the signing structure,
that will ensure the RRsets are signed with the correct key, rather
than a similar good key.

In case of a fullsign, we can also remove signatures from inactive
keys.

Remove the unused dns_zone_signwithkey function.

(cherry picked from commit 844bde0c70)
2025-09-26 14:18:57 +02:00
Matthijs Mekking
44f36e2763 Test rndc sign updates the signatures
Add a check to the ZSK rollover test case that ensures the zone is
signed with the successor key only, after a 'rndc sign' is commanded.

(cherry picked from commit 008d3d2a9c)
2025-09-26 12:06:35 +00:00
Nicki Křížek
f48e42bb12 [9.20] chg: ci: Temporarily disable shotgun jobs
There's currently an issue with the shotgun workflow that's being
investigated. Until it's resolved, there's no point in creating the
shotgun jobs as they'll just fail.

Backport of MR !11005

Merge branch 'backport-nicki/ci-temporarily-disable-shotgun-jobs-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11008
2025-09-24 15:09:16 +02:00
Nicki Křížek
102694f288 Temporarily disable shotgun jobs
There's currently an issue with the shotgun workflow that's being
investigated. Until it's resolved, there's no point in creating the
shotgun jobs as they'll just fail.

(cherry picked from commit 2669463b43)
2025-09-24 12:28:56 +00:00
Nicki Křížek
c573273ae1 [9.20] chg: test: Re-enable delv tests with TSAN
With the loopmgr rewrite in 9.20, the delv issue shoud no longer happen,
thus the delv tests can be executed under TSAN as well.

Related #4119

Backport of MR !10996

Merge branch 'backport-nicki/delv-reenable-under-tsan-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!11004
2025-09-24 14:27:55 +02:00
Nicki Křížek
80be56f89b Re-enable delv tests with TSAN
With the loopmgr rewrite in 9.20, the delv issue shoud no longer happen,
thus the delv tests can be executed under TSAN as well.

(cherry picked from commit 7e118fdb06)
2025-09-24 13:49:58 +02:00
Nicki Křížek
ad2662e1d0 [9.20] chg: ci: Only run relevant CI jobs based on the changes
Trigger selected CI jobs on MR automatically only if there are related
code changes. Otherwise, offer an option to run the jobs manually in
MRs. For other sources, like schedules, tags etc., execute the jobs as
usual.

Backport of MR !10987

Merge branch 'backport-nicki/ci-restrict-rules-changes-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10992
2025-09-18 16:40:33 +02:00
Nicki Křížek
22ed4ac481 Run shfmt on util/check-make-install.sh.in
(cherry picked from commit 96974330d5)
2025-09-18 16:05:18 +02:00
Nicki Křížek
11390203e6 Only run relevant CI jobs based on the changes
Trigger selected CI jobs on MR automatically only if there are related
code changes. Otherwise, offer an option to run the jobs manually in
MRs. For other sources, like schedules, tags etc., execute the jobs as
usual.

(cherry picked from commit 02c58d9baa)
2025-09-18 16:05:18 +02:00
Nicki Křížek
48e460e8d3 Add .sh extension to shell scripts
Use .sh(.in) file extension consistently for shell scripts
to allow more reliable detection of shell scripts based on their file
extension.

(cherry picked from commit 2d690499dd)
2025-09-18 15:40:26 +02:00
Colin Vidal
975aeda10b [9.20] fix: usr: preserve cache when reload fails and reload the server again
Fixes an issue where failing to reconfigure/reload the server would prevent to preserved the views caches on the subsequent server reconfiguration/reload.

Closes #5523

Backport of MR !10984

Merge branch 'backport-colin/fix-cache-revert-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10988
2025-09-18 09:45:18 +02:00
Colin Vidal
fe4d9d9e6a remove useless namedconf option in test
namedconf `request-zoneversion` option doesn't exists on 9.20, and was
actually useless for the purpose of the reload/fail/success cache test.
Remove this option so the test can run on 9.20
2025-09-18 09:06:31 +02:00
Colin Vidal
a4c3e6f3dd preserve cache when reload fails
If the server is reloaded, new views are created and preexisting cache
is attached to those _but_ something goes wrong later, the previous
views are restored but the previous cache list is destroyed. This makes
the subsequent reload to drop the existing cache. This fixes it by
avoiding a mutation of the old cache list.

(cherry picked from commit a1703fa35b)
2025-09-18 09:06:31 +02:00
Colin Vidal
56fa811fe5 test that cache is preserved on reconfing failure
A named bug scrap the cache on a second reload after an initial reload
failure. Adds a test checking that the cache is preserved between server
reconfiguration/reloads even if it fails at some point (after attempting
to re-use the cache) and the server is re-loaded later.

(cherry picked from commit 714693742e)
2025-09-18 09:06:31 +02:00
Petr Špaček
afb8abc236 [9.20] chg: test: Improve root zone loading into AsyncServer
Backport of MR !10981

Merge branch 'backport-pspacek/test-server-root-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10986
2025-09-17 21:19:17 +00:00
Petr Špaček
2f5e5c965d Add ability to load root zone into AsyncServer
We would prefer if explicit $ORIGIN is used only for root zone and
nothing else, solely to avoid zone files named "..db". For all other
zones the file name should match zone name.

(cherry picked from commit 339e5162d6)
2025-09-17 21:19:11 +00:00
Ondřej Surý
6c62e131cc [9.20] fix: nil: Fix dns_qpmulti_memusage() on empty dns_qpmulti_t instance
The dns_qpmulti_memusage() causes assertion failure when called on
freshly created qpmulti instance because the qp->usage hasn't been
allocated yet.

Backport of MR !10977

Merge branch 'backport-ondrej/fix-qpmulti_memusage-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10982
2025-09-17 15:29:53 +02:00
Ondřej Surý
f65c7b0c02
Fix dns_qpmulti_memusage() on empty dns_qpmulti_t instance
The dns_qpmulti_memusage() causes assertion failure when called on
freshly created qpmulti instance because the qp->usage hasn't been
allocated yet.

(cherry picked from commit b2f653b332)
2025-09-17 14:01:44 +02:00
Andoni Duarte
1cbd8b8556 chg: Merge 9.20.13 release branch
Merge branch 'v9.20.13-release' into 'bind-9.20'

See merge request isc-projects/bind9!10967
2025-09-12 06:53:15 +00:00
Andoni Duarte
4e92403ab6 Merge branch 'bind-9.20' into 'v9.20.13-release'
# Conflicts:
#   configure.ac
2025-09-12 06:52:40 +00:00
Petr Špaček
15beb635bf [9.20] chg: doc: ARM tweaks
Backport of MR !10960

Merge branch 'backport-pspacek/reorder-arm-toc-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10963
2025-09-11 11:56:20 +00:00
Petr Špaček
5ae34607ac Prevent Sphinx from messing up syntax with "smartquotes" feature
Sphinx's smartquotes feature was rewriting -- to en-dash, "" to proper
English quotes etc. This was messing up syntax at unpredictable places.
Disable this feature instead of attempting to escape all the places in
the manual.

(cherry picked from commit 66e58d3315)
2025-09-11 11:18:41 +00:00
Petr Špaček
2f2c312c4f Reorder appendices in ARM
The new order hopefully reflects likelihood of someone reading from start
to the end:

DNSSEC Guide
Manual Pages
General DNS Reference Information
Release Notes
Changelog
A Brief History of the DNS and BIND

(cherry picked from commit ed0db245be)
2025-09-11 11:18:41 +00:00
Mark Andrews
968a6be41f [9.20] fix: usr: Missing DNSSEC information when CD bit is set in query
The RRSIGs for glue records were not being cached correctly for CD=1 queries.  This has been fixed.

Closes #5502

Backport of MR !10938

Merge branch 'backport-5502-fix-missing-rrsig-with-cd-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10956
2025-09-11 18:47:33 +10:00
Mark Andrews
1d7046045f test that rrsigs are returned for glue with +cd
(cherry picked from commit b7e73edd12)
2025-09-10 17:29:31 +10:00
Mark Andrews
d471995445 Remove dns_rdataset_equals as unneeded
(cherry picked from commit 7d765a3514)
2025-09-10 17:09:14 +10:00
Mark Andrews
f8cafb9756 Fix missing RRSIGs for "glue" lookups with CD=1
The code to test whether to store the RRSIGs on DNS_R_UNCHANGED
with CD=1 was failing because the comparison methods of the two
rdatatset instances were not compatible.  Move the testing into
dns_db_addrdataset(), and request it by setting the DNS_ADD_EQUALOK
option.  If the option is set and the old and new rrsets compare
as equal, dns_db_addrdataset() returns ISC_R_SUCCESS instead of
DNS_R_UNCHANGED.

(cherry picked from commit b954a1df43)
2025-09-10 17:08:52 +10:00
Ondřej Surý
89edd7b45b [9.20] fix: nil: Replace .reuse/dep5 with REUSE.toml
Update to REUSE Specification 3.2+ that uses REUSE.toml instead of DEP5
based specification.

Backport of MR !10945

Merge branch 'backport-ondrej/cover-reuse-dep5-to-toml-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10949
2025-09-08 12:15:07 +02:00