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

41111 Commits

Author SHA1 Message Date
Michal Nowak
b1184d916d Merge branch 'mnowak/fix-changes-entry-6378' into 'main'
Reformat overflowing CHANGES entry 6378

See merge request isc-projects/bind9!8981
2024-04-25 07:31:29 +00:00
Michal Nowak
84180c8ee1
Reformat overflowing CHANGES entry 6378
$ sh util/check-line-length.sh CHANGES
    CHANGES: Line Too Long
                            previously removed. An attempt to use the option now prints
2024-04-25 09:22:27 +02:00
Ondřej Surý
1359694267 Merge branch '1879-fix-documentation-on-named--U' into 'main'
Properly document that named -U <n> is no-op now

Closes #1879

See merge request isc-projects/bind9!8976
2024-04-24 20:50:09 +00:00
Ondřej Surý
9305ebdabe
Add CHANGES and release note for [GL #1879] 2024-04-24 22:49:26 +02:00
Ondřej Surý
d69cd51f91
Properly document that named -U <n> is no-op now
We don't create <n> UDP dispatches anymore and -U <n> option to named is
a no-op for a while.  Properly document that in the named man page.
2024-04-24 22:49:14 +02:00
Petr Špaček
0f86976672 Merge branch 'spdx-custom-test-driver' into 'main'
Use standard SPDX license for custom-test-driver

See merge request isc-projects/bind9!8971
2024-04-24 09:49:44 +00:00
Petr Menšík
2b348a5daa Change exception SPDX to Autoconf-exception-generic
License text is in fact Autoconf generic exception, with already defined
SPDX identificator. Use that instead.

https://spdx.org/licenses/Autoconf-exception-generic.html
2024-04-24 09:46:58 +00:00
Mark Andrews
ed77b61599 Merge branch '4684-unit-test-error-handling-in-dns_name_-api' into 'main'
test dns_name_fromregion

Closes #4684

See merge request isc-projects/bind9!8967
2024-04-24 02:14:05 +00:00
Mark Andrews
e6984e5c07 Extract empty name in 'source' into 'name' 2024-04-24 01:38:14 +00:00
Mark Andrews
7a13fcd601 Extract non absolute name from source
The entire source region needs to be consumed for this usage.
2024-04-24 01:38:14 +00:00
Mark Andrews
7d7fc8cb2d Extract fully qualified named from source without buffer
'name.ndata' should point to the source.
2024-04-24 01:38:14 +00:00
Mark Andrews
254ba1b051 Test dns_name_fromregion
with a large source region and a large target buffer, both
larger than DNS_NAME_MAXWIRE.
2024-04-24 01:38:14 +00:00
Mark Andrews
63b93ccda2 Merge branch '4689-test-invalid-notify-source-address' into 'main'
Check behaviour using invalid notify source address

Closes #4689

See merge request isc-projects/bind9!8966
2024-04-24 01:09:35 +00:00
Mark Andrews
580c41de0d check behaviour with invalid notify-source-v6 address
This was reported as causing the server to fail to shutdown on
NetBSD.  Look for the expected informational and error messages.
2024-04-24 10:12:42 +10:00
Michal Nowak
4f7947c583 Merge branch 'mnowak/llvm-18' into 'main'
Bump the LLVM version to 18 and reformat sources

See merge request isc-projects/bind9!8827
2024-04-23 12:48:22 +00:00
Michal Nowak
f454fa6dea
Update sources to Clang 18 formatting 2024-04-23 13:11:52 +02:00
Michal Nowak
7107c44c7c
Update Clang to version 18 2024-04-23 13:11:52 +02:00
Ondřej Surý
abbc59a270 Merge branch 'ondrej/fix-adb-entries-cleaning' into 'main'
Always set ADB entry expiration to now + ADB_ENTRY_WINDOW

See merge request isc-projects/bind9!8934
2024-04-22 08:37:45 +00:00
Ondřej Surý
141e4c9805
Change the ADB_ENTRY_WINDOW to 60 seconds
The previous value of 30 minutes used to cache the ADB names and entries
was quite long.  Change the value to 60 seconds for faster recovery
after cached intermittent failure of the remote nameservers.
2024-04-22 10:36:36 +02:00
Ondřej Surý
6708da3112
Unify the expiration time handling for all ADB expiration
The algorithm from the previous commit[1] is now used to calculate all
the expiration values through the code (ncache results, cname/dname
targets).

1. ISC_MIN(cur, ISC_MAX(now + ADB_ENTRY_WINDOW, now + rdataset->ttl))
2024-04-22 10:36:36 +02:00
Ondřej Surý
53cc00ee3f
Fix the expire_v4 and expire_v6 logic
Correct the logic to set the expiration period of expire_{v4,v6} as
follows:

1. If the trust is ultimate (local entry), immediately set the entry as
   expired, so the changes to the local zones have immediate effect.

3. If the expiration is already set and smaller than the new value, then
   leave the expiration value as it is.

2. Otherwise pick larger of `now + ADB_ENTRY_WINDOW` and `now + TTL` as
   the new expiration value.
2024-04-22 10:36:36 +02:00
Ondřej Surý
932665410d
Always set ADB entry expiration to now + ADB_ENTRY_WINDOW
When ADB entry was created it was set to never expire.  If we never
called any of the functions that adjust the expiration, it could linger
in the ADB forever.

Set the expiration (.expires) to now + ADB_ENTRY_WINDOW when creating
the new ADB entry to ensure the ADB entry will always expire.
2024-04-22 10:36:36 +02:00
Mark Andrews
6cb6b99ae7 Merge branch '4687-validator-c-1280-insist-val-nfails-0-failed' into 'main'
Resolve "validator.c:1280: INSIST((*val->nfails) > 0) failed"

Closes #4687

See merge request isc-projects/bind9!8963
2024-04-22 04:57:45 +00:00
Mark Andrews
26375bdcf2 Break out of the switch if we have already reached the quota
This prevents consume_validation_fail being called and causing an
INSIST.
2024-04-22 12:32:36 +10:00
Michal Nowak
970ac03196 Merge branch 'mnowak/drop-respdiff-short-ci-jobs' into 'main'
Drop respdiff-short CI jobs

See merge request isc-projects/bind9!8958
2024-04-19 15:56:00 +00:00
Michal Nowak
6a045cd8ec
Drop respdiff-short CI jobs
In the past, our CI infrastructure was more sensitive to the number of
CI jobs running on it. We tried to limit long-running jobs in merge
request-triggered pipelines, as there are many of them, and spawned them
only in daily scheduled ones. Moving most of the CI infrastructure to
AWS has made it way better to run jobs in parallel, and the existence of
short respdiff jobs has lost its original merit. It can also be harmful
as some problems are detected only by the longer respdiff variant when a
faulty merge request has already been merged. We should run all long
respdiff tests in merge request-triggered pipelines.

Also, move the former respdiff-long job (now just "respdiff") to AWS as
old instance memory constraints (see
f09cf69594c6aab4d0c5608226424c566b833f3c) are no longer an issue.
2024-04-19 16:42:49 +02:00
Petr Špaček
c35f00e48a Merge branch 'pspacek/auto-backports' into 'main'
Attempt automatic MR backports after every merge

See merge request isc-projects/bind9!8959
2024-04-19 13:40:51 +00:00
Petr Špaček
49f9487577 Attempt automatic MR backports after every merge 2024-04-19 13:35:19 +00:00
Matthijs Mekking
b53c03d98e Merge branch '1128-offline-ksk' into 'main'
Introduce new DNSSEC tool dnssec-ksr

See merge request isc-projects/bind9!8188
2024-04-19 11:56:50 +00:00
Matthijs Mekking
afda87cb08 dnssec-keygen: Change flag options into booleans
We now have ctx.kskflag, ctx.zskflag, and ctx.revflag, but zskflag is
not quite like the other two, as it doesn't have a special bit in the
DNS packet, and is used as a boolean.

This patch changes so that we use booleans for all three, and
construct the flags based on which ones are set.

patch by @aram
2024-04-19 13:52:21 +02:00
Matthijs Mekking
7007025302 Don't leak
Make tsan happy, fix memory leaks by keeping track of the buffers
to be cleaned up.
2024-04-19 13:52:21 +02:00
Matthijs Mekking
d9c947c57d Add test cases for CDS/CDNSKEY
Add two more test cases to ensure that a Signed Key Response file
creates signed CDNSKEY and/or CDS RRsets according to the policy.
2024-04-19 13:52:21 +02:00
Matthijs Mekking
cdf0fd2e5e Adjust system test to expect CDS and CDNSKEY
Requires storing the KSK keyfile identifier to calculate the expected
CDS and CDNSKEY.
2024-04-19 13:52:21 +02:00
Matthijs Mekking
83da52d6e4 Add option to dnssec-dsfromkey to chop up rdata
The new option 'w' allows us to print DS rdata with the base64 portions
split up in chunks. This is mainly done for testing purposes.
2024-04-19 13:52:21 +02:00
Matthijs Mekking
efe4fa6fc7 Add CDS and CDNSKEY to SKR
Add signed CDS and CDNSKEY RRsets to the Signed Key Response (SKR) for the
used KSKs.

We only print one bundle header for all three RRsets.
2024-04-19 13:52:21 +02:00
Matthijs Mekking
46785dc71e sh the fmt up
Apply shfmt patch. Ideally I fixup every commit that changes testing,
but that is just too much at this point.
2024-04-19 13:52:21 +02:00
Matthijs Mekking
e7525cab4f Add CHANGES and release note
Introduce the new 'dnssec-ksr' tool.
2024-04-19 13:52:21 +02:00
Matthijs Mekking
695be761b0 Test dnssec-ksr sign
Add test cases for the 'sign' command. Reuse the earlier generated KSR
files.

Also update dnssec-ksr.c to have better cleanup.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
887fa0ddc9 Implement dnssec-ksr sign
Add code that can create a Signed Key Response (SKR) given a Key
Signing Request (KSR), a DNSSEC policy, a set of keys and an interval.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
31521fade2 Change ksr format
Make the ksr format compatible with knot.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
2bf03ab7df Refactor dnssec-ksr
Refactor some more, making the cleanup a generic function.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
852ba174dd Test dnssec-ksr request
Add test cases for the 'request' command. Reuse the earlier
pregenerated ZSKs. We also need to set up some KSK files, that can
be done with 'dnssec-keygen -k <policy> -fK' now.

The 'check_keys()' function is adjusted such that the expected active
time of the successor key is set to the inactive time of the
predecessor. Some additional information is saved to make 'request'
testing easier.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
1b39172ee7 Implement dnssec-ksr request
Add code that can create a Key Signing Request (KSR) given a DNSSEC
policy, a set of keys and an interval.

Multiple keys that match the bundle and kasp parameters are sorted by
keytag, mainly for testing purposes.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
22a4bd5bbe Also free the dst_key after keygen
During cleanup, we also need to free the dst_key structure that is part
of the dns_dnsseckey.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
ed9704fcda Refactor dnssec-ksr keygen
Create some helper functions for code that is going to be reused by the
other commands (request, sign), such as setting and checking the context
parameters, and retrieving the dnssec-policy/kasp.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
e033e58a85 dnssec-keygen: allow -f and -k together
The 'dnssec-keygen' tool now allows the options '-k <dnssec-policy>'
and '-f <flags>' together to create keys from a DNSSEC policy that only
match the given role. Allow setting '-fZ' to only create ZSKs, while
'-fK' will only create KSKs.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
7508534789 Implement dnssec-ksr keygen
Add code that can pregenerate ZSKs given a DNSSEC policy and an
interval.

Fix configuration shell scripts, fixing the ksr system test.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
a3915e535a Move kasp key match function to kasp header
The dnssec-ksr tool needs to check if existing key files match lines
in the keys section of a dnssec-policy, so make this function publicly
available.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
bc31575899 Move common create key functions to dnssectool.c
The dnssec-ksr tool needs to read a dnssec-policy from configuration
too, as well as deal with FIPS mode checks.
2024-04-19 10:41:04 +02:00
Matthijs Mekking
1cb345fa95 Add ksr system test
Add a system test for testing dnssec-ksr, initally for the keygen
command. This should be able to create or select key files given a
DNSSEC policy and a time window.
2024-04-19 10:41:04 +02:00