Commit Graph

37680 Commits

Author SHA1 Message Date
Arаm Sаrgsyаn
52844fa8c7 Merge branch '4054-zone_resigninc-bugfix-9.18' into 'bind-9.18'
[9.18] zone_resigninc(): check whether zone->db is a valid pointer before attaching

See merge request isc-projects/bind9!7923
2023-05-15 14:00:21 +00:00
Aram Sargsyan
cc197e82fe Add a CHANGES note for [GL #4054]
(cherry picked from commit 00ed5f84a9)
2023-05-15 12:02:27 +00:00
Aram Sargsyan
7713d2cb6d Check whether zone->db is a valid pointer before attaching
The zone_resigninc() function does not check the validity of
'zone->db', which can crash named if the zone was unloaded earlier,
for example with "rndc delete".

Check that 'zone->db' is not 'NULL' before attaching to it, like
it is done in zone_sign() and zone_nsec3chain() functions, which
can similarly be called by zone maintenance.

(cherry picked from commit fae0930eb8)
2023-05-15 12:01:23 +00:00
Michal Nowak
9285538683 Merge branch 'mnowak/coverity-scan-2022.12-9.18' into 'bind-9.18'
[9.18] Use the latest Coverity Scan

See merge request isc-projects/bind9!7918
2023-05-12 08:54:25 +00:00
Michal Nowak
7858de96f6 Use the latest Coverity Scan
(cherry picked from commit 68dd458764)
2023-05-12 10:14:29 +02:00
Michal Nowak
582e155c5e Merge branch 'mnowak/pytest_rewrite_ttl-9.18' into 'bind-9.18'
[9.18] Rewrite the ttl system test to pytest

See merge request isc-projects/bind9!7915
2023-05-11 14:40:54 +00:00
Michal Nowak
858954da9a Rewrite the ttl system test to pytest
(cherry picked from commit 0c05c3d97b)
2023-05-11 16:10:23 +02:00
Michal Nowak
73d25a85d0 Merge branch 'mnowak/clang-16-9.18' into 'bind-9.18'
[9.18] Update clang to version 16

See merge request isc-projects/bind9!7912
2023-05-11 13:10:45 +00:00
Michal Nowak
9699a377f5 Update clang to version 16
(cherry picked from commit 30aa258107)
2023-05-11 14:20:59 +02:00
Michal Nowak
534c5697b2 Merge branch 'mnowak/pytest_rewrite_hooks-9.18' into 'bind-9.18'
[9.18] Rewrite the hooks system test to pytest

See merge request isc-projects/bind9!7911
2023-05-11 10:52:55 +00:00
Michal Nowak
da74157440 Rewrite the hooks system test to pytest
Also, enable the test under TSAN.

(cherry picked from commit 5a84c7a09b)
2023-05-11 12:27:42 +02:00
Arаm Sаrgsyаn
4cae19f533 Merge branch '4039-dighost-fix-double-shutdown-call-9.18' into 'bind-9.18'
[9.18] dighost.c: don't call check_if_done() twice successively

See merge request isc-projects/bind9!7904
2023-05-10 12:49:57 +00:00
Aram Sargsyan
4b1e0913a5 Add a CHANGES note for [GL #4039]
(cherry picked from commit d71299121e)
2023-05-10 11:41:35 +00:00
Aram Sargsyan
906525642d dighost.c: don't call check_if_done() twice successively
The check_if_done() function can pass control back out to
dighost_shutdown() (which is part of dig.c, host.c, or nslookup.c),
and calling that twice can cause unexpected problems, if it is not
designed to be idempotent.

Since cancel_lookup() calls check_if_done() implicitly, don't call
check_if_done() again when 'next' is NULL.

(cherry picked from commit e4604b71d2)
2023-05-10 11:41:35 +00:00
Tom Krizek
ef0f7a7f13 Merge branch 'tkrizek/shutdown-test-exc-handling-9.18' into 'bind-9.18'
[9.18] Ensure named always terminates in the shutdown test

See merge request isc-projects/bind9!7902
2023-05-10 11:40:02 +00:00
Tom Krizek
8820c459c6 Replace dnspython resolver.query with resolver.resolve
The resolver.query() has been deprecated in favor of resolver.resolve();
used that.

This is an omission from 3b1756d450

(cherry picked from commit dee49b7a1f)
2023-05-10 12:55:30 +02:00
Tom Krizek
2dfe5367b7 Ensure named always terminates in the shutdown test
Previously, if an exception would happen inside the `with` block, the
error handler would wait indefinitely for the process to end. That would
never happen, since the termination signal was never sent to named and
the test would get stuck.

Using the try-finally block ensures that the named process is always
killed and any exception or errors will be handled gracefully.

(cherry picked from commit 836e6ed284)
2023-05-10 12:55:30 +02:00
Tom Krizek
947212a93f Refactor shutdown test into more helper functions
Improve code readability by splitting the test into more functions. Some
could be re-used later on for more general-purpose subprocess handling
or named checks.

(cherry picked from commit 9d64f1c1ed)
2023-05-10 12:55:27 +02:00
Michał Kępień
47fc1bf6bb Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.18.16' into 'bind-9.18'
Set up version and release notes for BIND 9.18.16

See merge request isc-projects/bind9!7900
2023-05-10 08:47:56 +00:00
Michał Kępień
8fee182171 Set up release notes for BIND 9.18.16 2023-05-10 10:41:42 +02:00
Michał Kępień
9c09313bc9 Update BIND version to 9.18.16-dev 2023-05-10 10:41:42 +02:00
Michał Kępień
f0c97789ff Merge branch '3986-handle-ISC_R_NOPERM-in-dns_dispatch-and-honour-the-source-port-9.18' into 'bind-9.18'
[9.18] Honour the source-port when retrying in dns_dispatch

See merge request isc-projects/bind9!7893
2023-05-05 13:50:06 +00:00
Ondřej Surý
a41eb823e9 Add CHANGES note for [GL #3986]
(cherry picked from commit 3d36e0bb89)
2023-05-05 15:40:12 +02:00
Ondřej Surý
e0620ca208 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
(cherry picked from commit c8e8ccd026)
2023-05-05 15:40:12 +02:00
Michał Kępień
9ae821b70e Merge branch '3980-add-timeouts-to-unit-tests-9.18' into 'bind-9.18'
[9.18] Use SIGABRT rather than SIGKILL for long running unit test

See merge request isc-projects/bind9!7892
2023-05-05 12:26:53 +00:00
Mark Andrews
ce391b500b 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

(cherry picked from commit 21a3d4f762)
2023-05-05 14:15:49 +02:00
Michał Kępień
54f842a442 Merge branch '4046-rndc-timeout-9.18' into 'bind-9.18'
[9.18] set the default rndc read timeout to 60 seconds

See merge request isc-projects/bind9!7890
2023-05-05 10:20:31 +00:00
Evan Hunt
5c4a56a9de CHANGES and release note for [GL #4046]
(cherry picked from commit dfc8efc467)
2023-05-05 11:46:55 +02:00
Evan Hunt
248f765e73 set the default rndc read timeout to 60 seconds
While the connect timeout was set to 60 seconds in rndc, the
idle read timeout was left at the default value of 30 seconds.
This commit sets it back to 60, to match the behavior in 9.16
and earlier.

(cherry picked from commit 9cacf9e336)
2023-05-05 11:46:55 +02:00
Matthijs Mekking
5a4ea1236b Merge branch '3991-logfile-absolutepath-bug-v9_18' into 'bind-9.18'
[9.18] Fix purging old log files with absolute file path

See merge request isc-projects/bind9!7880
2023-05-03 09:19:28 +00:00
Mark Andrews
fa35d059da Re-write remove_old_tsversions and greatest_version
Stop deliberately breaking const rules by copying file->name into
dirbuf and truncating it there.  Handle files located in the root
directory properly. Use unlinkat() from POSIX 200809.

(cherry picked from commit 9fcd42c672)
2023-05-03 10:39:46 +02:00
Matthijs Mekking
1670a738bd Add release note and CHANGES for #3991
Bug worth mentioning.

(cherry picked from commit ab9230b383)
2023-05-03 10:13:26 +02:00
Matthijs Mekking
cf8bf1e084 Add log rotation test with absolute file path
Add a test to the logfileconfig system test to test log file rotation
when using absolute file paths.

(cherry picked from commit d9b1df3b5d)
2023-05-03 10:13:02 +02:00
Matthijs Mekking
eb37fd2f13 Add more log/tap rotation tests
Add more tests to the dnstap system test to roll with different values.
Touch some files to make sure the number of existing files exceed the
number that we want to keep.

Add a test to the logfileconfig system test for the increment suffix.

(cherry picked from commit 9fb9670ebc)
2023-05-03 10:12:56 +02:00
Matthijs Mekking
33ad117166 Fix purging old log files with absolute file path
Removing old timestamp or increment versions of log backup files did
not work when the file is an absolute path: only the entry name was
provided to the file remove function.

The dirname was also bogus, since the file separater was put back too
soon.

Fix these issues to make log file rotation work when the file is
configured to be an absolute path.

(cherry picked from commit 70629d73da)
2023-05-03 10:12:51 +02:00
Mark Andrews
021337f3e2 Merge branch '4027-nsec3-of-removed-empty-non-terminal-remains-in-chain-breaking-validation-tools-bind-9.18' into 'bind-9.18'
[9.18] Resolve "NSEC3 of removed empty-non-terminal remains in chain, breaking validation tools"

See merge request isc-projects/bind9!7867
2023-04-25 06:10:31 +00:00
Mark Andrews
a69862e1a6 Add CHANGES note for [GL #4027]
(cherry picked from commit 7dbb2b877b)
2023-04-25 06:46:08 +01:00
Mark Andrews
a3c3012c25 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.

(cherry picked from commit ad91a70d15)
2023-04-25 06:46:08 +01:00
Mark Andrews
0eee434741 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.

(cherry picked from commit 27160c137f)
2023-04-25 06:46:08 +01:00
Ondřej Surý
57171a7047 Merge branch 'jpmens-main-patch-10650-9.18' into 'bind-9.18'
[9.18] Fix typo in the ARM - missed -> missing

See merge request isc-projects/bind9!7866
2023-04-24 15:14:41 +00:00
JP Mens
6862b5724e Fix typo in the ARM - missed -> missing
(cherry picked from commit 7bfffa1bd8)
2023-04-24 17:12:23 +02:00
Ondřej Surý
83ec46676f Merge branch '4004-reimplemented-max-transfer--in-9.18' into 'bind-9.18'
[9.18] Implement maximum global and idle time for incoming XFR

See merge request isc-projects/bind9!7862
2023-04-21 15:49:28 +00:00
Ondřej Surý
c71efbf45f Add CHANGES note for [GL #4004]
(cherry picked from commit 713e202110)
2023-04-21 17:21:32 +02:00
Aram Sargsyan
bc0461d4ae Implement new checks for the xfer system test
Check the max-transfer-time-in and max-transfer-idle-in options.

(cherry picked from commit 5324f047b2)
2023-04-21 17:21:32 +02:00
Aram Sargsyan
305bf677ab 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.

(cherry picked from commit dfaecfd752)
2023-04-21 17:21:32 +02:00
Ondřej Surý
fa2cb06c75 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.

(cherry picked from commit d2377f8e04)
2023-04-21 17:21:32 +02:00
Ondřej Surý
cf6a8987b3 Merge branch '4005-handle-ISC_R_INVALIDPROTO-from-libuv-9.18' into 'bind-9.18'
[9.18] Handle ISC_R_INVALIDPROTO in the dispatch

See merge request isc-projects/bind9!7861
2023-04-21 11:30:30 +00:00
Ondřej Surý
89b1f25c44 Add CHANGES and release note for [GL #4005]
(cherry picked from commit c233cd621b)
2023-04-21 12:49:06 +02:00
Evan Hunt
960e4dadd2 check for invalid protocol when dispatch fails
treat ISC_R_INVALIDPROTO as a networking error when it occurs.

(cherry picked from commit 2269a3e6fb)
2023-04-21 12:47:07 +02:00
Evan Hunt
2a714c25f8 add a result code for ENOPROTOOPT, EPROTONOSUPPORT
there was no isc_result_t value for invalid protocol errors
that could be returned from libuv.

(cherry picked from commit 0393b54afb)
2023-04-21 12:47:07 +02:00