]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoRevert "Remove kasp mutex lock"
Matthijs Mekking [Tue, 19 Dec 2023 16:07:40 +0000 (17:07 +0100)] 
Revert "Remove kasp mutex lock"

This reverts commit 634c80ea1237520b7660a8469af2c38b7865ca24.

2 years agoMerge branch '4498-gl-4495-followup-regression-test-was-too-strict' into 'main'
Mark Andrews [Tue, 19 Dec 2023 22:48:51 +0000 (22:48 +0000)] 
Merge branch '4498-gl-4495-followup-regression-test-was-too-strict' into 'main'

Resolve "[GL #4494] followup: regression test was too strict"

Closes #4498

See merge request isc-projects/bind9!8590

2 years agoThe NSEC3 -> NSEC private record may be added later
Mark Andrews [Tue, 19 Dec 2023 06:50:17 +0000 (17:50 +1100)] 
The NSEC3 -> NSEC private record may be added later

Check each delta for the NSEC3 -> NSEC private record addition
as it may be added in the second delta.

2 years agoMerge branch '4439-add-async-restart-handle' into 'main'
Mark Andrews [Tue, 19 Dec 2023 16:34:53 +0000 (16:34 +0000)] 
Merge branch '4439-add-async-restart-handle' into 'main'

Resolve "segfault in resolver when serving UDP clients"

Closes #4439

See merge request isc-projects/bind9!8594

2 years agoAdd CHANGES note for [GL #4439]
Mark Andrews [Fri, 8 Dec 2023 03:00:38 +0000 (14:00 +1100)] 
Add CHANGES note for [GL #4439]

2 years agoObtain a client->handle reference when calling async_restart
Mark Andrews [Fri, 8 Dec 2023 02:57:14 +0000 (13:57 +1100)] 
Obtain a client->handle reference when calling async_restart

otherwise client may be freed before async_restart is called.

2 years agoMerge branch '4500-log-the-change-that-generated-not-exact-when-applying-a-diff'...
Mark Andrews [Tue, 19 Dec 2023 15:37:45 +0000 (15:37 +0000)] 
Merge branch '4500-log-the-change-that-generated-not-exact-when-applying-a-diff' into 'main'

Resolve "Log the change that generated "not exact" when applying a diff."

Closes #4500

See merge request isc-projects/bind9!8591

2 years agoAdd CHANGES entry for [GL #4500]
Mark Andrews [Tue, 19 Dec 2023 08:39:46 +0000 (19:39 +1100)] 
Add CHANGES entry for [GL #4500]

2 years agoLog what change generated a 'not exact' error
Mark Andrews [Tue, 12 Dec 2023 02:50:33 +0000 (13:50 +1100)] 
Log what change generated a 'not exact' error

2 years agoMerge branch '4423-kasp-rwlock' into 'main'
Matthijs Mekking [Tue, 19 Dec 2023 14:54:21 +0000 (14:54 +0000)] 
Merge branch '4423-kasp-rwlock' into 'main'

Remove kasp mutex lock

Closes #4423

See merge request isc-projects/bind9!8571

2 years agoAdd release note and CHANGES for #4423
Matthijs Mekking [Wed, 13 Dec 2023 08:39:22 +0000 (09:39 +0100)] 
Add release note and CHANGES for #4423

2 years agoRemove kasp mutex lock
Matthijs Mekking [Wed, 13 Dec 2023 08:38:17 +0000 (09:38 +0100)] 
Remove kasp mutex lock

Multiple zones should be able to read the same key and signing policy
at the same time. Since writing the kasp lock only happens during
reconfiguration, and the complete kasp list is being replaced, there
is actually no need for a lock. Reference counting ensures that a kasp
structure is not destroyed when still being attached to one or more
zones.

This significantly improves the load configuration time.

2 years agoMerge branch '4234-placeholder' into 'main'
Matthijs Mekking [Tue, 19 Dec 2023 08:38:00 +0000 (08:38 +0000)] 
Merge branch '4234-placeholder' into 'main'

Add CHANGES placeholder for [GL #4234]

See merge request isc-projects/bind9!8592

2 years agoAdd CHANGES placeholder for [GL #4234]
Matthijs Mekking [Tue, 19 Dec 2023 08:34:56 +0000 (09:34 +0100)] 
Add CHANGES placeholder for [GL #4234]

2 years agoMerge branch '4494-add_sigs-was-using-the-wrong-time-in-kasp-mode' into 'main'
Mark Andrews [Tue, 19 Dec 2023 01:02:07 +0000 (01:02 +0000)] 
Merge branch '4494-add_sigs-was-using-the-wrong-time-in-kasp-mode' into 'main'

Resolve "add_sigs was using the wrong time in  kasp mode"

Closes #4494

See merge request isc-projects/bind9!8577

2 years agoAdd CHANGES note for [GL #4494]
Mark Andrews [Thu, 14 Dec 2023 23:54:53 +0000 (10:54 +1100)] 
Add CHANGES note for [GL #4494]

2 years agoRegression check for missing RRSIGs
Mark Andrews [Mon, 18 Dec 2023 00:23:21 +0000 (11:23 +1100)] 
Regression check for missing RRSIGs

When transitioning from NSEC3 to NSEC the added records where not
being signed because the wrong time was being used to determine if
a key should be used or not.  Check that these records are actually
signed.

2 years agoUse 'now' rather than 'inception' in 'add_sigs'
Mark Andrews [Thu, 14 Dec 2023 22:42:10 +0000 (09:42 +1100)] 
Use 'now' rather than 'inception' in 'add_sigs'

When kasp support was added 'inception' was used as a proxy for
'now' and resulted in signatures not being generated or the wrong
signatures being generated.  'inception' is the time to be set
in the signatures being generated and is usually in the past to
allow for clock skew.  'now' determines what keys are to be used
for signing.

2 years agoMerge branch '4402-use-our-instance-of-bind-keys' into 'main'
Mark Andrews [Tue, 19 Dec 2023 00:19:07 +0000 (00:19 +0000)] 
Merge branch '4402-use-our-instance-of-bind-keys' into 'main'

Resolve "Change system tests to not use dnssec-validation auto"

Closes #4402

See merge request isc-projects/bind9!8511

2 years agoTurn off dnssec validation in inline test
Tom Krizek [Mon, 27 Nov 2023 16:22:55 +0000 (17:22 +0100)] 
Turn off dnssec validation in inline test

DNSSEC validation isn't required by the inline test and would send
queries to root name servers.

2 years agoStop sending queries to the internet's root servers
Mark Andrews [Wed, 22 Nov 2023 01:56:52 +0000 (12:56 +1100)] 
Stop sending queries to the internet's root servers

Disable automatic dnssec validation.

2 years agoUse custom bindkeys-file in tests
Mark Andrews [Wed, 22 Nov 2023 01:48:27 +0000 (12:48 +1100)] 
Use custom bindkeys-file in tests

Ensure the test doesn't use the system's bind.keys file by using the
bindkeys-file statement.

2 years agoMerge branch '4138-dig-in-9-19-13-crashes-when-cancelling-with-ctrl-c-a-pending-query...
Mark Andrews [Mon, 18 Dec 2023 23:31:00 +0000 (23:31 +0000)] 
Merge branch '4138-dig-in-9-19-13-crashes-when-cancelling-with-ctrl-c-a-pending-query-to-to-a-not-reachable-tcp' into 'main'

Resolve "dig in 9.19.13 crashes, when cancelling (with CTRL+C) a pending query to to a not reachable TCP port"

Closes #4138

See merge request isc-projects/bind9!8554

2 years agoAdd CHANGES not for [GL #4138]
Mark Andrews [Thu, 7 Dec 2023 02:43:19 +0000 (13:43 +1100)] 
Add CHANGES not for [GL #4138]

2 years agoHandle ISC_R_SHUTTINGDOWN in dighost.c:tcp_connected
Mark Andrews [Thu, 7 Dec 2023 02:36:46 +0000 (13:36 +1100)] 
Handle ISC_R_SHUTTINGDOWN in dighost.c:tcp_connected

dig was making further queries after SIGINT was recieved rather
than shutting down as expected.

2 years agoMerge branch '4497-trust-anchor-telemetry-is-no-longer-experimental' into 'main'
Michał Kępień [Mon, 18 Dec 2023 14:12:22 +0000 (14:12 +0000)] 
Merge branch '4497-trust-anchor-telemetry-is-no-longer-experimental' into 'main'

"trust-anchor-telemetry" is no longer experimental

Closes #4497

See merge request isc-projects/bind9!8585

2 years agoAdd CHANGES entry for GL #4497
Michał Kępień [Mon, 18 Dec 2023 14:11:39 +0000 (15:11 +0100)] 
Add CHANGES entry for GL #4497

2 years ago"trust-anchor-telemetry" is no longer experimental
Michał Kępień [Mon, 18 Dec 2023 14:11:39 +0000 (15:11 +0100)] 
"trust-anchor-telemetry" is no longer experimental

Remove the CFG_CLAUSEFLAG_EXPERIMENTAL flag from the
"trust-anchor-telemetry" statement as the behavior of the latter has not
been changed since its initial implementation and there are currently no
plans to do so.  This silences a relevant log message that was emitted
even when the feature was explicitly disabled.

2 years agoMerge branch '4213-fix-reference-counting-in-do_nsfetch' into 'main'
Michał Kępień [Mon, 18 Dec 2023 10:35:20 +0000 (10:35 +0000)] 
Merge branch '4213-fix-reference-counting-in-do_nsfetch' into 'main'

Fix reference counting in do_nsfetch()

Closes #4213

See merge request isc-projects/bind9!8580

2 years agoFix reference counting in do_nsfetch()
Michał Kępień [Mon, 18 Dec 2023 10:33:43 +0000 (11:33 +0100)] 
Fix reference counting in do_nsfetch()

Each function queuing a do_nsfetch() call using isc_async_run() is
expected to increase the given zone's internal reference count
(zone->irefs), which is then correspondingly decreased in either
do_nsfetch() itself (when the dns_resolver_createfetch() fails) or in
nsfetch_done() (when recursion is finished).

However, do_nsfetch() can also return early if either the zone itself or
the relevant view's resolver object is being shut down.  In that case,
do_nsfetch() simply returns without decreasing the internal reference
count for the zone.  This leaves a dangling zone reference around, which
leads to hangs during named shutdown.

Fix by executing the same cleanup code for early returns from
do_nsfetch() as for a failed dns_resolver_createfetch() call in that
function as the reference count will not be decreased in nsfetch_done()
in any of these cases.

2 years agoMerge branch '4060-prevent-an-infinite-loop-in-shutdown_listener' into 'main'
Michał Kępień [Mon, 18 Dec 2023 10:07:35 +0000 (10:07 +0000)] 
Merge branch '4060-prevent-an-infinite-loop-in-shutdown_listener' into 'main'

Prevent an infinite loop in shutdown_listener()

Closes #4060

See merge request isc-projects/bind9!8581

2 years agoPrevent an infinite loop in shutdown_listener()
Michał Kępień [Mon, 18 Dec 2023 10:07:04 +0000 (11:07 +0100)] 
Prevent an infinite loop in shutdown_listener()

The loop in shutdown_listener() assumes that the reference count for
every controlconnection_t object on the listener->connections linked
list will drop down to zero after the conn_shutdown() call in the loop's
body.  However, when the timing is just right, some netmgr callbacks for
a given control connection may still be awaiting processing by the same
event loop that executes shutdown_listener() when the latter is run.
Since these netmgr callbacks must be run in order for the reference
count for the relevant controlconnection_t objects to drop to zero, when
the scenario described above happens, shutdown_listener() runs into an
infinite loop due to one of the controlconnection_t objects on the
listener->connections linked list never going away from the head of that
list.

Fix by safely iterating through the listener->connections list and
initiating shutdown for all controlconnection_t objects found.  This
allows any pending netmgr callbacks to be run by the same event loop in
due course, i.e. after shutdown_listener() returns.

2 years agoMerge branch '4477-tests-statschannel-loadtime-bugfix' into 'main'
Arаm Sаrgsyаn [Mon, 18 Dec 2023 09:33:16 +0000 (09:33 +0000)] 
Merge branch '4477-tests-statschannel-loadtime-bugfix' into 'main'

Resolve "statschannel test intermittently fails with incorrect zone loadtime"

Closes #4477

See merge request isc-projects/bind9!8569

2 years agoFix a statschannel system test zone loadtime issue
Aram Sargsyan [Tue, 12 Dec 2023 14:54:40 +0000 (14:54 +0000)] 
Fix a statschannel system test zone loadtime issue

The check_loaded() function compares the zone's loadtime value and
an expected loadtime value, which is based on the zone file's mtime
extracted from the filesystem.

For the secondary zones there may be cases, when the zone file isn't
ready yet before the zone transfer is complete and the zone file is
dumped to the disk, so a so zero value mtime is retrieved.

In such cases wait one second and retry until timeout. Also modify
the affected check to allow a possible difference of the same amount
of seconds as the chosen timeout value.

2 years agoMerge branch '4493-data-race-in-xfrin_send_request' into 'main'
Arаm Sаrgsyаn [Mon, 18 Dec 2023 08:44:33 +0000 (08:44 +0000)] 
Merge branch '4493-data-race-in-xfrin_send_request' into 'main'

Resolve "ThreadSanitizer: data race xfrin.c:1555:2 in xfrin_send_request"

Closes #4493

See merge request isc-projects/bind9!8579

2 years agoAdd a CHANGES note for [GL #4493]
Aram Sargsyan [Fri, 15 Dec 2023 09:48:19 +0000 (09:48 +0000)] 
Add a CHANGES note for [GL #4493]

2 years agoUse atomic store operations instead of atomic initialize
Aram Sargsyan [Fri, 15 Dec 2023 09:43:36 +0000 (09:43 +0000)] 
Use atomic store operations instead of atomic initialize

The atomic_init() function makes sense to use with structure's
members when creating a new instance of a strucutre. In other
places, use atomic store operations instead, in order to avoid
data races.

2 years agoMerge branch '4467-fix-stats-export-overflow' into 'main'
Petr Špaček [Thu, 14 Dec 2023 08:13:46 +0000 (08:13 +0000)] 
Merge branch '4467-fix-stats-export-overflow' into 'main'

Avoid overflow during statistics dump

Closes #4467

See merge request isc-projects/bind9!8532

2 years agoMove atomic statscounter next to the non-atomic definition
Aydın Mercan [Mon, 11 Dec 2023 14:26:04 +0000 (17:26 +0300)] 
Move atomic statscounter next to the non-atomic definition

2 years agoUse a non-atomic counter when passing to stats dumper
Aydın Mercan [Mon, 11 Dec 2023 10:50:45 +0000 (13:50 +0300)] 
Use a non-atomic counter when passing to stats dumper

2 years agoAdd CHANGES and release note for [GL #4467]
Petr Špaček [Mon, 4 Dec 2023 15:14:31 +0000 (16:14 +0100)] 
Add CHANGES and release note for [GL #4467]

2 years agoAvoid overflow during statistics dump
Petr Špaček [Fri, 1 Dec 2023 08:29:54 +0000 (09:29 +0100)] 
Avoid overflow during statistics dump

Related: !1493
Fixes: #4467
2 years agoMerge branch '4478-redefinition-of-hmac-as-different-kind-of-symbol-on-netbsd' into...
Mark Andrews [Wed, 13 Dec 2023 23:32:41 +0000 (23:32 +0000)] 
Merge branch '4478-redefinition-of-hmac-as-different-kind-of-symbol-on-netbsd' into 'main'

Resolve "Redefinition of 'hmac' as different kind of symbol on NetBSD"

Closes #4478

See merge request isc-projects/bind9!8555

2 years agoAdd CHANGES note for [GL #4478]
Mark Andrews [Thu, 7 Dec 2023 07:11:06 +0000 (18:11 +1100)] 
Add CHANGES note for [GL #4478]

2 years agoNetBSD has added 'hmac' to libc so rename out uses of hmac
Mark Andrews [Thu, 7 Dec 2023 07:07:55 +0000 (18:07 +1100)] 
NetBSD has added 'hmac' to libc so rename out uses of hmac

2 years agoMerge branch 'pspacek/update-gitlab-issue-templates' into 'main'
Petr Špaček [Wed, 13 Dec 2023 16:30:04 +0000 (16:30 +0000)] 
Merge branch 'pspacek/update-gitlab-issue-templates' into 'main'

Update Gitlab issue templates

See merge request isc-projects/bind9!8542

2 years agoAdd Acknowledgements into Security issue template
Petr Špaček [Wed, 13 Dec 2023 08:23:42 +0000 (09:23 +0100)] 
Add Acknowledgements into Security issue template

Hopefully it will save us one round-trip with the reporter.

2 years agoFix Gitlab label in Feature request template
Petr Špaček [Tue, 5 Dec 2023 17:30:26 +0000 (18:30 +0100)] 
Fix Gitlab label in Feature request template

2 years agoModernize Gitlab Bug template
Petr Špaček [Tue, 5 Dec 2023 17:29:37 +0000 (18:29 +0100)] 
Modernize Gitlab Bug template

2 years agoAdd a default Gitlab issue template
Petr Špaček [Tue, 5 Dec 2023 17:24:00 +0000 (18:24 +0100)] 
Add a default Gitlab issue template

It's an attempt to make people use correct Gitlab templates, or use them
at all.

2 years agoMake CVE issues confidential by default
Petr Špaček [Tue, 5 Dec 2023 17:06:41 +0000 (18:06 +0100)] 
Make CVE issues confidential by default

An trivial attempt to avoid accidental disclosures.

2 years agoLabel CVE issue template as internal-use only
Petr Špaček [Tue, 5 Dec 2023 17:06:15 +0000 (18:06 +0100)] 
Label CVE issue template as internal-use only

2 years agoAdd Gitlab template for security issues
Petr Špaček [Tue, 5 Dec 2023 17:05:36 +0000 (18:05 +0100)] 
Add Gitlab template for security issues

2 years agoMerge branch 'mnowak/alpine-3.19' into 'main'
Michal Nowak [Tue, 12 Dec 2023 10:10:50 +0000 (10:10 +0000)] 
Merge branch 'mnowak/alpine-3.19' into 'main'

Add Alpine Linux 3.19

See merge request isc-projects/bind9!8562

2 years agoAdd Alpine Linux 3.19
Michal Nowak [Mon, 11 Dec 2023 10:49:40 +0000 (11:49 +0100)] 
Add Alpine Linux 3.19

2 years agoMerge branch 'matthijs-qp-lookup-iterator' into 'main'
Evan Hunt [Mon, 11 Dec 2023 21:01:46 +0000 (21:01 +0000)] 
Merge branch 'matthijs-qp-lookup-iterator' into 'main'

Follow-up on !8468, more dns_qp_lookup bug fixes related to the iterator

See merge request isc-projects/bind9!8558

2 years agoAdd CHANGES
Matthijs Mekking [Mon, 11 Dec 2023 09:34:44 +0000 (10:34 +0100)] 
Add CHANGES

2 years agoRefactor getpred code
Matthijs Mekking [Thu, 7 Dec 2023 15:55:37 +0000 (16:55 +0100)] 
Refactor getpred code

Move the code to find the predecessor into one function, as it is shares
quite some similarities: In both cases we first need to find the
immediate predecessor/successor, then we need to find the immediate
predecessor if the iterator is not already pointing at it.

2 years agoand fix yet another dns_qp_lookup() iterator bug
Matthijs Mekking [Thu, 7 Dec 2023 10:51:23 +0000 (11:51 +0100)] 
and fix yet another dns_qp_lookup() iterator bug

This one is similar to the bug when searching for a key, reaching a
dead-end branch that doesn't match, because the branch offset point
is after the point where the search key differs.

This fixes the case where we are multiple levels deep. In other
words, we had a more-than-one matches *after* the point where the
search key differs.

For example, consider the following qp-trie:

branch: "[e]", "[m]":
 - leaf: "a.b.c.d.e"
 - branch: "moo[g]", "moo[k]", "moo[n]":
   - leaf: "moog"
   - branch: "mook[e]", "mook[o]"
     - leaf: "mooker"
     - leaf: "mooko"
   - leaf: "moon"

If searching for a key "monky", we would reach the branch with
twigs "moo[k]" and "moo[n]". The key matches on the 'k' on offset=4,
and reaches the branch with twigs "mook[e]" and "mook[o]". This time
we cannot find a twig that matches our key at offset=5, there is no
twig for 'y'. The closest name we found was "mooker".

Note that on a branch it can't detect it is on a dead branch because the
key is not encapsulated in a branch node.

In the previous code we considered "mooker" to be the successor of
"monky" and so we needed to the predecessor of "mooker" to find the
predecessor for "monky". However, since the search key alread differed
before entering this branch, this is not enough. We would be left with
"moog" as the predecessor of "monky", while in this example "a.b.c.d.e"
is the actual predecessor.

Instead, we need to go up a level, find the predecessor and check
again if we are on the right branch, and repeat the process until we
are.

Unit tests to cover the scenario are now added.

2 years agoand fix another dns_qp_lookup() iterator bug
Matthijs Mekking [Thu, 7 Dec 2023 09:11:14 +0000 (10:11 +0100)] 
and fix another dns_qp_lookup() iterator bug

There was yet another edge case in which an iterator could be
positioned at the wrong node after dns_qp_lookup(). When searching for
a key, it's possible to reach a leaf that matches at the given offset,
but because the offset point is *after* the point where the search key
differs from the leaf's contents, we are now at the wrong leaf.

In other words, the bug fixed the previous commit for dead-end branches
must also be applied on matched leaves.

For example, if searching for the key "monpop", we could reach a branch
containing "moop" and "moor". the branch offset point - i.e., the point
after which the branch's leaves differ from each other - is the
fourth character ("p" or "r"). The search key matches the fourth
character "p", and takes that twig to the next node (which can be
a branch for names starting with "moop", or could be a leaf node for
"moop").

The old code failed to detect this condition, and would have
incorrectly left the iterator pointing at some successor, and not
at the predecessor of the "moop".

To find the right predecessor in this case, we need to get to the
previous branch and get the previous from there.

This has been fixed and the unit test now includes several new
scenarios for testing search names that match and unmatch on the
offset but have a different character before the offset.

2 years agoMerge branch 'mnowak/replace-danger-python-with-hazard' into 'main'
Michal Nowak [Mon, 11 Dec 2023 17:02:47 +0000 (17:02 +0000)] 
Merge branch 'mnowak/replace-danger-python-with-hazard' into 'main'

Replace danger-python with Hazard

See merge request isc-projects/bind9!8548

2 years agoHandle empty MR description in dangerfile
Tom Krizek [Fri, 8 Dec 2023 15:31:46 +0000 (16:31 +0100)] 
Handle empty MR description in dangerfile

A merge request might have no description at all (i.e. None, rather than
an empty string). This might happen when the MR is created via an API.
Check a description is present before trying to find a backport string
in it.

2 years agoImprove determining the lines added by a branch
Michał Kępień [Thu, 7 Dec 2023 12:23:22 +0000 (13:23 +0100)] 
Improve determining the lines added by a branch

Since the list of lines added to Git-tracked text files in a given
branch is not part of the Danger DSL [1], it is determined using custom
code in dangerfile.py.  The current implementation of that logic is less
than perfect as it examines the diff between the current tip of the
target branch and the source branch rather than the diff between the
merge base of the two branches and the source branch.  Consider a Git
history like this:

    *   F (target)
    ...
    *   E
    *   D
    *   C
    | * B (source)
    |/
    *   A (merge base)

If danger-python or Hazard are run for commit B, the current logic for
determining the list of added lines in dangerfile.py examines the diff
between commits F and B rather than between commits A and B.  Therefore,
the added_lines() function returns not just the lines added by commit B
on top of commit A, but also the list of lines that were removed between
commits A and F, which leads to confusing results.

Fix by using the triple-dot diff operator in the Git invocation whose
output is used as the source of information for determining the list of
lines added by a given branch.

Since Hazard fetches the target branch itself when it is run, remove the
explicit "git fetch" invocation that fetches the target branch from
GitLab (shortening its local history to a single commit in the process)
before "git diff" is invoked.

[1] https://danger.systems/js/reference.html#GitDSL

2 years agoReplace danger-python with Hazard
Michal Nowak [Tue, 5 Dec 2023 10:55:03 +0000 (11:55 +0100)] 
Replace danger-python with Hazard

Hazard is a minimal danger-python replacement.

2 years agoMerge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.20' into 'main'
Tom Krizek [Fri, 8 Dec 2023 15:04:58 +0000 (15:04 +0000)] 
Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.20' into 'main'

Set up version and release notes for BIND 9.19.20

See merge request isc-projects/bind9!8560

2 years agoSet up release notes for BIND 9.19.20
Tom Krizek [Fri, 8 Dec 2023 14:51:48 +0000 (15:51 +0100)] 
Set up release notes for BIND 9.19.20

2 years agoUpdate BIND version to 9.19.20-dev
Tom Krizek [Fri, 8 Dec 2023 14:51:48 +0000 (15:51 +0100)] 
Update BIND version to 9.19.20-dev

2 years agoUpdate BIND version for release v9.19.19
Tom Krizek [Thu, 7 Dec 2023 15:57:21 +0000 (16:57 +0100)] 
Update BIND version for release

2 years agoAdd a CHANGES marker
Tom Krizek [Thu, 7 Dec 2023 15:56:20 +0000 (16:56 +0100)] 
Add a CHANGES marker

2 years agoMerge branch 'michal/prepare-documentation-for-bind-9.19.19' into 'v9.19.19-release'
Tom Krizek [Fri, 8 Dec 2023 11:38:30 +0000 (11:38 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.19.19' into 'v9.19.19-release'

Prepare documentation for BIND 9.19.19

See merge request isc-private/bind9!598

2 years agoTemporarily allow failure of respdiff-long:tsan job
Tom Krizek [Thu, 7 Dec 2023 15:42:43 +0000 (16:42 +0100)] 
Temporarily allow failure of respdiff-long:tsan job

There was a change in the branch that uncovered preexisting data races
when testing with respdiff under TSAN. This isn't a new issue that
should stop the releases. Allow the check to temporarily fail until the
underlying issue GL #4475 is addressed.

2 years agoTweak and reword release notes
Michał Kępień [Thu, 7 Dec 2023 09:43:46 +0000 (10:43 +0100)] 
Tweak and reword release notes

2 years agoPrepare release notes for BIND 9.19.19
Michał Kępień [Thu, 7 Dec 2023 09:43:46 +0000 (10:43 +0100)] 
Prepare release notes for BIND 9.19.19

2 years agoMerge branch '4405-cleanup-resolver-nonbackoff-tries-check' into 'main'
Tom Krizek [Thu, 7 Dec 2023 12:53:32 +0000 (12:53 +0000)] 
Merge branch '4405-cleanup-resolver-nonbackoff-tries-check' into 'main'

Remove obsolete check for resolver-nonbackoff-tries

See merge request isc-projects/bind9!8557

2 years agoRemove obsolete check for resolver-nonbackoff-tries
Tom Krizek [Thu, 7 Dec 2023 12:10:58 +0000 (13:10 +0100)] 
Remove obsolete check for resolver-nonbackoff-tries

With the resolver-nonbackoff-tries statement being removed in #4405,
this check can no longer be reached and can be safely removed.

2 years agoMerge branch '4448-improve-lur-cleaning-behaviour' into 'main'
Mark Andrews [Thu, 7 Dec 2023 09:48:55 +0000 (09:48 +0000)] 
Merge branch '4448-improve-lur-cleaning-behaviour' into 'main'

Resolve "Improve LRU cleaning behaviour"

Closes #4448 and #4269

See merge request isc-projects/bind9!8516

2 years agoAdd CHANGES for [GL #4448]
Mark Andrews [Tue, 5 Dec 2023 03:54:21 +0000 (14:54 +1100)] 
Add CHANGES for [GL #4448]

2 years agoAlso cleanup the space for the rbt nodes
Mark Andrews [Tue, 5 Dec 2023 02:15:03 +0000 (13:15 +1100)] 
Also cleanup the space for the rbt nodes

As we are in overmem state we want to free more memory than we are
adding so we need to add in an allowance for the rbtnodes that may
have been added and the names stored with them.  There is the node
for the owner name and a possible ENT node if there was a node split.

2 years agoProcess the combined LRU lists in LRU order
Mark Andrews [Thu, 23 Nov 2023 04:47:35 +0000 (15:47 +1100)] 
Process the combined LRU lists in LRU order

Only cleanup headers that are less than equal to the rbt's last_used
time.  Adjust the rbt's last_used time when the target cleaning was
not achieved to the oldest value of the remaining set of headers.

When updating delegating NS and glue records last_used was not being
updated when it should have been.

When adding zero TTL records to the tail of the LRU lists set
last_used to rbtdb->last_used + 1 rather than now.  This appoximately
preserves the lists LRU order.

2 years agoMerge branch 'each-cleanup-trivia' into 'main'
Evan Hunt [Thu, 7 Dec 2023 02:40:05 +0000 (02:40 +0000)] 
Merge branch 'each-cleanup-trivia' into 'main'

assorted trivial cleanups

See merge request isc-projects/bind9!8450

2 years agoremove some long-deprecated arguments from dig
Evan Hunt [Wed, 1 Nov 2023 16:09:16 +0000 (17:09 +0100)] 
remove some long-deprecated arguments from dig

certain dig options which were deprecated and became nonoperational
several releases ago still had documentation in the dig man page and
warnings printed when they were used: these included +mapped,
+sigchase, +topdown, +unexpected, +trusted-key, and the -i and -n
options. these are now all fatal errors.

another option was described as deprecated in the man page, but
the code to print a warning was never added. it has been added now.

2 years agofix consistency check for delv +ns and +qmin
Evan Hunt [Wed, 1 Nov 2023 16:00:45 +0000 (17:00 +0100)] 
fix consistency check for delv +ns and +qmin

the code to prevent +qmin from being used without +ns was
in the wrong place, resulting in it only working correctly
if +ns was specified first.

2 years agofix unnecessary capitalization
Evan Hunt [Wed, 1 Nov 2023 07:37:44 +0000 (08:37 +0100)] 
fix unnecessary capitalization

there was a typo in the copyright header.

2 years agoremove bin/rndc/rndc.conf
Evan Hunt [Tue, 31 Oct 2023 13:25:54 +0000 (14:25 +0100)] 
remove bin/rndc/rndc.conf

this file was no longer used.

2 years agoclean up client.c
Evan Hunt [Tue, 31 Oct 2023 13:20:51 +0000 (14:20 +0100)] 
clean up client.c

- make dns_client_startresolve() static since it's only used internally
- remove outdated comments

2 years agoremove unused functions in dns_master
Evan Hunt [Mon, 2 Oct 2023 20:52:58 +0000 (13:52 -0700)] 
remove unused functions in dns_master

dns_master_dumpnode() and dns_master_dumpnodetostream() were
never used and can be removed.

2 years agoMerge branch '4405-remove-resolver-opts' into 'main'
Evan Hunt [Wed, 6 Dec 2023 21:39:05 +0000 (21:39 +0000)] 
Merge branch '4405-remove-resolver-opts' into 'main'

deprecate/remove resolver-retry-interval and resolver-nonbackoff-tries

Closes #4405

See merge request isc-projects/bind9!8448

2 years agoremove resolver-retry-interval and resolver-nonbackoff-tries
Evan Hunt [Tue, 31 Oct 2023 14:13:30 +0000 (15:13 +0100)] 
remove resolver-retry-interval and resolver-nonbackoff-tries

fully remove these options and mark them as ancient.

2 years agodeprecate resolver-retry-interval and resolver-nonbackoff-tries
Evan Hunt [Tue, 31 Oct 2023 14:09:05 +0000 (15:09 +0100)] 
deprecate resolver-retry-interval and resolver-nonbackoff-tries

these options control default timing of retries in the resolver
for experimental purposes; they are not known to useful in production
environments.  they will be removed in the future; for now, we
only log a warning if they are used.

2 years agoMerge branch 'each-qp-lookup-iterator' into 'main'
Evan Hunt [Wed, 6 Dec 2023 19:17:20 +0000 (19:17 +0000)] 
Merge branch 'each-qp-lookup-iterator' into 'main'

add an iterator argument to dns_qp_lookup()

See merge request isc-projects/bind9!8468

2 years agofix another dns_qp_lookup() iterator bug
Evan Hunt [Mon, 4 Dec 2023 19:21:40 +0000 (11:21 -0800)] 
fix another dns_qp_lookup() iterator bug

there was another edge case in which an iterator could be positioned at
the wrong node after dns_qp_lookup().  when searching for a key, it's
possible to reach a dead-end branch that doesn't match, because the
branch offset point is *after* the point where the search key differs
from the branch's contents.

for example, if searching for the key "mop", we could reach a branch
containing "moon" and "moor". the branch offset point - i.e., the
point after which the branch's leaves differ from each other - is the
fourth character ("n" or "r"). however, both leaves differ from the
search key at position *three* ("o" or "p"). the old code failed to
detect this condition, and would have incorrectly left the iterator
pointing at some lower value and not at "moor".

this has been fixed and the unit test now includes this scenario.

2 years agofix dns_qp_lookup() iterator bug
Evan Hunt [Sun, 3 Dec 2023 22:02:29 +0000 (14:02 -0800)] 
fix dns_qp_lookup() iterator bug

in some cases it was possible for the iterator to be positioned in the
wrong place by dns_qp_lookup(). previously, when a leaf node was found
which matched the search key at its parent branch's offset point, but
did not match after that point, the code incorrectly assumed the leaf
it had found was a successor to the searched-for name, and stepped the
iterator back to find a predecessor.  however, it was possible for the
non-matching leaf to be the predecessor, in which case stepping the
iterator back was wrong.

(for example: a branch contains "aba" and "abcd", and we are searching
for "abcde". we step down to the twig matching the letter "c" in
position 3. "abcd" is the predecessor of "abcde", so the iterator is
already correctly positioned, but because the twig was an exact match,
we would have moved it back one step to "aba".)

this previously went unnoticed due to a mistake in the qp_test unit
test, which had the wrong expected result for the test case that should
have detected the error. both the code and the test have been fixed.

2 years agoadd an iterator argument to dns_qp_lookup()
Evan Hunt [Sun, 5 Nov 2023 12:42:42 +0000 (13:42 +0100)] 
add an iterator argument to dns_qp_lookup()

the 'predecessor' argument to dns_qp_lookup() turns out not to
be sufficient for our needs: the predecessor node in a QP database
could have become "empty" (for the current version) because of an
update or because cache data expired, and in that case the caller
would have to iterate more than one step back to find the predecessor
node that it needs.

it may also be necessary for a caller to iterate forward, in
order to determine whether a node has any children.

for both of these reasons, we now replace the 'predecessor'
argument with an 'iter' argument. if set, this points to memory
with enough space for a dns_qpiter object.

when an exact match is found by the lookup, the iterator will be
pointing to the matching node. if not, it will be pointing to the
lexical predecessor of the nae that was searched for.

a dns_qpiter_current() method has been added for examining
the current value of the iterator without moving it in either
direction.

2 years agoMerge branch 'tkrizek/add-changes-entry-for-4462' into 'main'
Tom Krizek [Wed, 6 Dec 2023 16:33:51 +0000 (16:33 +0000)] 
Merge branch 'tkrizek/add-changes-entry-for-4462' into 'main'

Add CHANGES entry for #4462

See merge request isc-projects/bind9!8551

2 years agoAdd CHANGES entry for #4462
Tom Krizek [Wed, 6 Dec 2023 15:47:51 +0000 (16:47 +0100)] 
Add CHANGES entry for #4462

2 years agoMerge branch '4464-multithread-tls-initialisation-crash-fix' into 'main'
Artem Boldariev [Wed, 6 Dec 2023 15:29:05 +0000 (15:29 +0000)] 
Merge branch '4464-multithread-tls-initialisation-crash-fix' into 'main'

Fix TLS certs store deletion on concurrent access

Closes #4464

See merge request isc-projects/bind9!8531

2 years agoUpdate CHANGES [GL #4464]
Artem Boldariev [Mon, 4 Dec 2023 12:42:30 +0000 (14:42 +0200)] 
Update CHANGES [GL #4464]

Mention that BIND crashing due to a `tls` multithreaded entry
initialisation attempts has been fixed.

2 years agodoth test: add a secondary NS instance that reuses a 'tls' entry
Artem Boldariev [Mon, 4 Dec 2023 13:12:57 +0000 (15:12 +0200)] 
doth test: add a secondary NS instance that reuses a 'tls' entry

This commit extends the 'doth' system tests with additional secondary
NS instance that reuses the same 'tls' entry for connecting the the
primary to download zones. This configurations were known to crash
secondaries in some cases.

2 years agoFix TLS certs store deletion on concurrent access
Artem Boldariev [Mon, 4 Dec 2023 12:28:28 +0000 (14:28 +0200)] 
Fix TLS certs store deletion on concurrent access

During initialisation or reconfiguration, it is possible that multiple
threads are trying to create a TLS context and associated data (like
TLS certs store) concurrently. In some cases, a thread might be too
late to add newly created data to the TLS contexts cache, in which
case it needs to be discarded. In the code that handles that case, it
was not taken into account that, in some cases, the TLS certs store
could not have been created or should not be deleted, as it is being
managed by the TLS contexts cache already. Deleting the store in such
cases might lead to crashes.

This commit fixes the issue.

2 years agoMerge branch '4388-initial-proxyv2-support-in-bind-and-dig' into 'main'
Artem Boldariev [Wed, 6 Dec 2023 13:49:01 +0000 (13:49 +0000)] 
Merge branch '4388-initial-proxyv2-support-in-bind-and-dig' into 'main'

Make it possible to accept PROXYv2 in BIND (and send it in dig)

Closes #4388

See merge request isc-projects/bind9!8417