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

35966 Commits

Author SHA1 Message Date
Ondřej Surý
f0feaa3305 Remove isc_task_sendto(anddetach) functions
The only place where isc_task_sendto() was used was in dns_resolver
unit, where the "sendto" part was actually no-op, because dns_resolver
uses bound tasks.  Remove the isc_task_sendto() and
isc_task_sendtoanddetach() functions in favor of using bound tasks
create with isc_task_create_bound().

Additionally, cache the number of running netmgr threads (nworkers)
locally to reduce the number of function calls.
2022-04-19 14:24:36 +02:00
Ondřej Surý
861f25d930 Merge branch 'ondrej/remove-isc_event_constallocate' into 'main'
Remove isc_event_constallocate()

See merge request isc-projects/bind9!6138
2022-04-19 12:23:30 +00:00
Ondřej Surý
1eeb4c1121 Remove isc_event_constallocate()
The isc_event_constallocate() function was not used anywhere, thus
remove the isc_event_constallocate() macro, declaration and definition.
2022-04-19 13:46:26 +02:00
Ondřej Surý
30687fcbb3 Merge branch 'ondrej-listen-on-specified-number-of-threads' into 'main'
Allow listening on less than nworkers threads

See merge request isc-projects/bind9!6032
2022-04-19 10:36:51 +00:00
Ondřej Surý
317d9547a9 Add CHANGES note for [GL !6032] 2022-04-19 11:11:30 +02:00
Ondřej Surý
f55a4d3e55 Allow listening on less than nworkers threads
For some applications, it's useful to not listen on full battery of
threads.  Add workers argument to all isc_nm_listen*() functions and
convenience ISC_NM_LISTEN_ONE and ISC_NM_LISTEN_ALL macros.
2022-04-19 11:08:13 +02:00
Mark Andrews
dad43a128d Merge branch '3234-check-the-oid-in-privateoid-keys' into 'main'
Resolve "Check the OID in PRIVATEOID keys"

Closes #3234

See merge request isc-projects/bind9!6045
2022-04-19 04:53:59 +00:00
Mark Andrews
9597d30186 Add release note for [GL #3234] 2022-04-19 14:35:35 +10:00
Mark Andrews
5a1c2b0b59 Add CHANGES note for [GL #3234] 2022-04-19 14:34:12 +10:00
Mark Andrews
69d30f8974 Check PRIVATEDNS and PRIVATEOID key identifiers
dns_rdata_fromtext and dns_rdata_fromwire now checks that there is
a valid name or oid at the start of the keydata when the key algorithm
is PRIVATEDNS and PRIVATEOID respectively.

dns_rdata_totext now prints out the oid if the algorithm is PRIVATEOID.
2022-04-19 14:32:56 +10:00
Mark Andrews
746b3ac88c Merge branch '3279-lib-dns-ncache-c-rdataset_settrust-fails-to-set-trust-on-called-rdataset' into 'main'
Resolve "lib/dns/ncache.c:rdataset_settrust() fails to set trust on called rdataset"

Closes #3279

See merge request isc-projects/bind9!6129
2022-04-18 23:36:59 +00:00
Mark Andrews
14ca6270d3 Add CHANGES entry for [GL #3279] 2022-04-19 08:38:26 +10:00
Mark Andrews
d043a41499 Update the rdataset->trust field in ncache.c:rdataset_settrust
Both the trust recorded in the slab stucture and the trust on
rdataset need to be updated.
2022-04-19 08:38:26 +10:00
Mark Andrews
d2d9910da2 Check that pending negative cache entries for DS can be used successfully
Prime the cache with a negative cache DS entry then make a query for
name beneath that entry. This will cause the DS entry to be retieved
as part of the validation process.  Each RRset in the ncache entry
will be validated and the trust level for each will be updated.
2022-04-19 08:38:26 +10:00
Evan Hunt
76bb33fbd5 Merge branch '3235-dig-exitcode' into 'main'
ensure dig sets exitcode after local UDP connection failure

Closes #3235

See merge request isc-projects/bind9!6107
2022-04-15 18:08:10 +00:00
Evan Hunt
d646aca282 CHANGES for [GL #3235] 2022-04-15 10:32:45 -07:00
Evan Hunt
4eee6460ff ensure dig sets exitcode after local UDP connection failure
dig previously set an exit code of 9 when a TCP connection failed
or when a UDP connection timed out, but when the server address is
localhost it's possible for a UDP query to fail with ISC_R_CONNREFUSED.
that code path didn't update the exit code, causing dig to exit with
status 0. we now set the exit code to 9 in this failure case.
2022-04-15 10:32:31 -07:00
Arаm Sаrgsyаn
9fb812763a Merge branch '3223-catz-change-of-ownership-aka-coo-support' into 'main'
[3/5] Implement catalog zones change of ownership (coo) support

Closes #3223

See merge request isc-projects/bind9!6013
2022-04-14 22:48:41 +00:00
Aram Sargsyan
99d1ec6c4b Do not use REQUIRE in dns_catz_entry_detach() after other code
The REQUIRE checks should be at the top of the function before
any assignments or code.

Move the REQUIRE check to the top.
2022-04-14 20:41:52 +00:00
Aram Sargsyan
59c486391d Replace CATZ_OPT_MASTERS with CATZ_OPT_PRIMARIES
Update the enum entry in the continued effort of replacing some
DNS terminology.
2022-04-14 20:41:52 +00:00
Aram Sargsyan
1c33dbd27d Add CHANGES note for [GL #3223] 2022-04-14 20:41:52 +00:00
Aram Sargsyan
bb837db4ee Implement catalog zones change of ownership (coo) support
Catalog zones change of ownership is special mechanism to facilitate
controlled migration of a member zone from one catalog to another.

It is implemented using catalog zones property named "coo" and is
documented in DNS catalog zones draft version 5 document.

Implement the feature using a new hash table in the catalog zone
structure, which holds the added "coo" properties for the catalog zone
(containing the target catalog zone's name), and the key for the hash
table being the member zone's name for which the "coo" property is being
created.

Change some log messages to have consistent zone name quoting types.

Update the ARM with change of ownership documentation and usage
examples.

Add tests which check newly the added features.
2022-04-14 20:41:52 +00:00
Arаm Sаrgsyаn
e8ba18906b Merge branch '3222-catz-options-new-syntax-based-on-custom-properties' into 'main'
[2/5] Implement catalog zones options new syntax based on custom properties

Closes #3222

See merge request isc-projects/bind9!6012
2022-04-14 19:49:00 +00:00
Aram Sargsyan
0b2d5490cd Do not cancel processing record datasets in catalog zone after an error
When there are multiple record datasets in a database node of a catalog
zone, and BIND encounters a soft error during processing of a dataset,
it breaks from the loop and doesn't process the other datasets in the
node.

There are cases when this is not desired. For example, the catalog zones
draft version 5 states that there must be a TXT RRset named
`version.$CATZ` with exactly one RR, but it doesn't set a limitation
on possible non-TXT RRsets named `version.$CATZ` existing alongside
with the TXT one. In case when one exists, we will get a processing
error and will not continue the loop to process the TXT RRset coming
next.

Remove the "break" statement to continue processing all record datasets.
2022-04-14 10:56:24 +00:00
Aram Sargsyan
6035980bb1 Process the 'version' record of the catalog zone first
When processing a new or updated catalog zone, the record datasets
from the database are being processed in order. This creates a
problem because we need to know the version of the catalog zone
schema to process some of the records differently, but we do not
know the version until the 'version' record gets processed.

Find the 'version' record and process it first, only then iterate over
the database to process the rest, making sure not to process the
'version' record twice.
2022-04-14 10:56:24 +00:00
Aram Sargsyan
321c93c05d Add CHANGES note for [GL #3222] 2022-04-14 10:56:23 +00:00
Aram Sargsyan
cedfebc64a Implement catalog zones options new syntax based on custom properties
According to DNS catalog zones draft version 5 document, catalog
zone custom properties must be placed under the "ext" label.

Make necessary changes to support the new custom properties syntax in
catalog zones with version "2" of the schema.

Change the default catalog zones schema version from "1" to "2" in
ARM to prepare for the new features and changes which come starting
from this commit in order to support the latest DNS catalog zones draft
document.

Make some restructuring in ARM and rename the term catalog zone "option"
to "custom property" to better reflect the terms used in the draft.

Change the version of 'catalog1.zone.' catalog zone in the "catz" system
test to "2", and leave the version of 'catalog2.zone.' catalog zone at
version "1" to test both versions.

Add tests to check that the new syntax works only with the new schema
version, and that the old syntax works only with the legacy schema
version catalog zones.
2022-04-14 10:53:52 +00:00
Arаm Sаrgsyаn
99de681480 Merge branch '3144-dig-+trace-or-+nssearch-with-+tcp-always-crashes' into 'main'
Unify dig +nssearch next query starting code for TCP and UDP protocols

Closes #3144

See merge request isc-projects/bind9!6109
2022-04-14 10:46:16 +00:00
Aram Sargsyan
2a9867d512 Add CHANGES note for [GL #3144] 2022-04-14 09:35:59 +00:00
Evan Hunt
6bf8535542 detach unfinished query when canceling
when a query was canceled while still in the process of connecting,
tcp_connected() and udp_ready() didn't detach the query object.
2022-04-14 09:34:40 +00:00
Aram Sargsyan
b944bf4120 Unify dig +nssearch next query starting code for TCP and UDP protocols
In `+nssearch` mode `dig` starts the next query of the followup lookup
using `start_udp()` or `start_tcp()` calls without waiting for the
previous query to complete.

In UDP mode that happens in the `send_done()` callback of the previous
query, but in TCP mode that happens in the `start_tcp()` call of the
previous query (recursion) which doesn't work because `start_tcp()`
attaches the `lookup->current_query` to the query it is starting, so a
recursive call will result in an assertion failure.

Make the TCP mode to start the next query in `send_done()`, just like in
the UDP mode. During that time the `lookup->current_query` is already
detached by the `tcp_connected()`/`udp_ready()` callbacks.
2022-04-14 09:34:40 +00:00
Matthijs Mekking
3a9c82f749 Merge branch '2931-cds-delete-removed-on-signing' into 'main'
Don't delete CDS DELETE after zone sign

Closes #2931

See merge request isc-projects/bind9!5706
2022-04-13 12:37:39 +00:00
Matthijs Mekking
f088657eb1 Add CDS/CDNSKEY DELETE documentation
Mention in the DNSSEC guide in the "revert to unsigned" recipe that you
can publish CDS and CDNSKEY DELETE records to remove the corresponding
DS records from the parent zone.
2022-04-13 13:26:59 +02:00
Matthijs Mekking
ebbcf4c34f Add CHANGE and release note for #2931
Release note worthy.
2022-04-13 13:26:59 +02:00
Matthijs Mekking
3d05c99abb Update dns_dnssec_syncdelete() function
Update the function that synchronizes the CDS and CDNSKEY DELETE
records. It now allows for the possibility that the CDS DELETE record
is published and the CDNSKEY DELETE record is not, and vice versa.

Also update the code in zone.c how 'dns_dnssec_syncdelete()' is called.

With KASP, we still maintain the DELETE records our self. Otherwise,
we publish the CDS and CDNSKEY DELETE record only if they are added
to the zone. We do still check if these records can be signed by a KSK.

This change will allow users to add a CDS and/or CDNSKEY DELETE record
manually, without BIND removing them on the next zone sign.

Note that this commit removes the check whether the key is a KSK, this
check is redundant because this check is also made in
'dst_key_is_signing()' when the role is set to DST_BOOL_KSK.
2022-04-13 13:26:59 +02:00
Matthijs Mekking
f08277f9fb Test CDS DELETE persists after zone sign
Add a test case for a dynamically added CDS DELETE record and make
sure it is not removed when signing the zone. This happens because
BIND maintains CDS and CDNSKEY publishing and it will only allow
CDS DELETE records if the zone is transitioning to insecure. This is
a state that can be identified when using KASP through 'dnssec-policy',
but not when using 'auto-dnssec'.
2022-04-13 13:26:59 +02:00
Michał Kępień
d8473d8152 Merge branch 'michal/fix-forward-system-test-requirements' into 'main'
Fix "forward" system test requirements

See merge request isc-projects/bind9!6117
2022-04-12 13:30:06 +00:00
Michał Kępień
806f457147 Fix "forward" system test requirements
Commit bf3fffff67e1de78e9387a93674d471bf4291604 added a Python-based
name server (bin/tests/system/forward/ans11/ans.py) to the "forward"
system test, but did not update bin/tests/system/Makefile.am to ensure
Python is present in the test environment before the "forward" system
test is run.  Update bin/tests/system/Makefile.am to enforce that
requirement.
2022-04-12 15:29:26 +02:00
Michał Kępień
aa99a554e4 Merge branch 'michal/set-up-release-notes-for-bind-9.19.1' into 'main'
Set up release notes for BIND 9.19.1

See merge request isc-projects/bind9!6118
2022-04-12 12:12:15 +00:00
Michał Kępień
058df60ee1 Set up release notes for BIND 9.19.1 2022-04-12 13:41:18 +02:00
Michał Kępień
6d8495f926 Merge branch 'michal/update-bind-version-to-9.19.1-dev' into 'main'
Update BIND version to 9.19.1-dev

See merge request isc-projects/bind9!6114
2022-04-12 11:10:32 +00:00
Michał Kępień
f7cf5603d0 Update BIND version to 9.19.1-dev 2022-04-12 11:15:13 +02:00
Evan Hunt
7f19cbbc90 Merge branch '3256-adb-crash' into 'main'
ADB entries could be unlinked too soon

Closes #3256

See merge request isc-projects/bind9!6113
2022-04-12 07:15:12 +00:00
Evan Hunt
06bf5f21d2 CHANGES for [GL #3256] 2022-04-11 17:32:55 -07:00
Evan Hunt
73ff8850bf ADB entries could be unlinked too soon
due to a typo in the code, ADB entries were unlinked from their entry
buckets during shutdown if they had a nonzero reference count. they
were only supposed to be unlinked if the reference count was exactly
one (that being the reference held by the bucket itself).
2022-04-11 17:29:03 -07:00
Michał Kępień
cab15392af Update BIND version to 9.19.0 v9.19.0 2022-04-11 10:08:24 +02:00
Michał Kępień
cee8e4bf9b Add a CHANGES marker 2022-04-11 10:08:24 +02:00
Michał Kępień
ddb46ecff5 Merge branch 'michal/prepare-documentation-for-bind-9.19.0' into 'v9_19_0-release'
Prepare documentation for BIND 9.19.0

See merge request isc-private/bind9!396
2022-04-11 08:06:22 +00:00
Michał Kępień
8ce52b94f4 Prepare release notes for BIND 9.19.0 2022-04-11 10:05:50 +02:00
Michał Kępień
d43ab7059a Reorder release notes 2022-04-11 10:05:50 +02:00