]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
19 months agoGenerate changelog to stdout
Nicki Křížek [Tue, 24 Sep 2024 12:04:16 +0000 (14:04 +0200)] 
Generate changelog to stdout

Since the changes aren't tracked in the single changelog.rst file,
generate the changelog to stdout instead, so it can be easily redirected
to the proper file.

19 months agoTrack changes in separate files
Nicki Křížek [Tue, 24 Sep 2024 11:59:56 +0000 (13:59 +0200)] 
Track changes in separate files

Keep the changelog for each version in a separate source file to avoid
rebase conflicts when handling the -S version.

19 months agochg: dev: Use libuv functions to get memory available to BIND 9
Ondřej Surý [Tue, 24 Sep 2024 13:51:55 +0000 (13:51 +0000)] 
chg: dev: Use libuv functions to get memory available to BIND 9

This change uses uv_get_available_memory() if available with fallback
to uv_get_constrained_memory() with fallback to uv_get_total_memory().

Merge branch 'ondrej/use-uv_get_available_memory' into 'main'

See merge request isc-projects/bind9!9527

19 months agoUse libuv functions to get memory available to BIND 9
Ondřej Surý [Fri, 20 Sep 2024 07:10:20 +0000 (09:10 +0200)] 
Use libuv functions to get memory available to BIND 9

This change uses uv_get_total_memory() to get the memory available to
BIND 9 with possible modification by uv_get_constrained_memory() if the
libuv version is recent enough to honour constraints created by
f.e. cgroups.

19 months agochg: ci: Increase the load TCP/DoT shotgun perf tests
Nicki Křížek [Tue, 24 Sep 2024 11:15:12 +0000 (11:15 +0000)] 
chg: ci: Increase the load TCP/DoT shotgun perf tests

Due to the recent improvements to the TCP processing, much higher loads
can be handled by BIND9 without causing client timeouts. The updated
parameters give us useful data for both cold and hot cache testing.

Merge branch 'nicki/increase-tcp-dot-shotgun-load' into 'main'

See merge request isc-projects/bind9!9494

19 months agoIncrease the load TCP/DoT shotgun perf tests
Nicki Křížek [Thu, 12 Sep 2024 13:11:31 +0000 (15:11 +0200)] 
Increase the load TCP/DoT shotgun perf tests

Due to the recent improvements to the TCP processing, much higher loads
can be handled by BIND9 without causing client timeouts. The updated
parameters give us useful data for both cold and hot cache testing.

19 months agofix: test: Check read value in upforwd/ans4
Mark Andrews [Tue, 24 Sep 2024 07:26:27 +0000 (07:26 +0000)] 
fix: test: Check read value in upforwd/ans4

The ans4 server wasn't shutting down cleanly sometimes.  Check that read returns the
expected value for the message length or exit read loop.

Closes #4301

Merge branch '4301-check-read-value-in-ans4' into 'main'

See merge request isc-projects/bind9!9537

19 months agoCheck read value in upforwd/ans4
Mark Andrews [Mon, 23 Sep 2024 04:56:54 +0000 (14:56 +1000)] 
Check read value in upforwd/ans4

The ans4 server wasn't shutting down cleanly sometimes.  Check that
read returns the expected value for the message length or exit read
loop.

19 months agochg: test: Downgrade "timeout" and "attempts" arguments in shutdown
Michal Nowak [Mon, 23 Sep 2024 15:39:16 +0000 (15:39 +0000)] 
chg: test: Downgrade "timeout" and "attempts" arguments in shutdown

The shutdown system test sends queries when named is shutting down, not
in an attempt to get answers but to destabilize the server into a crash.
With isctest.query.udp() defaulting to try up to ten times with a
ten-second timeout to get a response we don't care about from a likely
terminated server, we make the test run much longer than needed because
of retries and long timeouts.

Also, see isc-projects/bind9#4943.

Merge branch 'mnowak/shutdown-downgrade-timeout-and-attempts-arguments' into 'main'

See merge request isc-projects/bind9!9507

19 months agoPrint correct udp/tcp function name in generic_query()
Michal Nowak [Mon, 16 Sep 2024 12:43:22 +0000 (14:43 +0200)] 
Print correct udp/tcp function name in generic_query()

19 months agoDowngrade "timeout" and "attempts" arguments in shutdown
Michal Nowak [Mon, 16 Sep 2024 12:55:06 +0000 (14:55 +0200)] 
Downgrade "timeout" and "attempts" arguments in shutdown

The shutdown system test sends queries when named is shutting down, not
in an attempt to get answers but to destabilize the server into a crash.
With isctest.query.udp() defaulting to try up to ten times with a
ten-second timeout to get a response we don't care about from a likely
terminated server, we make the test run much longer than needed because
of retries and long timeouts.

19 months agochg: ci: Exclude some RPZ files from long stress test artifacts
Michal Nowak [Mon, 23 Sep 2024 11:20:10 +0000 (11:20 +0000)] 
chg: ci: Exclude some RPZ files from long stress test artifacts

This fixes 6f868853049769cd4c327acf32a8c1a7320daa06, that excluded files
only from short stress tests.

Validation jobs:
- [x] short - [#4756989](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4756989/artifacts/browse/output/ns4/) -
- [x] long - [#4757196](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4757196/artifacts/browse/output/ns4/)

Merge branch 'mnowak/exclude-some-rpz-files-from-long-stress-tests-artifacts' into 'main'

See merge request isc-projects/bind9!9522

19 months agoExclude some RPZ files from long stress test artifacts
Michal Nowak [Thu, 19 Sep 2024 09:26:53 +0000 (11:26 +0200)] 
Exclude some RPZ files from long stress test artifacts

This fixes 6f868853049769cd4c327acf32a8c1a7320daa06, that excluded files
only from short stress tests.

19 months agochg: dev: Use uv_available_parallelism() if available
Ondřej Surý [Sat, 21 Sep 2024 11:31:26 +0000 (11:31 +0000)] 
chg: dev: Use uv_available_parallelism() if available

Instead of cooking up our own code for getting the number of available
CPUs for named to use, make use of uv_available_parallelism() from
libuv >= 1.44.0.

Merge branch 'ondrej/use-uv_available_parallelism-if-available' into 'main'

See merge request isc-projects/bind9!9524

19 months agoAdd support to read number of online CPUs on OpenBSD
Ondřej Surý [Fri, 20 Sep 2024 06:53:01 +0000 (08:53 +0200)] 
Add support to read number of online CPUs on OpenBSD

The OpenBSD doesn't have sysctlbyname(), but sysctl() can be used to
read the number of online/available CPUs by reading following MIB(s):
[CTL_HW, HW_NCPUONLINE] with fallback to [CTL_HW, HW_NCPU].

19 months agoCleanup the sysctlbyname and friends configure checks and ifdefs
Ondřej Surý [Fri, 20 Sep 2024 06:45:46 +0000 (08:45 +0200)] 
Cleanup the sysctlbyname and friends configure checks and ifdefs

Cleanup various checks and cleanups that are available on the all
platforms like sysctlbyname() and various related <sys/*.h> headers
that are either defined in POSIX or available on Linux and all BSDs.

19 months agoUse uv_available_parallelism() if available
Ondřej Surý [Thu, 19 Sep 2024 15:58:19 +0000 (17:58 +0200)] 
Use uv_available_parallelism() if available

Instead of cooking up our own code for getting the number of available
CPUs for named to use, make use of uv_available_parallelism() from
libuv >= 1.44.0.

19 months agofix: usr: Fix long-running incoming transfers
Ondřej Surý [Sat, 21 Sep 2024 08:52:38 +0000 (08:52 +0000)] 
fix: usr: Fix long-running incoming transfers

Incoming transfers that took longer than 30 seconds would stop reading from the TCP stream and the incoming transfer would be indefinitely stuck causing BIND 9 to hang during shutdown.

This has been fixed and the `max-transfer-time-in` and `max-transfer-idle-in` timeouts are now honoured.

Closes #4949

Merge branch '4949-fix-ignored-and-invalid-dispatch-timeout-in-dns_xfrin' into 'main'

See merge request isc-projects/bind9!9531

19 months agoDon't enable timeouts in dns_dispatch for incoming transfers
Ondřej Surý [Fri, 20 Sep 2024 13:13:09 +0000 (15:13 +0200)] 
Don't enable timeouts in dns_dispatch for incoming transfers

The dns_dispatch_add() call in the dns_xfrin unit had hardcoded 30
second limit.  This meant that any incoming transfer would be stopped in
it didn't finish within 30 seconds limit.  Additionally, dns_xfrin
callback was ignoring the return value from dns_dispatch_getnext() when
restarting the reading from the TCP stream; this could cause transfers
to get stuck waiting for a callback that would never come due to the
dns_dispatch having already been shut down.

Call the dns_dispatch_add() without a timeout and properly handle the
result code from the dns_dispatch_getnext().

19 months agoModify dns_dispatch API to accept zero timeout
Ondřej Surý [Fri, 20 Sep 2024 13:13:09 +0000 (15:13 +0200)] 
Modify dns_dispatch API to accept zero timeout

The dns_dispatch_add() has timeout parameter that could not be 0 (for
not timeout).  Modify the dns_dispatch implementation to accept a zero
timeout for cases where the timeouts are undesirable because they are
managed externally.

19 months agochg: ci: Update code formatting
Ondřej Surý [Sat, 21 Sep 2024 07:16:00 +0000 (07:16 +0000)] 
chg: ci: Update code formatting

Merge branch 'nicki/update-code-format' into 'main'

See merge request isc-projects/bind9!9533

19 months agoIgnore clang-format reformatting commit
Nicki Křížek [Fri, 20 Sep 2024 14:52:21 +0000 (16:52 +0200)] 
Ignore clang-format reformatting commit

19 months agoFix arguments-renamed pylint issue in iscconf.py
Nicki Křížek [Fri, 20 Sep 2024 14:09:33 +0000 (16:09 +0200)] 
Fix arguments-renamed pylint issue in iscconf.py

The argument name was different in the base class.

19 months agoUpdate code formatting
Nicki Křížek [Fri, 20 Sep 2024 14:06:55 +0000 (16:06 +0200)] 
Update code formatting

clang 19 was updated in the base image.

19 months agochg: dev: Restore the number of threadpool threads back to original value
Nicki Křížek [Fri, 20 Sep 2024 14:47:24 +0000 (14:47 +0000)] 
chg: dev: Restore the number of threadpool threads back to original value

The issue of long-running operations potentially blocking query resolution has been fixed. Revert this temporary workaround and restore the number of threadpool threads.

Related #4898

Merge branch '4898-remove-workaround-and-note' into 'main'

See merge request isc-projects/bind9!9530

19 months agoRemove fixed known issue [GL #4898]
Nicki Křížek [Fri, 20 Sep 2024 12:31:57 +0000 (14:31 +0200)] 
Remove fixed known issue [GL #4898]

19 months agoRevert "Double the number of threadpool threads"
Nicki Křížek [Fri, 20 Sep 2024 12:31:25 +0000 (14:31 +0200)] 
Revert "Double the number of threadpool threads"

This reverts commit 6857df20a40f4e05f465a7a3f5d24eeedce8fc6c.

19 months agochg: doc: Update sphinx to 7.4.7
Nicki Křížek [Fri, 20 Sep 2024 12:02:32 +0000 (12:02 +0000)] 
chg: doc: Update sphinx to 7.4.7

Merge branch 'nicki/update-sphinx' into 'main'

See merge request isc-projects/bind9!9529

19 months agoUpdate sphinx to 7.4.7
Nicki Křížek [Fri, 20 Sep 2024 12:01:03 +0000 (14:01 +0200)] 
Update sphinx to 7.4.7

20 months agonew: usr: Log query response status to the query log
Mark Andrews [Thu, 19 Sep 2024 23:09:07 +0000 (23:09 +0000)] 
new: usr: Log query response status to the query log

Log a query response summary using the new category `responses`.  Logging can be controlled by the option `responselog` and `rndc responselog`.

Closes #459

Merge branch '459-log-query-response-status' into 'main'

See merge request isc-projects/bind9!9449

20 months agoDocument 'responselog' in the ARM
Mark Andrews [Thu, 6 Jun 2024 01:53:55 +0000 (11:53 +1000)] 
Document 'responselog' in the ARM

20 months agoCheck responselog behaviour
Mark Andrews [Wed, 19 Jun 2019 07:40:21 +0000 (17:40 +1000)] 
Check responselog behaviour

Extends the resolver system test to to check whether responses are
logged to the query log in addition to the queries.

20 months agoMove common flags logging to shared functions
Petr Menšík [Wed, 6 Oct 2021 11:53:33 +0000 (13:53 +0200)] 
Move common flags logging to shared functions

Query and response log shares the same flags. Move flags logging out of
log_query to share it with log_response. Use buffer instead of snprintf
to fill flags a bit faster.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
20 months agoMake responselog flags similar to querylog
Petr Menšík [Tue, 13 Jul 2021 18:12:11 +0000 (20:12 +0200)] 
Make responselog flags similar to querylog

Remove answer flag from log, log instead count of records for each
message section. Include EDNS version and few flags of response. Add
also status of result.

Still does not include body of responses rrset.

20 months agoReduce code duplication
Evan Hunt [Thu, 15 Jul 2021 01:54:01 +0000 (18:54 -0700)] 
Reduce code duplication

combined named_server_togglequerylog() and
named_server_toggleresponselog() into named_server_setortoggle().

20 months agoLog the rcode returned to for a query
Mark Andrews [Wed, 19 Jun 2019 06:20:24 +0000 (16:20 +1000)] 
Log the rcode returned to for a query

Log to the querylog the rcode of a previous query using
the identifier 'response:' to diffenciate queries from
responses.

20 months agochg: minor cleanup in qpcache
Evan Hunt [Thu, 19 Sep 2024 21:42:33 +0000 (21:42 +0000)] 
chg: minor cleanup in qpcache

when the QP cache was adapted from the RBTDB, some variable names weren't changed, and still incorrectly reference the RBT.

Merge branch 'each-qpcache-nits' into 'main'

See merge request isc-projects/bind9!9515

20 months agorename 'rbtiterator' and similar names in qpcache
Evan Hunt [Sat, 14 Sep 2024 02:26:54 +0000 (19:26 -0700)] 
rename 'rbtiterator' and similar names in qpcache

when the QP cache was adapted from the RBT database, some names
weren't changed. this could be confusing, so let's change them now.
also, we no longer need to include rbt.h.

20 months agoMerge tag 'v9.21.1'
Nicki Křížek [Wed, 18 Sep 2024 16:02:41 +0000 (18:02 +0200)] 
Merge tag 'v9.21.1'

20 months agorem: usr: Remove DNSRPS implementation from the open-source version
Ondřej Surý [Wed, 18 Sep 2024 15:39:40 +0000 (15:39 +0000)] 
rem: usr: Remove DNSRPS implementation from the open-source version

DNSRPS was the API for a commercial implementation of Response-Policy
Zones that was supposedly better.  However, it was never open-sourced
and has only ever been available from a single vendor.  This goes against
the principle that the open-source edition of BIND 9 should contain only
features that are generally available and universal.

This commit removes the DNSRPS implementation from BIND 9.  It may be
reinstated in the subscription edition if there's enough interest from
customers, but it would have to be rewritten as a plugin (hook) instead
of hard-wiring it again in so many places.

Merge branch 'ondrej/remove-DNSRPS-from-open-source-edition' into 'main'

See merge request isc-projects/bind9!9358

20 months agoRemove DNSRPS implementation
Ondřej Surý [Mon, 19 Aug 2024 15:19:21 +0000 (17:19 +0200)] 
Remove DNSRPS implementation

DNSRPS was the API for a commercial implementation of Response-Policy
Zones that was supposedly better.  However, it was never open-sourced
and has only ever been available from a single vendor.  This goes against
the principle that the open-source edition of BIND 9 should contain only
features that are generally available and universal.

This commit removes the DNSRPS implementation from BIND 9.  It may be
reinstated in the subscription edition if there's enough interest from
customers, but it would have to be rewritten as a plugin (hook) instead
of hard-wiring it again in so many places.

20 months agofix: dev: Clean up DNSRPS
Ondřej Surý [Wed, 18 Sep 2024 15:38:11 +0000 (15:38 +0000)] 
fix: dev: Clean up DNSRPS

Addressed several build and test errors when DNSRPS is enabled.

Merge branch 'each-dnsrps-cleanup' into 'main'

See merge request isc-projects/bind9!9374

20 months agofix DNSRPS errors
Evan Hunt [Tue, 20 Aug 2024 20:09:20 +0000 (13:09 -0700)] 
fix DNSRPS errors

silence some reported snprintf() overrun warnings that prevented
DNSRPS from building on some platforms.

20 months agouse uv_dlopen() instead of dlopen() when linking DNSRPZ
Evan Hunt [Thu, 22 Aug 2024 23:01:50 +0000 (16:01 -0700)] 
use uv_dlopen() instead of dlopen() when linking DNSRPZ

take advantage of libuv's shared library handling capability
when linking to a DNSRPS library.  (see b396f555861 and 37b9511ce1d
for prior related work.)

20 months agoRemove old cruft from dnsrps code
Ondřej Surý [Mon, 19 Aug 2024 13:41:43 +0000 (15:41 +0200)] 
Remove old cruft from dnsrps code

There was some old cruft for ancient compilers checking for attributes
that we regularly use, etc.  Just remove the cruft.

20 months agochg: usr: Set logging category for notify/xfer-in related messages
Arаm Sаrgsyаn [Tue, 17 Sep 2024 15:52:20 +0000 (15:52 +0000)] 
chg: usr: Set logging category for notify/xfer-in related messages

Some 'notify' and 'xfer-in' related log messages were logged at the
'general' category instead of their own category. This has been fixed.

Closes #2730

Merge branch '2730-logging-category-for-notify-and-xfer-related-messages' into 'main'

See merge request isc-projects/bind9!9451

20 months agoSet logging category for notify/xfer related messages
Aram Sargsyan [Thu, 22 Aug 2024 07:52:20 +0000 (07:52 +0000)] 
Set logging category for notify/xfer related messages

Some notify/xfer related log messages are logged at the general
category. Set a more suitable caterogry for those messages.

20 months agofix: usr: Limit the outgoing UDP send queue size
Ondřej Surý [Tue, 17 Sep 2024 14:02:16 +0000 (14:02 +0000)] 
fix: usr: Limit the outgoing UDP send queue size

If the operating system UDP queue gets full and the outgoing UDP sending
starts to be delayed, BIND 9 could exhibit memory spikes as it tries to
enqueue all the outgoing UDP messages.  Try a bit harder to deliver the
outgoing UDP messages synchronously and if that fails, drop the outgoing
DNS message that would get queued up and then timeout on the client side.

Closes #4930

Merge branch '4930-limit-the-UDP-send-queue' into 'main'

See merge request isc-projects/bind9!9506

20 months agoLimit the outgoing UDP send queue size
Ondřej Surý [Mon, 16 Sep 2024 07:10:36 +0000 (09:10 +0200)] 
Limit the outgoing UDP send queue size

If the operating system UDP queue gets full and the outgoing UDP sending
starts to be delayed, BIND 9 could exhibit memory spikes as it tries to
enqueue all the outgoing UDP messages.  As those are not going to be
delivered anyway (as we argued when we stopped enlarging the operating
system send and receive buffers), try to send the UDP messages directly
using `uv_udp_try_send()` and if that fails, drop the outgoing UDP
message.

20 months agodev: Ignore commit that reformatted sh script in git blame
Ondřej Surý [Tue, 17 Sep 2024 11:44:49 +0000 (11:44 +0000)] 
dev: Ignore commit that reformatted sh script in git blame

Merge branch 'ondrej/ignore-shfmt-git-blame' into 'main'

See merge request isc-projects/bind9!9510

20 months agoIgnore commit that reformatted sh script in git blame
Ondřej Surý [Tue, 17 Sep 2024 11:42:53 +0000 (13:42 +0200)] 
Ignore commit that reformatted sh script in git blame

20 months agofix: usr: Do not set SO_INCOMING_CPU
Alessio Podda [Mon, 16 Sep 2024 12:56:25 +0000 (12:56 +0000)] 
fix: usr: Do not set SO_INCOMING_CPU

We currently set SO_INCOMING_CPU incorrectly, and testing by Ondrej
shows that fixing the issue by setting affinities is worse than letting
the kernel schedule threads without constraints. So we should not set
SO_INCOMING_CPU anymore.

Closes #4936

Merge branch '4936-remove-so-incoming-cpu' into 'main'

See merge request isc-projects/bind9!9497

20 months agoDo not set SO_INCOMING_CPU
alessio [Thu, 12 Sep 2024 14:48:00 +0000 (16:48 +0200)] 
Do not set SO_INCOMING_CPU

We currently set SO_INCOMING_CPU incorrectly, and testing by Ondrej
shows that fixing the issue and setting affinities is worse than letting
the kernel schedule threads without constraints. So we should not set
SO_INCOMING_CPU anymore.

20 months agonew: usr: Implement the ForwardOnlyFail statistics channel counter
Arаm Sаrgsyаn [Mon, 16 Sep 2024 12:17:42 +0000 (12:17 +0000)] 
new: usr: Implement the ForwardOnlyFail statistics channel counter

The new ForwardOnlyFail statistics channel counter indicates the
number of queries failed due to bad forwarders for 'forward only'
zones.

Related to #1793

Merge branch 'aram/add-new-stats-channel-counter-forwardonlyfail' into 'main'

See merge request isc-projects/bind9!9498

20 months agoUpdate the statistics channel check in the forward system test
Aram Sargsyan [Thu, 12 Sep 2024 12:39:14 +0000 (12:39 +0000)] 
Update the statistics channel check in the forward system test

Check that the ForwardOnlyFail increases as expected.

20 months agoDocument the ForwardOnlyFail statistics channel counter
Aram Sargsyan [Thu, 12 Sep 2024 12:38:38 +0000 (12:38 +0000)] 
Document the ForwardOnlyFail statistics channel counter

Update ARM with the information about the new ForwardOnlyFail
counter.

20 months agoImplement the ForwardOnlyFail statistics channel counter
Aram Sargsyan [Thu, 12 Sep 2024 12:34:40 +0000 (12:34 +0000)] 
Implement the ForwardOnlyFail statistics channel counter

The new ForwardOnlyFail statistics channel counter indicates the
number of queries failed due to bad forwarders for 'forward only'
zones.

20 months agofix: usr: Fix a statistics channel counter bug when 'forward only' zones are used
Arаm Sаrgsyаn [Mon, 16 Sep 2024 09:30:56 +0000 (09:30 +0000)] 
fix: usr: Fix a statistics channel counter bug when 'forward only' zones are used

When resolving a zone with a 'forward only' policy, and
finding out that all the forwarders are marked as "bad",
the 'ServerQuota' counter of the statistics channel was
incorrectly increased. This has been fixed.

Closes #1793

Merge branch '1793-serverquota-counter-bug-with-forward-only' into 'main'

See merge request isc-projects/bind9!9493

20 months agoAdd a statistics channel check in the forward system test
Aram Sargsyan [Thu, 12 Sep 2024 12:17:28 +0000 (12:17 +0000)] 
Add a statistics channel check in the forward system test

Check that the fix in the previous commit works and that the
'ServerQuota' counter in the statistics channel is still unset
after a SERVFAIL result in a 'forward only' zone.

20 months agoFix a 'serverquota' counter calculation bug
Aram Sargsyan [Thu, 12 Sep 2024 11:50:28 +0000 (11:50 +0000)] 
Fix a 'serverquota' counter calculation bug

The 'all_spilled' local variable in resolver.c:fctx_getaddresses()
is 'true' by default, and only becomes false when there is at least
one successfully found NS address. However, when a 'forward only;'
configuration is used, the code jumps over the part where it looks
for NS addresses and doesn't reset the 'all_spilled' to false, which
results in incorretly increased 'serverquota' statistics variable,
and also in invalid return error code from the function. The result
code error didn't make any differences, because all codes other than
'ISC_R_SUCCESS' or 'DNS_R_WAIT' were treated in the same way, and
the result code was never logged anywhere.

Set the default value of 'all_spilled' to 'false', and only make it
'true' before actually starting to look up NS addresses.

20 months agochg: dev: Remove statslock from dnssec-signzone
Mark Andrews [Mon, 16 Sep 2024 02:49:11 +0000 (02:49 +0000)] 
chg: dev: Remove statslock from dnssec-signzone

Silence Coverity CID 468757 and 468767 (DATA RACE read not locked) by converting dnssec-signzone to use atomics for statistics counters rather than using a lock.

Closes #4939

Merge branch '4939-remove-stats-lock-from-dnssec-signzone' into 'main'

See merge request isc-projects/bind9!9496

20 months agoRemove 'statslock' from dnssec-signzone
Mark Andrews [Fri, 13 Sep 2024 03:30:34 +0000 (13:30 +1000)] 
Remove 'statslock' from dnssec-signzone

Silence Coverity CID 468757 and 468767 (DATA RACE read not locked)
by converting dnssec-signzone to use atomics for statistics counters
rather than using a lock.  This should be marginally faster than
using the lock as well when statistics are requested.

20 months agofix: usr: Separate DNSSEC validation from the long-running tasks
Ondřej Surý [Thu, 12 Sep 2024 14:35:08 +0000 (14:35 +0000)] 
fix: usr: Separate DNSSEC validation from the long-running tasks

As part of the KeyTrap \[CVE-2023-50387\] mitigation, the DNSSEC CPU-intensive operations were offloaded to a separate threadpool that we use to run other tasks that could affect the networking latency.

If that threadpool is running some long-running tasks like RPZ, catalog zone processing, or zone file operations, it would delay DNSSEC validations to a point where the resolving signed DNS records would fail.

Split the CPU-intensive and long-running tasks into separate threadpools in a way that the long-running tasks don't block the CPU-intensive operations.

Closes #4898

Merge branch '4898-move-offloaded-DNSSEC-to-own-threads' into 'main'

See merge request isc-projects/bind9!9473

20 months agoMove offloaded DNSSEC operations to different helper threads
Ondřej Surý [Mon, 9 Sep 2024 12:39:14 +0000 (14:39 +0200)] 
Move offloaded DNSSEC operations to different helper threads

Currently, the isc_work API is overloaded.  It runs both the
CPU-intensive operations like DNSSEC validations and long-term tasks
like RPZ processing, CATZ processing, zone file loading/dumping and few
others.

Under specific circumstances, when many large zones are being loaded, or
RPZ zones processed, this stops the CPU-intensive tasks and the DNSSEC
validation is practically stopped until the long-running tasks are
finished.

As this is undesireable, this commit moves the CPU-intensive operations
from the isc_work API to the isc_helper API that only runs fast memory
cleanups now.

20 months agoAdd isc_helper API that adds 1:1 thread for each loop
Ondřej Surý [Tue, 10 Sep 2024 13:02:53 +0000 (15:02 +0200)] 
Add isc_helper API that adds 1:1 thread for each loop

Add an extra thread that can be used to offload operations that would
affect latency, but are not long-running tasks; those are handled by
isc_work API.

Each isc_loop now has matching isc_helper thread that also built on top
of uv_loop.  In fact, it matches most of the isc_loop functionality, but
only the `isc_helper_run()` asynchronous call is exposed.

20 months agochg: test: Replace dns.resolver module in system tests
Michal Nowak [Thu, 12 Sep 2024 09:57:22 +0000 (09:57 +0000)] 
chg: test: Replace dns.resolver module in system tests

Closes #4634

Merge branch '4634-drop-dns.resolver-module-from-system-tests' into 'main'

See merge request isc-projects/bind9!9150

20 months agoExtract dns.rcode compatibility code to isctest.compat
Michal Nowak [Tue, 27 Aug 2024 18:14:00 +0000 (20:14 +0200)] 
Extract dns.rcode compatibility code to isctest.compat

20 months agoTurn off deadline for wildcard tests
Michal Nowak [Wed, 7 Aug 2024 18:53:00 +0000 (20:53 +0200)] 
Turn off deadline for wildcard tests

Tests that query BIND need much longer deadline to account for retries,
the default 200ms won't work.

20 months agoExtract "custom" named instances support to isctest.run module
Michal Nowak [Mon, 22 Jul 2024 14:20:02 +0000 (16:20 +0200)] 
Extract "custom" named instances support to isctest.run module

20 months agoRework query functions to retry by default
Michal Nowak [Tue, 16 Jul 2024 18:06:06 +0000 (20:06 +0200)] 
Rework query functions to retry by default

20 months agoDeprecate dns.resolver module in BIND 9 system tests
Michal Nowak [Thu, 4 Jul 2024 18:06:36 +0000 (20:06 +0200)] 
Deprecate dns.resolver module in BIND 9 system tests

20 months agoReplace dns.resolver module in system tests
Michal Nowak [Thu, 11 Jul 2024 11:01:29 +0000 (13:01 +0200)] 
Replace dns.resolver module in system tests

20 months agofix: dev: Fix data race in offloaded dns_message_checksig()
Arаm Sаrgsyаn [Thu, 12 Sep 2024 09:08:59 +0000 (09:08 +0000)] 
fix: dev: Fix data race in offloaded dns_message_checksig()

When verifying a message in an offloaded thread there is a race with
the worker thread which writes to the same buffer. Clone the message
buffer before offloading.

Closes #4929

Merge branch '4929-data-race-in-dns_dnssec_verifymessage-memmove' into 'main'

See merge request isc-projects/bind9!9481

20 months agoFix data race in offloaded dns_message_checksig()
Aram Sargsyan [Wed, 11 Sep 2024 15:58:11 +0000 (15:58 +0000)] 
Fix data race in offloaded dns_message_checksig()

When verifying a message in an offloaded thread there is a race with
the worker thread which writes to the same buffer. Clone the message
buffer before offloading.

20 months agochg: doc: Add CWE category to the security issue template
Nicki Křížek [Thu, 12 Sep 2024 08:51:36 +0000 (08:51 +0000)] 
chg: doc: Add CWE category to the security issue template

Merge branch 'vicky-main-patch-72181' into 'main'

See merge request isc-projects/bind9!9482

20 months agoAdd CWE category to Internal_use_only-CVE.md template
Vicky Risk [Wed, 11 Sep 2024 16:32:54 +0000 (16:32 +0000)] 
Add CWE category to Internal_use_only-CVE.md template

20 months agorem: usr: Remove "port" from source address options
Alessio Podda [Thu, 12 Sep 2024 07:45:18 +0000 (07:45 +0000)] 
rem: usr: Remove "port" from source address options

Remove the use of "port" when configuring query-source(-v6),
transfer-source(-v6), notify-source(-v6), parental-source(-v6),
etc. Remove the use of source ports for parental-agents.

Also remove the deprecated options use-{v4,v6}-udp-ports and
avoid-{v4,v6}udp-ports.

Closes #3843

Merge branch '3843-remove-deprecated-source-port-options' into 'main'

See merge request isc-projects/bind9!9469

20 months agoRemove "port" from source address options
alessio [Wed, 4 Sep 2024 15:48:04 +0000 (17:48 +0200)] 
Remove "port" from source address options

Remove the use of "port" when configuring query-source(-v6),
transfer-source(-v6), notify-source(-v6), parental-source(-v6),
etc. Remove the use of source ports for parental-agents.

Also remove the deprecated options use-{v4,v6}-udp-ports and
avoid-{v4,v6}udp-ports.

20 months agofix: usr: Don't allow statistics-channel if libxml2 and libjson-c are unsupported
Mark Andrews [Thu, 12 Sep 2024 03:27:10 +0000 (03:27 +0000)] 
fix: usr: Don't allow statistics-channel if libxml2 and libjson-c are unsupported

When the libxml2 and libjson-c libraries are not supported, the statistics channel can't return anything useful, so it is now disabled. Use of `statistics-channel` in `named.conf` is a fatal error.

Closes #4895

Merge branch '4895-link-style-sheet-to-libxml2-support' into 'main'

See merge request isc-projects/bind9!9423

20 months agoFix named-checkconf and statistics-channels
Mark Andrews [Mon, 2 Sep 2024 05:53:11 +0000 (15:53 +1000)] 
Fix named-checkconf and statistics-channels

If neither libxml2 nor libjson_c are available have named-checkconf
fail if a statistics-channels block is specified.

20 months agoOnly configure statistics-channels if supported
Mark Andrews [Tue, 3 Sep 2024 04:59:19 +0000 (14:59 +1000)] 
Only configure statistics-channels if supported

20 months agoDon't create the HTTP server if libxml and libjson-c are unavailable
Mark Andrews [Tue, 27 Aug 2024 01:22:41 +0000 (11:22 +1000)] 
Don't create the HTTP server if libxml and libjson-c are unavailable

20 months agoDon't return the style sheet unless libxml2 is supported
Mark Andrews [Mon, 26 Aug 2024 22:54:54 +0000 (08:54 +1000)] 
Don't return the style sheet unless libxml2 is supported

If not statistics are available we don't want the style sheet
returned.

20 months agofix: test: The statschannel tests fails if one of libxml2 or json-c is configured
Mark Andrews [Wed, 11 Sep 2024 23:05:34 +0000 (23:05 +0000)] 
fix: test: The statschannel tests fails if one of libxml2 or json-c is configured

The `statschannel` system test failed if only one of `libxml2` or `json-c` is
available / configured as checks were being run against the non available
statistics page.

Closes #4919

Merge branch '4919-fix-statschannel-system-test' into 'main'

See merge request isc-projects/bind9!9454

20 months agoProperly detect when libxml2 or json-c is not available
Mark Andrews [Wed, 4 Sep 2024 02:52:22 +0000 (12:52 +1000)] 
Properly detect when libxml2 or json-c is not available

20 months ago[9.21] chg: doc: Review BIND ARM (9.18 updates)
Nicki Křížek [Wed, 11 Sep 2024 15:13:02 +0000 (15:13 +0000)] 
[9.21] chg: doc: Review BIND ARM (9.18 updates)

Forward-port of !9375

Closes #4832

Merge branch '4832-bind-arm-review-from-2022-through-9-18-main' into 'main'

See merge request isc-projects/bind9!9479

20 months agoReview and update ARM documentation
Suzanne Goldlust [Wed, 28 Aug 2024 19:53:46 +0000 (19:53 +0000)] 
Review and update ARM documentation

Minor edits and fixes for the documentation added from 2022 through
9.18.

(cherry picked from commit b6e4b512dd02d0cbd8dc7f90784ad3ddba21d270)

20 months agonew: doc: Document TCP4Clients/TCP6Clients
Aydın Mercan [Wed, 11 Sep 2024 10:06:37 +0000 (10:06 +0000)] 
new: doc: Document TCP4Clients/TCP6Clients

Future port the missing TCP4Clients/TCP6Clients documentation entry.

Commit abc47f5ce4a50ab2d3b23505914e9c65f856262b added two new statistics
counters without documenting them.  Add the missing counter descriptions
to the ARM.

(cherry picked from commit cb7924009152a4b8b1ec82a50bdb112541e9ec74)

Merge branch 'aydin/tcpclient-doc' into 'main'

See merge request isc-projects/bind9!9078

20 months agomake the tcp client counter documentation consistent with others
Aydın Mercan [Fri, 31 May 2024 15:14:31 +0000 (18:14 +0300)] 
make the tcp client counter documentation consistent with others

20 months agoalphabetically sort socket i/o counters
Aydın Mercan [Fri, 31 May 2024 15:12:08 +0000 (18:12 +0300)] 
alphabetically sort socket i/o counters

20 months agoDocument TCP4Clients/TCP6Clients
Michał Kępień [Mon, 27 May 2024 13:03:18 +0000 (15:03 +0200)] 
Document TCP4Clients/TCP6Clients

Commit abc47f5ce4a50ab2d3b23505914e9c65f856262b added two new statistics
counters without documenting them.  Add the missing counter descriptions
to the ARM.

(cherry picked from commit cb7924009152a4b8b1ec82a50bdb112541e9ec74)

20 months agochg: ci: Update code formatting
Michal Nowak [Wed, 11 Sep 2024 09:28:55 +0000 (09:28 +0000)] 
chg: ci: Update code formatting

clang 19 was updated in the base image.

Merge branch 'mnowak/fix-clang-format' into 'main'

See merge request isc-projects/bind9!9475

20 months agoUpdate to ignore ff69d07fed2619a9bedf5ccc18cf106b7dd49bef
Mark Andrews [Wed, 11 Sep 2024 05:08:37 +0000 (15:08 +1000)] 
Update to ignore ff69d07fed2619a9bedf5ccc18cf106b7dd49bef

20 months agoUpdate code formatting
Michal Nowak [Tue, 10 Sep 2024 15:31:32 +0000 (17:31 +0200)] 
Update code formatting

clang 19 was updated in the base image.

20 months agochg: usr: allow IXFR-to-AXFR fallback on DNS_R_TOOMANYRECORDS
Nicki Křížek [Tue, 10 Sep 2024 12:38:45 +0000 (12:38 +0000)] 
chg: usr: allow IXFR-to-AXFR fallback on DNS_R_TOOMANYRECORDS

This change allows fallback from an IXFR failure to AXFR when the reason is `DNS_R_TOOMANYRECORDS`. This is because this error condition could be temporary only in an intermediate version of IXFR transactions and it's possible that the latest version of the zone doesn't have that condition. In such a case, the secondary would never be able to update the zone (even if it could) without this fallback.

This fallback behavior is particularly useful with the recently introduced `max-records-per-type` and `max-types-per-name` options: the primary may not have these limitations and may temporarily introduce "too many" records, breaking IXFR. If the primary side subsequently deletes these records, this fallback will help recover the zone transfer failure automatically; without it, the secondary side would first need to increase the limit, which requires more operational overhead and has its own adverse effect.

Closes #4928

Merge branch 'fallback-ixfr-to-axfr-on-toomanyrecords' into 'main'

See merge request isc-projects/bind9!9333

20 months agoallow IXFR-to-AXFR fallback on DNS_R_TOOMANYRECORDS
JINMEI Tatuya [Fri, 16 Aug 2024 07:53:38 +0000 (16:53 +0900)] 
allow IXFR-to-AXFR fallback on DNS_R_TOOMANYRECORDS

This change allows fallback from an IXFR failure to AXFR when the
reason is DNS_R_TOOMANYRECORDS. This is because this error condition
could be temporary only in an intermediate version of IXFR
transactions and it's possible that the latest version of the zone
doesn't have that condition. In such a case, the secondary would never
be able to update the zone (even if it could) without this fallback.

This fallback behavior is particularly useful with the recently
introduced max-records-per-type and max-types-per-name options:
the primary may not have these limitations and may temporarily
introduce "too many" records, breaking IXFR. If the primary side
subsequently deletes these records, this fallback will help recover
the zone transfer failure automatically; without it, the secondary
side would first need to increase the limit, which requires more
operational overhead and has its own adverse effect.

This change also fixes a minor glitch that DNS_R_TOOMANYRECORDS wasn't
logged in xfrin_fail.

20 months agofix: usr: Fix assertion failure when processing access control lists
Arаm Sаrgsyаn [Tue, 10 Sep 2024 10:33:56 +0000 (10:33 +0000)] 
fix: usr: Fix assertion failure when processing access control lists

The named process could terminate unexpectedly when processing ACL. This has been fixed.

Closes #4908

Merge branch '4908-acl-assertion-failure' into 'main'

See merge request isc-projects/bind9!9458

20 months agoFix RCU API usage in acl.c
Aram Sargsyan [Wed, 4 Sep 2024 16:19:44 +0000 (16:19 +0000)] 
Fix RCU API usage in acl.c

The rcu_xchg_pointer() function can be used outside of a critical
section, and usually must be followed by a synchronize_rcu() or
call_rcu() call to detach from the resource, unless if there are
some guarantees in place because of our own reference counting.

20 months agonew: usr: Add flag to named-checkconf to ignore "not configured" errors
Mark Andrews [Tue, 10 Sep 2024 00:08:51 +0000 (00:08 +0000)] 
new: usr: Add flag to named-checkconf to ignore "not configured" errors

`named-checkconf` now takes "-n" to ignore "not configured" errors. This allows named-checkconf to check the syntax of configurations from other builds which have support for more options.

Merge branch '4913-add-option-to-named-checkconf-to-override-notconfigured-flag' into 'main'

See merge request isc-projects/bind9!9446

20 months agoAdd flag to named-checkconf to ignore "not configured" errors
Mark Andrews [Mon, 2 Sep 2024 06:03:17 +0000 (16:03 +1000)] 
Add flag to named-checkconf to ignore "not configured" errors

named-checkconf now takes "-n" to ignore "not configured" errors.
This allows named-checkconf to check the syntax of configurations
from other builds which have support for more options.