]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoProperly process extra nameserver lines in resolv.conf
Mark Andrews [Mon, 15 May 2023 00:34:16 +0000 (10:34 +1000)] 
Properly process extra nameserver lines in resolv.conf

The whole line needs to be read rather than just the token "nameserver"
otherwise the next line in resolv.conf is not properly processed.

3 years agoMerge branch 'fanf-urcu-qsbr-build' into 'main'
Tony Finch [Mon, 15 May 2023 20:49:47 +0000 (20:49 +0000)] 
Merge branch 'fanf-urcu-qsbr-build' into 'main'

Fixes for liburcu-qsbr

Closes #4067

See merge request isc-projects/bind9!7925

3 years agoFixes for liburcu-qsbr
Tony Finch [Mon, 15 May 2023 10:42:33 +0000 (11:42 +0100)] 
Fixes for liburcu-qsbr

Move registration and deregistration of the main thread from
`isc_loopmgr_run()` into `isc__initialize()` / `isc__shutdown()`:
liburcu-qsbr fails an assertion if we try to use it from an
unregistered thread, and we need to be able to use it when the
event loops are not running.

Use `rcu_assign_pointer()` and `rcu_dereference()` in qp-trie
transactions so that they properly mark threads as online. The
RCU-protected pointer is no longer declared atomic because
liburcu does not (yet) use standard C atomics.

Fix the definition of `isc_qsbr_rcu_dereference()` to return
the referenced value, and to call the right function inside
liburcu.

Change the thread sanitizer suppressions to match any variant of
`rcu_*_barrier()`

3 years agoMerge branch '4068-coverity-uv_async_send' into 'main'
Tony Finch [Mon, 15 May 2023 20:49:23 +0000 (20:49 +0000)] 
Merge branch '4068-coverity-uv_async_send' into 'main'

Check the return value from uv_async_send()

Closes #4068

See merge request isc-projects/bind9!7926

3 years agoCheck the return value from uv_async_send()
Tony Finch [Mon, 15 May 2023 14:35:57 +0000 (15:35 +0100)] 
Check the return value from uv_async_send()

An omission pointed out by the following report from Coverity:

    /lib/isc/loop.c: 483 in isc_loopmgr_pause()
    >>>     CID 455002:  Error handling issues  (CHECKED_RETURN)
    >>>     Calling "uv_async_send" without checking return value (as is done elsewhere 5 out of 6 times).
    483      uv_async_send(&loop->pause_trigger);

3 years agoMerge branch 'mnowak/openbsd-7.3' into 'main'
Michal Nowak [Mon, 15 May 2023 17:46:44 +0000 (17:46 +0000)] 
Merge branch 'mnowak/openbsd-7.3' into 'main'

Add OpenBSD 7.3

See merge request isc-projects/bind9!7847

3 years agoAdd OpenBSD 7.3
Michal Nowak [Mon, 17 Apr 2023 16:50:55 +0000 (18:50 +0200)] 
Add OpenBSD 7.3

3 years agoMerge branch 'mnowak/freebsd-13.2' into 'main'
Michal Nowak [Mon, 15 May 2023 16:31:38 +0000 (16:31 +0000)] 
Merge branch 'mnowak/freebsd-13.2' into 'main'

Add FreeBSD 13.2

See merge request isc-projects/bind9!7846

3 years agoAdd FreeBSD 13.2
Michal Nowak [Mon, 17 Apr 2023 16:46:43 +0000 (18:46 +0200)] 
Add FreeBSD 13.2

3 years agoMerge branch '4064-read-timeout-failure' into 'main'
Evan Hunt [Mon, 15 May 2023 16:25:45 +0000 (16:25 +0000)] 
Merge branch '4064-read-timeout-failure' into 'main'

allow streamdns read to resume after timeout

Closes #4064

See merge request isc-projects/bind9!7921

3 years agoallow streamdns read to resume after timeout
Evan Hunt [Sun, 14 May 2023 06:31:45 +0000 (23:31 -0700)] 
allow streamdns read to resume after timeout

when reading on a streamdns socket failed due to timeout, but
the dispatch was still waiting for other responses, it would
resume reading by calling isc_nm_read() again. this caused
an assertion because the socket was already reading.

we now check that either the socket is reading, or that it was
already reading on the same handle.

3 years agoMerge branch 'fanf-urcu-qp' into 'main'
Tony Finch [Fri, 12 May 2023 20:43:30 +0000 (20:43 +0000)] 
Merge branch 'fanf-urcu-qp' into 'main'

Replace isc_qsbr with liburcu-qsbr

Closes #3936 and #4019

See merge request isc-projects/bind9!7668

3 years agoCHANGES note for [GL #3936]
Tony Finch [Thu, 9 Mar 2023 11:11:41 +0000 (11:11 +0000)] 
CHANGES note for [GL #3936]

[cleanup] Refactor the loop manager and qp-trie code to remove
isc_qsbr and use liburcu instead. [GL #3936]

3 years agoRemove the now-unused ISC_STACK
Tony Finch [Fri, 12 May 2023 11:20:42 +0000 (12:20 +0100)] 
Remove the now-unused ISC_STACK

We are using the liburcu concurrent data structures instead.

3 years agoUse per-CPU RCU helper threads
Tony Finch [Fri, 5 May 2023 07:12:35 +0000 (08:12 +0100)] 
Use per-CPU RCU helper threads

Create and free per-CPU helper threads from the main thread and tell
thread sanitizer to suppress leaking threads. (We are not leaking
threads ourselves and we can safely ignore the Userspace-RCU thread
leaks.)

3 years agoHelp thread sanitizer to cope with liburcu
Tony Finch [Thu, 4 May 2023 14:26:13 +0000 (15:26 +0100)] 
Help thread sanitizer to cope with liburcu

All the places the qp-trie code was using `call_rcu()` needed
`__tsan_release()` and `__tsan_acquire()` annotations, so
add a couple of wrappers to encapsulate this pattern.

With these wrappers, the tests run almost clean under thread
sanitizer. The remaining problems are due to `rcu_barrier()`
which can be suppressed using `.tsan-suppress`. It does not
suppress the whole of `liburcu`, because we would like thread
sanitizer to detect problems in `call_rcu()` callbacks, which
are called from `liburcu`.

The CI jobs have been updated to use `.tsan-suppress` by
default, except for a special-case job that needs the
additional suppressions in `.tsan-suppress-extra`.

We might be able to get rid of some of this after liburcu gains
support for thread sanitizer.

Note: the `rcu_barrier()` suppression is not entirely effective:
tsan sometimes reports races that originate inside `rcu_barrier()`
but tsan has discarded the stack so it does not have the
information required to suppress the report. These "races" can
be made much easier to reproduce by adding `atexit_sleep_ms=1000`
to `TSAN_OPTIONS`. The problem with tsan's short memory can be
addressed by increasing `history_size`: when it is large enough
(6 or 7) the `rcu_barrier()` stack usually survives long enough
for suppression to work.

3 years agoAvoid using the zone timer after its loop has gone
Tony Finch [Wed, 3 May 2023 14:29:43 +0000 (15:29 +0100)] 
Avoid using the zone timer after its loop has gone

Shutdown and cleanup of zones is more asynchronous with the qp-trie
zone table. As a result it's possible that some activity is delayed
until after a zone has been released from its zonemanager.

Previously, the dns_zone code was not very strict in the way it
refers to the loop it is running on: The loop pointer was stashed when
dns_zonemgr_managezone() was called and never cleared. Now, zones
properly attach to and detach from their loops.

The zone timer depends on its loop. The shutdown crashes occurred
when asynchronous calls tried to modify the zone timer after
dns_zonemgr_releasezone() has been called and the loop was
invalidated. In these cases the attempt to set the timer is now
ignored, with a debug log message.

3 years agoGet the tests working with liburcu
Tony Finch [Wed, 8 Mar 2023 14:52:30 +0000 (14:52 +0000)] 
Get the tests working with liburcu

Mostly a few qp-trie details to adjust.

3 years agoThe zone table no longer depends on the loop manager
Tony Finch [Thu, 27 Apr 2023 11:47:03 +0000 (12:47 +0100)] 
The zone table no longer depends on the loop manager

This reverts some of the changes in commit b171cacf4f0123ba
because now it isn't necessary to pass the loopmgr around.

3 years agoRefactor the core qp-trie code to use liburcu
Tony Finch [Wed, 8 Mar 2023 14:28:06 +0000 (14:28 +0000)] 
Refactor the core qp-trie code to use liburcu

A `dns_qmpulti_t` no longer needs to know about its loopmgr. We no
longer keep a linked list of `dns_qpmulti_t` that have reclamation
work, and we no longer mark chunks with the phase in which they are to
be reclaimed. Instead, empty chunks are listed in an array in a
`qp_rcu_t`, which is passed to call_rcu().

3 years agoRemove isc_qsbr (we are using liburcu instead)
Tony Finch [Wed, 8 Mar 2023 10:20:16 +0000 (10:20 +0000)] 
Remove isc_qsbr (we are using liburcu instead)

This commit breaks the qp-trie code.

3 years agoSlightly more sanitary thread dispatch
Tony Finch [Wed, 3 May 2023 14:44:36 +0000 (15:44 +0100)] 
Slightly more sanitary thread dispatch

Tell thread sanitizer that the thread wrapper is released before
passing it to a new thread.

3 years agoWait for RCU to finish before destroying a memory context
Tony Finch [Fri, 28 Apr 2023 13:10:03 +0000 (14:10 +0100)] 
Wait for RCU to finish before destroying a memory context

Memory reclamation by `call_rcu()` is asynchronous, so during shutdown
it can lose a race with the destruction of its memory context. When we
defer memory reclamation, we need to attach to the memory context to
indicate that it is still in use, but that is not enough to delay its
destruction. So, call `rcu_barrier()` in `isc_mem_destroy()` to wait
for pending RCU work to finish before proceeding to destroy the memory
context.

3 years agoA macro for the size of a struct with a flexible array member
Tony Finch [Thu, 9 Mar 2023 10:43:53 +0000 (10:43 +0000)] 
A macro for the size of a struct with a flexible array member

It can be fairly long-winded to allocate space for a struct with a
flexible array member: in general we need the size of the struct, the
size of the member, and the number of elements. Wrap them all up in a
STRUCT_FLEX_SIZE() macro, and use the new macro for the flexible
arrays in isc_ht and dns_qp.

3 years agoMerge branch '4046-rndc-t-option' into 'main'
Evan Hunt [Fri, 12 May 2023 19:37:36 +0000 (19:37 +0000)] 
Merge branch '4046-rndc-t-option' into 'main'

add 'rndc -t' option to set timeout

Closes #4046

See merge request isc-projects/bind9!7889

3 years agoCHANGES and release note for part 2 of [GL #4046]
Evan Hunt [Wed, 3 May 2023 21:34:39 +0000 (14:34 -0700)] 
CHANGES and release note for part 2 of [GL #4046]

3 years agoadd 'rndc -t' option to set timeout
Evan Hunt [Wed, 3 May 2023 21:28:37 +0000 (14:28 -0700)] 
add 'rndc -t' option to set timeout

Allow an arbitrary TCP timeout value to be specified when running
rndc, so that commands that take a long time to execute (for example,
reloading a very large configuration) can be given time to do so.

3 years agoMerge branch '4054-zone_resigninc-bugfix' into 'main'
Arаm Sаrgsyаn [Fri, 12 May 2023 13:37:46 +0000 (13:37 +0000)] 
Merge branch '4054-zone_resigninc-bugfix' into 'main'

zone_resigninc(): check whether zone->db is a valid pointer before attaching

Closes #4054

See merge request isc-projects/bind9!7914

3 years agoAdd a CHANGES note for [GL #4054]
Aram Sargsyan [Thu, 11 May 2023 12:20:58 +0000 (12:20 +0000)] 
Add a CHANGES note for [GL #4054]

3 years agoCheck whether zone->db is a valid pointer before attaching
Aram Sargsyan [Thu, 11 May 2023 12:08:13 +0000 (12:08 +0000)] 
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.

3 years agoMerge branch 'ondrej/convert-isc_async-to-use-urcu-wfcqueue' into 'main'
Ondřej Surý [Fri, 12 May 2023 13:24:27 +0000 (13:24 +0000)] 
Merge branch 'ondrej/convert-isc_async-to-use-urcu-wfcqueue' into 'main'

Change the isc_async and isc_quota API to use cds_wfcqueue internally

See merge request isc-projects/bind9!7894

3 years agoAdd Userspace-RCU to global CFLAGS and LIBS
Ondřej Surý [Tue, 9 May 2023 11:38:37 +0000 (13:38 +0200)] 
Add Userspace-RCU to global CFLAGS and LIBS

The Userspace-RCU headers are now needed for more parts of the libisc
and libdns, thus we need to add it globally to prevent compilation
failures on systems with non-standard Userspace-RCU installation path.

3 years agoChange the isc_quota API to use cds_wfcqueue internally
Ondřej Surý [Mon, 8 May 2023 21:31:54 +0000 (23:31 +0200)] 
Change the isc_quota API to use cds_wfcqueue internally

The isc_quota API was using locked list of isc_job_t objects to keep the
waiting TCP accepts.  Change the isc_quota implementation to use
cds_wfcqueue internally - the enqueue is wait-free and only dequeue
needs to be locked.

3 years agoAdjust the udp_shutdown_connect to delay the check
Ondřej Surý [Tue, 9 May 2023 08:24:37 +0000 (10:24 +0200)] 
Adjust the udp_shutdown_connect to delay the check

The teardown jobs are not executed immediately, so we need to delay the
check for ISC_R_SHUTTINGDOWN even more (as the UDP connect is
synchronous, it makes it harder to test it).

3 years agoChange the isc_async API to use cds_wfcqueue internally
Ondřej Surý [Mon, 8 May 2023 21:31:54 +0000 (23:31 +0200)] 
Change the isc_async API to use cds_wfcqueue internally

The isc_async API was using lock-free stack (where enqueue operation was
not wait-free).  Change the isc_async to use cds_wfcqueue internally -
enqueue and splice (move the queue members from one list to another) is
nonblocking and wait-free.

3 years agoMerge branch '4045-refactor-rbtdb-glue_cache' into 'main'
Ondřej Surý [Fri, 12 May 2023 11:26:58 +0000 (11:26 +0000)] 
Merge branch '4045-refactor-rbtdb-glue_cache' into 'main'

Replace glue_cache hashtable with direct link in rdatasetheader

Closes #4045

See merge request isc-projects/bind9!7895

3 years agoAdd CHANGES and release note for [GL #4045]
Ondřej Surý [Tue, 9 May 2023 12:53:28 +0000 (14:53 +0200)] 
Add CHANGES and release note for [GL #4045]

3 years agoReplace glue_cache hashtable with direct link in rdatasetheader
Ondřej Surý [Wed, 3 May 2023 17:38:05 +0000 (19:38 +0200)] 
Replace glue_cache hashtable with direct link in rdatasetheader

Instead of having a global hashtable with a global rwlock for the GLUE
cache, move the glue_list directly into rdatasetheader and use
Userspace-RCU to update the pointer when the glue_list is empty.

Additionally, the cached glue_lists needs to be stored in the RBTDB
version for early cleaning, otherwise the circular dependencies between
nodes and glue_lists will prevent nodes to be ever cleaned up.

3 years agoMerge branch 'mnowak/coverity-scan-2022.12' into 'main'
Michal Nowak [Fri, 12 May 2023 08:13:42 +0000 (08:13 +0000)] 
Merge branch 'mnowak/coverity-scan-2022.12' into 'main'

Use the latest Coverity Scan

See merge request isc-projects/bind9!7881

3 years agoUse the latest Coverity Scan
Michal Nowak [Wed, 3 May 2023 09:55:57 +0000 (11:55 +0200)] 
Use the latest Coverity Scan

3 years agoMerge branch '4050-cdnskey-no' into 'main'
Matthijs Mekking [Fri, 12 May 2023 07:46:17 +0000 (07:46 +0000)] 
Merge branch '4050-cdnskey-no' into 'main'

Add option to not generate CDNSKEY record

Closes #4050

See merge request isc-projects/bind9!7917

3 years agoAdd release note and CHANGES for cdnskey option
Matthijs Mekking [Thu, 11 May 2023 14:20:47 +0000 (16:20 +0200)] 
Add release note and CHANGES for cdnskey option

3 years agoRead from kasp whether to publish CDNSKEY
Matthijs Mekking [Thu, 11 May 2023 14:15:57 +0000 (16:15 +0200)] 
Read from kasp whether to publish CDNSKEY

Check the policy and feed 'dns_dnssec_syncupdate() the right value
to enable/disable CDSNKEY publication.

3 years agoAdd test case for cdnskey no;
Matthijs Mekking [Thu, 11 May 2023 13:13:03 +0000 (15:13 +0200)] 
Add test case for cdnskey no;

Change one of the test cases to disable publication of CDNSKEY.

3 years agoAdd configuration option 'cdnskey'
Matthijs Mekking [Thu, 11 May 2023 12:11:45 +0000 (14:11 +0200)] 
Add configuration option 'cdnskey'

Add the 'cdnskey' configuration option to 'dnssec-policy'.

3 years agoAdd functions to set CDNSKEY publication
Matthijs Mekking [Thu, 11 May 2023 12:00:58 +0000 (14:00 +0200)] 
Add functions to set CDNSKEY publication

Add kasp API functions to enable/disable publication of CDNSKEY records.

3 years agoMerge branch 'mnowak/pytest_rewrite_ttl' into 'main'
Michal Nowak [Thu, 11 May 2023 14:09:42 +0000 (14:09 +0000)] 
Merge branch 'mnowak/pytest_rewrite_ttl' into 'main'

Rewrite the ttl system test to pytest

See merge request isc-projects/bind9!7896

3 years agoRewrite the ttl system test to pytest
Michal Nowak [Thu, 4 May 2023 18:05:30 +0000 (20:05 +0200)] 
Rewrite the ttl system test to pytest

3 years agoMerge branch 'mnowak/clang-16' into 'main'
Michal Nowak [Thu, 11 May 2023 12:18:16 +0000 (12:18 +0000)] 
Merge branch 'mnowak/clang-16' into 'main'

Bump the LLVM version to 16

See merge request isc-projects/bind9!7721

3 years agoUpdate sources to Clang 16 formatting
Michal Nowak [Thu, 30 Mar 2023 17:08:41 +0000 (19:08 +0200)] 
Update sources to Clang 16 formatting

3 years agoUpdate clang to version 16
Michal Nowak [Fri, 24 Mar 2023 10:18:09 +0000 (11:18 +0100)] 
Update clang to version 16

3 years agoMerge branch '4023-nsupdate-disable-asan-for-fatal-cases' into 'main'
Michal Nowak [Thu, 11 May 2023 11:41:47 +0000 (11:41 +0000)] 
Merge branch '4023-nsupdate-disable-asan-for-fatal-cases' into 'main'

Disable ASAN in nsupdate for fatal cases

Closes #4023

See merge request isc-projects/bind9!7871

3 years agoDisable ASAN in nsupdate for fatal cases
Michal Nowak [Thu, 27 Apr 2023 08:30:54 +0000 (10:30 +0200)] 
Disable ASAN in nsupdate for fatal cases

Clang 16 LeakSanitizer reports a memory leak when dns_request_create()
returned a TLS error in the nsupdate system test. While technically a
memory leak on error handling, it's not a problem because the program is
immediately terminated; nsupdate is not expected to run for a prolonged
time.

3 years agoMerge branch 'fanf-noreturn-lossage' into 'main'
Tony Finch [Thu, 11 May 2023 10:41:01 +0000 (10:41 +0000)] 
Merge branch 'fanf-noreturn-lossage' into 'main'

Avoid lossage from <stdnoreturn.h>

See merge request isc-projects/bind9!7906

3 years agoAvoid lossage from <stdnoreturn.h>
Tony Finch [Wed, 10 May 2023 16:15:21 +0000 (17:15 +0100)] 
Avoid lossage from <stdnoreturn.h>

A few of the source files in `tests/ns` included `<isc/util.h>`
before `<cmocka.h>`. This could cause compile failures because the
`CMOCKA_NORETURN` macro is defined as `__attribute__((noreturn))`
and `<stdnoreturn.h>` defines `noreturn` as `_Noreturn` which does
not work as a gcc-style attribute.

3 years agoMerge branch 'mnowak/pytest_rewrite_hooks' into 'main'
Michal Nowak [Thu, 11 May 2023 10:26:33 +0000 (10:26 +0000)] 
Merge branch 'mnowak/pytest_rewrite_hooks' into 'main'

Rewrite the hooks system test to pytest

See merge request isc-projects/bind9!7883

3 years agoRewrite the hooks system test to pytest
Michal Nowak [Wed, 3 May 2023 18:06:38 +0000 (20:06 +0200)] 
Rewrite the hooks system test to pytest

Also, enable the test under TSAN.

3 years agoMerge branch '4049-detect-formerr-with-an-echoed-dns-cookie-client-cookie-and-retry...
Mark Andrews [Thu, 11 May 2023 01:16:19 +0000 (01:16 +0000)] 
Merge branch '4049-detect-formerr-with-an-echoed-dns-cookie-client-cookie-and-retry-without-dns-cookie' into 'main'

Resolve "Detect FORMERR with an echoed DNS COOKIE client cookie and retry without DNS COOKIE"

Closes #4049

See merge request isc-projects/bind9!7888

3 years agoAdd CHANGES note for [GL #4049]
Mark Andrews [Mon, 8 May 2023 09:39:54 +0000 (19:39 +1000)] 
Add CHANGES note for [GL #4049]

3 years agoCheck fallback on FORMERR to EDNS options
Mark Andrews [Mon, 8 May 2023 06:26:29 +0000 (16:26 +1000)] 
Check fallback on FORMERR to EDNS options

3 years agoAdd a server which returns FORMERR to all EDNS options
Mark Andrews [Mon, 8 May 2023 06:07:19 +0000 (16:07 +1000)] 
Add a server which returns FORMERR to all EDNS options

The server also echoes back the EDNS options and EDNS flags.

3 years agoHandle FORMERR on unknown EDNS option that are echoed
Mark Andrews [Mon, 8 May 2023 07:39:51 +0000 (17:39 +1000)] 
Handle FORMERR on unknown EDNS option that are echoed

If the resolver received a FORMERR response to a request with
an DNS COOKIE option present that echoes the option back, resend
the request without an DNS COOKIE option present.

3 years agoMerge branch '4039-dighost-fix-double-shutdown-call' into 'main'
Arаm Sаrgsyаn [Wed, 10 May 2023 11:36:23 +0000 (11:36 +0000)] 
Merge branch '4039-dighost-fix-double-shutdown-call' into 'main'

dighost.c: don't call check_if_done() twice successively

Closes #4039

See merge request isc-projects/bind9!7878

3 years agoAdd a CHANGES note for [GL #4039]
Aram Sargsyan [Tue, 2 May 2023 13:21:35 +0000 (13:21 +0000)] 
Add a CHANGES note for [GL #4039]

3 years agodighost.c: don't call check_if_done() twice successively
Aram Sargsyan [Tue, 2 May 2023 12:24:34 +0000 (12:24 +0000)] 
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.

3 years agoMerge branch 'tkrizek/shutdown-test-exc-handling' into 'main'
Tom Krizek [Wed, 10 May 2023 10:54:48 +0000 (10:54 +0000)] 
Merge branch 'tkrizek/shutdown-test-exc-handling' into 'main'

Ensure named always terminates in the shutdown test

See merge request isc-projects/bind9!7819

3 years agoReplace dnspython resolver.query with resolver.resolve
Tom Krizek [Thu, 6 Apr 2023 12:33:27 +0000 (14:33 +0200)] 
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 3b1756d45012a66f08693c17145a8484ec68bd47

3 years agoEnsure named always terminates in the shutdown test
Tom Krizek [Thu, 6 Apr 2023 12:05:30 +0000 (14:05 +0200)] 
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.

3 years agoRefactor shutdown test into more helper functions
Tom Krizek [Thu, 6 Apr 2023 12:01:43 +0000 (14:01 +0200)] 
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.

3 years agoMerge branch 'michal/set-up-version-and-release-notes-for-bind-9.19.14' into 'main'
Michał Kępień [Wed, 10 May 2023 08:47:54 +0000 (08:47 +0000)] 
Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.19.14' into 'main'

Set up version and release notes for BIND 9.19.14

See merge request isc-projects/bind9!7899

3 years agoSet up release notes for BIND 9.19.14
Michał Kępień [Wed, 10 May 2023 08:41:42 +0000 (10:41 +0200)] 
Set up release notes for BIND 9.19.14

3 years agoUpdate BIND version to 9.19.14-dev
Michał Kępień [Wed, 10 May 2023 08:41:42 +0000 (10:41 +0200)] 
Update BIND version to 9.19.14-dev

3 years agoUpdate BIND version for release v9.19.13
Michał Kępień [Mon, 8 May 2023 13:34:59 +0000 (15:34 +0200)] 
Update BIND version for release

3 years agoAdd a CHANGES marker
Michał Kępień [Mon, 8 May 2023 13:34:59 +0000 (15:34 +0200)] 
Add a CHANGES marker

3 years agoMerge branch 'michal/prepare-documentation-for-bind-9.19.13' into 'v9.19.13-release'
Michał Kępień [Mon, 8 May 2023 13:33:29 +0000 (13:33 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.19.13' into 'v9.19.13-release'

Prepare documentation for BIND 9.19.13

See merge request isc-private/bind9!515

3 years agoAdd release note for GL #4027
Michał Kępień [Mon, 8 May 2023 13:29:07 +0000 (15:29 +0200)] 
Add release note for GL #4027

3 years agoAdd release note for GL #3985
Michał Kępień [Mon, 8 May 2023 13:29:07 +0000 (15:29 +0200)] 
Add release note for GL #3985

3 years agoReorder release notes
Michał Kępień [Mon, 8 May 2023 13:29:07 +0000 (15:29 +0200)] 
Reorder release notes

3 years agoTweak and reword release notes
Michał Kępień [Mon, 8 May 2023 13:29:07 +0000 (15:29 +0200)] 
Tweak and reword release notes

3 years agoPrepare release notes for BIND 9.19.13
Michał Kępień [Mon, 8 May 2023 13:29:07 +0000 (15:29 +0200)] 
Prepare release notes for BIND 9.19.13

3 years agoApply minor corrections to CHANGES
Michał Kępień [Mon, 8 May 2023 13:29:07 +0000 (15:29 +0200)] 
Apply minor corrections to CHANGES

3 years agoMerge branch '4046-rndc-timeout' into 'main'
Michał Kępień [Fri, 5 May 2023 09:43:00 +0000 (09:43 +0000)] 
Merge branch '4046-rndc-timeout' into 'main'

set the default rndc read timeout to 60 seconds

See merge request isc-projects/bind9!7885

3 years agoCHANGES and release note for [GL #4046]
Evan Hunt [Wed, 3 May 2023 21:16:58 +0000 (14:16 -0700)] 
CHANGES and release note for [GL #4046]

3 years agoset the default rndc read timeout to 60 seconds
Evan Hunt [Wed, 3 May 2023 21:12:25 +0000 (14:12 -0700)] 
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.

3 years agoMerge branch '2360-dnstap-timestamp-millis-oliverford' into 'main'
Matthijs Mekking [Thu, 4 May 2023 14:17:50 +0000 (14:17 +0000)] 
Merge branch '2360-dnstap-timestamp-millis-oliverford' into 'main'

Add option to dnstap-read to print long timestamps

Closes #2360

See merge request isc-projects/bind9!7887

3 years agoAdd release note and CHANGES for #2360
Matthijs Mekking [Thu, 4 May 2023 13:05:46 +0000 (15:05 +0200)] 
Add release note and CHANGES for #2360

3 years agoAdd option to dnstap-read to print long timestamps
Oliver Ford [Sat, 15 Apr 2023 20:37:16 +0000 (21:37 +0100)] 
Add option to dnstap-read to print long timestamps

Adds a -t option to dnstap-read to print timestamps with
millisecond precision

3 years agoChange dnstap-read timestamp to millis
Oliver Ford [Sun, 2 Apr 2023 17:50:57 +0000 (18:50 +0100)] 
Change dnstap-read timestamp to millis

3 years agoMerge branch 'marka-placeholder' into 'main'
Mark Andrews [Thu, 4 May 2023 03:50:45 +0000 (03:50 +0000)] 
Merge branch 'marka-placeholder' into 'main'

Add placeholder for [GL #3988]

See merge request isc-projects/bind9!7886

3 years agoAdd placeholder for [GL #3988]
Mark Andrews [Thu, 4 May 2023 03:14:24 +0000 (13:14 +1000)] 
Add placeholder for [GL #3988]

3 years agoMerge branch '4031-remove-dead-code-from-dns_zone' into 'main'
Ondřej Surý [Wed, 3 May 2023 19:52:22 +0000 (19:52 +0000)] 
Merge branch '4031-remove-dead-code-from-dns_zone' into 'main'

Fix a logical flaw that would skip logging notify success

Closes #4031

See merge request isc-projects/bind9!7879

3 years agoFix a logical flaw that would skip logging notify success
Ondřej Surý [Wed, 3 May 2023 06:15:31 +0000 (08:15 +0200)] 
Fix a logical flaw that would skip logging notify success

The notify_done() would never log a success as the logging part was
always skipped.  Fix the code flow in the function.

3 years agoMerge branch '3991-logfile-absolutepath-bug' into 'main'
Matthijs Mekking [Wed, 3 May 2023 07:41:17 +0000 (07:41 +0000)] 
Merge branch '3991-logfile-absolutepath-bug' into 'main'

Fix purging old log files with absolute file path

Closes #3991

See merge request isc-projects/bind9!7809

3 years agoRe-write remove_old_tsversions and greatest_version
Mark Andrews [Fri, 14 Apr 2023 03:53:41 +0000 (13:53 +1000)] 
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.

3 years agoAdd release note and CHANGES for #3991
Matthijs Mekking [Thu, 6 Apr 2023 07:45:55 +0000 (09:45 +0200)] 
Add release note and CHANGES for #3991

Bug worth mentioning.

3 years agoAdd log rotation test with absolute file path
Matthijs Mekking [Thu, 6 Apr 2023 07:24:43 +0000 (09:24 +0200)] 
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.

3 years agoAdd more log/tap rotation tests
Matthijs Mekking [Thu, 6 Apr 2023 07:21:09 +0000 (09:21 +0200)] 
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.

3 years agoFix purging old log files with absolute file path
Matthijs Mekking [Wed, 5 Apr 2023 15:50:12 +0000 (17:50 +0200)] 
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.

3 years agoMerge branch '4020-delv-ns-duplicate-output' into 'main'
Evan Hunt [Tue, 2 May 2023 20:17:41 +0000 (20:17 +0000)] 
Merge branch '4020-delv-ns-duplicate-output' into 'main'

prevent duplicate output from delv +ns

Closes #4020

See merge request isc-projects/bind9!7848

3 years agoCHANGES for [GL #4020]
Evan Hunt [Mon, 17 Apr 2023 21:52:48 +0000 (14:52 -0700)] 
CHANGES for [GL #4020]