]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoDisable failing MD5 unit tests in FIPS mode
Michal Nowak [Tue, 20 Oct 2020 10:15:23 +0000 (12:15 +0200)] 
Disable failing MD5 unit tests in FIPS mode

With FIPS mode enabled 'isc_hmac_init_test' and 'isc_hmac_md5_test'
tests of hmac_test and 'isc_md_init_test' and 'isc_md_md5_test' test
of md_test fail.

This is due to leveraging MD5, which is disabled in FIPS mode.

3 years agoAllow FIPS mode to be enabled at run time in named
Mark Andrews [Wed, 29 Jun 2022 04:10:06 +0000 (14:10 +1000)] 
Allow FIPS mode to be enabled at run time in named

If FIPS mode is supported by the OS 'named -F' will turn on FIPS
mode.

3 years agoDefine isc_fips_mode() and isc_fips_set_mode()
Mark Andrews [Wed, 20 Jul 2022 01:26:06 +0000 (11:26 +1000)] 
Define isc_fips_mode() and isc_fips_set_mode()

isc_fips_mode() determines if the process is running in FIPS mode

isc_fips_set_mode() sets the process into FIPS mode

3 years agoDetect if FIPS mode is configured at the OS level
Mark Andrews [Wed, 29 Jun 2022 04:10:06 +0000 (14:10 +1000)] 
Detect if FIPS mode is configured at the OS level

Always look for FIPS_mode and EVP_default_properties_enable_fips
rather than just when requested by --enable-fips.

3 years agoProbe for EVP_default_properties_enable_fips
Mark Andrews [Thu, 16 Dec 2021 08:20:40 +0000 (19:20 +1100)] 
Probe for EVP_default_properties_enable_fips

FIPS_mode is not available in OpenSSL 3.0.0

3 years agoadd --enable-fips-mode to configure summary
Evan Hunt [Wed, 13 Oct 2021 23:50:14 +0000 (16:50 -0700)] 
add --enable-fips-mode to configure summary

Report when FIPS mode is enabled or disabled in the configure
summary output.

3 years agoEnable FIPS testing in Pairwise
Michal Nowak [Tue, 20 Oct 2020 10:14:11 +0000 (12:14 +0200)] 
Enable FIPS testing in Pairwise

It's useful to configure and build with FIPS mode in Pairwise testing
because it exposes some parts of the code otherwise hiden.

3 years agoAdd scheduled FIPS mode jobs
Michal Nowak [Wed, 9 Dec 2020 11:04:38 +0000 (12:04 +0100)] 
Add scheduled FIPS mode jobs

3 years agoMerge branch '3980-add-timeouts-to-unit-tests' into 'main'
Mark Andrews [Mon, 3 Apr 2023 00:42:27 +0000 (00:42 +0000)] 
Merge branch '3980-add-timeouts-to-unit-tests' into 'main'

Resolve "Add timeouts to unit tests."

Closes #3980

See merge request isc-projects/bind9!7762

3 years agoKill unit tests that run more than 1200 seconds
Mark Andrews [Tue, 24 Jan 2023 07:09:06 +0000 (18:09 +1100)] 
Kill unit tests that run more than 1200 seconds

The CI doesn't provide useful forensics when a system test locks
up.  Fork the process and kill it with ABRT if it is still running
after 20 minutes.  Pass the exit status to the caller.

3 years agoMerge branch 'fanf-trampoline-go-jump' into 'main'
Tony Finch [Fri, 31 Mar 2023 17:11:04 +0000 (17:11 +0000)] 
Merge branch 'fanf-trampoline-go-jump' into 'main'

Simplify thread spawning

See merge request isc-projects/bind9!7293

3 years agoSimplify thread spawning
Tony Finch [Mon, 2 Jan 2023 19:56:27 +0000 (19:56 +0000)] 
Simplify thread spawning

The `isc_trampoline` module had a lot of machinery to support stable
thread IDs for use by hazard pointers. But the hazard pointer code
is gone, and the `isc_loop` module now has its own per-loop thread
IDs.

The trampoline machinery seems over-complicated for its remaining
tasks, so move the per-thread initialization into `isc/thread.c`,
and delete the rest.

3 years agoMerge branch 'ondrej/simplify-isc_time_now' into 'main'
Ondřej Surý [Fri, 31 Mar 2023 15:51:15 +0000 (15:51 +0000)] 
Merge branch 'ondrej/simplify-isc_time_now' into 'main'

Refactor isc_time_now() to return time, and not result

See merge request isc-projects/bind9!7761

3 years agoRefactor isc_time_now() to return time, and not result
Ondřej Surý [Thu, 30 Mar 2023 22:12:33 +0000 (00:12 +0200)] 
Refactor isc_time_now() to return time, and not result

The isc_time_now() and isc_time_now_hires() were used inconsistently
through the code - either with status check, or without status check,
or via TIME_NOW() macro with RUNTIME_CHECK() on failure.

Refactor the isc_time_now() and isc_time_now_hires() to always fail when
getting current time has failed, and return the isc_time_t value as
return value instead of passing the pointer to result in the argument.

3 years agoMerge branch '3982-remove-isc_fsaccess-API' into 'main'
Ondřej Surý [Fri, 31 Mar 2023 12:53:22 +0000 (12:53 +0000)] 
Merge branch '3982-remove-isc_fsaccess-API' into 'main'

Replace isc_fsaccess API with more secure file creation

Closes #3982

See merge request isc-projects/bind9!7766

3 years agoAdd CHANGES note for [GL #3982]
Ondřej Surý [Thu, 30 Mar 2023 17:35:59 +0000 (19:35 +0200)] 
Add CHANGES note for [GL #3982]

3 years agoReplace isc_fsaccess API with more secure file creation
Ondřej Surý [Thu, 30 Mar 2023 16:00:17 +0000 (18:00 +0200)] 
Replace isc_fsaccess API with more secure file creation

The isc_fsaccess API was created to hide the implementation details
between POSIX and Windows APIs.  As we are not supporting the Windows
APIs anymore, it's better to drop this API used in the DST part.

Moreover, the isc_fsaccess was setting the permissions in an insecure
manner - it operated on the filename, and not on the file descriptor
which can lead to all kind of attacks if unpriviledged user has read (or
even worse write) access to key directory.

Replace the code that operates on the private keys with code that uses
mkstemp(), fchmod() and atomic rename() at the end, so at no time the
private key files have insecure permissions.

3 years agoAdd isc_os_umask() function to get current umask
Ondřej Surý [Fri, 31 Mar 2023 08:06:03 +0000 (10:06 +0200)] 
Add isc_os_umask() function to get current umask

As it's impossible to get the current umask without modifying it at the
same time, initialize the current umask at the program start and keep
the loaded value internally.  Add isc_os_umask() function to access the
starttime umask.

3 years agoMerge branch 'ondrej/squash-dns_name_fullhash-and-dns_name_hash' into 'main'
Ondřej Surý [Fri, 31 Mar 2023 12:43:50 +0000 (12:43 +0000)] 
Merge branch 'ondrej/squash-dns_name_fullhash-and-dns_name_hash' into 'main'

Squash dns_name_fullhash() and dns_name_hash()

See merge request isc-projects/bind9!7759

3 years agoSquash dns_name_fullhash() and dns_name_hash()
Ondřej Surý [Thu, 30 Mar 2023 19:37:12 +0000 (21:37 +0200)] 
Squash dns_name_fullhash() and dns_name_hash()

The only place where dns_name_hash() was being used is the old hash
table in the dns_badcache unit.  Squash the dns_name_fullhash() and
dns_name_hash() into single dns_name_hash() function that's always
case-insensitive as it doesn't make to do case-sensitive hashing of the
domain names and we were not using this anywhere.

3 years agoMerge branch 'ondrej/add-isc_stdtime_now' into 'main'
Ondřej Surý [Fri, 31 Mar 2023 11:58:13 +0000 (11:58 +0000)] 
Merge branch 'ondrej/add-isc_stdtime_now' into 'main'

Provide isc_stdtime_now(void) that returns value

See merge request isc-projects/bind9!7757

3 years agoAdd CHANGES note for [GL !7757]
Ondřej Surý [Thu, 30 Mar 2023 19:16:14 +0000 (21:16 +0200)] 
Add CHANGES note for [GL !7757]

3 years agoRemove isc_stdtime_get() macro
Ondřej Surý [Thu, 30 Mar 2023 19:15:06 +0000 (21:15 +0200)] 
Remove isc_stdtime_get() macro

Now that isc_stdtime_get() macro is unused, remove it from the header
file.

3 years agoApply the semantic patch to remove isc_stdtime_get()
Ondřej Surý [Thu, 30 Mar 2023 19:13:41 +0000 (21:13 +0200)] 
Apply the semantic patch to remove isc_stdtime_get()

This is a simple replacement using the semantic patch from the previous
commit and as added bonus, one removal of previously undetected unused
variable in named/server.c.

3 years agoAdd a semantic patch to change isc_stdtime_get() to isc_stdtime_now
Ondřej Surý [Thu, 30 Mar 2023 19:09:24 +0000 (21:09 +0200)] 
Add a semantic patch to change isc_stdtime_get() to isc_stdtime_now

Add a simple semantic patch to rewrite all uses of isc_stdtime_get(&t)
to simpler t = isc_stdtime_now().

3 years agoProvide isc_stdtime_now(void) that returns value
Ondřej Surý [Thu, 30 Mar 2023 19:04:43 +0000 (21:04 +0200)] 
Provide isc_stdtime_now(void) that returns value

As isc_stdtime_get() cannot fail, the API seems to be too complicated,
add new isc_stdtime_now() that returns the unixtime as a return value.

3 years agoMerge branch '3970-dighost-signal-crash' into 'main'
Tony Finch [Fri, 31 Mar 2023 09:54:05 +0000 (09:54 +0000)] 
Merge branch '3970-dighost-signal-crash' into 'main'

Fix a crash when dig or host receive a signal

Closes #3970

See merge request isc-projects/bind9!7756

3 years agoFix a crash when dig or host receive a signal
Tony Finch [Thu, 30 Mar 2023 16:56:08 +0000 (17:56 +0100)] 
Fix a crash when dig or host receive a signal

When the loopmanager is shutting down following a signal,
`dig` and `host` should stop cleanly. Before this commit
they were oblivious to ISC_R_SHUTTINGDOWN.

The `isc_signal` callbacks now report this kind of mistake
with a stack backtrace.

3 years agoMerge branch 'matthijs-checkconf-kasp-test-bug' into 'main'
Matthijs Mekking [Fri, 31 Mar 2023 08:33:24 +0000 (08:33 +0000)] 
Merge branch 'matthijs-checkconf-kasp-test-bug' into 'main'

Fix kasp system test bug

See merge request isc-projects/bind9!7750

3 years agoFix kasp system test bug
Matthijs Mekking [Thu, 30 Mar 2023 12:56:20 +0000 (14:56 +0200)] 
Fix kasp system test bug

This test was succeeding for the wrong reason (policy not found, rather
than bad key length).

3 years agoMerge branch 'ondrej/add-maybe_unused-attribute-macro' into 'main'
Ondřej Surý [Thu, 30 Mar 2023 22:16:49 +0000 (22:16 +0000)] 
Merge branch 'ondrej/add-maybe_unused-attribute-macro' into 'main'

Replace __attribute__((unused)) with ISC_ATTR_UNUSED attribute macro

See merge request isc-projects/bind9!7345

3 years agoReplace __attribute__((unused)) with ISC_ATTR_UNUSED attribute macro
Ondřej Surý [Tue, 10 Jan 2023 09:20:44 +0000 (10:20 +0100)] 
Replace __attribute__((unused)) with ISC_ATTR_UNUSED attribute macro

Instead of marking the unused entities with UNUSED(x) macro in the
function body, use a `ISC_ATTR_UNUSED` attribute macro that expans to
C23 [[maybe_unused]] or __attribute__((__unused__)) as fallback.

3 years agoUse C23 attributes if available, add ISC_ATTR_UNUSED
Ondřej Surý [Mon, 27 Feb 2023 13:09:26 +0000 (14:09 +0100)] 
Use C23 attributes if available, add ISC_ATTR_UNUSED

Use C23 attribute styles if available:

  * Add new ISC_ATTR_UNUSED attribute macro that either expands to C23's
    [[maybe_unused]] or __attribute__((__unused__));

  * Add default expansion of the `noreturn` to [[noreturn]] if available;

  * Move the FALLTHROUGH from <isc/util.h> to <isc/attributes.h>

3 years agoMerge branch 'mnowak/replace-enable_dnsprs_dl-with-enable_dnsrps_dl' into 'main'
Michal Nowak [Thu, 30 Mar 2023 17:51:42 +0000 (17:51 +0000)] 
Merge branch 'mnowak/replace-enable_dnsprs_dl-with-enable_dnsrps_dl' into 'main'

Replace enable_dnsprs_dl with enable_dnsrps_dl

See merge request isc-projects/bind9!7745

3 years agoReplace enable_dnsprs_dl with enable_dnsrps_dl
Michal Nowak [Wed, 29 Mar 2023 11:12:50 +0000 (13:12 +0200)] 
Replace enable_dnsprs_dl with enable_dnsrps_dl

"enable_dnsprs_dl" is a typo where "enable_dnsrps_dl" was intended.

3 years agoMerge branch 'artem-tlsstream-followup-to-2846888c573fcc610cdf71bcdd5bb6f92ffaf499...
Artem Boldariev [Thu, 30 Mar 2023 16:41:05 +0000 (16:41 +0000)] 
Merge branch 'artem-tlsstream-followup-to-2846888c573fcc610cdf71bcdd5bb6f92ffaf499' into 'main'

TLS Stream: remove incorrect/obsolete INSIST()s from tls_do_bio()

See merge request isc-projects/bind9!7751

3 years agoTLS Stream: remove incorrect/obsolete INSIST()s from tls_do_bio()
Artem Boldariev [Thu, 30 Mar 2023 15:17:11 +0000 (18:17 +0300)] 
TLS Stream: remove incorrect/obsolete INSIST()s from tls_do_bio()

With the changes to tls_try_handshake() made in
2846888c573fcc610cdf71bcdd5bb6f92ffaf499 there are some incorrect
INSISTS() related to handshake handling which better to be removed.

3 years agoMerge branch 'ondrej/reduce-atomic-use-in-netmgr' into 'main'
Ondřej Surý [Thu, 30 Mar 2023 14:26:38 +0000 (14:26 +0000)] 
Merge branch 'ondrej/reduce-atomic-use-in-netmgr' into 'main'

Refactor the use of atomics in netmgr

See merge request isc-projects/bind9!7724

3 years agoAttach the accept "client" socket to .listener member of the socket
Ondřej Surý [Fri, 24 Mar 2023 14:32:02 +0000 (15:32 +0100)] 
Attach the accept "client" socket to .listener member of the socket

When accepting a TCP connection in the higher layers (tlsstream,
streamdns, and http) attach to the socket the connection was accepted
on, and use this socket instead of the parent listening socket.

This has an advantage - accessing the sock->listener now doesn't break
the thread boundaries, so we can properly check whether the socket is
being closed without requiring .closing member to be atomic_bool.

3 years agoConvert sock->active to non-atomic variable, cleanup rchildren
Ondřej Surý [Tue, 28 Mar 2023 15:03:56 +0000 (17:03 +0200)] 
Convert sock->active to non-atomic variable, cleanup rchildren

The last atomic_bool variable sock->active was converted to non-atomic
bool by properly handling the listening socket case where we were
checking parent socket instead of children sockets.

This is no longer necessary as we properly set the .active to false on
the children sockets.

Additionally, cleanup the .rchildren - the atomic variable was used for
mutex+condition to block until all children were listening, but that's
now being handled by a barrier.

Finally, just remove dead .self and .active_child_connections members of
the netmgr socket.

3 years agoRefactor the use of atomics in netmgr
Ondřej Surý [Fri, 24 Mar 2023 12:37:19 +0000 (13:37 +0100)] 
Refactor the use of atomics in netmgr

Now that everything runs on their own loop and we don't cross the thread
boundaries (with few exceptions), most of the atomic_bool variables used
to track the socket state have been unatomicized because they are always
accessed from the matching thread.

The remaining few have been relaxed: a) the sock->active is now using
acquire/release memory ordering; b) the various global limits are now
using relaxed memory ordering - we don't really care about the
synchronization for those.

3 years agoMerge branch '3961-add-fast-isc_loop_run' into 'main'
Ondřej Surý [Thu, 30 Mar 2023 14:09:50 +0000 (14:09 +0000)] 
Merge branch '3961-add-fast-isc_loop_run' into 'main'

Refactor isc_job_run to not-make any allocations

Closes #3961

See merge request isc-projects/bind9!7722

3 years agoAdd CHANGES for [GL #3961]
Ondřej Surý [Fri, 24 Mar 2023 11:23:17 +0000 (12:23 +0100)] 
Add CHANGES for [GL #3961]

3 years agoAdd isc_async_current() macro to run job on current loop
Ondřej Surý [Wed, 29 Mar 2023 07:02:22 +0000 (09:02 +0200)] 
Add isc_async_current() macro to run job on current loop

Previously, isc_job_run() could have been used to run the job on the
current loop and the isc_job_run() would take care of allocating and
deallocating the job.  After the change in this MR, the isc_job_run()
is more complicated to use, so we introduce the isc_async_current()
macro to suplement isc_async_run() when we need to run the job on the
current loop.

3 years agoRefactor isc_job_run to not-make any allocations
Ondřej Surý [Mon, 27 Mar 2023 20:40:57 +0000 (22:40 +0200)] 
Refactor isc_job_run to not-make any allocations

Change the isc_job_run() to not-make any allocations.  The caller must
make sure that it allocates isc_job_t - usually as part of the argument
passed to the callback.

For simple jobs, using isc_async_run() is advised as it allocates its
own separate isc_job_t.

3 years agoRefactor the isc__nm_uvreq_t to have idle callback
Ondřej Surý [Fri, 24 Mar 2023 11:11:44 +0000 (12:11 +0100)] 
Refactor the isc__nm_uvreq_t to have idle callback

Change the isc__nm_uvreq_t to have the idle callback as a separate
member as we always need to use it to properly close the uvreq.

Slightly refactor uvreq_put and uvreq_get to remove the unneeded
arguments - in uvreq_get(), we always use sock->worker, and in
uvreq_put, we always use req->sock, so there's not reason to pass those
extra arguments.

3 years agoUse uv_idle API for calling asynchronous connect/read/send callback
Ondřej Surý [Fri, 24 Mar 2023 09:36:58 +0000 (10:36 +0100)] 
Use uv_idle API for calling asynchronous connect/read/send callback

Instead of using isc_job_run() that's quite heavy as it allocates memory
for every new job, add uv_idle_t to uvreq union, and use uv_idle API
directly to execute the connect/read/send callback without any
additional allocations.

3 years agoRe-add the comment to streamdns_readmore()
Ondřej Surý [Fri, 24 Mar 2023 11:20:07 +0000 (12:20 +0100)] 
Re-add the comment to streamdns_readmore()

Put the comment back, so it's more obvious that we are only restarting
timer when there's a last handle attached to the socket; there has to be
always at least one.

3 years agoMerge branch '3967-linkfix-dnssec-guide' into 'main'
Matthijs Mekking [Wed, 29 Mar 2023 13:28:57 +0000 (13:28 +0000)] 
Merge branch '3967-linkfix-dnssec-guide' into 'main'

Remove dead link to resolver test

Closes #3967

See merge request isc-projects/bind9!7737

3 years agoAdd CHANGES for #3967
Matthijs Mekking [Tue, 28 Mar 2023 11:57:57 +0000 (13:57 +0200)] 
Add CHANGES for #3967

3 years agoRemove dead link to resolver test
Matthijs Mekking [Tue, 28 Mar 2023 11:55:59 +0000 (13:55 +0200)] 
Remove dead link to resolver test

The doc file doc/dnssec-guide/validation.rst points to a resolver test
site that is now down. Remove the dead link.

3 years agoMerge branch 'fanf-backtrace-log' into 'main'
Tony Finch [Wed, 29 Mar 2023 11:13:32 +0000 (11:13 +0000)] 
Merge branch 'fanf-backtrace-log' into 'main'

Ad-hoc backtrace logging with isc_backtrace_log()

See merge request isc-projects/bind9!7743

3 years agoAd-hoc backtrace logging with isc_backtrace_log()
Tony Finch [Fri, 3 Mar 2023 12:01:03 +0000 (12:01 +0000)] 
Ad-hoc backtrace logging with isc_backtrace_log()

It's sometimes helpful to get a quick idea of the call stack when
debugging. This change factors out the backtrace logging from named's
fatal error handler so that it's easy to use in other places too.

3 years agoMerge branch 'ondrej/fix-isc_nm_httpconnect-to-check-for-shuttingdown' into 'main'
Ondřej Surý [Wed, 29 Mar 2023 05:50:01 +0000 (05:50 +0000)] 
Merge branch 'ondrej/fix-isc_nm_httpconnect-to-check-for-shuttingdown' into 'main'

Fix isc_nm_httpconnect to check for shuttindown condition

See merge request isc-projects/bind9!7736

3 years agoFix isc_nm_httpconnect to check for shuttindown condition
Ondřej Surý [Tue, 28 Mar 2023 07:40:59 +0000 (09:40 +0200)] 
Fix isc_nm_httpconnect to check for shuttindown condition

The isc_nm_httpconnect() would succeed even if the netmgr would be
already shuttingdown.  This has been fixed and the unit test has been
updated to cope with fact that the handle would be NULL when
isc_nm_httpconnect() returns with an error.

3 years agoMerge branch '3926-dns_qp-fuzz-test-is-failing-to-build-under-clusterfuzz' into ...
Mark Andrews [Wed, 29 Mar 2023 03:20:03 +0000 (03:20 +0000)] 
Merge branch '3926-dns_qp-fuzz-test-is-failing-to-build-under-clusterfuzz' into 'main'

Remove unnecessary conditionals in fuzz/Makefile.am

Closes #3926

See merge request isc-projects/bind9!7649

3 years agoBuild libtest even if CMOCKA is not available
Mark Andrews [Thu, 9 Mar 2023 04:53:42 +0000 (15:53 +1100)] 
Build libtest even if CMOCKA is not available

Be more selective about what is not built when CMOCKA is not available
so that fuzz/dns_qp and fuzz/dns_qpkey_name can link against it.

3 years agoMerge branch 'each-dnsrps-testlib' into 'main'
Evan Hunt [Wed, 29 Mar 2023 02:03:17 +0000 (02:03 +0000)] 
Merge branch 'each-dnsrps-testlib' into 'main'

use a test library for DNSRPS

See merge request isc-projects/bind9!7693

3 years agoCHANGES for [GL !7693]
Evan Hunt [Wed, 15 Mar 2023 19:25:28 +0000 (12:25 -0700)] 
CHANGES for [GL !7693]

3 years agoadd --enable-dnsrps to gitlab CI
Evan Hunt [Wed, 15 Mar 2023 21:05:26 +0000 (14:05 -0700)] 
add --enable-dnsrps to gitlab CI

enable DNSRPS in the continuous integration tests

this triggered a build failure in OpenBSD; building with DNSRPS
causes arpa/nameser.h to be included, which defines the value
STATUS. that value was then reused in server.c  renaming the
value to STAT corrects the error.

3 years agoupdate the rpz tests to use the dummyrpz library
Evan Hunt [Tue, 14 Mar 2023 02:43:04 +0000 (19:43 -0700)] 
update the rpz tests to use the dummyrpz library

when testing the DNSRPS API, instead of linking to an installed
librpz.so from fastrpz, we now link to the test library. code that
ran dnsrpzd and checked the fastrpz license is now unnecessary and
has been removed.

two dnsrps-specific test cases in rpz (qname_as_ns and ip_as_ns) have
been removed, because they were only supported by fastrpz and do not
work in the test library. in rpzrecurse, nsip-wait-recurse and
nsdname-wait-recurse are now only tested in native mode, due to those
tests being specific to the native implementation.

3 years agoclean up library
Mark Andrews [Wed, 22 Mar 2023 06:57:10 +0000 (17:57 +1100)] 
clean up library

address style issues, unfreed memory, etc.

3 years agoimport libdummyrpz test library for DNSRPS
Evan Hunt [Mon, 13 Mar 2023 19:47:00 +0000 (12:47 -0700)] 
import libdummyrpz test library for DNSRPS

libdummyrpz is a limited version of the fastrpz library for use in
testing the dnsrps API.

3 years agoallow configuration of dnsrps library path
Evan Hunt [Mon, 13 Mar 2023 21:13:39 +0000 (14:13 -0700)] 
allow configuration of dnsrps library path

for testing purposes, we need to be able to specify a library path from
which to load the dnsrps implementation. this can now be done with the
"dnsrps-library" option.

DNSRPS can now be enabled in configure regardless of whether librpz.so
is currently installed on the system.

3 years agoMerge branch '3842-delv-ns' into 'main'
Evan Hunt [Tue, 28 Mar 2023 20:08:34 +0000 (20:08 +0000)] 
Merge branch '3842-delv-ns' into 'main'

implement "delv +ns"

Closes #3842

See merge request isc-projects/bind9!7477

3 years agoCHANGES and release note for [GL #3842]
Evan Hunt [Thu, 2 Feb 2023 07:38:04 +0000 (23:38 -0800)] 
CHANGES and release note for [GL #3842]

3 years agotest "delv +ns"
Evan Hunt [Mon, 27 Mar 2023 22:42:09 +0000 (15:42 -0700)] 
test "delv +ns"

add tests for "delv +ns", with and without +qmin and with and without
validation.

3 years agoadd "delv +hint"
Evan Hunt [Sat, 25 Mar 2023 00:50:32 +0000 (17:50 -0700)] 
add "delv +hint"

Add the ablity to specify a hints file from which to load root
name server addresses, so that "delv +ns" can be used with test
name servers.

3 years agoadd "delv +qmin"
Evan Hunt [Fri, 3 Mar 2023 08:46:36 +0000 (00:46 -0800)] 
add "delv +qmin"

add an option to enable or disable QNAME minimization in delv's
internal resolver.

3 years agoadd "delv +strace"
Evan Hunt [Thu, 2 Feb 2023 07:19:36 +0000 (23:19 -0800)] 
add "delv +strace"

"delv +strace" is similar to "delv +mtrace", but sets the logging
level to DEBUG(11) instead of DEBUG(10), so that packets sent
will be logged along with packets received. "delv +ns" turns
this option on by default.

3 years agosend delv +ns output to stdout
Evan Hunt [Wed, 15 Feb 2023 01:28:55 +0000 (17:28 -0800)] 
send delv +ns output to stdout

normally, the only output of delv that is sent to stdout is
the final answer to the query; all other output is sent to
stderr. this seems undesirable for delv +ns, which will
only be used to see the process of finding the answer. so,
for that case, we now send all the logging to stdout.

3 years agochange the log level of "resolver priming query complete"
Evan Hunt [Tue, 31 Jan 2023 21:30:12 +0000 (13:30 -0800)] 
change the log level of "resolver priming query complete"

this log message, formerly at level INFO, is now DEBUG(1),
so it won't be printed when running "delv +ns +nortrace".

3 years agoon connect error, send the actual result to the caller
Evan Hunt [Tue, 31 Jan 2023 21:30:12 +0000 (13:30 -0800)] 
on connect error, send the actual result to the caller

formerly if a connection failed in dns_request, the callback
function was called with ISC_R_CANCELED. change this to the
actual result code so the failure is correctly reported.

3 years agoadd explicit error for +trace argument
Evan Hunt [Wed, 15 Feb 2023 00:56:51 +0000 (16:56 -0800)] 
add explicit error for +trace argument

add a specific error message when someone tries to use
"delv +trace" suggesting "delv +ns" instead.

3 years agoadd "delv +ns" command, for full internal resolution
Evan Hunt [Tue, 31 Jan 2023 21:30:12 +0000 (13:30 -0800)] 
add "delv +ns" command, for full internal resolution

"delv +ns" (name server mode) instantiates a full recursive resolver
inside delv and uses it to resolve the requested name and type, logging
every authoritative response received to iterative queries in the
process. this is intended to replace "dig +trace"; it much more
accurately duplicates the behavior of named when resolving a query
with a cold cache.

3 years agochange ns__client_request() to ns_client_request()
Evan Hunt [Wed, 12 Jan 2022 07:35:22 +0000 (23:35 -0800)] 
change ns__client_request() to ns_client_request()

in the future we'll want to call this function from outside named,
so change the name to one suitable for external access.

3 years agoupdate stream sockets with bound address/port
Evan Hunt [Tue, 31 Jan 2023 21:30:12 +0000 (13:30 -0800)] 
update stream sockets with bound address/port

when isc_nm_listenstreamdns() is called with a local port of 0,
a random port is chosen. call uv_getsockname() to determine what
the port is as soon as the socket is bound, and add a function
isc_nmsocket_getaddr() to retrieve it, so that the caller can
connect to the listening socket. this will be used in cases
where the same process is acting as both client and server.

3 years agoadd ns_interface_create()
Evan Hunt [Tue, 31 Jan 2023 21:30:12 +0000 (13:30 -0800)] 
add ns_interface_create()

add a public function ns_interface_create() allowing the caller
to set up a listening interface directly without having to set
up listen-on and scan network interfaces.

3 years agoadd dns_view_addtrustedkey()
Evan Hunt [Tue, 31 Jan 2023 21:30:12 +0000 (13:30 -0800)] 
add dns_view_addtrustedkey()

the new dns_view_addtrustedkey() function allows a view's trust
anchors to be updated directly. this code was formerly in
dns_client_addtrustedkey(), which is now a wrapper around
dns_view_addtrustedkey().

3 years agoMerge branch 'mnowak/drop-unit-and-system-test-jobs' into 'main'
Michal Nowak [Tue, 28 Mar 2023 14:33:38 +0000 (14:33 +0000)] 
Merge branch 'mnowak/drop-unit-and-system-test-jobs' into 'main'

Drop tests on amd64cross32; move "unstable" unit and system jobs; drop Tumbleweed

See merge request isc-projects/bind9!7717

3 years agoDrop "unstable" Debian "bullseye" unit and system jobs
Michal Nowak [Thu, 23 Mar 2023 10:05:54 +0000 (11:05 +0100)] 
Drop "unstable" Debian "bullseye" unit and system jobs

"Unstable" Debian "bullseye" unit and system jobs differ from unit and
system jobs on the Debian "bullseye" image by running a few more tests
enabled by the CI_ENABLE_ALL_TESTS environmental variable.  These tests
are no less stable than the rest, and thus to have distinct jobs for
them wastes resources.

Run "unstable" unit and system tests as part of stock Debian "bullseye"
jobs.

3 years agoDrop unit and system tests on amd64cross32
Michal Nowak [Thu, 23 Mar 2023 09:30:59 +0000 (10:30 +0100)] 
Drop unit and system tests on amd64cross32

amd64cross32 jobs run a cross-compiled 32-bit BIND 9 on the 64-bit
platform. This approach brings no build issues, and it is a good way to
catch 32-bit issues in BIND 9 code-base and ensure cross-compilation
keeps working.

Unfortunately, running unit and system tests is a problem:

- #3269 - doth-ns1 frequently failed to start
- #3316 - quota_test sometimes fails to create new thread
- #3956 - tcp-ns1 sometimes fails to allocate memory

There's little value in running unit and system tests on the
amd64cross32 platform, and it only means the effort spent by QA by
looking into what turns out to be 32-bit limitations.

3 years agoMerge branch '3965-source-never-read-master.c' into 'main'
Matthijs Mekking [Tue, 28 Mar 2023 12:57:49 +0000 (12:57 +0000)] 
Merge branch '3965-source-never-read-master.c' into 'main'

Fix scan-build issue: initialized value never read

Closes #3965

See merge request isc-projects/bind9!7725

3 years agoAdd CHANGES entry for #3965
Matthijs Mekking [Mon, 27 Mar 2023 09:56:39 +0000 (11:56 +0200)] 
Add CHANGES entry for #3965

3 years agoFix scan-build issue: initialized value never read
Matthijs Mekking [Mon, 27 Mar 2023 09:54:00 +0000 (11:54 +0200)] 
Fix scan-build issue: initialized value never read

Value stored to 'source' during its initialization is never read.

3 years agoMerge branch 'tkrizek/gh-actions-branch-name-update' into 'main'
Tom Krizek [Mon, 27 Mar 2023 15:12:14 +0000 (15:12 +0000)] 
Merge branch 'tkrizek/gh-actions-branch-name-update' into 'main'

Update branch&tag name conventions

See merge request isc-projects/bind9!7697

3 years agoUpdate branch&tag naming convention in CONTRIBUTING
Tom Krizek [Fri, 24 Mar 2023 13:49:06 +0000 (14:49 +0100)] 
Update branch&tag naming convention in CONTRIBUTING

3 years agoUpdate github actions to trigger on correct branches
Tom Krizek [Thu, 16 Mar 2023 16:20:41 +0000 (17:20 +0100)] 
Update github actions to trigger on correct branches

The naming convention for maintanence branches was changed from `vX_Y`
to `bind-X.Y`.

3 years agoMerge branch '3962-doc-arm-fixes' into 'main'
Tom Krizek [Mon, 27 Mar 2023 15:07:31 +0000 (15:07 +0000)] 
Merge branch '3962-doc-arm-fixes' into 'main'

Documentation formatting fixes in ARM

Closes #3962

See merge request isc-projects/bind9!7723

3 years agoApply suppress_grammar directive in ARM docs
Tom Krizek [Fri, 24 Mar 2023 12:30:13 +0000 (13:30 +0100)] 
Apply suppress_grammar directive in ARM docs

With a newline before the :suppress_grammar: directive, it wasn't
actually interpreted as a directive, but rather as node content.
Therefore, the directive was ignored and the grammar was incorrectly
printed out.

3 years agoAdd missing newline in documentation code example
Tom Krizek [Fri, 24 Mar 2023 09:46:08 +0000 (10:46 +0100)] 
Add missing newline in documentation code example

3 years agoMerge branch 'mnowak/suppress-gitlab-clean-up-output' into 'main'
Michal Nowak [Mon, 27 Mar 2023 13:04:45 +0000 (13:04 +0000)] 
Merge branch 'mnowak/suppress-gitlab-clean-up-output' into 'main'

Suppress Git clean output in GitLab CI

See merge request isc-projects/bind9!7702

3 years agoSuppress Git clean output in GitLab CI
Michal Nowak [Mon, 20 Mar 2023 09:41:42 +0000 (10:41 +0100)] 
Suppress Git clean output in GitLab CI

Git clean in GitLab CI can take up to a thousand lines, thus cluttering
the output for no good reason.

The default GitLab GIT_CLEAN_FLAGS variable is extended with "q" as in
"quiet.

3 years agoMerge branch 'pspacek/qmin-docs-describe-underscore' into 'main'
Petr Špaček [Mon, 27 Mar 2023 12:58:48 +0000 (12:58 +0000)] 
Merge branch 'pspacek/qmin-docs-describe-underscore' into 'main'

Clarify qname-minimization relaxed in the ARM

See merge request isc-projects/bind9!7646

3 years agoClarify qname-minimization relaxed in the ARM
Petr Špaček [Fri, 3 Mar 2023 15:21:03 +0000 (16:21 +0100)] 
Clarify qname-minimization relaxed in the ARM

Leading underscore in qname confused some users, and it was not
documented.

3 years agoMerge branch '3968-catz-data-race-in-dns__catz_update_cb' into 'main'
Arаm Sаrgsyаn [Mon, 27 Mar 2023 11:35:43 +0000 (11:35 +0000)] 
Merge branch '3968-catz-data-race-in-dns__catz_update_cb' into 'main'

Fix a data race in dns__catz_update_cb()

Closes #3968

See merge request isc-projects/bind9!7726

3 years agoAdd a CHANGES note for [GL #3968]
Aram Sargsyan [Mon, 27 Mar 2023 11:09:13 +0000 (11:09 +0000)] 
Add a CHANGES note for [GL #3968]

3 years agoFix a data race in dns__catz_update_cb()
Aram Sargsyan [Mon, 27 Mar 2023 10:56:22 +0000 (10:56 +0000)] 
Fix a data race in dns__catz_update_cb()

The dns__catz_update_cb() function was earlier updated (see
d2ecff3c4a0d961041b860515858d258d40462d7) to use a separate
'dns_db_t' object ('catz->updb' instead of 'catz->db') to
avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions, but the 'REQUIRE'
check there still checks the validity of the 'catz->db' object.

Fix the omission.

3 years agoMerge branch 'each-replay-merge' into 'main'
Evan Hunt [Fri, 24 Mar 2023 20:46:46 +0000 (20:46 +0000)] 
Merge branch 'each-replay-merge' into 'main'

revise branch format

See merge request isc-projects/bind9!7719

3 years agoUpdate tag name convention in release checklist
Tom Krizek [Fri, 24 Mar 2023 13:56:19 +0000 (14:56 +0100)] 
Update tag name convention in release checklist