2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 21:47:59 +00:00

39168 Commits

Author SHA1 Message Date
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
Arаm Sаrgsyаn
546312f06c Merge branch 'aram/dns_xfrin_create-use-after-free' into 'main'
Fix a use-after-free bug in dns_xfrin_create()

See merge request isc-projects/bind9!7832
2023-04-14 07:40:01 +00:00
Aram Sargsyan
bf8e93aee5 Add a CHANGES note for [GL !7832] 2023-04-14 07:39:38 +00:00
Aram Sargsyan
d8a207bd00 Fix a use-after-free bug in dns_xfrin_create()
'xfr' is used after detaching the only reference, which would
have destroyed the object.

Call dns_xfrin_detach() only after the final use of 'xfr'.
2023-04-14 07:39:38 +00:00
Mark Andrews
172c678f2b Merge branch '3980-add-timeouts-to-unit-tests' into 'main'
Draft: Resolve "Add timeouts to unit tests."

Closes #3980

See merge request isc-projects/bind9!7837
2023-04-14 06:34:36 +00:00
Mark Andrews
21a3d4f762 Use SIGABRT rather than SIGKILL for long running unit test
SIGABRT will produce a core dump which will allow for forensic
analysis of the unit test
2023-04-14 15:40:02 +10:00
Ondřej Surý
b6c9ac75ad Merge branch '3980-revert-unit-test-forking' into 'main'
Revert "Kill unit tests that run more than 1200 seconds"

Closes #3980

See merge request isc-projects/bind9!7833
2023-04-14 04:19:40 +00:00
Ondřej Surý
c60ce13127
Revert "Kill unit tests that run more than 1200 seconds"
This reverts commit 3d5c7cd46c60e0a534dce0640c4e47b699e7003e which
added wrapper around all the unit tests that would run the unit test in
the forked process.

This makes any debugging of the unit tests too hard.  Futures attempts
to fix #3980 should add a custom automake test harness (log driver) that
would kill the unit test after configured timeout.
2023-04-14 06:14:19 +02:00
Mark Andrews
22fb1b115a Merge branch '4003-dump_histo-defined-but-not-used-on-fips-in-bin-named-statschannel-c' into 'main'
Resolve "'dump_histo' defined but not used on FIPS in bin/named/statschannel.c"

Closes #4003

See merge request isc-projects/bind9!7826
2023-04-12 23:49:55 +00:00
Mark Andrews
82d2434ff8 dump_histo is only used with extended stats
Wrap dump_histo with #if defined(EXTENDED_STATS)/#endif.  Reproduce
build failure with "configure --without-libxml2 --without-json-c"
2023-04-13 08:53:27 +10:00
Ondřej Surý
8117c11d09 Merge branch '3985-make-TCP-accept-a-tad-bit-faster' into 'main'
Fix the TCP accept quota code

Closes #3985

See merge request isc-projects/bind9!7823
2023-04-12 12:12:33 +00:00
Ondřej Surý
b88ed40c96
Add CHANGES note for [GL #3985] 2023-04-12 14:10:37 +02:00
Ondřej Surý
1715cad685
Refactor the isc_quota code and fix the quota in TCP accept code
In e18541287231b721c9cdb7e492697a2a80fd83fc, the TCP accept quota code
became broken in a subtle way - the quota would get initialized on the
first accept for the server socket and then deleted from the server
socket, so it would never get applied again.

Properly fixing this required a bigger refactoring of the isc_quota API
code to make it much simpler.  The new code decouples the ownership of
the quota and acquiring/releasing the quota limit.

After (during) the refactoring it became more clear that we need to use
the callback from the child side of the accepted connection, and not the
server side.
2023-04-12 14:10:37 +02:00
Ondřej Surý
1768522045
Convert tls_send() callback to use isc_job_run()
The tls_send() was already using uvreq; convert this to use more direct
isc_job_run() - the on-loop no-allocation method.
2023-04-12 14:10:37 +02:00
Ondřej Surý
1302345c93
Convert isc__nm_http_send() from isc_async_run() to isc_job_run()
The isc__nm_http_send() was already using uvreq; convert this to use
more direct isc_job_run() - the on-loop no-allocation method.
2023-04-12 14:10:37 +02:00
Ondřej Surý
3adba8ce23
Use isc_job_run() for reading from StreamDNS socket
Change the reading in the StreamDNS code to use isc_job_run() instead of
using isc_async_run() for less allocations and more streamlined
execution.
2023-04-12 14:10:37 +02:00
Ondřej Surý
74cbf523b3
Run closehandle_cb on run queue instead of async queue
Instead of using isc_async_run() when closing StreamDNS handle, add
isc_job_t member to the isc_nmhandle_t structure and use isc_job_run()
to avoid allocation/deallocation on the StreamDNS hot-path.
2023-04-12 14:10:37 +02:00
Ondřej Surý
d27f6f2d68
Accept overquota TCP connection on local thread if possible
If the quota callback is called on a thread matching the socket, call
the TCP accept function directly instead of using isc_async_run() which
allocates-deallocates memory.
2023-04-12 14:10:37 +02:00
Ondřej Surý
0a468e7c9e
Make isc_tid() a header-only function
The isc_tid() function is often called on the hot-path and it's the only
function is to return thread_local variable, make the isc_tid() function
a header-only to save several function calls during query-response
processing.
2023-04-12 14:10:37 +02:00
Tom Krizek
9ca151680c Merge branch 'tkrizek/dnsrps-test-replace-egrep' into 'main'
Replace egrep with grep -E in rpz tests

See merge request isc-projects/bind9!7821
2023-04-12 11:55:28 +00:00
Tom Krizek
c977b0c81d
Replace egrep with grep -E in rpz tests
GNU Grep 3.8 reports the following warnings:

    egrep: warning: egrep is obsolescent; using grep -E
2023-04-12 13:32:46 +02:00
Petr Špaček
460760ee77
Update BIND version for release v9.19.12 2023-04-11 16:48:56 +02:00
Petr Špaček
a375f38557
Add a CHANGES marker 2023-04-11 16:48:27 +02:00
Petr Špaček
9403b5d476 Merge branch 'pspacek/prepare-documentation-for-bind-9.19.12' into 'v9.19.12-release'
Prepare documentation for BIND 9.19.12

See merge request isc-private/bind9!510
2023-04-11 14:46:17 +00:00
Petr Špaček
1029e929b3
Add release notes for GL #3955, #3968, and #3997 2023-04-11 16:29:22 +02:00
Petr Špaček
6fac8b15bc
Add known issue release note for GL #3985 and #4006 2023-04-11 16:29:22 +02:00
Petr Špaček
4c307123a8
Add release note for GL #3998 2023-04-11 16:29:22 +02:00
Petr Špaček
4ca02afb31
Reorder release notes 2023-04-11 16:29:22 +02:00
Petr Špaček
618c5d1ec0
Tweak and reword release notes 2023-04-11 16:29:22 +02:00
Petr Špaček
b06c5ad471
Prepare release notes for BIND 9.19.12 2023-04-11 16:29:22 +02:00
Mark Andrews
eb2c8ab213 Merge branch '3975-atomically-increase-rrn-in-add-other-data' into 'main'
atomically increase rrn in add_other_data

Closes #3975

See merge request isc-projects/bind9!7824
2023-04-11 02:45:48 +00:00
Mark Andrews
6cf8a532d4 Atomically increase rrn in add_other_data
'rrn' needs to be treated atomically as it updated from multiple threads.
2023-04-11 10:44:36 +10:00
Michal Nowak
ff34a1f117 Merge branch '3916-legacy-test-no-retries-in-resolution_fails' into 'main'
Do not retry in resolution_fails() on timeout

Closes #3916

See merge request isc-projects/bind9!7814
2023-04-06 09:39:22 +00:00
Michal Nowak
e05460c813
Do not retry in resolution_fails() on timeout
At the time of test number (19), there were 10 "sending packet to
10.53.0.7" lines in the "legacy/ns1/named.run" file; usually, only seven
are present:

    I:legacy:checking recursive lookup to edns 512 + no tcp server does not cause query loops (19)
    I:legacy:ns1 sent 10 queries to ns7, expected less than 10
    I:legacy:failed

Those three can be attributed to tests "8", "10", and "18", where the
dig of "resolution_fails()" retried after a timeout to succeed with
"status: SERVFAIL" subsequently, as seen in each of
dig.out.test{8,10,18} files.

    ;; communications error to 10.53.0.1#13093: timed out

    ; <<>> DiG 9.19.12-dev <<>> -p 13093 +tcp @10.53.0.1 edns512-notcp. TXT
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 5368
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

This retry is unnecessary because "resolution_fails()" considers timeout
a positive result.
2023-04-06 11:35:48 +02:00
Michal Nowak
a43519f7b8 Merge branch 'mnowak/looking-for-dig-errors-must-not-fail' into 'main'
Looking for errors in dig output files must not fail

See merge request isc-projects/bind9!7813
2023-04-06 09:03:31 +00:00
Michal Nowak
28a0df3081
Looking for errors in dig output files must not fail
If no errors in dig output files of failed tests are found, TSAN file
parsing won't occur.
2023-04-06 09:44:49 +02:00
Ondřej Surý
3f91819bd2 Merge branch '3999-histo-div-zero' into 'main'
Fix a division by zero bug in isc_histo

Closes #3999

See merge request isc-projects/bind9!7804
2023-04-05 21:29:50 +00:00