2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00
Commit Graph

39204 Commits

Author SHA1 Message Date
Mark Andrews
7dbb2b877b Add CHANGES note for [GL #4027] 2023-04-25 05:04:30 +01:00
Mark Andrews
ad91a70d15 Check removal of ENT when subdomains are removed
Empty-non-terminal NSEC records where not always removed when the
delegations generating them where removed via update. Check that
they now are.
2023-04-25 05:03:40 +01:00
Mark Andrews
27160c137f Cleanup orphaned empty-non-terminal NSEC3
When OPTOUT was in use we didn't ensure that NSEC3 records
for orphaned empty-non-terminals where removed.  Check if
there are orphaned empty-non-terminal NSEC3 even if there
wasn't an NSEC3 RRset to be removed in dns_nsec3_delnsec3.
2023-04-25 05:03:12 +01:00
Ondřej Surý
2aff1d6efc Merge branch 'jpmens-main-patch-10650' into 'main'
ARM: replace word in TLS section

See merge request isc-projects/bind9!7864
2023-04-24 15:12:12 +00:00
JP Mens
7bfffa1bd8 Fix typo in the ARM - missed -> missing 2023-04-24 16:09:48 +01:00
Ondřej Surý
b226200529 Merge branch '4004-reimplemented-max-transfer--in' into 'main'
Implement maximum global and idle time for incoming XFR

Closes #4004

See merge request isc-projects/bind9!7810
2023-04-21 11:31:04 +00:00
Ondřej Surý
713e202110 Add CHANGES note for [GL #4004] 2023-04-21 12:53:34 +02:00
Aram Sargsyan
5324f047b2 Implement new checks for the xfer system test
Check the max-transfer-time-in and max-transfer-idle-in options.
2023-04-21 12:53:02 +02:00
Aram Sargsyan
dfaecfd752 Implement new -T options for xfer system tests
'-T transferinsecs' makes named interpret the max-transfer-time-out,
max-transfer-idle-out, max-transfer-time-in and max-transfer-idle-in
configuration options as seconds instead of minutes.

'-T transferslowly' makes named to sleep for one second for every
xfrout message.

'-T transferstuck' makes named to sleep for one minute for every
xfrout message.
2023-04-21 12:53:02 +02:00
Ondřej Surý
d2377f8e04 Implement maximum global and idle time for incoming XFR
After the dns_xfrin was changed to use network manager, the maximum
global (max-transfer-time-in) and idle (max-transfer-idle-in) times for
incoming transfers were turned inoperational because of missing
implementation.

Restore this functionality by implementing the timers for the incoming
transfers.
2023-04-21 12:53:02 +02:00
Ondřej Surý
599ac5bb93 Merge branch '4005-handle-ISC_R_INVALIDPROTO-from-libuv' into 'main'
Handle ISC_R_INVALIDPROTO in the dispatch

Closes #4005

See merge request isc-projects/bind9!7860
2023-04-21 10:43:14 +00:00
Ondřej Surý
c233cd621b Add CHANGES and release note for [GL #4005] 2023-04-21 12:42:28 +02:00
Evan Hunt
2269a3e6fb check for invalid protocol when dispatch fails
treat ISC_R_INVALIDPROTO as a networking error when it occurs.
2023-04-21 12:42:11 +02:00
Evan Hunt
0393b54afb add a result code for ENOPROTOOPT, EPROTONOSUPPORT
there was no isc_result_t value for invalid protocol errors
that could be returned from libuv.
2023-04-21 12:42:10 +02:00
Ondřej Surý
abc2342372 Merge branch '3977-add-isc_spinlock-implementation' into 'main'
Add isc_spinlock unit with shim pthread_spin implementation

Closes #3977

See merge request isc-projects/bind9!7749
2023-04-21 10:10:47 +00:00
Ondřej Surý
ebd9188d42 Add CHANGES note for [GL #3977] 2023-04-21 12:10:02 +02:00
Ondřej Surý
b497e90179 Add isc_spinlock unit with shim pthread_spin implementation
The spinlock is small (atomic_uint_fast32_t at most), lightweight
synchronization primitive and should only be used for short-lived and
most of the time a isc_mutex should be used.

Add a isc_spinlock unit which is either (most of the time) a think
wrapper around pthread_spin API or an efficient shim implementation of
the simple spinlock.
2023-04-21 12:10:02 +02:00
Ondřej Surý
32a8773ab3 Always initialize the workers in the libtest
The workers variable might be needed even to tests not using
loopmgr. Split the workers initialization into setup_workers() function
and always call it from the default main loop.
2023-04-21 09:04:24 +02:00
Ondřej Surý
bd94d8c98e Merge branch '4011-fix-read_stop-in-streaming-protocols' into 'main'
Fix the streaming read callback shutdown logic

Closes #4011

See merge request isc-projects/bind9!7836
2023-04-20 12:03:52 +00:00
Ondřej Surý
9b0353e62e Add CHANGES note for [GL #4011] 2023-04-20 12:58:47 +02:00
Ondřej Surý
3b10814569 Fix the streaming read callback shutdown logic
When shutting down TCP sockets, the read callback calling logic was
flawed, it would call either one less callback or one extra.  Fix the
logic in the way:

1. When isc_nm_read() has been called but isc_nm_read_stop() hasn't on
   the handle, the read callback will be called with ISC_R_CANCELED to
   cancel active reading from the socket/handle.

2. When isc_nm_read() has been called and isc_nm_read_stop() has been
   called on the on the handle, the read callback will be called with
   ISC_R_SHUTTINGDOWN to signal that the dormant (not-reading) socket
   is being shut down.

3. The .reading and .recv_read flags are little bit tricky.  The
   .reading flag indicates if the outer layer is reading the data (that
   would be uv_tcp_t for TCP and isc_nmsocket_t (TCP) for TLSStream),
   the .recv_read flag indicates whether somebody is interested in the
   data read from the socket.

   Usually, you would expect that the .reading should be false when
   .recv_read is false, but it gets even more tricky with TLSStream as
   the TLS protocol might need to read from the socket even when sending
   data.

   Fix the usage of the .recv_read and .reading flags in the TLSStream
   to their true meaning - which mostly consist of using .recv_read
   everywhere and then wrapping isc_nm_read() and isc_nm_read_stop()
   with the .reading flag.

4. The TLS failed read helper has been modified to resemble the TCP code
   as much as possible, clearing and re-setting the .recv_read flag in
   the TCP timeout code has been fixed and .recv_read is now cleared
   when isc_nm_read_stop() has been called on the streaming socket.

5. The use of Network Manager in the named_controlconf, isccc_ccmsg, and
   isc_httpd units have been greatly simplified due to the improved design.

6. More unit tests for TCP and TLS testing the shutdown conditions have
   been added.

Co-authored-by: Ondřej Surý <ondrej@isc.org>
Co-authored-by: Artem Boldariev <artem@isc.org>
2023-04-20 12:58:32 +02:00
Michał Kępień
4fcbb078c1 Merge tag 'v9.19.12'
BIND 9.19.12
2023-04-20 12:43:46 +02:00
Ondřej Surý
654de3201c Merge branch '3986-handle-ISC_R_NOPERM-in-dns_dispatch-and-honour-the-source-port' into 'main'
Honour the source-port when retrying in dns_dispatch

Closes #3986

See merge request isc-projects/bind9!7806
2023-04-20 09:01:49 +00:00
Ondřej Surý
3d36e0bb89 Add CHANGES note for [GL #3986] 2023-04-20 10:57:20 +02:00
Ondřej Surý
c8e8ccd026 Honour the source-port when retrying in dns_dispatch
When retrying in the DNS dispatch, the local port would be forgotten on
ISC_R_ADDRINUSE, keep the configured source-port even when retrying.

Additionally, treat ISC_R_NOPERM same as ISC_R_ADDRINUSE.

Closes: #3986
2023-04-20 10:57:20 +02:00
Ondřej Surý
25962dd188 Merge branch '4001-4002-retry-over-TCP-when-notify-sending-fails' into 'main'
Handle the failure to send notify more gracefully and with log

Closes #4001 and #4002

See merge request isc-projects/bind9!7805
2023-04-20 08:41:02 +00:00
Ondřej Surý
f4fcb63152 Add CHANGES and release note for [GL #4001] [GL #4002] 2023-04-20 10:09:53 +02:00
Ondřej Surý
0d48ac5a93 Handle the failure to send notify more gracefully and with log
When dns_request_create() failed in notify_send_toaddr(), sending the
notify would silently fail.  When notify_done() failed, the error would
be logged on the DEBUG(2) level.

This commit remedies the situation by:

 * Promoting several messages related to notifies to INFO level and add
   a "success" log message at the INFO level

 * Adding a TCP fallback - when sending the notify over UDP fails, named
   will retry sending notify over TCP and log the information on the
   NOTICE level

 * When sending the notify over TCP fails, it will be logged on the
   WARNING level

Closes: #4001, #4002
2023-04-20 10:09:53 +02:00
Tony Finch
6892e463bf Merge branch '3998-check-countlabels' into 'main'
Check dns_name_countlabels() wrt DNS_NAME_MAXLABELS

Closes #3998

See merge request isc-projects/bind9!7822
2023-04-18 12:58:09 +00:00
Tony Finch
3dcfad81d8 Check dns_name_countlabels() wrt DNS_NAME_MAXLABELS
This test case was omitted from [GL !7803]
2023-04-18 13:32:09 +01:00
Tony Finch
89eeca7981 Merge branch 'fanf-inane' into 'main'
Fix several typoes in name_test

See merge request isc-projects/bind9!7800
2023-04-18 12:22:55 +00:00
Tony Finch
80a153e159 Fix several typos in name_test
`nane` -> `name`
2023-04-18 12:56:29 +01:00
Arаm Sаrgsyаn
2928ab4e5f Merge branch 'aram/xfer-test-bugfix' into 'main'
Fix variable name error in the xfer system test

See merge request isc-projects/bind9!7845
2023-04-18 09:38:12 +00:00
Aram Sargsyan
613a9fc659 Fix variable name error in the xfer system test
There is no 'ret' in this test, and it is obvious that 'ret=1'
should be 'tmp=1' for the check to work correctly, if the string
is not found in the log file.
2023-04-18 09:37:39 +00:00
Mark Andrews
b23a3c7729 Merge branch '3996-in-fatal-only-pause-when-running' into 'main'
In fatal only pause loops when they are running.

Closes #3996

See merge request isc-projects/bind9!7825
2023-04-18 01:11:49 +00:00
Mark Andrews
be68dd62ea isc_loopmgr_pause was called inappropriately
isc_loopmgr_pause can't be called before isc_loopmgr_run is
called as the thread ids are not yet valid.  If there is a
fatal error before isc_loopmgr_run is run then don't call
isc_loopmgr_pause.
2023-04-18 00:28:36 +00:00
Matthijs Mekking
453aaac2f0 Merge branch '3769-migrate-zsk-ksk-split-tocsk' into 'main'
kasp: Add test case for migrating KSK/ZSK to CSK

See merge request isc-projects/bind9!7306
2023-04-17 09:39:59 +00:00
Matthijs Mekking
e752656a38 Add key state init debugging
When debugging an issue it can be useful to see what BIND initially
set the key states to.
2023-04-17 10:56:08 +02:00
Matthijs Mekking
c42ec8a56e kasp: Add test case for migrating KSK/ZSK to CSK
Add a test case to cover #3679 where a user migrates from a KSK/ZSK
split using auto-dnssec maintain, to the default dnssec-policy (CSK).

The test actually does not use the default dnssec-policy, but it does
use one that has the same keys clause. For testing convenience, we use
the same propagation time values as other test cases that migrate to
dnssec-policy with mismatching existing key set.
2023-04-17 10:56:08 +02:00
Ondřej Surý
02edb42a0a Merge branch '4015-fix-forward_cancel-from-the-wrong-loop' into 'main'
Run the forward_cancel on the appropriate zone->loop

Closes #4015

See merge request isc-projects/bind9!7835
2023-04-14 15:13:03 +00:00
Ondřej Surý
2423907b87 Add CHANGES note for [GL #4015] 2023-04-14 16:31:48 +02:00
Ondřej Surý
3df3b5efbd Run the forward_cancel on the appropriate zone->loop
If the zone forwards are canceled from dns_zonemgr_shutdown(), the
forward_cancel() would get called from the main loop, which is wrong.
It needs to be called from the matching zone->loop.

Run the dns_request_cancel() via isc_async_run() on the loop associated
with the zone instead of calling the dns_request_cancel() directly from
the main loop.
2023-04-14 16:31:33 +02:00
Ondřej Surý
36a3c87c33 Merge branch 'ondrej/remove-unused-netmgr-worker-sendbuf' into 'main'
Remove unused netmgr->worker->sendbuf

See merge request isc-projects/bind9!7841
2023-04-14 14:20:52 +00:00
Ondřej Surý
f677cf6b73 Remove unused netmgr->worker->sendbuf
By inspecting the code, it was discovered that .sendbuf member of the
isc__nm_networker_t was unused and just consuming ~64k per worker.
Remove the member and the association allocation/deallocation.
2023-04-14 16:20:14 +02:00
Arаm Sаrgsyаn
9bd88df624 Merge branch '4000-openssl-attr-malloc-vs-cmocka-define-malloc' into 'main'
unit tests: include an OpenSSL header before including cmocka.h

Closes #4000

See merge request isc-projects/bind9!7820
2023-04-14 12:12:13 +00:00
Aram Sargsyan
786b0689c6 Add a CHANGES note for [GL #4000] 2023-04-14 12:11:52 +00:00
Aram Sargsyan
87db9ea84c unit tests: include an OpenSSL header before including cmocka.h
OpenSSL 3.1.0 uses __attribute__(malloc), conflicting with a redefined
malloc in cmocka.h.

As a workaround, include an OpenSSL header file before including
cmocka.h in the unit tests where OpenSSL is used.
2023-04-14 12:11:52 +00:00
Petr Špaček
9e3f7f4d53 Merge branch 'pspacek/set-up-version-and-release-notes-for-bind-9.19.13' into 'main'
Set up version and release notes for BIND 9.19.13

See merge request isc-projects/bind9!7839
2023-04-14 09:03:19 +00:00
Petr Špaček
923eb6667f Update BIND version to 9.19.13-dev 2023-04-14 10:51:44 +02:00
Petr Špaček
0fb1e00469 Set up release notes for BIND 9.19.13 2023-04-14 10:51:23 +02:00