]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 years agoMerge branch 'ondrej-remove-dns_byaddr-API' into 'main'
Ondřej Surý [Wed, 25 May 2022 12:50:25 +0000 (12:50 +0000)] 
Merge branch 'ondrej-remove-dns_byaddr-API' into 'main'

Remove dns_lookup and unused functions in dns_byaddr

See merge request isc-projects/bind9!6348

4 years agoRemove dns_lookup and unused functions in dns_byaddr
Ondřej Surý [Thu, 19 May 2022 11:07:30 +0000 (13:07 +0200)] 
Remove dns_lookup and unused functions in dns_byaddr

Clean up unused functions from the dns_byaddr API and completely remove
the dns_lookup API.

4 years agoMerge branch '3375-cids-352848-352849-handle-deadcode-flow-errors' into 'main'
Artem Boldariev [Wed, 25 May 2022 10:20:05 +0000 (10:20 +0000)] 
Merge branch '3375-cids-352848-352849-handle-deadcode-flow-errors' into 'main'

Resolve: CID 352848, CID 352849: Control flow issues (DEADCODE)

Closes #3375

See merge request isc-projects/bind9!6351

4 years agoCID 352848: split xfrin_start() and remove dead code
Artem Boldariev [Tue, 24 May 2022 08:39:26 +0000 (11:39 +0300)] 
CID 352848: split xfrin_start() and remove dead code

This commit separates TLS context creation code from xfrin_start() as
it has become too large and hard to follow into a new
function (similarly how it is done in dighost.c)

The dead code has been removed from the cleanup section of the TLS
creation code:

* there is no way 'tlsctx' can equal 'found';
* there is no way 'sess_cache' can be non-NULL in the cleanup section.

Also, it fixes a bug in the older version of the code, where TLS
client session context fetched from the cache would not get passed to
isc_nm_tlsdnsconnect().

4 years agoCID 352849: refactor get_create_tls_context() within dighost.c
Artem Boldariev [Tue, 24 May 2022 08:25:30 +0000 (11:25 +0300)] 
CID 352849: refactor get_create_tls_context() within dighost.c

This commit removes dead code from cleanup handling part of the
get_create_tls_context().

In particular, currently:

* there is no way 'found_ctx' might equal 'ctx';
* there is no way 'session_cache' might equal a non-NULL value while
cleaning up after a TLS initialisation error.

4 years agoMerge branch '2801-unittest-isc-netmgr-s390x' into 'main'
Ondřej Surý [Tue, 24 May 2022 18:22:54 +0000 (18:22 +0000)] 
Merge branch '2801-unittest-isc-netmgr-s390x' into 'main'

Fix failures in isc netmgr_test on big endian machines

Closes #2801

See merge request isc-projects/bind9!6352

4 years agoFix failures in isc netmgr_test on big endian machines
Petr Menšík [Tue, 24 May 2022 17:42:41 +0000 (19:42 +0200)] 
Fix failures in isc netmgr_test on big endian machines

Typing from libuv structure to isc_region_t is not possible, because
their sizes differ on 64 bit architectures. Little endian machines seems
to be lucky and still result in test passed. But big endian machine such
as s390x fails the test reliably.

Fix by directly creating the buffer as isc_region_t and skipping the
type conversion. More readable and still more correct.

4 years agoMerge branch '3064-avoid-periodic-interface-rescans' into 'main'
Artem Boldariev [Tue, 24 May 2022 13:55:33 +0000 (13:55 +0000)] 
Merge branch '3064-avoid-periodic-interface-rescans' into 'main'

Disable periodic interface re-scans on Linux

Closes #3064

See merge request isc-projects/bind9!6111

4 years agoModify CHANGES [GL #3064]
Artem Boldariev [Fri, 8 Apr 2022 12:50:06 +0000 (15:50 +0300)] 
Modify CHANGES [GL #3064]

Mention that "interface-interval" might be ignored if a reliable,
event-based mechanism to detect interface state changes is available.

4 years agoDisable periodic interface re-scans on modern platforms
Artem Boldariev [Fri, 8 Apr 2022 12:32:10 +0000 (15:32 +0300)] 
Disable periodic interface re-scans on modern platforms

This commit disables periodic interface re-scans timer on Linux where
a kernel-based dynamic interface mechanisms make it a thing of the
past in most cases.

4 years agoMerge branch '3376-fix-openssl-1.1.0-unimplementable-SSL-SESSION-is-resumable' into...
Artem Boldariev [Tue, 24 May 2022 10:52:06 +0000 (10:52 +0000)] 
Merge branch '3376-fix-openssl-1.1.0-unimplementable-SSL-SESSION-is-resumable' into 'main'

Resolve #3376: Do not provide a shim for SSL_SESSION_is_resumable()

Closes #3376

See merge request isc-projects/bind9!6346

4 years agoDo not provide a shim for SSL_SESSION_is_resumable()
Artem Boldariev [Mon, 23 May 2022 10:41:06 +0000 (13:41 +0300)] 
Do not provide a shim for SSL_SESSION_is_resumable()

The recently added TLS client session cache used
SSL_SESSION_is_resumable() to avoid polluting the cache with
non-resumable sessions. However, it turned out that we cannot provide
a shim for this function across the whole range of OpenSSL versions
due to the fact that OpenSSL 1.1.0 does uses opaque pointers for
SSL_SESSION objects.

The commit replaces the shim for SSL_SESSION_is_resumable() with a non
public approximation of it on systems shipped with OpenSSL 1.1.0. It
is not turned into a proper shim because it does not fully emulate the
behaviour of SSL_SESSION_is_resumable(), but in our case it is good
enough, as it still helps to protect the cache from pollution.

For systems shipped with OpenSSL 1.0.X and derivatives (e.g. older
versions of LibreSSL), the provided replacement perfectly mimics the
function it is intended to replace.

4 years agoMerge branch '3341-servestale-extendederrors-test-failure' into 'main'
Matthijs Mekking [Mon, 23 May 2022 14:01:47 +0000 (14:01 +0000)] 
Merge branch '3341-servestale-extendederrors-test-failure' into 'main'

Tweak timings in serve-stale system test

Closes #3341

See merge request isc-projects/bind9!6276

4 years agoTweak timings in serve-stale system test
Matthijs Mekking [Tue, 10 May 2022 13:09:29 +0000 (15:09 +0200)] 
Tweak timings in serve-stale system test

Give a little bit more time if we wait on a time out from the
authoritative (aka resolver failure), and give up after one try
(because the second attempt will likely result in a different EDE).

4 years agoMerge branch '3354-cid-352776-missing_lock' into 'main'
Matthijs Mekking [Mon, 23 May 2022 10:27:29 +0000 (10:27 +0000)] 
Merge branch '3354-cid-352776-missing_lock' into 'main'

Fix CID 352776: Concurrent data access violations

Closes #3354

See merge request isc-projects/bind9!6315

4 years agoRequire valid key for dst_key functions
Matthijs Mekking [Tue, 17 May 2022 10:02:43 +0000 (12:02 +0200)] 
Require valid key for dst_key functions

Make sure that the key structure is valid when calling the following
functions:
- dst_key_setexternal
- dst_key_isexternal
- dst_key_setmodified
- dst_key_ismodified

4 years agoFix CID 352776: Concurrent data access violations
Matthijs Mekking [Mon, 16 May 2022 17:00:47 +0000 (19:00 +0200)] 
Fix CID 352776: Concurrent data access violations

*** CID 352776:  Concurrent data access violations  (MISSING_LOCK)
/lib/dns/dst_api.c: 474 in dst_key_setmodified()
468     dst_key_isexternal(dst_key_t *key) {
469 return (key->external);
470     }
471
472     void
473     dst_key_setmodified(dst_key_t *key, bool value) {
>>>     CID 352776:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "key->modified" without holding lock
>>> "dst_key.mdlock". Elsewhere, "dst_key.modified" is accessed with
>>> "dst_key.mdlock" held 8 out of 11 times (8 of these accesses
>>> strongly imply that it is necessary).
474 key->modified = value;
475     }
476
477     bool
478     dst_key_ismodified(dst_key_t *key) {
479 return (key->modified);

4 years agoMerge branch 'artem-client-tls-sessions-reuse' into 'main'
Artem Boldariev [Fri, 20 May 2022 17:53:33 +0000 (17:53 +0000)] 
Merge branch 'artem-client-tls-sessions-reuse' into 'main'

TLS session resumption support

See merge request isc-projects/bind9!6274

4 years agoDig: Do not call isc_nm_cancelread() for HTTP sockets
Artem Boldariev [Tue, 10 May 2022 20:09:59 +0000 (23:09 +0300)] 
Dig: Do not call isc_nm_cancelread() for HTTP sockets

This commit ensures that isc_nm_cancelread() is not called from within
dig code for HTTP sockets, as these lack its implementation.

It does not have much sense to have it due to transactional nature of
HTTP.

Every HTTP request-response pair is represented by a virtual socket,
where read callback is called only when full DNS message is received
or when an error code is being passed there. That is, there is nothing
to cancel at the time of the call.

4 years agoFix an abort in DoH (client-side) when writing on closing sock
Artem Boldariev [Tue, 10 May 2022 16:46:12 +0000 (19:46 +0300)] 
Fix an abort in DoH (client-side) when writing on closing sock

The commit fixes a corner case in client-side DoH code, when a write
attempt is done on a closing socket (session).

The change ensures that the write call-back will be called with a
proper error code (see failed_send_cb() call in client_httpsend()).

4 years agoAvoid aborting when uv_timer_start() is used on a closing socket
Artem Boldariev [Tue, 10 May 2022 16:44:28 +0000 (19:44 +0300)] 
Avoid aborting when uv_timer_start() is used on a closing socket

In such a case it will return UV_EINVAL (-EINVAL), leading to
aborting, as the code expects the function to succeed.

4 years agoModify CHANGES
Artem Boldariev [Mon, 9 May 2022 16:40:01 +0000 (19:40 +0300)] 
Modify CHANGES

Mention that TLS session resumption is now fully supported in the
client side code.

4 years agoAdd SSL_SESSION_is_resumable() implementation shim
Artem Boldariev [Mon, 9 May 2022 16:08:29 +0000 (19:08 +0300)] 
Add SSL_SESSION_is_resumable() implementation shim

This commit adds SSL_SESSION_is_resumable() implementation if it is
missing.

4 years agoDoT: implement TLS client session resumption
Artem Boldariev [Mon, 25 Apr 2022 13:47:06 +0000 (16:47 +0300)] 
DoT: implement TLS client session resumption

This commit extends DoT code with TLS client session resumption
support implemented on top of the TLS client session cache.

4 years agoTLS stream/DoH: implement TLS client session resumption
Artem Boldariev [Fri, 22 Apr 2022 12:59:11 +0000 (15:59 +0300)] 
TLS stream/DoH: implement TLS client session resumption

This commit extends TLS stream code and DoH code with TLS client
session resumption support implemented on top of the TLS client
session cache.

4 years agoExtend TLS context cache with TLS client session cache
Artem Boldariev [Fri, 22 Apr 2022 08:41:14 +0000 (11:41 +0300)] 
Extend TLS context cache with TLS client session cache

This commit extends TLS context cache with TLS client session cache so
that an associated session cache can be stored alongside the TLS
context within the context cache.

4 years agoAdd TLS client session cache implementation
Artem Boldariev [Thu, 21 Apr 2022 12:29:45 +0000 (15:29 +0300)] 
Add TLS client session cache implementation

This commit adds an implementation of a client TLS session cache. TLS
client session cache is an object which allows efficient storing and
retrieval of previously saved TLS sessions so that they can be
resumed. This object is supposed to be a foundation for implementing
TLS session resumption - a standard technique to reduce the cost of
re-establishing a connection to the remote server endpoint.

OpenSSL does server-side TLS session caching transparently by
default. However, on the client-side, a TLS session to resume must be
manually specified when establishing the TLS connection. The TLS
client session cache is precisely the foundation for that.

4 years agoMerge branch '3344-threadsanitizer-data-race-in-isc__nm_tcpdns_send' into 'main'
Ondřej Surý [Thu, 19 May 2022 20:37:16 +0000 (20:37 +0000)] 
Merge branch '3344-threadsanitizer-data-race-in-isc__nm_tcpdns_send' into 'main'

Move setting the sock->write_timeout to the async_*send

Closes #3344

See merge request isc-projects/bind9!6320

4 years agoMove setting the sock->write_timeout to the async_*send
Ondřej Surý [Tue, 17 May 2022 19:31:37 +0000 (21:31 +0200)] 
Move setting the sock->write_timeout to the async_*send

Setting the sock->write_timeout from the TCP, TCPDNS, and TLSDNS send
functions could lead to (harmless) data race when setting the value for
the first time when the isc_nm_send() function would be called from
thread not-matching the socket we are sending to.  Move the setting the
sock->write_timeout to the matching async function which is always
called from the matching thread.

4 years agoMerge branch '3371-check-for-__attribute__-fallthrough-support-is-sometimes-incorrect...
Ondřej Surý [Thu, 19 May 2022 20:01:06 +0000 (20:01 +0000)] 
Merge branch '3371-check-for-__attribute__-fallthrough-support-is-sometimes-incorrect' into 'main'

Use C2x [[fallthrough]] when supported by LLVM/clang

Closes #3371

See merge request isc-projects/bind9!6338

4 years agoUse C2x [[fallthrough]] when supported by LLVM/clang
Ondřej Surý [Thu, 19 May 2022 19:40:24 +0000 (21:40 +0200)] 
Use C2x [[fallthrough]] when supported by LLVM/clang

Clang added support for the gcc-style fallthrough
attribute (i.e. __attribute__((fallthrough))) in version 10.  However,
__has_attribute(fallthrough) will return 1 in C mode in older versions,
even though they only support the C++11 fallthrough attribute. At best,
the unsupported attribute is simply ignored; at worst, it causes errors.

The C2x fallthrough attribute has the advantages of being supported in
the broadest range of clang versions (added in version 9) and being easy
to check for support. Use C2x [[fallthrough]] attribute if possible, and
fall back to not using an attribute for clang versions that don't have
it.

Courtesy of Joshua Root

4 years agoMerge tag 'v9_19_1'
Michal Nowak [Thu, 19 May 2022 08:55:42 +0000 (10:55 +0200)] 
Merge tag 'v9_19_1'

BIND 9.19.1

4 years agoMerge branch 'each-resolver-hash-tables' into 'main'
Evan Hunt [Thu, 19 May 2022 07:49:11 +0000 (07:49 +0000)] 
Merge branch 'each-resolver-hash-tables' into 'main'

Use self-resizing hash tables for resolver

See merge request isc-projects/bind9!6271

4 years agoCHANGES for [GL !6271]
Evan Hunt [Thu, 19 May 2022 07:48:06 +0000 (00:48 -0700)] 
CHANGES for [GL !6271]

4 years agoAlways use the number of CPUS for resolver->ntasks
Evan Hunt [Sun, 8 May 2022 03:58:19 +0000 (20:58 -0700)] 
Always use the number of CPUS for resolver->ntasks

Since the fctx hash table is now self-resizing, and resolver tasks are
selected to match the thread that created the fetch context, there
shouldn't be any significant advantage to having multiple tasks per CPU;
a single task per thread should be sufficient.

Additionally, the fetch context is always pinned to the calling netmgr
thread to minimize the contention just to coalesced fetches - if two
threads starts the same fetch, it will be pinned to the first one to get
the bucket.

4 years agoUse automatically-resizing hash table for resolver buckets
Evan Hunt [Fri, 6 May 2022 21:51:12 +0000 (14:51 -0700)] 
Use automatically-resizing hash table for resolver buckets

Replace the statically-sized hash table used for the resolver
fetch contexts with an isc_ht_t.

4 years agoUse automatically-resizing hash table for fetches-per-zone
Evan Hunt [Wed, 4 May 2022 22:26:39 +0000 (15:26 -0700)] 
Use automatically-resizing hash table for fetches-per-zone

Replace the statically-sized hash table used for fcount_incr()
and fcount_decr() with an isc_ht_t.

4 years agoMerge branch '3350-rndc-dnssec-checkds-doc' into 'main'
Evan Hunt [Wed, 18 May 2022 22:28:39 +0000 (22:28 +0000)] 
Merge branch '3350-rndc-dnssec-checkds-doc' into 'main'

specify time format in the documentation for 'rdnc dnssec -checkds'

Closes #3350

See merge request isc-projects/bind9!6302

4 years agospecify time format in the documentation for 'rdnc dnssec -checkds'
Evan Hunt [Sat, 14 May 2022 02:42:29 +0000 (19:42 -0700)] 
specify time format in the documentation for 'rdnc dnssec -checkds'

also clarified the writing in the surrounding paragraph.

4 years agoMerge branch 'mnowak/fix-typo-in-ednscompliance-test' into 'main'
Michal Nowak [Wed, 18 May 2022 17:15:04 +0000 (17:15 +0000)] 
Merge branch 'mnowak/fix-typo-in-ednscompliance-test' into 'main'

Fix typo in ednscompliance test

See merge request isc-projects/bind9!6323

4 years agoFix typo in ednscompliance test
Michal Nowak [Wed, 18 May 2022 09:23:21 +0000 (11:23 +0200)] 
Fix typo in ednscompliance test

Caused by ba0313e649b9de3d746cc8a748cd02da75f258bd, an incomplete fix of
spelling errors.

4 years agoMerge branch '3366-configure-fails-to-find-uv-h-on-bsd' into 'main'
Ondřej Surý [Wed, 18 May 2022 17:04:31 +0000 (17:04 +0000)] 
Merge branch '3366-configure-fails-to-find-uv-h-on-bsd' into 'main'

Use libuv CFLAGS and LIBS when checking for features

Closes #3366

See merge request isc-projects/bind9!6326

4 years agoUse libuv CFLAGS and LIBS when checking for features
Ondřej Surý [Wed, 18 May 2022 12:10:58 +0000 (14:10 +0200)] 
Use libuv CFLAGS and LIBS when checking for features

When autoconf was checking for libuv features, the LIBUV_CFLAGS was not
added to CFLAGS and LIBUV_LIBS to LIBS which resulted in false
negatives.

Use AX_SAVE_FLAGS and AX_RESTORE_FLAGS to temporarily add LIBUV_CFLAGS
and LIBUV_LIBS to their respective variables.

4 years agoMerge branch '3356-wrong-path-for-geoip-directory' into 'main'
Mark Andrews [Tue, 17 May 2022 18:56:17 +0000 (18:56 +0000)] 
Merge branch '3356-wrong-path-for-geoip-directory' into 'main'

Resolve "wrong path for geoip-directory"

Closes #3356

See merge request isc-projects/bind9!6316

4 years agoRemove extraneous '$' in AS_VAR_COPY([MAXMINDDB_PREFIX], [with_maxminddb])
Mark Andrews [Tue, 17 May 2022 09:39:22 +0000 (19:39 +1000)] 
Remove extraneous '$' in AS_VAR_COPY([MAXMINDDB_PREFIX], [with_maxminddb])

4 years agoMerge branch '3361-dnssec-settime-unset' into 'main'
Tony Finch [Tue, 17 May 2022 15:33:29 +0000 (15:33 +0000)] 
Merge branch '3361-dnssec-settime-unset' into 'main'

Teach dnssec-settime to read unset times that it writes

Closes #3361

See merge request isc-projects/bind9!6317

4 years agoTeach dnssec-settime to read unset times that it writes
Tony Finch [Tue, 17 May 2022 12:13:57 +0000 (14:13 +0200)] 
Teach dnssec-settime to read unset times that it writes

When there is no time in a key file, `dnssec-settime` will print
"UNSET", but to unset a time the user must specify "none" or "never".
This change allows "unset" or "UNSET" as well as "none" or "never".
The "UNSET" output remains the same to avoid compatibility problems
with wrapper scripts.

I have also re-synchronized the "Timing Options" sections of the man
pages.

4 years agoMerge branch 'ondrej-cleanup-dns_message_gettemp' into 'main'
Ondřej Surý [Tue, 17 May 2022 11:12:06 +0000 (11:12 +0000)] 
Merge branch 'ondrej-cleanup-dns_message_gettemp' into 'main'

Cleanup dns_message_gettemp*() functions - they cannot fail

See merge request isc-projects/bind9!6311

4 years agoCleanup dns_message_gettemp*() functions - they cannot fail
Ondřej Surý [Mon, 16 May 2022 11:28:13 +0000 (13:28 +0200)] 
Cleanup dns_message_gettemp*() functions - they cannot fail

The dns_message_gettempname(), dns_message_gettemprdata(),
dns_message_gettemprdataset(), and dns_message_gettemprdatalist() always
succeeds because the memory allocation cannot fail now.  Change the API
to return void and cleanup all the use of aforementioned functions.

4 years agoMerge branch '3352-kasp-test-broken-on-freebsd' into 'main'
Matthijs Mekking [Mon, 16 May 2022 16:15:01 +0000 (16:15 +0000)] 
Merge branch '3352-kasp-test-broken-on-freebsd' into 'main'

Fix "kasp test broken on freebsd"

Closes #3352

See merge request isc-projects/bind9!6310

4 years agoReplace stat with PERL stat in kasp system test
Matthijs Mekking [Mon, 16 May 2022 09:23:15 +0000 (11:23 +0200)] 
Replace stat with PERL stat in kasp system test

7249bad7 introduced the -c option to stat(1) command, but BSD systems
do not know about it. Replace the stat(1) command with a PERL script
that achieves the same.

Why PERL? For consistency purposes, there are more places in the
system test where we use the same method.

4 years agoMerge branch '3327-fetches-per-server-quota' into 'main'
Evan Hunt [Sat, 14 May 2022 07:42:04 +0000 (07:42 +0000)] 
Merge branch '3327-fetches-per-server-quota' into 'main'

fix the fetches-per-server quota calculation

Closes #3327

See merge request isc-projects/bind9!6268

4 years agoAdd CHANGES note for [GL #3327]
Evan Hunt [Thu, 5 May 2022 22:02:43 +0000 (15:02 -0700)] 
Add CHANGES note for [GL #3327]

4 years agoAdd lower bound checks to fetchlimit test
Evan Hunt [Mon, 9 May 2022 00:17:29 +0000 (17:17 -0700)] 
Add lower bound checks to fetchlimit test

Check that the recursing client count is above a reasonable
minimum, as well as below a maximum, so that we can detect
bugs that cause recursion to fail too early or too often.

4 years agoCleanup: always count ns_statscounter_recursclients
Evan Hunt [Thu, 5 May 2022 21:57:16 +0000 (14:57 -0700)] 
Cleanup: always count ns_statscounter_recursclients

The ns_statscounter_recursclients counter was previously only
incremented or decremented if client->recursionquota was non-NULL.
This was harmless, because that value should always be non-NULL if
recursion is enabled, but it made the code slightly confusing.

4 years agoDisable EDNS for the fetchlimit test server
Evan Hunt [Thu, 5 May 2022 21:52:15 +0000 (14:52 -0700)] 
Disable EDNS for the fetchlimit test server

The fetchlimit test depends on a resolver continuing to try UDP
and timing out while the client waits for resolution to succeed.
but since commit bb990030 (flag day 2020), a fetch will always
switch to TCP after two timeouts, unless EDNS was disabled for
the query.

This commit adds "edns no;" to server statements in the fetchlimit
resolver, to restore the behavior expected by the test.

4 years agoFix the fetches-per-server quota calculation
Evan Hunt [Thu, 5 May 2022 00:27:56 +0000 (17:27 -0700)] 
Fix the fetches-per-server quota calculation

Since commit bad5a523c2e, when the fetches-per-server quota
was increased or decreased, instead of the value being set to
the newly calculated quota, it was set to the *minimum* of
the new quota or 1 - which effectively meant it was always set to 1.
it should instead have been the maximum, to prevent the value from
ever dropping to zero.

4 years agoMerge branch '3351-checkconf-overflow' into 'main'
Evan Hunt [Sat, 14 May 2022 03:28:48 +0000 (03:28 +0000)] 
Merge branch '3351-checkconf-overflow' into 'main'

prevent a possible buffer overflow in configuration check

Closes #3351

See merge request isc-projects/bind9!6303

4 years agoprevent a possible buffer overflow in configuration check
Evan Hunt [Sat, 14 May 2022 02:59:58 +0000 (19:59 -0700)] 
prevent a possible buffer overflow in configuration check

corrected code that could have allowed a buffer overfow while
parsing named.conf.

4 years agoMerge branch 'each-view-cleanup' into 'main'
Evan Hunt [Fri, 13 May 2022 21:23:40 +0000 (21:23 +0000)] 
Merge branch 'each-view-cleanup' into 'main'

clean up view and related object shutdown processes

See merge request isc-projects/bind9!6278

4 years agoCHANGES
Evan Hunt [Thu, 12 May 2022 23:57:43 +0000 (16:57 -0700)] 
CHANGES

4 years agoattach the resolver to the ADB
Evan Hunt [Thu, 12 May 2022 22:51:10 +0000 (15:51 -0700)] 
attach the resolver to the ADB

the ADB depends on the resolver, but previously only accessed it
via the view. as view->resolver may now be detached before the ADB
finishes, a shutdown race was possible. attaching to the resolver
directly prevents this.

4 years agoremove requestmgr whenshutdown events
Evan Hunt [Wed, 11 May 2022 20:55:01 +0000 (13:55 -0700)] 
remove requestmgr whenshutdown events

the request manager has no direct dependency on the
view, so there's no need for a weak reference. remove the
dns_requestmgr_whenshutdown() mechanism since it is no longer
used.

4 years agoremove resolver whenshutdown events
Evan Hunt [Wed, 11 May 2022 20:55:01 +0000 (13:55 -0700)] 
remove resolver whenshutdown events

weakly attaching and detaching when creating and destroying the
resolver obviates the need to have a callback event to do the weak
detach. remove the dns_resolver_whenshutdown() mechanism, as it is
now unused.

4 years agoremove ADB whenshutdown events
Evan Hunt [Wed, 11 May 2022 20:55:01 +0000 (13:55 -0700)] 
remove ADB whenshutdown events

weakly attaching and detaching the view when creating or destroying
the ADB obviates the need for a whenshutdown callback event to do
the detaching.  remove the dns_adb_whenshutdown() mechanism, since
it is no longer needed.

4 years agomove ADB and resolver stats out of the view object
Evan Hunt [Wed, 11 May 2022 22:38:54 +0000 (15:38 -0700)] 
move ADB and resolver stats out of the view object

for better object separation, ADB and resolver statistics counters
are now stored in the ADB and resolver objects themsevles, rather than
in the associated view.

4 years agoremove view->attributes field
Evan Hunt [Wed, 11 May 2022 21:18:45 +0000 (14:18 -0700)] 
remove view->attributes field

it's not necessary to use view attributes to determine whether
the ADB, resolver and requestmgr need to be shut down; checking
whether they're NULL is sufficient.

4 years agothe validator can attach to the view normally
Evan Hunt [Wed, 11 May 2022 19:15:46 +0000 (12:15 -0700)] 
the validator can attach to the view normally

dns_view_weakattach() and _weakdetach() are used by objects that
are created by the view and need it to persist until they are
destroyed, but don't need to prevent it from being shut down. the
validator can use normal view references instead of weak references.

4 years agofixed a possible reference leak in dns_resolver_create()
Evan Hunt [Tue, 10 May 2022 19:48:31 +0000 (12:48 -0700)] 
fixed a possible reference leak in dns_resolver_create()

If an error occurred while creating the resolver, the mctx could
remain attached.

4 years agominor view refactoring
Evan Hunt [Tue, 10 May 2022 19:48:31 +0000 (12:48 -0700)] 
minor view refactoring

- eliminate dns_view_flushanddetach(), which was only called from
  one place; instead, we now call a function dns_view_flushonshutdown()
  which sets the view up to flush zones when it is detached normally
  with dns_view_detach().
- cleaned up code in dns_view_create().

4 years agomaybe_cancel_validators() is always called locked
Evan Hunt [Mon, 9 May 2022 19:55:07 +0000 (12:55 -0700)] 
maybe_cancel_validators() is always called locked

there's no longer any need for a parameter to specify whether the
function is called while holding the bucket lock, because all
unlocked uses have been removed.

4 years agoMerge branch '3302-keymgr-updates-key-files-each-run' into 'main'
Matthijs Mekking [Fri, 13 May 2022 12:50:16 +0000 (12:50 +0000)] 
Merge branch '3302-keymgr-updates-key-files-each-run' into 'main'

Fix "keymgr updates key files each run"

Closes #3302

See merge request isc-projects/bind9!6250

4 years agoAdd changes and release notes for #3302
Matthijs Mekking [Tue, 3 May 2022 10:32:45 +0000 (12:32 +0200)] 
Add changes and release notes for #3302

Add a comment to make danger happy.

4 years agoCheck if key metadata is modified before writing
Matthijs Mekking [Tue, 3 May 2022 10:28:31 +0000 (12:28 +0200)] 
Check if key metadata is modified before writing

Add a new parameter to the dst_key structure, mark a key modified if
dst_key_(un)set[bool,num,state,time] is called. Only write out key
files during a keymgr run if the metadata has changed.

4 years agoAdd kasp test for #3302
Matthijs Mekking [Tue, 3 May 2022 10:24:58 +0000 (12:24 +0200)] 
Add kasp test for #3302

Add a test case that triggers a keymgr run that will not trigger any
metadata changes. Ensure that the last status change of the key files
is unmodified.

4 years agoMerge branch 'ondrej-fix-trampoline-locking' into 'main'
Ondřej Surý [Fri, 13 May 2022 10:16:16 +0000 (10:16 +0000)] 
Merge branch 'ondrej-fix-trampoline-locking' into 'main'

Lock the trampoline when attaching

See merge request isc-projects/bind9!6257

4 years agoLock the trampoline when attaching
Ondřej Surý [Wed, 4 May 2022 07:26:34 +0000 (09:26 +0200)] 
Lock the trampoline when attaching

When attaching to the trampoline, the isc__trampoline_max was access
unlocked.  This would not manifest under normal circumstances because we
initialize 65 trampolines by default and that's enough for most
commodity hardware, but there are ARM machines with 128+ cores where
this would be reported by ThreadSanitizer.

Add locking around the code in isc__trampoline_attach().  This also
requires the lock to leak on exit (along with memory that we already)
because a new thread might be attaching to the trampoline while we are
running the library destructor at the same time.

4 years agoMerge branch 'ondrej-remove-isc_task-on-shutdown' into 'main'
Ondřej Surý [Fri, 13 May 2022 08:04:49 +0000 (08:04 +0000)] 
Merge branch 'ondrej-remove-isc_task-on-shutdown' into 'main'

Remove isc_task_onshutdown()

See merge request isc-projects/bind9!6275

4 years agoAdd CHANGES note for [GL !6275]
Ondřej Surý [Tue, 10 May 2022 07:01:14 +0000 (09:01 +0200)] 
Add CHANGES note for [GL !6275]

4 years agoRemove isc_task_destroy() and isc_task_shutdown()
Ondřej Surý [Mon, 9 May 2022 10:58:34 +0000 (12:58 +0200)] 
Remove isc_task_destroy() and isc_task_shutdown()

After removing the isc_task_onshutdown(), the isc_task_shutdown() and
isc_task_destroy() became obsolete.

Remove calls to isc_task_shutdown() and replace the calls to
isc_task_destroy() with isc_task_detach().

Simplify the internal logic to destroy the task when the last reference
is removed.

4 years agoRemove isc_task_onshutdown()
Ondřej Surý [Mon, 9 May 2022 09:33:09 +0000 (11:33 +0200)] 
Remove isc_task_onshutdown()

The isc_task_onshutdown() was used to post event that should be run when
the task is being shutdown.  This could happen explicitly in the
isc_test_shutdown() call or implicitly when we detach the last reference
to the task and there are no more events posted on the task.

This whole task onshutdown mechanism just makes things more complicated,
and it's easier to post the "shutdown" events when we are shutting down
explicitly and the existing code already always knows when it should
shutdown the task that's being used to execute the onshutdown events.

Replace the isc_task_onshutdown() calls with explicit calls to execute
the shutdown tasks.

4 years agoMerge branch 'michal/drop-post-merge-pipelines' into 'main'
Michał Kępień [Wed, 11 May 2022 13:03:17 +0000 (13:03 +0000)] 
Merge branch 'michal/drop-post-merge-pipelines' into 'main'

Drop post-merge pipelines

See merge request isc-projects/bind9!6292

4 years agoDrop post-merge pipelines
Michał Kępień [Wed, 11 May 2022 12:59:47 +0000 (14:59 +0200)] 
Drop post-merge pipelines

Commit 24961f606882939b62f461f843933da9c2d44ea8 introduced the concept
of post-merge pipelines.  These were used to build documentation after
each merge to any of the maintained branches, to allow up-to-date
documentation to be subsequently published on the bind.isc.org
microsite.  As the latter no longer downloads documentation from GitLab,
instead linking to Read the Docs for all currently maintained branches,
post-merge pipelines have become redundant since running the
"autoreconf" and "docs" jobs after each merge is not necessary any more.
Drop the "release_branch_triggering_rules" YAML anchor and revert to
default triggering rules for the "autoconf" and "docs" jobs, effectively
preventing pipelines from being created after each merge to any of the
maintained branches.

4 years agoMerge branch '565-do-not-trigger-gitlab-pages-pipelines-any-more' into 'main'
Michał Kępień [Wed, 11 May 2022 12:10:48 +0000 (12:10 +0000)] 
Merge branch '565-do-not-trigger-gitlab-pages-pipelines-any-more' into 'main'

Do not trigger GitLab Pages pipelines any more

See merge request isc-projects/bind9!6285

4 years agoDo not set up ccache in CI jobs building docs
Michał Kępień [Wed, 11 May 2022 12:10:17 +0000 (14:10 +0200)] 
Do not set up ccache in CI jobs building docs

Building documentation for Automake-based BIND 9 versions does not
require running "make all" beforehand.  Drop ccache setup code from the
definitions of GitLab CI jobs building documentation as it is redundant.

4 years agoDo not trigger GitLab Pages pipelines any more
Michał Kępień [Wed, 11 May 2022 12:10:17 +0000 (14:10 +0200)] 
Do not trigger GitLab Pages pipelines any more

The bind.isc.org microsite no longer downloads documentation from
GitLab, instead linking to Read the Docs for all currently maintained
branches.  This makes it redundant to trigger GitLab Pages pipelines
after each merge to any of the maintained branches.  Revert changes
introduced by commit 31bde118db8cae4a0f5a9484e3beead66fcc24d0: remove
the "push:docs" job along with the "push" stage it is associated with
and revert artifact expiry time for the "docs" job to the default value.

4 years agoMerge branch '3335-confusing-parental-source-documentation' into 'main'
Matthijs Mekking [Wed, 11 May 2022 11:17:54 +0000 (11:17 +0000)] 
Merge branch '3335-confusing-parental-source-documentation' into 'main'

Remove confusing parental-source line

Closes #3335

See merge request isc-projects/bind9!6272

4 years agoRemove confusing parental-source line
Matthijs Mekking [Fri, 6 May 2022 12:53:58 +0000 (14:53 +0200)] 
Remove confusing parental-source line

Remove the line "This address must appear in the secondary server’s
parental-agents zone clause". This line is a copy paste error from
notify-source.

Rewrap.

4 years agoMerge branch 'pspacek/arm-remove-solaris251' into 'main'
Petr Špaček [Wed, 11 May 2022 09:02:29 +0000 (09:02 +0000)] 
Merge branch 'pspacek/arm-remove-solaris251' into 'main'

Remove ARM notes about Solaris 2.5.1

See merge request isc-projects/bind9!6269

4 years agoRemove ARM notes about Solaris 2.5.1
Petr Špaček [Thu, 5 May 2022 11:22:26 +0000 (13:22 +0200)] 
Remove ARM notes about Solaris 2.5.1

It was released in May 1996 and hopefully is not used to run BIND
anymore.

4 years agoMerge branch '3169-arm-restructuring' into 'main'
Petr Špaček [Wed, 11 May 2022 09:01:01 +0000 (09:01 +0000)] 
Merge branch '3169-arm-restructuring' into 'main'

Restructure ARM

Closes #1223

See merge request isc-projects/bind9!6156

4 years agoAdd RPZ section to the ARM
Suzanne Goldlust [Thu, 21 Apr 2022 13:49:16 +0000 (13:49 +0000)] 
Add RPZ section to the ARM

Closes: #1223
4 years agoRewrite Configurations and Zone Files section in the ARM
Ron Aitchison [Mon, 4 Apr 2022 20:37:36 +0000 (20:37 +0000)] 
Rewrite Configurations and Zone Files section in the ARM

4 years agoTweak zones.inc.rst now separated from Reference section
Ron Aitchison [Tue, 5 Apr 2022 06:30:26 +0000 (06:30 +0000)] 
Tweak zones.inc.rst now separated from Reference section

4 years agoMove zone file material from Reference to new subsection of chapter 3
Ron Aitchison [Fri, 1 Apr 2022 16:47:03 +0000 (16:47 +0000)] 
Move zone file material from Reference to new subsection of chapter 3

4 years agoMinor DNSSEC guide tweaks
Ron Aitchison [Tue, 22 Mar 2022 01:21:33 +0000 (01:21 +0000)] 
Minor DNSSEC guide tweaks

4 years agoRestructure includes for chapter 9 Troubleshooting
Ron Aitchison [Tue, 22 Mar 2022 01:11:02 +0000 (01:11 +0000)] 
Restructure includes for chapter 9 Troubleshooting

4 years agoSplit chapter Advanced DNS Features in the ARM into chapters 5, 6, 7
Ron Aitchison [Tue, 22 Mar 2022 00:38:26 +0000 (00:38 +0000)] 
Split chapter Advanced DNS Features in the ARM into chapters 5, 6, 7

4 years agoSplit Configuration chapter in the ARM into chapters 3 and 4
Ron Aitchison [Mon, 21 Mar 2022 22:13:29 +0000 (22:13 +0000)] 
Split Configuration chapter in the ARM into chapters 3 and 4

4 years agoAdd new ARM section Installing BIND 9
Ron Aitchison [Mon, 21 Mar 2022 21:41:50 +0000 (21:41 +0000)] 
Add new ARM section Installing BIND 9