]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agorevise branch format
Evan Hunt [Thu, 23 Mar 2023 21:05:03 +0000 (14:05 -0700)] 
revise branch format

backport branches are now called "bind-9.x" instead of "v9_x".

3 years agoMerge branch 'ondrej/use-isc_job-and-isc_async-in-netmgr' into 'main'
Ondřej Surý [Fri, 24 Mar 2023 07:59:44 +0000 (07:59 +0000)] 
Merge branch 'ondrej/use-isc_job-and-isc_async-in-netmgr' into 'main'

Convert netmgr netievent to isc_job/isc_async

Closes #3964

See merge request isc-projects/bind9!7714

3 years agoCHANGES for [GL #3964]
Evan Hunt [Fri, 24 Mar 2023 00:51:27 +0000 (17:51 -0700)] 
CHANGES for [GL #3964]

3 years agoRemove the netievent remnants
Ondřej Surý [Thu, 23 Mar 2023 22:56:46 +0000 (23:56 +0100)] 
Remove the netievent remnants

After removing all functional netievents, remove what has been left from
the netievents.  This also includes leftovers from previous refactorings.

3 years agoConvert stopping generic socket children to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 22:52:26 +0000 (23:52 +0100)] 
Convert stopping generic socket children to to isc_async callback

Simplify the stopping of the generic socket children by using the
isc_async API from the loopmgr instead of using the asychronous
netievent mechanism in the netmgr.

3 years agoConvert setting of the TLS contexts to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 22:47:33 +0000 (23:47 +0100)] 
Convert setting of the TLS contexts to to isc_async callback

Simplify the setting of the TLS contexts by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert canceling StreamDNS socket to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 22:34:12 +0000 (23:34 +0100)] 
Convert canceling StreamDNS socket to to isc_async callback

Simplify the canceling of the StreamDNS socket by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert reading from StreamDNS socket to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 22:30:32 +0000 (23:30 +0100)] 
Convert reading from StreamDNS socket to to isc_async callback

Simplify the reading from the StreamDNS socket by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert setting of the DoH endpoints to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 22:20:33 +0000 (23:20 +0100)] 
Convert setting of the DoH endpoints to to isc_async callback

Simplify the setting of the DoH endpoints by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert sending on the DoH socket to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 22:00:21 +0000 (23:00 +0100)] 
Convert sending on the DoH socket to to isc_async callback

Simplify the sending on the DoH socket by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert closing the DoH socket to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 21:56:00 +0000 (22:56 +0100)] 
Convert closing the DoH socket to to isc_async callback

Simplify the closing the DoH socket by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert doing the TLS IO to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 21:52:47 +0000 (22:52 +0100)] 
Convert doing the TLS IO to to isc_async callback

Simplify the doing the TLS IO by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoCleanup already defunct tlsconnect netievent
Ondřej Surý [Thu, 23 Mar 2023 21:48:41 +0000 (22:48 +0100)] 
Cleanup already defunct tlsconnect netievent

The netievent used for TLS connect was already defunct, just cleanup the
cruft.

3 years agoConvert sending on the TLS socket to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 21:46:58 +0000 (22:46 +0100)] 
Convert sending on the TLS socket to to isc_async callback

Simplify the sending on the TLS socket by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert closing the TLS socket to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 21:42:21 +0000 (22:42 +0100)] 
Convert closing the TLS socket to to isc_async callback

Simplify the closing the TLS socket by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert accepting new TCP connection to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 21:37:55 +0000 (22:37 +0100)] 
Convert accepting new TCP connection to to isc_async callback

Simplify the acception the new TCP connection by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert canceling UDP socket to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 21:16:47 +0000 (22:16 +0100)] 
Convert canceling UDP socket to to isc_async callback

Simplify the canceling of the UDP socket by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert stopping TCP children to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 11:34:49 +0000 (12:34 +0100)] 
Convert stopping TCP children to to isc_async callback

Simplify the stopping of the TCP children by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert starting TCP children to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 11:18:18 +0000 (12:18 +0100)] 
Convert starting TCP children to to isc_async callback

Simplify the starting of the TCP children by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert stopping UDP children to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 11:11:04 +0000 (12:11 +0100)] 
Convert stopping UDP children to to isc_async callback

Simplify the stopping of the UDP children by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoConvert starting UDP children to to isc_async callback
Ondřej Surý [Thu, 23 Mar 2023 10:48:04 +0000 (11:48 +0100)] 
Convert starting UDP children to to isc_async callback

Simplify the starting of the UDP children by using the isc_async API
from the loopmgr instead of using the asychronous netievent mechanism in
the netmgr.

3 years agoSimplify netmgr active handles accounting
Ondřej Surý [Thu, 23 Mar 2023 08:47:47 +0000 (09:47 +0100)] 
Simplify netmgr active handles accounting

The active handles accounting was both using atomic counter and ISC_LIST
to keep track of active handles.  Remove the atomic counter that was in
use before the ISC_LIST was added for better tracking of the handles
attached to the socket.

3 years agoConvert netmgr handle detach to synchronous callback
Ondřej Surý [Thu, 23 Mar 2023 07:55:29 +0000 (08:55 +0100)] 
Convert netmgr handle detach to synchronous callback

Instead of calling isc__nmhandle_detach calling
nmhandle_detach_cb() asynchronously when there's closehandle_cb
initialized, convert the closehandle_cb to use isc_job, and make the
isc__nmhandle_detach() to be fully synchronous.

3 years agoConvert netmgr connect, read and send callbacks to isc_job
Ondřej Surý [Thu, 23 Mar 2023 05:56:17 +0000 (06:56 +0100)] 
Convert netmgr connect, read and send callbacks to isc_job

The netmgr connect, read and send callbacks can now only be executed on
the same loop, convert it from asynchronous netievent queue event to
more direct isc_job.

3 years agoMerge branch '3953-remove-delegation-only' into 'main'
Evan Hunt [Thu, 23 Mar 2023 20:21:13 +0000 (20:21 +0000)] 
Merge branch '3953-remove-delegation-only' into 'main'

remove delegation-only and root-delegation only

Closes #3953

See merge request isc-projects/bind9!7713

3 years agorevised CHANGES and release note for [GL #3953]
Evan Hunt [Thu, 23 Mar 2023 00:00:27 +0000 (17:00 -0700)] 
revised CHANGES and release note for [GL #3953]

3 years agoremove {root-}delegation-only
Evan Hunt [Wed, 22 Mar 2023 23:57:54 +0000 (16:57 -0700)] 
remove {root-}delegation-only

complete the removal of the delegation-only and root-delegation-only
options, and the delegation-only zone type.

3 years agoMerge branch '3953-deprecate-delegation-only' into 'main'
Ondřej Surý [Thu, 23 Mar 2023 19:06:10 +0000 (19:06 +0000)] 
Merge branch '3953-deprecate-delegation-only' into 'main'

deprecate delegation-only and root-delegation only

See merge request isc-projects/bind9!7712

3 years agoCHANGES and release note for [GL #3953]
Evan Hunt [Wed, 22 Mar 2023 22:06:58 +0000 (15:06 -0700)] 
CHANGES and release note for [GL #3953]

3 years agodeprecate delegation-only and root-delegation only
Evan Hunt [Wed, 22 Mar 2023 22:01:30 +0000 (15:01 -0700)] 
deprecate delegation-only and root-delegation only

These options and zone type were created to address the
SiteFinder controversy, in which certain TLD's redirected queries
rather than returning NXDOMAIN. since TLD's are now DNSSEC-signed,
this is no longer likely to be a problem.

The deprecation message for 'type delegation-only' is issued from
the configuration checker rather than the parser. therefore,
isccfg_check_namedconf() has been modified to take a 'nodeprecate'
parameter to suppress the warning when named-checkconf is used with
the command-line option to ignore warnings on deprecated options (-i).

3 years agoMerge branch '3960-handle-non-ISC_R_SUCCESS-in-rctx_respinit' into 'main'
Ondřej Surý [Thu, 23 Mar 2023 11:21:33 +0000 (11:21 +0000)] 
Merge branch '3960-handle-non-ISC_R_SUCCESS-in-rctx_respinit' into 'main'

Properly handle ISC_R_SHUTTINGDOWN in resquery_response()

Closes #3960

See merge request isc-projects/bind9!7715

3 years agoProperly handle ISC_R_SHUTTINGDOWN in resquery_response()
Ondřej Surý [Thu, 23 Mar 2023 09:48:39 +0000 (10:48 +0100)] 
Properly handle ISC_R_SHUTTINGDOWN in resquery_response()

When resquery_response() was called with ISC_R_SHUTTINDOWN, the region
argument would be NULL, but rctx_respinit() would try to pass
region->base and region->len to the isc_buffer_init() leading to
a NULL pointer dereference.  Properly handle non-ISC_R_SUCCESS by
ignoring the provided region.

3 years agoMerge branch 'mnowak/adapt-release-tarball-comparison-to-tags-with-dots' into 'main'
Michal Nowak [Wed, 22 Mar 2023 15:07:43 +0000 (15:07 +0000)] 
Merge branch 'mnowak/adapt-release-tarball-comparison-to-tags-with-dots' into 'main'

Adapt release-tarball-comparison.sh to dotted tag notation

See merge request isc-projects/bind9!7698

3 years agoAdapt release-tarball-comparison.sh to dotted tag notation
Michal Nowak [Thu, 16 Mar 2023 11:59:57 +0000 (12:59 +0100)] 
Adapt release-tarball-comparison.sh to dotted tag notation

Recently, the tag notation format changed:

    v9_19_9     -> v9.19.9
    v9_18_13-S1 -> v9.18.13-S1

release-tarball-comparison.sh needs to adapt.

3 years agoMerge branch '3665-dupsigs-test-stability' into 'main'
Tom Krizek [Wed, 22 Mar 2023 09:55:33 +0000 (09:55 +0000)] 
Merge branch '3665-dupsigs-test-stability' into 'main'

Improve dupsigs test stability

Closes #3665

See merge request isc-projects/bind9!7688

3 years agoLighten the CI load during the dupsigs test
Tom Krizek [Mon, 13 Mar 2023 16:45:20 +0000 (17:45 +0100)] 
Lighten the CI load during the dupsigs test

Previously, an AXFR request would be issued every second while waiting
for the zone to be signed. This might've been the cause of issues in CI
where many tests are running in parallel and any extra load may increase
test instability.

Instead, check for the last NSEC record to have a signature before
commencing the AXFR request to check the zone has been fully signed.

Also increase the time for the zone signing to a total of 60+10 seconds
up from the previous 30.

3 years agoEnd dupsigs test early if it fails
Tom Krizek [Mon, 13 Mar 2023 14:16:35 +0000 (15:16 +0100)] 
End dupsigs test early if it fails

There's no point in continuing the dupsigs test if a failure is
detected. End the test early to avoid wasting time and resources.

3 years agoStore dupsigs axfr to a file for easier debugging
Tom Krizek [Tue, 14 Mar 2023 09:33:47 +0000 (10:33 +0100)] 
Store dupsigs axfr to a file for easier debugging

3 years agoRedirect dupsigs test output to proper logger
Tom Krizek [Mon, 13 Mar 2023 14:13:44 +0000 (15:13 +0100)] 
Redirect dupsigs test output to proper logger

Ensure messages from dupsigs system test end up in its log rather than
stdout. Previously, the output was hard to debug when running the tests
in parallel and messages wouldn't end up in the dupsigs.log.

3 years agoMerge branch '3955-hold-catz-reference-during-update' into 'main'
Arаm Sаrgsyаn [Tue, 21 Mar 2023 11:39:46 +0000 (11:39 +0000)] 
Merge branch '3955-hold-catz-reference-during-update' into 'main'

Hold a catz reference while the update process is running

Closes #3955

See merge request isc-projects/bind9!7704

3 years agoAdd a CHANGES note for [GL #3955]
Aram Sargsyan [Tue, 21 Mar 2023 10:06:07 +0000 (10:06 +0000)] 
Add a CHANGES note for [GL #3955]

3 years agoHold a catz reference while the update process is running
Aram Sargsyan [Tue, 21 Mar 2023 09:56:36 +0000 (09:56 +0000)] 
Hold a catz reference while the update process is running

This should delay the catalog zone from being destroyed during
shutdown, if the update process is still running.

Doing this should not introduce significant shutdown delays, as
the update function constantly checks the 'shuttingdown' flag
and cancels the process if it is set.

3 years agoMerge branch 'mnowak/respdiff-drop-allow_failure' into 'main'
Michal Nowak [Fri, 17 Mar 2023 10:08:40 +0000 (10:08 +0000)] 
Merge branch 'mnowak/respdiff-drop-allow_failure' into 'main'

respdiff jobs do not need "allow_failure: true"

See merge request isc-projects/bind9!7681

3 years agorespdiff jobs do not need "allow_failure: true"
Michal Nowak [Mon, 13 Mar 2023 15:46:13 +0000 (16:46 +0100)] 
respdiff jobs do not need "allow_failure: true"

ASAN and TSAN respdiff jobs should be stable and not require
"allow_failure: true" anymore.

3 years agoMerge branch 'each-key-restore-test' into 'main'
Evan Hunt [Fri, 17 Mar 2023 06:09:28 +0000 (06:09 +0000)] 
Merge branch 'each-key-restore-test' into 'main'

add basic test for TSIG key dump/restore functionality

See merge request isc-projects/bind9!7629

3 years agoadd basic test for TSIG key dump/restore functionality
Evan Hunt [Wed, 1 Mar 2023 02:29:38 +0000 (18:29 -0800)] 
add basic test for TSIG key dump/restore functionality

stop and restart the server in the 'tsiggss' test, in order
to confirm that GSS negotiated TSIG keys are saved and restored
when named loads.

added logging to dns_tsigkey_createfromkey() to indicate whether
a key has been statically configured, generated via GSS negotiation,
or restored from a file.

3 years agoMerge branch 'tkrizek/ci-artifacts-1d' into 'main'
Tom Krizek [Thu, 16 Mar 2023 14:04:36 +0000 (14:04 +0000)] 
Merge branch 'tkrizek/ci-artifacts-1d' into 'main'

Use the default retention time for CI artifacts

See merge request isc-projects/bind9!7670

3 years agoUse the default retention time for CI artifacts
Tom Krizek [Thu, 9 Mar 2023 12:33:31 +0000 (13:33 +0100)] 
Use the default retention time for CI artifacts

The instance-wide GitLab CI artifact retention time was changed to 1 day
up from the previous value of 12 hours. Remove our explicit overrides
for 1 day artifact retention time, as it is the default now.

Previously, most of our jobs had overrides for 1 day retention, while
some of our jobs used the default 12 hours. This discrepancy could be
quite impractical at times.

3 years agoMove gitlab-ci.yml comment to its proper place
Tom Krizek [Thu, 9 Mar 2023 12:30:41 +0000 (13:30 +0100)] 
Move gitlab-ci.yml comment to its proper place

The comment refers to "interruptible" key, rather than the entire
"default" section.

3 years agoMerge tag 'v9_19_11'
Tom Krizek [Wed, 15 Mar 2023 17:23:44 +0000 (18:23 +0100)] 
Merge tag 'v9_19_11'

BIND 9.19.11

3 years agoMerge branch 'artem-remove-tlsdns-and-tcpdns-leftouts' into 'main'
Artem Boldariev [Wed, 15 Mar 2023 16:55:07 +0000 (16:55 +0000)] 
Merge branch 'artem-remove-tlsdns-and-tcpdns-leftouts' into 'main'

Delete old TLS DNS and TCP DNS dead code

See merge request isc-projects/bind9!7689

3 years agoDelete old TLS DNS and TCP DNS dead code
Artem Boldariev [Wed, 15 Mar 2023 15:08:11 +0000 (17:08 +0200)] 
Delete old TLS DNS and TCP DNS dead code

This commit removes old, unused TLS DNS and TCP DNS definitions from
the code. They should have been deleted earlier, but that was missed.

3 years agoMerge branch '3937-zone-sign-kasp' into 'main'
Mark Andrews [Tue, 14 Mar 2023 13:16:37 +0000 (13:16 +0000)] 
Merge branch '3937-zone-sign-kasp' into 'main'

Resolve "NSEC records aren't signed with both configured algorithms during NSEC3->NSEC transition"

Closes #3937

See merge request isc-projects/bind9!7682

3 years agoAdd CHANGES for [GL #3937]
Mark Andrews [Tue, 14 Mar 2023 02:32:47 +0000 (13:32 +1100)] 
Add CHANGES for [GL #3937]

3 years agoWhen signing with a new algorithm preserve NSEC/NSEC3 chains
Mark Andrews [Tue, 14 Mar 2023 02:13:14 +0000 (13:13 +1100)] 
When signing with a new algorithm preserve NSEC/NSEC3 chains

If the zone already has existing NSEC/NSEC3 chains then zone_sign
needs to continue to use them.  If there are no chains then use
kasp setting otherwise generate an NSEC chain.

3 years agoMerge branch '3928-placeholder' into 'main'
Arаm Sаrgsyаn [Tue, 14 Mar 2023 09:58:24 +0000 (09:58 +0000)] 
Merge branch '3928-placeholder' into 'main'

Add a CHANGES placeholder for [GL #3928]

See merge request isc-projects/bind9!7684

3 years agoAdd a CHANGES placeholder for [GL #3928]
Aram Sargsyan [Mon, 13 Mar 2023 13:39:02 +0000 (13:39 +0000)] 
Add a CHANGES placeholder for [GL #3928]

3 years agoMerge branch '3939-insufficient-information-to-identify-key' into 'main'
Mark Andrews [Tue, 14 Mar 2023 03:09:25 +0000 (03:09 +0000)] 
Merge branch '3939-insufficient-information-to-identify-key' into 'main'

Resolve "Insufficient information to identify key"

Closes #3939

See merge request isc-projects/bind9!7676

3 years agoReport key name when removing it
Mark Andrews [Mon, 13 Mar 2023 02:56:42 +0000 (13:56 +1100)] 
Report key name when removing it

3 years agoAdd ISC_FORMAT_PRINTF to report's declaration
Mark Andrews [Mon, 13 Mar 2023 02:48:20 +0000 (13:48 +1100)] 
Add ISC_FORMAT_PRINTF to report's declaration

dns_dnssec_updatekeys's 'report' could be called with invalid arguments
which the compiler should be be able to detect.

3 years agoMerge branch '3924-dnstap-test-timing-issue' into 'main'
Arаm Sаrgsyаn [Mon, 13 Mar 2023 11:48:19 +0000 (11:48 +0000)] 
Merge branch '3924-dnstap-test-timing-issue' into 'main'

Resolve "missing messages in `dnstap` system test after query failure"

Closes #3924

See merge request isc-projects/bind9!7674

3 years agoImprove dnstap system test reliability
Aram Sargsyan [Fri, 10 Mar 2023 11:07:13 +0000 (11:07 +0000)] 
Improve dnstap system test reliability

The dnstap system test fails intermittently, and it appears to be
a timing issue - adding a short delay after running 'fstrm_capture',
and before running 'dnstap -reopen' improves the situation from
50% failures (5 out of 10 times) to 0% failures (0 out of 20 times),
tested locally.

The reason is that 'fstrm_capture' is executed in the background,
and due to OS scheduling and other factors, the listener socket
may not be ready when the following command runs and tells 'named'
to (re)open it.

3 years agoMerge branch 'ondrej-userspace-rcu-github-actions' into 'main'
Ondřej Surý [Sat, 11 Mar 2023 04:05:57 +0000 (04:05 +0000)] 
Merge branch 'ondrej-userspace-rcu-github-actions' into 'main'

Install liburcu-dev to GitHub Actions

See merge request isc-projects/bind9!7675

3 years agoInstall liburcu-dev to GitHub Actions
Ondřej Surý [Sat, 11 Mar 2023 04:03:54 +0000 (05:03 +0100)] 
Install liburcu-dev to GitHub Actions

The CodeQL and SonarCloud GitHub Actions would FTBFS because of missing
liburcu-dev package resulting.  Install the required package to both
GitHub Action files.

3 years agoMerge branch 'fanf-urcu' into 'main'
Ondřej Surý [Fri, 10 Mar 2023 19:21:45 +0000 (19:21 +0000)] 
Merge branch 'fanf-urcu' into 'main'

Build with liburcu, userspace RCU

Closes #3935

See merge request isc-projects/bind9!7662

3 years agoCHANGES and release notes for [GL #3935]
Tony Finch [Wed, 8 Mar 2023 19:22:27 +0000 (19:22 +0000)] 
CHANGES and release notes for [GL #3935]

[func] BIND now requires liburcu for lock-free data structures
and concurrent safe memory reclamation. It replaces the
home-grown lock-free linked list and QSBR machinery
added in changes 6108 and 6109. The qp-trie code has
been adjusted to use liburcu.

3 years agoApply adjusted clang-format
Tony Finch [Wed, 8 Mar 2023 19:25:34 +0000 (19:25 +0000)] 
Apply adjusted clang-format

The headers were slightly reordered when liburcu was added.

3 years agoBuild with liburcu, Userspace RCU
Ondřej Surý [Tue, 7 Mar 2023 14:13:03 +0000 (15:13 +0100)] 
Build with liburcu, Userspace RCU

BIND needs a collection of standard lock-free data structures,
which we can find in liburcu, along with its RCU safe memory
reclamation machinery. We will use liburcu's QSBR variant instead
of the home-grown isc_qsbr.

3 years agoMerge branch 'aram/fix-ISC_REFCOUNT_TRACE_IMPL-usage' into 'main'
Arаm Sаrgsyаn [Thu, 9 Mar 2023 22:40:44 +0000 (22:40 +0000)] 
Merge branch 'aram/fix-ISC_REFCOUNT_TRACE_IMPL-usage' into 'main'

Fix ISC_REFCOUNT_TRACE_IMPL usage

See merge request isc-projects/bind9!7673

3 years agoFix ISC_REFCOUNT_TRACE_IMPL usage
Aram Sargsyan [Thu, 9 Mar 2023 21:38:04 +0000 (21:38 +0000)] 
Fix ISC_REFCOUNT_TRACE_IMPL usage

ISC_REFCOUNT_TRACE_IMPL uses isc_tid(), but the corresponding header
file is not included, which breaks, for example, compiling BIND with
DNS_CATZ_TRACE defined in lib/dns/include/dns/catz.h.

Add '#include <isc/tid.h>' in lib/isc/include/isc/refcount.h.

3 years agoMerge branch 'mnowak/stress-test-drop-parallel-build' into 'main'
Michal Nowak [Thu, 9 Mar 2023 17:31:33 +0000 (17:31 +0000)] 
Merge branch 'mnowak/stress-test-drop-parallel-build' into 'main'

Drop parallel build from stress tests

See merge request isc-projects/bind9!7669

3 years agoDrop parallel build from stress tests
Michal Nowak [Thu, 9 Mar 2023 10:10:53 +0000 (11:10 +0100)] 
Drop parallel build from stress tests

BUILD_PARALLEL_JOBS environmental variable is set to 6, which does not
align well with 4 and 8 CPU core systems dedicated to CI "stress" tests.
When multiple parallel jobs run on the host, they compete for resources
with an undesirable result: 6 compiler processes of one job may starve
named, resulting in lower-than-expected throughput and minutes-long
query response latency spikes.

Better drop the build parallelism of BIND-under-test. About 1-2 minutes
are added to the 60-65 minutes long job duration.

3 years agoMerge branch 'mnowak/update-release-tarball-comparison.sh' into 'main'
Michal Nowak [Thu, 9 Mar 2023 16:05:20 +0000 (16:05 +0000)] 
Merge branch 'mnowak/update-release-tarball-comparison.sh' into 'main'

Adapt tarball comparison to dropped pregenerated man pages

See merge request isc-projects/bind9!7661

3 years agoAdapt tarball comparison to dropped pregenerated man pages
Michal Nowak [Tue, 7 Mar 2023 18:42:19 +0000 (19:42 +0100)] 
Adapt tarball comparison to dropped pregenerated man pages

Since pregenerated manual pages were removed from the BIND 9 repository,
Sphinx must be present in the build environment for manual pages to be
created and placed to release tarball. release-tarball-comparison.sh
script needs to be adapted to keep up with how to release tarballs are
prepared.

3 years agoMerge branch '3923-doth-system-test-timing-issue' into 'main'
Arаm Sаrgsyаn [Thu, 9 Mar 2023 10:39:14 +0000 (10:39 +0000)] 
Merge branch '3923-doth-system-test-timing-issue' into 'main'

Resolve "timing issue with incoming XoT check in `doth` system test"

Closes #3923

See merge request isc-projects/bind9!7653

3 years agoRetry multiple times in doth test when checking if the zone file exists
Aram Sargsyan [Tue, 7 Mar 2023 14:12:10 +0000 (14:12 +0000)] 
Retry multiple times in doth test when checking if the zone file exists

Dumping of the freshly transferred zone file can take some time.

Retry 5 times before failing.

The log excerpt below shows such a case, when dumping lasted more than
two seconds.

    06-Mar-2023 09:32:09.973 zone example6/IN: Transfer started.
    06-Mar-2023 09:32:10.301 zone example6/IN: zone transfer finished: success
    06-Mar-2023 09:32:10.301 zone_dump: zone example6/IN: enter
    06-Mar-2023 09:32:11.789 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): AXFR request
    06-Mar-2023 09:32:11.801 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): transfer of 'example6/IN': AXFR ended: 5 messages, 2676 records, 55815 bytes, 0.011 secs (5074090 bytes/sec) (serial 1397051952)
    06-Mar-2023 09:32:12.409 zone_gotwritehandle: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 dump_done: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 zone_journal_compact: zone example6/IN: target journal size 53044

3 years agoFix the placement of printing dig output comments in doth system test
Aram Sargsyan [Tue, 7 Mar 2023 14:08:52 +0000 (14:08 +0000)] 
Fix the placement of printing dig output comments in doth system test

There can be comments in dig output for a zone transfer only in case
of an error, so we should print those errors not when wait_for_tls_xfer
succeeds, but when it fails.

Also, there is no point in printing those comments when a failure was
indeed expected.

3 years agoFail early in doth system test when the expected failure doesn't happen
Aram Sargsyan [Tue, 7 Mar 2023 14:03:35 +0000 (14:03 +0000)] 
Fail early in doth system test when the expected failure doesn't happen

If wait_for_tls_xfer succeeds, while a failure was being expected,
set ret=1 to fail without further checking if the zone file exists.

3 years agoMerge branch 'mnowak/stress-test-build-with-default-CFLAGS' into 'main'
Michal Nowak [Thu, 9 Mar 2023 09:58:05 +0000 (09:58 +0000)] 
Merge branch 'mnowak/stress-test-build-with-default-CFLAGS' into 'main'

Build BIND in stress test jobs with common CFLAGS

See merge request isc-projects/bind9!7627

3 years agoBuild BIND in stress test jobs with common CFLAGS
Michal Nowak [Tue, 28 Feb 2023 16:49:43 +0000 (17:49 +0100)] 
Build BIND in stress test jobs with common CFLAGS

By omission, BIND was not built with common CFLAGS in the stress test
jobs. Building with common CFLAGS and -Og should help GDB produce a
backtrace with more information.

3 years agoMerge branch '3929-gcc-12-static-analyzer-use-of-uninitialized-value-ctx-val-1-in...
Mark Andrews [Wed, 8 Mar 2023 23:01:12 +0000 (23:01 +0000)] 
Merge branch '3929-gcc-12-static-analyzer-use-of-uninitialized-value-ctx-val-1-in-base32-c' into 'main'

Resolve "GCC 12 static analyzer: use of uninitialized value '*ctx.val[1]' in base32.c"

Closes #3929

See merge request isc-projects/bind9!7655

3 years agoSilence uninitialized value false positives
Mark Andrews [Wed, 8 Mar 2023 04:16:44 +0000 (15:16 +1100)] 
Silence uninitialized value false positives

In base32_decode_char the GCC 12 static analyser fails to determine
that ctx->val[1], ctx->val[3], ctx->val[4] and ctx->val[6] are
assigned values by the previous call to base32_decode_char.  Initialise
ctx->val to zeros when initalising the rest of ctx to silence the
false positive.

3 years agoMerge branch '3932-gcc-12-static-analyzer-warning-use-of-null-_frm-where-non-null...
Mark Andrews [Wed, 8 Mar 2023 22:36:19 +0000 (22:36 +0000)] 
Merge branch '3932-gcc-12-static-analyzer-warning-use-of-null-_frm-where-non-null-expected-in-cc-c' into 'main'

Resolve "GCC 12 static analyzer: warning: use of NULL '_frm' where non-null expected in cc.c"

Closes #3932

See merge request isc-projects/bind9!7658

3 years agoSilence GCC 12 NULL pointer dereference warnings
Mark Andrews [Wed, 8 Mar 2023 05:53:37 +0000 (16:53 +1100)] 
Silence GCC 12 NULL pointer dereference warnings

When isccc_cc_lookupstring returns ISC_R_SUCCESS the returned pointer
is non NULL.  Add INSISTS do that GCC 12 can determine this.

3 years agoMerge branch '3931-gcc-12-static-analyzer-warning-use-of-uninitialized-value-svcb...
Mark Andrews [Wed, 8 Mar 2023 22:07:46 +0000 (22:07 +0000)] 
Merge branch '3931-gcc-12-static-analyzer-warning-use-of-uninitialized-value-svcb-svclen-in-rdata-c' into 'main'

Resolve "GCC 12 static analyzer: warning: use of uninitialized value 'svcb.svclen' in rdata.c"

Closes #3931

See merge request isc-projects/bind9!7657

3 years agoAdd additional contraints to dns_rdata_checksvcb
Mark Andrews [Wed, 8 Mar 2023 05:38:11 +0000 (16:38 +1100)] 
Add additional contraints to dns_rdata_checksvcb

REQUIRE that rdata->type is dns_rdatatype_svcb to detect when
dns_rdata_checksvcb is called with the wrong rdata type.  There are
no code paths that currently pass the wrong rdata to dns_rdata_checksvcb.

This was found by GCC 12 static analysis.

3 years agoMerge branch '3925-serve-stale-system-test-failure' into 'main'
Matthijs Mekking [Wed, 8 Mar 2023 16:34:46 +0000 (16:34 +0000)] 
Merge branch '3925-serve-stale-system-test-failure' into 'main'

Lower chance of intermittent serve-stale system test failure

Closes #3925

See merge request isc-projects/bind9!7659

3 years agoUpdate serve-stale system test
Matthijs Mekking [Wed, 8 Mar 2023 08:11:19 +0000 (09:11 +0100)] 
Update serve-stale system test

The serve-stale system test was intermittently failing due to a timing
issue:

    I:serve-stale:check stale data.example TXT was refreshed...
    I:serve-stale:failed

The RRset is refreshed, however, it first checks for an expected log
line, prior checking that the stale data.example TXT was refreshed
(using dig). This log line is there to ensure the record is actually
refreshed before we start querying again. Alternatively we could just
retry_quiet 10 <wait for dig output matches expectations>. It would
lower the chances for intermittent test failures, since there is no
longer a "check for log line, sleep one second if check fails, check
for log line, ...", prior to the check.

3 years agoMerge branch 'tt-openssl-dh-refactoring' into 'main'
Ondřej Surý [Wed, 8 Mar 2023 15:13:20 +0000 (15:13 +0000)] 
Merge branch 'tt-openssl-dh-refactoring' into 'main'

Refactor OpenSSL EDDSA code

See merge request isc-projects/bind9!7429

3 years agoConvert OpenSSL EDDSA glue to pkeypair
Timo Teräs [Sat, 28 Jan 2023 19:14:39 +0000 (21:14 +0200)] 
Convert OpenSSL EDDSA glue to pkeypair

Finish the OpenSSL EDSSA glue refactoring to use pkeypair - this is the
same change that has been already applied to RSA and ECDSA glues.

3 years agoOpenSSL EDDSA introduce and use openssleddsa_alg_info()
Timo Teräs [Sat, 28 Jan 2023 10:53:14 +0000 (12:53 +0200)] 
OpenSSL EDDSA introduce and use openssleddsa_alg_info()

Move the common code into a helper function that returns the EDDSA
parameters (pkey type, nid, keysize, sigsize).

3 years agoRemove redundant NULL checks in OpenSSL RSA glue
Timo Teräs [Thu, 26 Jan 2023 14:21:00 +0000 (16:21 +0200)] 
Remove redundant NULL checks in OpenSSL RSA glue

The OpenSSL free functions are no-op when called with NULL argument,
thus remove the extra checks around *_free() calls in the OpenSSL RSA
glue.

3 years agoIntroduce dst__openssl_keypair_{compare,isprivate,destroy}
Timo Teräs [Thu, 26 Jan 2023 14:11:07 +0000 (16:11 +0200)] 
Introduce dst__openssl_keypair_{compare,isprivate,destroy}

Rename and simplify dst__openssl_compare_keypair() to
dst__openssl_keypair_compare(), and introduce two additional functions
dst__openssl_keypair_isprivate and dst__openssl_keypair_destroy.

Use those to de-duplicated openssl{rsa,ecdsa}_isprivate, and
openssl{rsa,ecdsa}_destroy.

3 years agoMerge branch 'fanf-libbind9-remnants' into 'main'
Tony Finch [Wed, 8 Mar 2023 12:04:35 +0000 (12:04 +0000)] 
Merge branch 'fanf-libbind9-remnants' into 'main'

Remove some lingering references to libbind9

See merge request isc-projects/bind9!7660

3 years agoRemove some lingering references to libbind9
Tony Finch [Wed, 8 Mar 2023 10:06:22 +0000 (10:06 +0000)] 
Remove some lingering references to libbind9

Clean up the `.clang-format` #include priority list and
the `\file` declaration in `isc/getaddresses.h`.

3 years agoMerge branch '3905-remove-TKEY-Diffie-Hellman-exchange' into 'main'
Ondřej Surý [Wed, 8 Mar 2023 07:57:52 +0000 (07:57 +0000)] 
Merge branch '3905-remove-TKEY-Diffie-Hellman-exchange' into 'main'

Remove TKEY Mode 2 (Diffie-Hellman)

Closes #3905

See merge request isc-projects/bind9!7626

3 years agoAdd CHANGES and release note for [GL #3905]
Ondřej Surý [Tue, 28 Feb 2023 15:26:31 +0000 (16:26 +0100)] 
Add CHANGES and release note for [GL #3905]

3 years agofurther cleanup after removing diffie-hellman TKEY mode
Evan Hunt [Tue, 28 Feb 2023 23:28:29 +0000 (15:28 -0800)] 
further cleanup after removing diffie-hellman TKEY mode

without diffie-hellman TKEY negotiation, some other code is
now effectively dead or unnecessary, and can be cleaned up:

- the rndc tsig-list and tsig-delete commands.
- a nonoperational command-line option to dnssec-keygen that
  was documented as being specific to DH.
- the section of the ARM that discussed TKEY/DH.
- the functions dns_tkey_builddeletequery(), processdeleteresponse(),
  and tkey_processgssresponse(), which are unused.

3 years agoRemove TKEY Mode 2 (Diffie-Hellman)
Ondřej Surý [Tue, 28 Feb 2023 15:05:34 +0000 (16:05 +0100)] 
Remove TKEY Mode 2 (Diffie-Hellman)

Completely remove the TKEY Mode 2 (Diffie-Hellman Exchanged Keying) from
BIND 9 (from named, named.conf and all the tools).  The TKEY usage is
fringe at best and in all known cases, GSSAPI is being used as it should.

The draft-eastlake-dnsop-rfc2930bis-tkey specifies that:

    4.2 Diffie-Hellman Exchanged Keying (Deprecated)

       The use of this mode (#2) is NOT RECOMMENDED for the following two
       reasons but the specification is still included in Appendix A in case
       an implementation is needed for compatibility with old TKEY
       implementations. See Section 4.6 on ECDH Exchanged Keying.

          The mixing function used does not meet current cryptographic
          standards because it uses MD5 [RFC6151].

          RSA keys must be excessively long to achieve levels of security
          required by current standards.

We might optionally implement Elliptic Curve Diffie-Hellman (ECDH) key
exchange mode 6 if the draft ever reaches the RFC status.  Meanwhile the
insecure DH mode needs to be removed.

3 years agoMerge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.12' into 'main'
Tom Krizek [Tue, 7 Mar 2023 16:35:33 +0000 (16:35 +0000)] 
Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.12' into 'main'

Set up version and release notes for BIND 9.19.12

See merge request isc-projects/bind9!7650