2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

39719 Commits

Author SHA1 Message Date
Mark Andrews
be21d31840 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.
2023-08-31 11:32:29 +10:00
Mark Andrews
690fd050a0 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).
2023-08-31 11:32:29 +10:00
Mark Andrews
87912e4bb8 Provide a mechanism to return the expire option value
to the zone code so that it can be used to adjust the expire time.
2023-08-31 11:32:29 +10:00
Arаm Sаrgsyаn
0cfe0a61dc 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
2023-08-30 16:34:00 +00:00
Aram Sargsyan
852e8204fe 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.
2023-08-30 16:03:39 +00:00
Mark Andrews
b7c62b29d9 Merge branch 'marka-cleanup-cid-464884' into 'main'
Silence CID 464884 (REVERSE_INULL)

See merge request isc-projects/bind9!8248
2023-08-30 00:13:16 +00:00
Mark Andrews
60630fe3aa 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,
2023-08-29 23:45:12 +00:00
Mark Andrews
62fb970d0a 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
2023-08-29 15:16:17 +00:00
Mark Andrews
2b4e109c6a Add release note for [GL #4280] 2023-08-30 00:48:50 +10:00
Mark Andrews
bb3556baa4 Add CHANGES for [GL #4280] 2023-08-30 00:48:50 +10:00
Mark Andrews
b76a15977a 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.
2023-08-30 00:48:50 +10:00
Mark Andrews
2b7192c5be 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.
2023-08-30 00:48:50 +10:00
Tom Krizek
7029f7df45 Merge branch 'tkrizek-update-sphinx-rtd-theme' into 'main'
Update sphinx_rtd_theme

See merge request isc-projects/bind9!8246
2023-08-29 08:07:34 +00:00
Tom Krizek
92143fa960
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
2023-08-29 10:07:05 +02:00
Matthijs Mekking
c4bda5b592 Merge branch 'tt-improve-pkcs11-tests' into 'main'
Enable keyfromlabel and enginepkcs11 systemtests for pkcs11-provider

See merge request isc-projects/bind9!8170
2023-08-28 10:20:49 +00:00
Timo Teräs
7fbcf38a3f 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
2023-08-25 14:59:16 +03:00
Timo Teräs
628dd278d3 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.
2023-08-25 14:59:16 +03:00
Arаm Sаrgsyаn
edd9925e44 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
2023-08-24 12:43:31 +00:00
Aram Sargsyan
a33dc921dc 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.
2023-08-24 11:59:57 +00:00
Aram Sargsyan
9a271371d3 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
2023-08-24 11:59:57 +00:00
Aram Sargsyan
4d723c76b1 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.
2023-08-24 11:59:57 +00:00
Ondřej Surý
6b1ed14f17 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
2023-08-23 14:55:14 +00:00
Ondřej Surý
db94c7526c
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.
2023-08-23 16:54:22 +02:00
Ondřej Surý
dda021281a 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
2023-08-23 13:50:03 +00:00
Ondřej Surý
2e3eae6b91
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.
2023-08-23 15:49:17 +02:00
Ondřej Surý
01c758ea3a Merge branch 'ondrej-cleanup-mem-macros' into 'main'
Remove some unnecessary token pasting macrology

See merge request isc-projects/bind9!8236
2023-08-23 12:50:08 +00:00
Tony Finch
6271f3c054
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.
2023-08-23 14:49:15 +02:00
Tony Finch
1d341096c1
Get rid of unnecessary macros in the system test dyndb driver
CHECKED_MEM_GET and ZERO_PTR are built-in features of isc_mem.
2023-08-23 14:49:15 +02:00
Tony Finch
52fcc9fc0f
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.
2023-08-23 14:49:15 +02:00
Tom Krizek
911dd7fa36 Merge branch '3001-pytest-nitpicks' into 'main'
system tests stability tweaks and cleanup

Closes #3001

See merge request isc-projects/bind9!8239
2023-08-23 12:48:58 +00:00
Tom Krizek
40289d5440
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.
2023-08-23 14:06:20 +02:00
Tom Krizek
8c5833fe39
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.
2023-08-23 14:06:20 +02:00
Tom Krizek
be2123a8e9
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.
2023-08-23 14:06:20 +02:00
Tom Krizek
7522583b57
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.
2023-08-23 14:06:20 +02:00
Tom Krizek
86043b0bbe
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.
2023-08-23 14:06:20 +02:00
Tom Krizek
1b3db25adf
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.
2023-08-23 14:06:20 +02:00
Tom Krizek
0361233b3d
Skip checkds test on Python<3.7
checkds test requires the capture_output argument for subprocess.run()
which was added in Python 3.7.
2023-08-23 14:06:18 +02:00
Ondřej Surý
a0801963ad 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
2023-08-23 09:07:05 +00:00
Ondřej Surý
a80608200d
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.
2023-08-23 11:06:14 +02:00
Matthijs Mekking
39490eccaf 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
2023-08-23 08:29:08 +00:00
Matthijs Mekking
4249ebd92f Add release note and CHANGES for #1181 2023-08-23 09:56:57 +02:00
Matthijs Mekking
6502240442 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.
2023-08-23 09:56:38 +02:00
Ondřej Surý
6c4af7ca40 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
2023-08-23 06:59:50 +00:00
Ondřej Surý
3b6db95e70 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.
2023-08-23 07:40:20 +02:00
Ondřej Surý
d13ea59a3c 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.
2023-08-23 07:33:50 +02:00
Evan Hunt
b4a3b133cc Merge branch '3835-cname-wildcard-loop-followup' into 'main'
prevent query_coveringnsec() from running twice

See merge request isc-projects/bind9!8214
2023-08-21 21:29:56 +00:00
Evan Hunt
ba1f75684f CHANGES for [GL #3835] 2023-08-21 12:23:08 -07:00
Evan Hunt
0ae8b2e056 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.
2023-08-21 12:22:47 -07:00
Tom Krizek
344f0bb7ce 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
2023-08-21 19:13:13 +00:00
Tom Krizek
0422415500
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.
2023-08-21 20:04:50 +02:00