]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoOnly create private records for DNSKEYs that have changed
Mark Andrews [Tue, 19 Dec 2023 04:58:49 +0000 (15:58 +1100)] 
Only create private records for DNSKEYs that have changed

We don't need to create private records for DNSKEY records that
have only had their TTL's changed.

2 years agosync_secure_db failed to handle some TTL changes
Mark Andrews [Thu, 14 Dec 2023 04:02:22 +0000 (15:02 +1100)] 
sync_secure_db failed to handle some TTL changes

If the DNSKEY, CDNSKEY or CDS RRset had different TTLs then the
filtering of these RRset resulted in dns_diff_apply failing with
"not exact". Identify tuple pairs that are just TTL changes and
allow them through the filter.

2 years agoUse the current CDS and CDNSKEY TTLs
Mark Andrews [Tue, 12 Dec 2023 02:51:19 +0000 (13:51 +1100)] 
Use the current CDS and CDNSKEY TTLs

When adding new CDS and CDNSKEY records use the existing RRset
TTL if they already exist.

2 years agoUpdate the DNSKEY, CDNSKEY and CDS TTLs to match dnskey-ttl
Mark Andrews [Tue, 12 Dec 2023 02:47:30 +0000 (13:47 +1100)] 
Update the DNSKEY, CDNSKEY and CDS TTLs to match dnskey-ttl

If the TTLs of the DNSKEY, CDNSKEY and CDS do not match the
dnskey-ttl update them by removing all records and re-adding
them with the correct TTL.

2 years agoTest dnssec-policy dnskey-ttl behaviour
Mark Andrews [Tue, 12 Dec 2023 02:47:30 +0000 (13:47 +1100)] 
Test dnssec-policy dnskey-ttl behaviour

If the dnskey-ttl in the dnssec-policy doesn't match the DNSKEY's
ttl then the DNSKEY, CDNSKEY and CDS rrset should be updated by
named to reflect the expressed policy.  Check that named does this
by creating a zone with a TTL that does not match the policy's TTL
and check that it is correctly updated.

2 years agoMerge branch '4513-system-tests-fail-with-net-dns-1-42' into 'main'
Mark Andrews [Wed, 3 Jan 2024 00:07:07 +0000 (00:07 +0000)] 
Merge branch '4513-system-tests-fail-with-net-dns-1-42' into 'main'

Resolve "System tests fail with Net::DNS 1.42"

Closes #4513

See merge request isc-projects/bind9!8615

2 years agoSupport Net::DNS::Nameserver 1.42
Mark Andrews [Tue, 2 Jan 2024 04:39:58 +0000 (15:39 +1100)] 
Support Net::DNS::Nameserver 1.42

In Net::DNS 1.42 $ns->main_loop no longer loops.  Use current methods
for starting the server, wait for SIGTERM then cleanup child processes
using $ns->stop_server(), then remove the pid file.

2 years agoMerge branch 'michal/silence-a-scan-build-warning-in-dns_rbt_addname' into 'main'
Michał Kępień [Tue, 2 Jan 2024 13:51:18 +0000 (13:51 +0000)] 
Merge branch 'michal/silence-a-scan-build-warning-in-dns_rbt_addname' into 'main'

Silence a scan-build warning in dns_rbt_addname()

See merge request isc-projects/bind9!8614

2 years agoSilence a scan-build warning in dns_rbt_addname()
Michał Kępień [Fri, 22 Dec 2023 18:27:37 +0000 (19:27 +0100)] 
Silence a scan-build warning in dns_rbt_addname()

Clang Static Analyzer is unable to grasp that when dns_rbt_addnode()
returns ISC_R_EXISTS, it always sets the pointer passed to it via its
'nodep' parameter to a non-NULL value.  Add an extra safety check in the
conditional expression used in dns_rbt_addname() to silence that
warning.

2 years agoMerge branch 'mnowak/pytest_rewrite_spf' into 'main'
Michal Nowak [Fri, 22 Dec 2023 15:07:13 +0000 (15:07 +0000)] 
Merge branch 'mnowak/pytest_rewrite_spf' into 'main'

Rewrite spf system test to pytest

See merge request isc-projects/bind9!8572

2 years agoRewrite spf system test to pytest
Michal Nowak [Fri, 22 Dec 2023 09:57:12 +0000 (10:57 +0100)] 
Rewrite spf system test to pytest

2 years agoAdd wait_for_zones_loaded fixture
Michał Kępień [Tue, 19 Dec 2023 14:58:36 +0000 (15:58 +0100)] 
Add wait_for_zones_loaded fixture

The wait_for_zones_loaded fixture waits for the "all zones loaded"
message in the named log file before the test function can proceed.

2 years agoEnsure wait_for_line() is not called with timeout=0
Michał Kępień [Tue, 19 Dec 2023 10:10:04 +0000 (11:10 +0100)] 
Ensure wait_for_line() is not called with timeout=0

2 years agoRefactor string matching loop for readability
Michał Kępień [Thu, 21 Dec 2023 11:22:18 +0000 (12:22 +0100)] 
Refactor string matching loop for readability

2 years agoAdd LogFile helper
Tom Krizek [Fri, 22 Dec 2023 09:55:17 +0000 (10:55 +0100)] 
Add LogFile helper

LogFile class contains a log path and has means to find a string in the
log file.

2 years agoMerge branch 'stepan/rndc-fixtures-for-pytest' into 'main'
Štěpán Balážik [Thu, 21 Dec 2023 19:33:43 +0000 (19:33 +0000)] 
Merge branch 'stepan/rndc-fixtures-for-pytest' into 'main'

Implement Python helpers for using RNDC in tests

See merge request isc-projects/bind9!8357

2 years agoAdd reconfiguration support to NamedInstance
Michał Kępień [Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)] 
Add reconfiguration support to NamedInstance

Reconfiguring named using RNDC is a common action in BIND 9 system
tests.  It involves sending the "reconfig" RNDC command to a named
instance and waiting until it is fully processed.  Add a reconfigure()
method to the NamedInstance class in order to simplify and standardize
named reconfiguration using RNDC in Python-based system tests.

TODO:

  - full reconfiguration support (w/templating *.in files)

  - add an "rndc null" before every reconfiguration to show which file
    is used (NamedInstance.add_mark_to_log() as it may be generically
    useful?)

2 years agoRun mypy checks on Python helpers in GitLab CI
Michał Kępień [Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)] 
Run mypy checks on Python helpers in GitLab CI

Ensure the type hints provided in helper code for Python-based system
tests are correct by continuously checking them using mypy in GitLab CI.
Check bin/tests/system/isctest.py exclusively for the time being because
it is the only Python file in the source tree which uses static typing
at the moment and working around the issues reported by mypy for other
(non-statically-typed) Python files present in the source tree would be
cumbersome.

2 years agoClean up the "checkds" system test
Michał Kępień [Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)] 
Clean up the "checkds" system test

The "checkds" system test contains a lot of duplicated code despite
carrying out the same set of actions for every tested scenario
(zone_check() → wait for logs to appear → keystate_check()).  Extract
the parts of the code shared between all tests into a new function,
test_checkds(), and use pytest's test parametrization capabilities to
pass distinct sets of test parameters to this new function, in an
attempt to cleanly separate the fixed parts of this system test from the
variable ones.  Replace format() calls with f-strings.

2 years agoDrop use of dns.resolver.Resolver from "checkds"
Michał Kępień [Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)] 
Drop use of dns.resolver.Resolver from "checkds"

The "checkds" system test only uses dns.resolver.Resolver objects to
access their 'nameservers' and 'port' attributes.  Instances of the
NamedInstance class also expose that information via their attributes,
so only pass NamedInstance objects around instead of needlessly
depending on dns.resolver.Resolver.

2 years agoUse helper Python classes for watching log files
Michał Kępień [Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)] 
Use helper Python classes for watching log files

Make log file watching in Python-based system tests consistent by
employing the helper Python classes designed for that purpose.  Drop the
custom code currently used.

2 years agoAdd helper Python classes for watching log files
Michał Kępień [Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)] 
Add helper Python classes for watching log files

Waiting for a specific log line to appear in a named.run file is a
common action in BIND 9 system tests.  Implement a set of Python classes
which intend to simplify and standardize this task in Python-based
system tests.

Co-authored-by: Štěpán Balážik <stepan@isc.org>
2 years agoSimplify use of RNDC in Python-based tests
Michał Kępień [Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)] 
Simplify use of RNDC in Python-based tests

The "addzone" and "shutdown" system tests currently invoke rndc using
test-specific helper code.  Rework the relevant bits of those tests so
that they use the helper classes from bin/tests/system/isctest.py.

2 years agoImplement Python helpers for using RNDC in tests
Michał Kępień [Tue, 25 Jul 2023 12:37:05 +0000 (14:37 +0200)] 
Implement Python helpers for using RNDC in tests

Controlling named instances using RNDC is a common action in BIND 9
system tests.  However, there is currently no standardized way of doing
that from Python-based system tests, which leads to code duplication.
Add a set of Python classes and pytest fixtures which intend to simplify
and standardize use of RNDC in Python-based system tests.

For now, RNDC commands are sent to servers by invoking the rndc binary.
However, a switch to a native Python module able to send RNDC commands
without executing external binaries is expected to happen soon.  Even
when that happens, though, having the capability to invoke the rndc
binary (in order to test it) will remain useful.  Define a common Python
interface that such "RNDC executors" should implement (RNDCExecutor), in
order to make switching between them convenient.

Co-authored-by: Štěpán Balážik <stepan@isc.org>
2 years agoMerge branch 'each-broken-qpiter' into 'main'
Evan Hunt [Thu, 21 Dec 2023 17:57:47 +0000 (17:57 +0000)] 
Merge branch 'each-broken-qpiter' into 'main'

more fix_iterator() bugs

See merge request isc-projects/bind9!8606

2 years agoprevent an infinite loop in fix_iterator()
Evan Hunt [Wed, 20 Dec 2023 08:32:57 +0000 (00:32 -0800)] 
prevent an infinite loop in fix_iterator()

it was possible for fix_iterator() to get stuck in a loop while
trying to find the predecessor of a missing node. this has been
fixed and a regression test has been added.

2 years agofix_iterator() could produce incoherent iterator stacks
Evan Hunt [Wed, 20 Dec 2023 20:38:12 +0000 (12:38 -0800)] 
fix_iterator() could produce incoherent iterator stacks

the fix_iterator() function moves an iterator so that it points
to the predecessor of the searched-for name when that name doesn't
exist in the database. the tests only checked the correctness of
the top of the stack, however, and missed some cases where interior
branches in the stack could be missing or duplicated. in these
cases, the iterator would produce inconsistent results when walked.

the predecessors test case in qp_test has been updated to walk
each iterator to the end and ensure that the expected number of
nodes are found.

2 years agoMerge branch '4495-conversion-from-nsec3-to-nsec-removes-the-nsec3param-too-early...
Mark Andrews [Thu, 21 Dec 2023 10:00:15 +0000 (10:00 +0000)] 
Merge branch '4495-conversion-from-nsec3-to-nsec-removes-the-nsec3param-too-early' into 'main'

Resolve "Conversion from NSEC3 to NSEC removes the NSEC3PARAM too early"

Closes #4495 and #1794

See merge request isc-projects/bind9!8578

2 years agoAdd CHANGES for [GL #1794] and [GL #4459]
Mark Andrews [Fri, 15 Dec 2023 08:37:20 +0000 (19:37 +1100)] 
Add CHANGES for [GL #1794] and [GL #4459]

2 years agoRegression check for NSEC3 to NSEC3 conversion
Matthijs Mekking [Tue, 19 Dec 2023 12:23:44 +0000 (13:23 +0100)] 
Regression check for NSEC3 to NSEC3 conversion

When changing the NSEC3 chain, the new NSEC3 chain must be built before
the old NSEC3PARAM is removed.  Check each delta in the conversion to
ensure this ordering is met.

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

When transitioning from NSEC3 to NSEC the NSEC3 must be built before
the NSEC3PARAM is removed.  Check each delta in the conversion to
ensure this ordering is met.

2 years agoUpdate the NSEC3PARAM TTL to match the SOA minimum
Mark Andrews [Wed, 20 Dec 2023 02:07:51 +0000 (13:07 +1100)] 
Update the NSEC3PARAM TTL to match the SOA minimum

When building NSEC3 chains update the NSEC3PARAM TTL to match
the SOA minimum.  Delete all records using the old TTL then
re-add them using the new TTL.

2 years agoDon't delete the NSEC3PARAM immediately
Mark Andrews [Fri, 15 Dec 2023 05:07:46 +0000 (16:07 +1100)] 
Don't delete the NSEC3PARAM immediately

Wait until the new NSEC or NSEC3 chain is generated then it should
be deleted.

2 years agoMerge branch '4364-compilezone-disable-checks' into 'main'
Evan Hunt [Thu, 21 Dec 2023 04:26:07 +0000 (04:26 +0000)] 
Merge branch '4364-compilezone-disable-checks' into 'main'

disable checks by default in named-compilezone

Closes #4364

See merge request isc-projects/bind9!8499

2 years agoCHANGES and release note for [GL #4364]
Evan Hunt [Thu, 16 Nov 2023 02:57:45 +0000 (18:57 -0800)] 
CHANGES and release note for [GL #4364]

2 years agodisable checks by default in named-compilezone
Evan Hunt [Thu, 16 Nov 2023 02:42:43 +0000 (18:42 -0800)] 
disable checks by default in named-compilezone

Zone content integrity checks can significantly slow the conversion
of zones from raw to text. As this is more properly a job for
named-checkzone anyway, we now disable all zone checks by
default in named-compilezone.

Users relying on named-compilezone for integrity checks as
well as format conversion can run named-checkzone separately,
or re-enable the checks in named-compilezone by using:
"named-compilezone -n fail -k fail -r warn -T warn -W warn".

2 years agoMerge branch '4488-memory-reference-leak-in-lib-dns-zone-c-zone_sign' into 'main'
Mark Andrews [Wed, 20 Dec 2023 23:02:50 +0000 (23:02 +0000)] 
Merge branch '4488-memory-reference-leak-in-lib-dns-zone-c-zone_sign' into 'main'

Resolve "Memory/reference leak in lib/dns/zone.c:zone_sign"

Closes #4488

See merge request isc-projects/bind9!8570

2 years agoAdd CHANGES note for [GL #4488]
Mark Andrews [Wed, 13 Dec 2023 07:35:54 +0000 (18:35 +1100)] 
Add CHANGES note for [GL #4488]

2 years agoDon't look for KSK status here and squash memory leak
Mark Andrews [Wed, 13 Dec 2023 06:55:09 +0000 (17:55 +1100)] 
Don't look for KSK status here and squash memory leak

Just remove the key from  consideration as it is being removed.

The old code could leak a key reference as dst_free_key was not
called every time we continued. This simplification will address
this as well.

2 years agoMerge branch '4310-require-when-changing-primaries-list' into 'main'
Mark Andrews [Wed, 20 Dec 2023 21:50:26 +0000 (21:50 +0000)] 
Merge branch '4310-require-when-changing-primaries-list' into 'main'

Resolve "REQUIRE when changing primaries list."

Closes #4310

See merge request isc-projects/bind9!8546

2 years agoAdd CHANGES note for [GL #4310]
Mark Andrews [Wed, 6 Dec 2023 00:41:31 +0000 (11:41 +1100)] 
Add CHANGES note for [GL #4310]

2 years agodns_request_cancel needs to be callable from any thread
Mark Andrews [Wed, 6 Dec 2023 00:34:52 +0000 (11:34 +1100)] 
dns_request_cancel needs to be callable from any thread

Check the tid and cancel the request immediately or pass it to the
appropriate loop for processing.  Call request->cb directly from
req_sendevent as it is now always called with the correct tid.

2 years agoMerge branch 'tkrizek/update-sphinx_rtd_theme' into 'main'
Tom Krizek [Wed, 20 Dec 2023 17:01:45 +0000 (17:01 +0000)] 
Merge branch 'tkrizek/update-sphinx_rtd_theme' into 'main'

Update sphinx_rtd_theme and docutils

See merge request isc-projects/bind9!8603

2 years agoUpdate sphinx_rtd_theme and docutils
Tom Krizek [Wed, 20 Dec 2023 15:54:54 +0000 (16:54 +0100)] 
Update sphinx_rtd_theme and docutils

2 years agoMerge branch '4496-do-not-destroy-ixfr-journal-in-xfrin_end' into 'main'
Michał Kępień [Wed, 20 Dec 2023 16:32:04 +0000 (16:32 +0000)] 
Merge branch '4496-do-not-destroy-ixfr-journal-in-xfrin_end' into 'main'

Do not destroy IXFR journal in xfrin_end()

Closes #4496

See merge request isc-projects/bind9!8602

2 years agoAdd CHANGES entry for GL #4496
Michał Kępień [Wed, 20 Dec 2023 16:21:14 +0000 (17:21 +0100)] 
Add CHANGES entry for GL #4496

2 years agoDo not destroy IXFR journal in xfrin_end()
Michał Kępień [Wed, 20 Dec 2023 16:21:14 +0000 (17:21 +0100)] 
Do not destroy IXFR journal in xfrin_end()

The xfrin_end() function is run when a zone transfer is finished or
canceled.  One of the actions it takes for incremental transfers (IXFR)
is calling dns_journal_destroy() on the zone journal structure that is
stored in the relevant zone transfer context (xfr->ixfr.journal).  That
immediately invalidates that structure as it is not reference-counted.
However, since the changes present in the IXFR stream are applied to the
journal asynchronously (via isc_work_enqueue()), it is possible that
some zone changes may still be in the process of being written to the
journal by the time xfrin_end() destroys the relevant structure.  Such a
scenario leads to crashes.

Fix by not destroying the zone journal structure until the entire zone
transfer context is destroyed.  xfrin_destroy() already conditionally
calls dns_journal_destroy() and when the former is called, all
asynchronous work for a given zone transfer process is guaranteed to be
complete.

2 years agoMerge tag 'v9.19.19'
Tom Krizek [Wed, 20 Dec 2023 14:59:22 +0000 (15:59 +0100)] 
Merge tag 'v9.19.19'

2 years agoMerge branch '4423-revert' into 'main'
Matthijs Mekking [Wed, 20 Dec 2023 08:32:00 +0000 (08:32 +0000)] 
Merge branch '4423-revert' into 'main'

Revert "Remove kasp mutex lock"

See merge request isc-projects/bind9!8597

2 years agoRevert "Add release note and CHANGES for #4423"
Matthijs Mekking [Tue, 19 Dec 2023 16:07:50 +0000 (17:07 +0100)] 
Revert "Add release note and CHANGES for #4423"

This reverts commit 7af2ec7e4fafb72ee8e734867321bca348a8ab95.

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.