Commit Graph

39560 Commits

Author SHA1 Message Date
Michał Kępień
e5a0784e60 Add CHANGES entry for GL !7873 2023-08-02 10:40:09 +02:00
Evan Hunt
39f46fc128 Merge branch '3700-deprecate-dialup' into 'main'
deprecate "dialup" and "heartbeat-interval"

Closes #3700

See merge request isc-projects/bind9!8080
2023-08-02 01:38:27 +00:00
Evan Hunt
d10b6a4b39 CHANGES and release note for [GL #3700] 2023-08-01 18:10:44 -07:00
Evan Hunt
eeeccec67c deprecate "dialup" and "heartbeat-interval"
these options concentrate zone maintenance actions into
bursts for the benefit of servers with intermittent connections.
that's no longer something we really need to optimize.
2023-08-01 18:10:44 -07:00
Mark Andrews
cd0f115082 Merge branch '4229-nextpart-failed-set-e-fallout' into 'main'
Resolve "nextpart failed, set -e fallout?"

Closes #4229

See merge request isc-projects/bind9!8149
2023-08-02 00:21:26 +00:00
Mark Andrews
dd74840291 Add sleep 1 so that the signing happens in a different second 2023-08-01 23:47:55 +00:00
Mark Andrews
162db75e2b Use $() instead of backticks 2023-08-01 23:47:55 +00:00
Mark Andrews
6d0f19da7d Correctly grep nextpart output 2023-08-01 23:47:55 +00:00
Mark Andrews
edd4226df2 Merge branch '4059-oracle-linux-8-shell-doesn-t-always-restore-environment-variable-correctly' into 'main'
Resolve "Oracle Linux 8 shell doesn't always restore environment variable correctly"

Closes #4059

See merge request isc-projects/bind9!7908
2023-08-01 23:47:38 +00:00
Mark Andrews
96f75bba18 Use sub shell to isolate enviroment changes
'HOME=value command' should only change HOME for command but on
some platforms this occasionally sets HOME for the rest of the
test. Explicitly isolate the enviroment change using a sub shell.
2023-08-01 23:17:15 +00:00
Arаm Sаrgsyаn
d6cbb3d6aa Merge branch '4226-dig-help-message-https-plain-get-vs-http-plain-get' into 'main'
Fix dig help message typo in the http-plain-get option

Closes #4226

See merge request isc-projects/bind9!8148
2023-08-01 10:39:26 +00:00
Aram Sargsyan
77d1476c46 Fix dig help message typo in the http-plain-get option
The option name is misspelled as 'https-plain-get'. Fix the error.
2023-08-01 10:38:44 +00:00
Matthijs Mekking
9a4a4c6678 Merge branch '4032-ignore-max-zone-ttl-dnssec-policy-insecure' into 'main'
Ignore max-zone-ttl on dnssec-policy insecure

Closes #4032

See merge request isc-projects/bind9!8142
2023-08-01 07:46:22 +00:00
Matthijs Mekking
0bdf1980c4 Add CHANGES and release note for #4032 2023-08-01 08:57:11 +02:00
Matthijs Mekking
dc6dafdad1 Ignore max-zone-ttl on dnssec-policy insecure
Allow larger TTL values in zones that go insecure. This is necessary
because otherwise the zone will not be loaded due to the max-zone-ttl
of P1D that is part of the current insecure policy.

In the keymgr.c code, default back to P1D if the max-zone-ttl is set
to zero.
2023-08-01 08:56:52 +02:00
Matthijs Mekking
ce869a521c Merge branch '3677-dnssec-policy-inline-signing' into 'main'
Add inline-signing to dnssec-policy

Closes #3677

See merge request isc-projects/bind9!7204
2023-08-01 06:55:56 +00:00
Matthijs Mekking
bd00c2ce4e Add release note and CHANGES for GL #3677
News worthy.
2023-08-01 06:55:48 +00:00
Matthijs Mekking
1e0f77b349 Remove redundant inline-signing lines from docs
Now that inline-signing is explicitly set in dnssec-policy, remove
the redundant "inline-signing yes;" lines from the documentation.
2023-08-01 06:55:48 +00:00
Matthijs Mekking
62ddc3dca0 Remove redundant inline-signing lines from tests
Now that inline-signing is explicitly set in dnssec-policy, remove
the redundant "inline-signing yes;" lines from the system tests.
2023-08-01 06:55:48 +00:00
Matthijs Mekking
495597a91b Update inline-signing checkconf code
When using automated DNSSEC management, it is required that the zone
is dynamic, or that inline-signing is enabled (or both). Update the
checkconf code to also allow inline-signing to be enabled within
dnssec-policy.
2023-08-01 06:55:48 +00:00
Matthijs Mekking
bbfdcc36c8 Add inline-signing to dnssec-policy
Add an option to enable/disable inline-signing inside the
dnssec-policy clause. The existing inline-signing option that is
set in the zone clause takes priority, but if it is omitted, then the
value that is set in dnssec-policy is taken.

The built-in policies use inline-signing.

This means that if you want to use the default policy without
inline-signing you either have to set it explicitly in the zone
clause:

    zone "example" {
        ...
        dnssec-policy default;
        inline-signing no;
    };

Or create a new policy, only overriding the inline-signing option:

    dnssec-policy "default-dynamic" {
        inline-signing no;
    };

    zone "example" {
        ...
        dnssec-policy default-dynamic;
    };

This also means that if you are going insecure with a dynamic zone,
the built-in "insecure" policy needs to be accompanied with
"inline-signing no;".
2023-08-01 06:55:48 +00:00
Ondřej Surý
4bf94f4c52 Merge branch '4196-use-rculist-for-dns_db_updatenotify' into 'main'
Use cds_lfht for updatenotify mechanism in dns_db unit

Closes #4196

See merge request isc-projects/bind9!8097
2023-07-31 16:12:54 +00:00
Ondřej Surý
8c4cf5b1de fixup! Use cds_lfht for updatenotify mechanism in dns_db unit 2023-07-31 18:11:34 +02:00
Ondřej Surý
a1afa31a5a Use cds_lfht for updatenotify mechanism in dns_db unit
The updatenotify mechanism in dns_db relied on unlocked ISC_LIST for
adding and removing the "listeners".  The mechanism relied on the
exclusive mode - it should have been updated only during reconfiguration
of the server.  This turned not to be true anymore in the dns_catz - the
updatenotify list could have been updated during offloaded work as the
offloaded threads are not subject to the exclusive mode.

Change the update_listeners to be cds_lfht (lock-free hash-table), and
slightly refactor how register and unregister the callbacks - the calls
are now idempotent (the register call already was and the return value
of the unregister function was mostly ignored by the callers).
2023-07-31 18:11:34 +02:00
Ondřej Surý
6856798919 Merge branch 'ondrej/add-isc_rwlock-unit-test' into 'main'
Add rwlock unit test

See merge request isc-projects/bind9!7859
2023-07-31 16:08:46 +00:00
Ondřej Surý
46d75e0004 Add rwlock unit test
Add simple rwlock unit test and rwlock benchmark.  The benchmark
compares the pthread rwlock with isc rwlock implementation, so it's
mainly useful when developing a new isc rwlock implementation.
2023-07-31 18:07:56 +02:00
Ondřej Surý
ed944ba8fd Merge branch '4223-replace-dns_badcache-hashtable-implementation' into 'main'
Refactor dns_badcache to use cds_lfht lock-free hashtable

Closes #4223

See merge request isc-projects/bind9!8139
2023-07-31 13:54:11 +00:00
Ondřej Surý
10279f540d Add CHANGES note for [GL #4223] 2023-07-31 15:51:15 +02:00
Ondřej Surý
c1821ccf92 Call rcu_barrier() five times in the isc__mem_destroy()
Because rcu_barrier() needs to be called as many times as the number of
nested call_rcu() calls (call_rcu() calls made from call_rcu thread),
and currently there's no mechanism to detect whether there are more
call_rcu callbacks scheduled, we simply call the rcu_barrier() multiple
times.  The overhead is negligible and it prevents rare assertion
failures caused by the check for memory leaks in isc__mem_destroy().
2023-07-31 15:51:15 +02:00
Ondřej Surý
1e3b6d2d83 Don't cleanup the dns_message_checksig fuzzer in atexit handler
After the dns_badcache refactoring, the dns_badcache_destroy() would
call call_rcu().  The dns_message_checksig cleanup which calls
dns_view_detach() happens in the atexit handler, so there might be
call_rcu threads started very late in the process.  The liburcu
registers library destructor that destroys the data structured internal
to liburcu and this clashes with the call_rcu thread that just got
started in the atexit() handler causing either (depending on timing):

 - a normal run
 - a straight segfault
 - an assertion failure from liburcu

Instead of trying to cleanup the dns_message_checksig unit, ignore the
leaked memory as we do with all the other fuzzing tests.
2023-07-31 15:51:15 +02:00
Ondřej Surý
b570750382 Make the load-names benchmark multithreaded
The load-names benchmark was originally only measuring single thread
performance of the data structures.  As this is not how those are used
in the real life, it was refactored to be multi-threaded with proper
protections in place (rwlock for ht, hashmap and rbt; transactions for
qp).

The qp test has been extended to see effect of the dns_qp_compact() and
rcu_barrier() on the overall speed and memory consumption.
2023-07-31 15:51:15 +02:00
Ondřej Surý
4dacdde28f Refactor dns_badcache to use cds_lfht lock-free hashtable
The dns_badcache unit had (yet another) own locked hashtable
implementation.  Replace the hashtable used by dns_badcache with
lock-free cds_lfht implementation from liburcu.
2023-07-31 15:51:15 +02:00
Ondřej Surý
c4bc43c8a7 Merge branch 'stepan/fix-check-in-ecdsa-system-test' into 'main'
Fix ecdsa256 check in ecdsa system test setup

See merge request isc-projects/bind9!8053
2023-07-28 07:14:27 +00:00
Štěpán Balážik
10194baa07 Fix ecdsa256 check in ecdsa system test setup
Probably by copy-paste mistake, ecdsa384 was checked twice.
2023-07-28 09:13:39 +02:00
Ondřej Surý
baa8f81b3d Merge branch '4086-run-dispentry_destroy-on-associated-loop' into 'main'
Pin dns_request to the associated loop

Closes #4086

See merge request isc-projects/bind9!8137
2023-07-28 07:07:50 +00:00
Ondřej Surý
9908e0a664 Add CHANGES note for [GL #4086] 2023-07-28 09:01:36 +02:00
Ondřej Surý
4ca64c1799 Pin dns_request to the associated loop
When dns_request was canceled via dns_requestmgr_shutdown() the cancel
event would be propagated on different loop (loop 0) than the loop where
request was created on.  In turn this would propagate down to isc_netmgr
where we require all the events to be called from the matching isc_loop.

Pin the dns_requests to the loops and ensure that all the events are
called on the associated loop.  This in turn allows us to remove the
hashed locks on the requests and change the single .requests list to be
a per-loop list for the request accounting.

Additionally, do some extra cleanup because some race condititions are
now not possible as all events on the dns_request are serialized.
2023-07-28 09:01:22 +02:00
Ondřej Surý
0fa8d8c191 Merge branch 'ondrej/remove__tsan_acquire_release-hints' into 'main'
Cleanup the __tsan_acquire/__tsan_release

See merge request isc-projects/bind9!8114
2023-07-28 06:59:44 +00:00
Ondřej Surý
b6b0d81a36 Cleanup the __tsan_acquire/__tsan_release
With ThreadSanitizer support added to the Userspace RCU, we no longer
need to wrap the call_rcu and caa_container_of with
__tsan_{acquire,release} hints.  Remove the direct calls to
__tsan_{acquire,release} and the isc_urcu_{container,cleanup} macros.
2023-07-28 08:59:08 +02:00
Mark Andrews
c8b73d98e4 Merge branch '4225-return-refused-if-gssapi-not-configured' into 'main'
Resolve "SERVFAIL response to TKEY query"

Closes #4225

See merge request isc-projects/bind9!8146
2023-07-28 06:43:58 +00:00
Mark Andrews
ccaefce7ca Add CHANGES for [GL #4225] 2023-07-28 14:38:20 +10:00
Mark Andrews
3a2a24903c Check GSS-API TKEY against non configured server
Check for the expected error message which includes rcode REFUSED
then reload the server to specify the keytab for the rest of the
GSSAPI tests.
2023-07-28 14:38:20 +10:00
Mark Andrews
f244619680 Report TKEY query errors in nsupdate 2023-07-28 14:38:20 +10:00
Mark Andrews
b5076014b9 Return REFUSED if GSSAPI is not configured
Return REFUSED if neither a keytab nor a gssapi credential is
configured to GSSAPI/TKEY requests.
2023-07-28 14:37:32 +10:00
Ondřej Surý
5342d6e97d Merge branch 'ondrej/workaround-the-ASAN-report-for-cds_lfht_for_each_entry' into 'main'
Workaround AddressSanitizer overzealous check

See merge request isc-projects/bind9!8116
2023-07-27 13:22:08 +00:00
Ondřej Surý
dc3e07572b Workaround AddressSanitizer overzealous check
The cds_lfht_for_each_entry and cds_lfht_for_each_entry_duplicate macros
had a code that operated on the NULL pointer, at the end of the list it
was calling caa_container_of() on the NULL pointer in the init-clause
and iteration-expression, but the result wasn't actually used anywhere
because the cond-expression in the for loop has prevented executing
loop-statement.  This made AddressSanitizer notice the invalid operation
and rightfully complain.

This was reported to the upstream and fixed there.  Pull the upstream
fix into our <isc/urcu.h> header, so our CI checks pass.
2023-07-27 15:21:39 +02:00
Ondřej Surý
7c8d6a454d Merge branch '4227-free-stub_glue_request-in-stub_glue_response' into 'main'
Free struct stub_glue_request in stub_glue_response() callback

Closes #4227

See merge request isc-projects/bind9!8147
2023-07-27 10:34:20 +00:00
Ondřej Surý
7a2b4ad17b Add CHANGES note for [GL #4227] 2023-07-27 12:34:03 +02:00
Ondřej Surý
31c43d4b76 Free struct stub_glue_request in stub_glue_response() callback
When stub_glue_response() is called, the associated data is stored in
newly allocated struct stub_glue_request.  The allocated structure is
never freed in the callback, thus we leak a little bit of memory.
2023-07-27 12:34:03 +02:00
Ondřej Surý
57a568e8f9 Unify the naming for struct stub_glue_request
The stub_request_nameserver_address() used 'request' as name for
struct stub_glue_request leading to confusion between 'request'
(stub_glue_request) and 'request->request' (dns_request_t).

Unify the name to 'sgr' already used in struct stub_glue_response().
2023-07-27 12:34:03 +02:00