]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoClear OpenSSL errors on ECDSA_SIG_new failures
Mark Andrews [Thu, 13 Jul 2023 04:39:06 +0000 (14:39 +1000)] 
Clear OpenSSL errors on ECDSA_SIG_new failures

2 years agoClear OpenSSL errors on d2i_ASN1_OBJECT failures
Mark Andrews [Wed, 21 Jun 2023 11:30:15 +0000 (21:30 +1000)] 
Clear OpenSSL errors on d2i_ASN1_OBJECT failures

When d2i_ASN1_OBJECT() fails an error is pushed onto the thread's
error stack.  This is now cleared by calling ERR_clear_error().

2 years agoMerge branch 'ondrej-isc_mem_cget' into 'main'
Ondřej Surý [Thu, 31 Aug 2023 20:18:26 +0000 (20:18 +0000)] 
Merge branch 'ondrej-isc_mem_cget' into 'main'

Checked array allocation arithmetic with isc_mem_get and friends

See merge request isc-projects/bind9!8237

2 years agoAdd CHANGES note for [GL !8237]
Ondřej Surý [Wed, 23 Aug 2023 12:46:45 +0000 (14:46 +0200)] 
Add CHANGES note for [GL !8237]

2 years agoRemove ISC_MEM_ZERO and isc_mem_*x() API
Ondřej Surý [Wed, 23 Aug 2023 09:05:14 +0000 (11:05 +0200)] 
Remove ISC_MEM_ZERO and isc_mem_*x() API

Use the new isc_mem_c*() calloc-like API for allocations that are
zeroed.

In turn, this also fixes couple of incorrect usage of the ISC_MEM_ZERO
for structures that need to be zeroed explicitly.

There are few places where isc_mem_cput() is used on structures with a
flexible member (or similar).

2 years agoRemove ISC_MEM_ALIGN() memory flag
Ondřej Surý [Wed, 23 Aug 2023 08:05:30 +0000 (10:05 +0200)] 
Remove ISC_MEM_ALIGN() memory flag

The ISC_MEM_ALIGN() was not used anywhere (except mem.c itself), so just
remove the unused flag.

2 years agoDo extra manual isc_mem_cget() conversions
Ondřej Surý [Wed, 23 Aug 2023 08:00:12 +0000 (10:00 +0200)] 
Do extra manual isc_mem_cget() conversions

Some of the cases weren't caught by the coccinelle and there were some
places where cget+memmove() could get converted to simple creget().

2 years agoApply the isc_mem_cget semantic patch
Ondřej Surý [Wed, 23 Aug 2023 06:56:31 +0000 (08:56 +0200)] 
Apply the isc_mem_cget semantic patch

2 years agoA semantic patch to refactor isc_mem_cget and friends
Tony Finch [Fri, 9 Jun 2023 12:58:41 +0000 (13:58 +0100)] 
A semantic patch to refactor isc_mem_cget and friends

The aim is to match unsafe patterns of allocation size arithmetic
and turn them into safe calls to the new `isc_mem_cget()`,
`isc_mem_creget()`, and `isc_mem_cput()`.

2 years agoChecked array allocation arithmetic with isc_mem_get and friends
Ondřej Surý [Wed, 23 Aug 2023 06:56:22 +0000 (08:56 +0200)] 
Checked array allocation arithmetic with isc_mem_get and friends

Add new isc_mem_cget(), isc_mem_creget(), and isc_mem_cput() macros to
complement the isc_mem_callocate() (which works like calloc()).

The overflow checks are implemented as macros in the <isc/mem.h>, so
that the compiler can see that the element size is constant: it should
always be `sizeof(something)`.

2 years agoMerge branch 'each-cleanup-function-names' into 'main'
Ondřej Surý [Thu, 31 Aug 2023 20:08:13 +0000 (20:08 +0000)] 
Merge branch 'each-cleanup-function-names' into 'main'

remove extra function names

See merge request isc-projects/bind9!8204

2 years agoremove dns_name_totext2() and dns_name_toprincipal()
Evan Hunt [Wed, 16 Aug 2023 01:52:17 +0000 (18:52 -0700)] 
remove dns_name_totext2() and dns_name_toprincipal()

we can pass option flags to dns_name_totext() to get the same
results, and eliminate the extra function names.

2 years agoremove dns_name_towire2()
Evan Hunt [Wed, 16 Aug 2023 00:55:13 +0000 (17:55 -0700)] 
remove dns_name_towire2()

we don't need two versions of dns_name_towire(), we can just add NULL
to the calls that don't need to specify a compression offset.

2 years agoremove dns_name_fromstring2()
Evan Hunt [Wed, 16 Aug 2023 00:41:01 +0000 (17:41 -0700)] 
remove dns_name_fromstring2()

we don't need two versions of dns_name_fromstring() any longer; we
can just specify an origin value of dns_rootname for absolute names.

2 years agoremove cfg_acl_fromconfig2()
Evan Hunt [Wed, 16 Aug 2023 01:07:01 +0000 (18:07 -0700)] 
remove cfg_acl_fromconfig2()

the extra option to limit ACL configuration to only one address family
was no longer in use, and has been removed.

2 years agoMerge branch '4266-document-dnssec-policy-lifetime' into 'main'
Matthijs Mekking [Thu, 31 Aug 2023 16:30:26 +0000 (16:30 +0000)] 
Merge branch '4266-document-dnssec-policy-lifetime' into 'main'

Clarify BIND 9 time formats

Closes #4266

See merge request isc-projects/bind9!8228

2 years agoAdd CHANGES entry for #4266
Matthijs Mekking [Tue, 22 Aug 2023 09:51:25 +0000 (11:51 +0200)] 
Add CHANGES entry for #4266

2 years agoExplain lifetime format
Matthijs Mekking [Tue, 22 Aug 2023 09:49:22 +0000 (11:49 +0200)] 
Explain lifetime format

Add the text "TTL-style unit suffixes or ISO 8601 duration formats",
just like we do at other places that are duration option types.

Also, in the dnssec-policy "keys" example, use a TTL-style unit too.

2 years agoAdd a glossary definition for duration
Matthijs Mekking [Tue, 22 Aug 2023 09:48:37 +0000 (11:48 +0200)] 
Add a glossary definition for duration

We don't yet explain the syntax of TTL-style suffixes or ISO 8601
duration formats.

2 years agoFix keys reference link in ARM
Matthijs Mekking [Tue, 22 Aug 2023 09:45:41 +0000 (11:45 +0200)] 
Fix keys reference link in ARM

There's a statement that says: "Here is an example (for illustration
purposes only) of some possible entries in a [keys] list:", and that
links to the wrong "keys" statement (it links to the TSIG keys section).

Remove the reference, as we are already in the right section.

2 years agoMerge branch 'tt-arm-pkcs11-update' into 'main'
Matthijs Mekking [Thu, 31 Aug 2023 15:42:07 +0000 (15:42 +0000)] 
Merge branch 'tt-arm-pkcs11-update' into 'main'

Update PKCS#11 section in the ARM

See merge request isc-projects/bind9!8258

2 years agoUpdate PKCS#11 section in the ARM
Timo Teräs [Thu, 31 Aug 2023 11:24:15 +0000 (14:24 +0300)] 
Update PKCS#11 section in the ARM

Add instructions for pkcs11-provider and generalize common sections.

2 years agoMerge branch 'mnowak/unify-doc-tools-versions' into 'main'
Michal Nowak [Thu, 31 Aug 2023 12:50:04 +0000 (12:50 +0000)] 
Merge branch 'mnowak/unify-doc-tools-versions' into 'main'

Install Sphinx tools versions from BIND 9 repository

See merge request isc-projects/bind9!8251

2 years agoInstall Sphinx tools versions from BIND 9 repository
Michal Nowak [Tue, 29 Aug 2023 08:44:18 +0000 (10:44 +0200)] 
Install Sphinx tools versions from BIND 9 repository

The doc/arm/requirements.txt file is the single source of truth when it
comes to Sphinx tools versions used to build documentation via
util/release-tarball-comparison.sh.

2 years agoMerge branch 'aram/zone.c-got_transfer_quota-bugfix' into 'main'
Arаm Sаrgsyаn [Thu, 31 Aug 2023 09:41:34 +0000 (09:41 +0000)] 
Merge branch 'aram/zone.c-got_transfer_quota-bugfix' into 'main'

Reset the 'result' before using it again in zone.c:got_transfer_quota()

See merge request isc-projects/bind9!8241

2 years agoUnobfuscate the code-flow logic in got_transfer_quota()
Ondřej Surý [Wed, 23 Aug 2023 14:04:44 +0000 (16:04 +0200)] 
Unobfuscate the code-flow logic in got_transfer_quota()

This refactors the code flow in got_transfer_quota() to not use the
CHECK() macro as it really obfuscates the code flow logic here.

2 years agoReset the 'result' before using it again
Aram Sargsyan [Wed, 23 Aug 2023 11:50:02 +0000 (11:50 +0000)] 
Reset the 'result' before using it again

The 'result' variable should be reset to ISC_R_NOTFOUND again,
because otherwise a log message could be logged about not being
able to get the TLS configuration based on on the 'result' value
from the previous calls to get the TSIG key.

2 years agoMerge branch '4278-rndc-flush-resets-stale-refresh-time-to-0' into 'main'
Matthijs Mekking [Thu, 31 Aug 2023 09:08:52 +0000 (09:08 +0000)] 
Merge branch '4278-rndc-flush-resets-stale-refresh-time-to-0' into 'main'

Restore serve-stale settings after cache flush

Closes #4278

See merge request isc-projects/bind9!8244

2 years agoAdd release note and CHANGES for #4278
Matthijs Mekking [Thu, 24 Aug 2023 09:49:52 +0000 (11:49 +0200)] 
Add release note and CHANGES for #4278

2 years agoAfter cache flush, restore serve-stale settings
Matthijs Mekking [Thu, 24 Aug 2023 09:33:05 +0000 (11:33 +0200)] 
After cache flush, restore serve-stale settings

When flushing the cache, we create a new cache database. The serve-stale
settings need to be restored after doing this. We already did this
for max-stale-ttl, but forgot to do this for stale-refresh-time.

2 years agoAdd serve-stale test settings after flush
Matthijs Mekking [Thu, 24 Aug 2023 09:23:49 +0000 (11:23 +0200)] 
Add serve-stale test settings after flush

Add a test case to ensure that after 'rndc flush', the serve-stale
settings are not reset.

2 years agoMerge branch '4170-extend-expire-opt-support-into-xfrin-c' into 'main'
Mark Andrews [Thu, 31 Aug 2023 08:03:32 +0000 (08:03 +0000)] 
Merge branch '4170-extend-expire-opt-support-into-xfrin-c' into 'main'

Resolve "Extend EXPIRE opt support into xfrin.c"

Closes #4170

See merge request isc-projects/bind9!8064

2 years agoAdd release note for [GL #4170]
Mark Andrews [Tue, 4 Jul 2023 03:46:02 +0000 (13:46 +1000)] 
Add release note for [GL #4170]

2 years agoAdd CHANGES note for [GL #4170]
Mark Andrews [Tue, 4 Jul 2023 03:26:01 +0000 (13:26 +1000)] 
Add CHANGES note for [GL #4170]

2 years agoCheck EDNS EXPIRE is returned with AXFR
Mark Andrews [Tue, 4 Jul 2023 07:39:29 +0000 (17:39 +1000)] 
Check EDNS EXPIRE is returned with AXFR

2 years agoSet the modification time of the zone file after dumping
Mark Andrews [Tue, 4 Jul 2023 01:57:56 +0000 (11:57 +1000)] 
Set the modification time of the zone file after dumping

For secondary, mirror and redirect zones the expiry time is set
from the zone file's modification time on restart.  As zone dumping
take time, set the modification time of the zone file to the expire
time less the expire interval.

2 years agoTrim the effective expire time based on expire option
Mark Andrews [Mon, 3 Jul 2023 07:10:28 +0000 (17:10 +1000)] 
Trim the effective expire time based on expire option

and use that adjusted time to set the modification times.

2 years agoExtract the expire option from the response
Mark Andrews [Thu, 29 Jun 2023 07:59:24 +0000 (17:59 +1000)] 
Extract the expire option from the response

2 years agoHandle EDNS induced FORMERR responses
Mark Andrews [Tue, 4 Jul 2023 04:22:29 +0000 (14:22 +1000)] 
Handle EDNS induced FORMERR responses

If we are talking to a non EDNS aware primary that returns FORMERR
to EDNS requests retry the request without using EDNS.

2 years agoAllow EDNS to be used when making requests in xfrin
Mark Andrews [Thu, 29 Jun 2023 07:25:15 +0000 (17:25 +1000)] 
Allow EDNS to be used when making requests in xfrin

This allow for the EDNS options EXPIRE and NSID to be sent when
when making requests.  The existing controls controlling whether
EDNS is used and whether EXPIRE or NSID are sent are honoured.

Adjust the expected byte counts in the xfer system test to reflect
the EDNS overhead.  Adjust the dig call to match named's behavior
(don't set +expire as we are talking to a secondary).

2 years agoProvide a mechanism to return the expire option value
Mark Andrews [Thu, 29 Jun 2023 05:52:32 +0000 (15:52 +1000)] 
Provide a mechanism to return the expire option value

to the zone code so that it can be used to adjust the expire time.

2 years agoMerge branch '4285-timer_test-timer_event-fix' into 'main'
Arаm Sаrgsyаn [Wed, 30 Aug 2023 16:34:00 +0000 (16:34 +0000)] 
Merge branch '4285-timer_test-timer_event-fix' into 'main'

Resolve "timer_test unit test intermittently fails in CI"

Closes #4285

See merge request isc-projects/bind9!8253

2 years agoUse isc_loop_now() instead of uv_hrtime() for timestamps
Aram Sargsyan [Wed, 30 Aug 2023 12:06:19 +0000 (12:06 +0000)] 
Use isc_loop_now() instead of uv_hrtime() for timestamps

The resolution of the uv_hrtime() function is bigger than the
intervals used in the timers, which can result in an unexpected
difference between the start_time and stop_time variables.

Use isc_loop_now(), which is based on uv_now() and has the same
milliseconds resolution as the functions in the uv_timer_t API.

Also fix a couple wrong numbers in the comments.

2 years agoMerge branch 'marka-cleanup-cid-464884' into 'main'
Mark Andrews [Wed, 30 Aug 2023 00:13:16 +0000 (00:13 +0000)] 
Merge branch 'marka-cleanup-cid-464884' into 'main'

Silence CID 464884 (REVERSE_INULL)

See merge request isc-projects/bind9!8248

2 years agoSilence CID 464884 (REVERSE_INULL)
Mark Andrews [Mon, 28 Aug 2023 06:25:16 +0000 (16:25 +1000)] 
Silence CID 464884 (REVERSE_INULL)

    *** CID 464884:  Null pointer dereferences  (REVERSE_INULL)
    /bin/tests/system/dyndb/driver/db.c: 644 in create_db()
    638
    639      *dbp = (dns_db_t *)sampledb;
    640
    641      return (ISC_R_SUCCESS);
    642
    643     cleanup:
       CID 464884:  Null pointer dereferences  (REVERSE_INULL)
       Null-checking "sampledb" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    644      if (sampledb != NULL) {
    645      if (dns_name_dynamic(&sampledb->common.origin)) {
    646      dns_name_free(&sampledb->common.origin, mctx);
    647      }
    648
    649      isc_mem_putanddetach(&sampledb->common.mctx, sampledb,

2 years agoMerge branch '4280-isc-support-22588-bind-now-returning-servfail-for-attempted-deleti...
Mark Andrews [Tue, 29 Aug 2023 15:16:17 +0000 (15:16 +0000)] 
Merge branch '4280-isc-support-22588-bind-now-returning-servfail-for-attempted-deletions-of-non-existent-ptr-srv' into 'main'

Resolve "[ISC-support #22588] BIND now returning SERVFAIL for attempted deletions of non-existent PTR/SRV records"

Closes #4280

See merge request isc-projects/bind9!8247

2 years agoAdd release note for [GL #4280]
Mark Andrews [Mon, 28 Aug 2023 02:28:35 +0000 (12:28 +1000)] 
Add release note for [GL #4280]

2 years agoAdd CHANGES for [GL #4280]
Mark Andrews [Mon, 28 Aug 2023 02:03:45 +0000 (12:03 +1000)] 
Add CHANGES for [GL #4280]

2 years agorr_exists should not error if the name does not exist
Mark Andrews [Mon, 28 Aug 2023 01:53:21 +0000 (11:53 +1000)] 
rr_exists should not error if the name does not exist

rr_exists errored if the name did not exist in the zone.  This was
not an issue prior to the addition of krb5-subdomain-self-rhs and
ms-subdomain-self-rhs as the only name used was the zone name which
always existed.

2 years agoCheck that removal of nonexistent PTR and SRV records work
Mark Andrews [Mon, 28 Aug 2023 01:40:46 +0000 (11:40 +1000)] 
Check that removal of nonexistent PTR and SRV records work

There was a bug in rr_exists that caused it to fail when the
name didn't exist in the zone.

2 years agoMerge branch 'tkrizek-update-sphinx-rtd-theme' into 'main'
Tom Krizek [Tue, 29 Aug 2023 08:07:34 +0000 (08:07 +0000)] 
Merge branch 'tkrizek-update-sphinx-rtd-theme' into 'main'

Update sphinx_rtd_theme

See merge request isc-projects/bind9!8246

2 years agoUpdate sphinx_rtd_theme
Tom Krizek [Thu, 24 Aug 2023 15:10:27 +0000 (17:10 +0200)] 
Update sphinx_rtd_theme

To resolve the version select and search issue on readthedocs.org,
sphinx_rtd_theme>=1.2.1 is required.

Related https://github.com/readthedocs/sphinx_rtd_theme/issues/1452

2 years agoMerge branch 'tt-improve-pkcs11-tests' into 'main'
Matthijs Mekking [Mon, 28 Aug 2023 10:20:49 +0000 (10:20 +0000)] 
Merge branch 'tt-improve-pkcs11-tests' into 'main'

Enable keyfromlabel and enginepkcs11 systemtests for pkcs11-provider

See merge request isc-projects/bind9!8170

2 years agoEnable keyfromlabel and enginepkcs11 systemtests with pkcs11-provider
Timo Teräs [Sat, 5 Aug 2023 12:22:38 +0000 (15:22 +0300)] 
Enable keyfromlabel and enginepkcs11 systemtests with pkcs11-provider

- Simplify configuration management by deducing SoftHSM module path
  from openssl config

- Determine the engine flag (-E) value from openssl config

- Drop unused/unneeded environment variables

- Run pkcs11-provider tests on Debian "sid" ossl3 flavor

2 years agoRework opensslecdsa_link to handle legacy key objects w/ openssl3
Timo Teräs [Wed, 9 Aug 2023 13:39:08 +0000 (16:39 +0300)] 
Rework opensslecdsa_link to handle legacy key objects w/ openssl3

Due to bug in openssl3, the pkcs11-engine is made the default
provider if enabled. This causes key generation and load to
return legacy objects.

Openssl3 has limited glue and does not support the full set
of new style parameter to be inqueried from legacy key objects

Rewrite required functions to use first the new API (if available),
but fallback to the old API (if available). For the methods that
have proper OpenSSL compatiblity glue, ship only one version.

2 years agoMerge branch '4273-streamdns-eagain' into 'main'
Arаm Sаrgsyаn [Thu, 24 Aug 2023 12:43:31 +0000 (12:43 +0000)] 
Merge branch '4273-streamdns-eagain' into 'main'

Resolve "crash while receiving 64 kiB message over TCP"

Closes #4273

See merge request isc-projects/bind9!8231

2 years agoFix a condition in isc_dnsstream_assembler_incoming()
Aram Sargsyan [Tue, 22 Aug 2023 12:18:09 +0000 (12:18 +0000)] 
Fix a condition in isc_dnsstream_assembler_incoming()

Before calling isc_buffer_putmem(), there is a condition to check
that 'buf_size' is greater than 0. At this point 'buf_size' is
guaranteed to be greater than zero, so either the condition is
redundant, or 'unprocessed_size' should be checked instead, which
seems more logical, because calling isc_buffer_putmem() with
'unprocessed_size' being zero is not useful, although harmless.

2 years agoHandle cases when buf_size is zero
Aram Sargsyan [Tue, 22 Aug 2023 12:10:40 +0000 (12:10 +0000)] 
Handle cases when buf_size is zero

The isc_dnsstream_assembler_incoming() inline function expects that
when 'buf_size' is zero, then 'buf' must be NULL. The expectation is
not correct, because those values come from the libuv read callback,
and its documentation notes[1] that 'nread' ('buf_size' here) might
be 0, which does not indicate an error or EOF, but is equivalent to
EAGAIN or EWOULDBLOCK under read(2).

Change the isc_dnsstream_assembler_incoming() inline function to
remove the invalid expectation.

[1] https://docs.libuv.org/en/v1.x/stream.html#c.uv_read_cb

2 years agoAdd a a tcp system test case
Aram Sargsyan [Thu, 24 Aug 2023 11:41:07 +0000 (11:41 +0000)] 
Add a a tcp system test case

The new test sends a 64 KiB message over TCP to named, and expects
it to handle it correctly.

2 years agoMerge branch 'ondrej/remove-i386-as-fully-supported-platform' into 'main'
Ondřej Surý [Wed, 23 Aug 2023 14:55:14 +0000 (14:55 +0000)] 
Merge branch 'ondrej/remove-i386-as-fully-supported-platform' into 'main'

Move i386 and armhf to the Best-Effort category

See merge request isc-projects/bind9!8223

2 years agoSplit the CPU architectures into more categories
Ondřej Surý [Mon, 21 Aug 2023 15:53:15 +0000 (17:53 +0200)] 
Split the CPU architectures into more categories

Move i386 and other less common or ancient CPU architectures to
Community-Maintened category.  Move armhf and arm64 to the Best-Effort
category as we do test them as part of development work (new MacBooks
are all arm64), we don't really do full set of tests in the CI.

2 years agoMerge branch 'ondrej-cleanup-qp-in-forwarders' into 'main'
Ondřej Surý [Wed, 23 Aug 2023 13:50:03 +0000 (13:50 +0000)] 
Merge branch 'ondrej-cleanup-qp-in-forwarders' into 'main'

Refactor cleanup code in the qp-trie for the forwarders table

See merge request isc-projects/bind9!8212

2 years agoRefactor cleanup code in the qp-trie for the forwarders table
Ondřej Surý [Thu, 17 Aug 2023 10:39:10 +0000 (12:39 +0200)] 
Refactor cleanup code in the qp-trie for the forwarders table

Instead of duplicating the destroy_forwarders() code in the cleanup
sections, just call dns_forwarders_detach() every time - in case of
failure, the forwarders aren't going to be attached, and forwarders
object will be destroyed right away.

2 years agoMerge branch 'ondrej-cleanup-mem-macros' into 'main'
Ondřej Surý [Wed, 23 Aug 2023 12:50:08 +0000 (12:50 +0000)] 
Merge branch 'ondrej-cleanup-mem-macros' into 'main'

Remove some unnecessary token pasting macrology

See merge request isc-projects/bind9!8236

2 years agoFix the style of an array de-allocation in dnssec-cds
Tony Finch [Mon, 12 Jun 2023 11:51:02 +0000 (12:51 +0100)] 
Fix the style of an array de-allocation in dnssec-cds

Mention the element size explicitly, so that `matching_sigs()`,
`signed_loose()`, and `signed_strict()` use the same calculation.

2 years agoGet rid of unnecessary macros in the system test dyndb driver
Tony Finch [Mon, 12 Jun 2023 11:08:07 +0000 (12:08 +0100)] 
Get rid of unnecessary macros in the system test dyndb driver

CHECKED_MEM_GET and ZERO_PTR are built-in features of isc_mem.

2 years agoRemove some unnecessary token pasting macrology
Tony Finch [Thu, 8 Jun 2023 11:57:32 +0000 (12:57 +0100)] 
Remove some unnecessary token pasting macrology

There used to be an extra layer of indirection in the memory functions
for certain dynamic linking scenarios. This involved variant spellings
like isc__mem and isc___mem. The isc___mem variants were removed in
commit 7de846977b2a4fd3 so the token pasting is no longer needed and
only serves to obfuscate.

2 years agoMerge branch '3001-pytest-nitpicks' into 'main'
Tom Krizek [Wed, 23 Aug 2023 12:48:58 +0000 (12:48 +0000)] 
Merge branch '3001-pytest-nitpicks' into 'main'

system tests stability tweaks and cleanup

Closes #3001

See merge request isc-projects/bind9!8239

2 years agoAllow re-runs of rrl system test
Tom Krizek [Tue, 22 Aug 2023 16:49:55 +0000 (18:49 +0200)] 
Allow re-runs of rrl system test

The rrl system test has been unstable and producing false positive
results for years (GL #172). Allow the test to be re-run (once) to
reduce the noise it causes.

2 years agoAllow re-runs of reclimit system test
Tom Krizek [Tue, 22 Aug 2023 16:46:05 +0000 (18:46 +0200)] 
Allow re-runs of reclimit system test

The reclimit system test has been unstable and producing false positive
results for years (GL #1587). Allow the test to be re-run (once) to
reduce the noise it causes.

2 years agoAllow re-runs of qmin system test
Tom Krizek [Tue, 22 Aug 2023 16:39:51 +0000 (18:39 +0200)] 
Allow re-runs of qmin system test

The qmin test is inherently unstable. It fails quite often with failure
modes described in GL #904. Allow the pytest runner to re-run the test
up to 3 times to only detect a more persistent and reproducible failures
rather than random noise caused by the nature of the test.

2 years agoDisable loadtime check in statschannel test
Tom Krizek [Tue, 22 Aug 2023 15:59:16 +0000 (17:59 +0200)] 
Disable loadtime check in statschannel test

It is better to disable the specific check that causes the test to fail
rather than mark the entire test as xfail, which can mask other issues
which the test is capable of detecting.

2 years agoci: fix after_script for out-of-tree tests
Tom Krizek [Tue, 22 Aug 2023 15:26:14 +0000 (17:26 +0200)] 
ci: fix after_script for out-of-tree tests

The commands in after_script run in a new shell, separate from
before_script and script commands. Since the pytest.log.txt is for out
of tree tests is present in the build directory, switch to it (if set)
before running any postprocessing commands.

2 years agoClean up pytest .gitignore file
Tom Krizek [Tue, 22 Aug 2023 15:20:51 +0000 (17:20 +0200)] 
Clean up pytest .gitignore file

The _last_test_run entry was accidentally added in !8194. It came from a
work-in-progress version of the MR and was left there during a rebase.

2 years agoSkip checkds test on Python<3.7
Tom Krizek [Tue, 22 Aug 2023 15:09:59 +0000 (17:09 +0200)] 
Skip checkds test on Python<3.7

checkds test requires the capture_output argument for subprocess.run()
which was added in Python 3.7.

2 years agoMerge branch '4271-disable-DTrace-in-FIPS-jobs' into 'main'
Ondřej Surý [Wed, 23 Aug 2023 09:07:05 +0000 (09:07 +0000)] 
Merge branch '4271-disable-DTrace-in-FIPS-jobs' into 'main'

Disable tracing in the FIPS enabled builds

Closes #4271

See merge request isc-projects/bind9!8235

2 years agoDisable tracing in the FIPS enabled builds
Ondřej Surý [Wed, 23 Aug 2023 05:46:27 +0000 (07:46 +0200)] 
Disable tracing in the FIPS enabled builds

The dtrace command fails with segmentation fault in the FIPS-enabled
builds, thus we need to disable the tracing in the CI for the FIPS
jobs.

2 years agoMerge branch '1181-nsupdate-tcp-soa-requests-main' into 'main'
Matthijs Mekking [Wed, 23 Aug 2023 08:29:08 +0000 (08:29 +0000)] 
Merge branch '1181-nsupdate-tcp-soa-requests-main' into 'main'

Don't do TCP SOA requests for default servers

Closes #1181

See merge request isc-projects/bind9!8192

2 years agoAdd release note and CHANGES for #1181
Matthijs Mekking [Thu, 10 Aug 2023 08:47:05 +0000 (10:47 +0200)] 
Add release note and CHANGES for #1181

2 years agoDon't do DoT SOA requests for default servers
Matthijs Mekking [Thu, 10 Aug 2023 08:41:28 +0000 (10:41 +0200)] 
Don't do DoT SOA requests for default servers

Default servers usually don't have DoT set up. Only do SOA queries if
the server is specified.

2 years agoMerge branch '4275-DTrace-on-macOS-only-needs-header' into 'main'
Ondřej Surý [Wed, 23 Aug 2023 06:59:50 +0000 (06:59 +0000)] 
Merge branch '4275-DTrace-on-macOS-only-needs-header' into 'main'

Don't generate the probes.lo on macOS

Closes #4275

See merge request isc-projects/bind9!8234

2 years agoRegenerate the DTrace generated files on configure change
Ondřej Surý [Wed, 23 Aug 2023 05:40:20 +0000 (07:40 +0200)] 
Regenerate the DTrace generated files on configure change

The DTrace generated files were missing dependency on the Makefile, so
they didn't get regenerated when ./configure was re-run.  This would
create problem especially between ./configure --enable-tracing vs
./configure --disable-tracing invocations.

2 years agoDon't generate the probes.lo on macOS
Ondřej Surý [Wed, 23 Aug 2023 05:33:50 +0000 (07:33 +0200)] 
Don't generate the probes.lo on macOS

The DTrace on macOS only needs header file and the dtrace command
doesn't have the -G option.  Skip generating the object file on macOS,
so the build doesn't fail.

2 years agoMerge branch '3835-cname-wildcard-loop-followup' into 'main'
Evan Hunt [Mon, 21 Aug 2023 21:29:56 +0000 (21:29 +0000)] 
Merge branch '3835-cname-wildcard-loop-followup' into 'main'

prevent query_coveringnsec() from running twice

See merge request isc-projects/bind9!8214

2 years agoCHANGES for [GL #3835]
Evan Hunt [Thu, 17 Aug 2023 17:06:14 +0000 (10:06 -0700)] 
CHANGES for [GL #3835]

2 years agoprevent query_coveringnsec() from running twice
Evan Hunt [Fri, 19 May 2023 05:02:06 +0000 (22:02 -0700)] 
prevent query_coveringnsec() from running twice

when synthesizing a new CNAME, we now check whether the target
matches the query already being processed. if so, we do not
restart the query; this prevents a waste of resources.

2 years agoMerge branch '4249-compile-test-files-during-make' into 'main'
Tom Krizek [Mon, 21 Aug 2023 19:13:13 +0000 (19:13 +0000)] 
Merge branch '4249-compile-test-files-during-make' into 'main'

Compile system test binaries during make

Closes #4249

See merge request isc-projects/bind9!8189

2 years agoci: Disable dnsrps for respdiff jobs compiled with ASAN/TSAN
Tom Krizek [Wed, 9 Aug 2023 13:42:05 +0000 (15:42 +0200)] 
ci: Disable dnsrps for respdiff jobs compiled with ASAN/TSAN

The dnsrps build assumes that dlopen is available from libc. This
assumption isn't met when attempting to build with address or thread
sanitizer on debian (bullseye, bookworm). Disable dnsrps build to avoid
the issue, since it's not needed anyway for our respdiff tests.

See commit b396f555861f11d7d6cee2ceb0d94abb733e1101 for more info about
the dnsrps build.

2 years agoResolve scan-build issue in dummylib.c
Tom Krizek [Wed, 9 Aug 2023 11:42:23 +0000 (13:42 +0200)] 
Resolve scan-build issue in dummylib.c

Value stored to 'rdatap' is never read. Remove the line which has no
effect.

2 years agoCompile system test binaries during make
Tom Krizek [Mon, 7 Aug 2023 14:59:11 +0000 (16:59 +0200)] 
Compile system test binaries during make

Using check_PROGRAMS would postpone compiling the binaries needed by
system tests until `make check` would be called. Since it's preferable
to invoke pytest directly to run the system test suite, compile these
binaries without installing them during `make all` instead by using
noinst_PROGRAMS.

This removes the need to use TESTS= make -e check hack invoked from
pytest to work around this issue.

2 years agoMerge branch '4041-add-userspace-tracing' into 'main'
Ondřej Surý [Mon, 21 Aug 2023 18:04:05 +0000 (18:04 +0000)] 
Merge branch '4041-add-userspace-tracing' into 'main'

Add support for userspace tracing via USDT

Closes #4041

See merge request isc-projects/bind9!7872

2 years agoAdd CHANGES and release note for [GL #4041]
Ondřej Surý [Thu, 27 Apr 2023 11:40:24 +0000 (13:40 +0200)] 
Add CHANGES and release note for [GL #4041]

2 years agoAdd zone name to the LIBDNS_XFRIN probes
Ondřej Surý [Mon, 14 Aug 2023 12:24:52 +0000 (14:24 +0200)] 
Add zone name to the LIBDNS_XFRIN probes

We already print the formatted zone name via the xfrin_log() function,
generate the text once and store it in xfr->info static buffer.  Then we
can reuse the string to pass it to the LIBDNS_XFRIN probes.

2 years agoAdd a probe when the response rate limiting drops or slips query
Ondřej Surý [Thu, 27 Apr 2023 11:57:00 +0000 (13:57 +0200)] 
Add a probe when the response rate limiting drops or slips query

Add a trace point that would report when a query gets dropped or slipped
by rate limits. It reports the client IP, the zone, and the RRL result
code.

Co-authored-by: Paul Frieden <pfrieden@yahooinc.com>
2 years agoAdd tracing probes to the dns_xfrin unit
Ondřej Surý [Tue, 31 Jan 2023 09:14:21 +0000 (10:14 +0100)] 
Add tracing probes to the dns_xfrin unit

Add tracing probes to incoming transfers, so we can accurately measure
the individual events when sending, receiving and parsing the incoming
transfers.

2 years agoAdd tracing probes to the isc_job unit
Ondřej Surý [Mon, 30 Jan 2023 15:20:40 +0000 (16:20 +0100)] 
Add tracing probes to the isc_job unit

Add tracing probes to isc_job unit:

 * libisc:job_cb_before - before the job callback is called
 * libisc:job_cb_after - after the job callback is called

2 years agoAdd tracing probes to the custom isc_rwlock implementation
Ondřej Surý [Mon, 30 Jan 2023 14:42:20 +0000 (15:42 +0100)] 
Add tracing probes to the custom isc_rwlock implementation

Add tracing probes to ISC own isc_rwlock implementation to allow
fine-grained tracing.  The pthread rwlock already has probes inside
glibc, and it's difficult to add probes to headers included from the
other libraries.

2 years agoAdd support for User Statically Defined Tracing (USDT) probes
Ondřej Surý [Mon, 30 Jan 2023 14:36:49 +0000 (15:36 +0100)] 
Add support for User Statically Defined Tracing (USDT) probes

This adds support for User Statically Defined Tracing (USDT).  On
Linux, this uses the header from SystemTap and dtrace utility, but the
support is universal as long as dtrace is available.

Also add the required infrastructure to add probes to libisc, libdns and
libns libraries, where most of the probes will be.

2 years agoMerge branch '3893-make-debian-12-bookworm-base-image' into 'main'
Michal Nowak [Mon, 21 Aug 2023 15:19:49 +0000 (15:19 +0000)] 
Merge branch '3893-make-debian-12-bookworm-base-image' into 'main'

Make Debian 12 "bookworm" the base image

See merge request isc-projects/bind9!8075

2 years agoMove clang:bullseye PKCS11 testing to gcc:bullseye
Michal Nowak [Wed, 9 Aug 2023 19:13:30 +0000 (21:13 +0200)] 
Move clang:bullseye PKCS11 testing to gcc:bullseye

Move clang:bullseye:amd64 PKCS11 testing to the gcc:bullseye:amd64 job
to evenly represent compilers in PKCS11 testing.