]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoMerge branch '3968-catz-data-race-in-dns__catz_update_cb-9.18' into 'bind-9.18'
Arаm Sаrgsyаn [Mon, 27 Mar 2023 12:35:31 +0000 (12:35 +0000)] 
Merge branch '3968-catz-data-race-in-dns__catz_update_cb-9.18' into 'bind-9.18'

[9.18] Fix a data race in dns__catz_update_cb()

See merge request isc-projects/bind9!7727

3 years agoAdd a CHANGES note for [GL #3968]
Aram Sargsyan [Mon, 27 Mar 2023 11:09:13 +0000 (11:09 +0000)] 
Add a CHANGES note for [GL #3968]

(cherry picked from commit 95cb2affaae70dac9921a7c1166eac55363873d8)

3 years agoFix a data race in dns__catz_update_cb()
Aram Sargsyan [Mon, 27 Mar 2023 10:56:22 +0000 (10:56 +0000)] 
Fix a data race in dns__catz_update_cb()

The dns__catz_update_cb() function was earlier updated (see
d2ecff3c4a0d961041b860515858d258d40462d7) to use a separate
'dns_db_t' object ('catz->updb' instead of 'catz->db') to
avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions, but the 'REQUIRE'
check there still checks the validity of the 'catz->db' object.

Fix the omission.

(cherry picked from commit a2817541b3f619fd6ad55f34e65b81bd9f46e913)

3 years agoMerge branch '3953-deprecate-delegation-only-v9_18' into 'bind-9.18'
Evan Hunt [Thu, 23 Mar 2023 21:10:50 +0000 (21:10 +0000)] 
Merge branch '3953-deprecate-delegation-only-v9_18' into 'bind-9.18'

[9.18] Merge branch '3953-deprecate-delegation-only' into 'main'

See merge request isc-projects/bind9!7718

3 years agoCHANGES and release note for [GL #3953]
Evan Hunt [Wed, 22 Mar 2023 22:06:58 +0000 (15:06 -0700)] 
CHANGES and release note for [GL #3953]

(cherry picked from commit 8d80ee561ed087d3376919cd9239a53c46970995)

3 years agodeprecate delegation-only and root-delegation only
Evan Hunt [Wed, 22 Mar 2023 22:01:30 +0000 (15:01 -0700)] 
deprecate delegation-only and root-delegation only

These options and zone type were created to address the
SiteFinder controversy, in which certain TLD's redirected queries
rather than returning NXDOMAIN. since TLD's are now DNSSEC-signed,
this is no longer likely to be a problem.

The deprecation message for 'type delegation-only' is issued from
the configuration checker rather than the parser. therefore,
isccfg_check_namedconf() has been modified to take a 'nodeprecate'
parameter to suppress the warning when named-checkconf is used with
the command-line option to ignore warnings on deprecated options (-i).

(cherry picked from commit 2399556beef5230f7632db48c09ca8d952903e08)

3 years agoMerge branch '3960-handle-non-ISC_R_SUCCESS-in-rctx_respinit-bind-9.18' into 'bind...
Ondřej Surý [Thu, 23 Mar 2023 12:39:03 +0000 (12:39 +0000)] 
Merge branch '3960-handle-non-ISC_R_SUCCESS-in-rctx_respinit-bind-9.18' into 'bind-9.18'

Properly handle ISC_R_SHUTTINGDOWN in resquery_response()

See merge request isc-projects/bind9!7716

3 years agoProperly handle ISC_R_SHUTTINGDOWN in resquery_response()
Ondřej Surý [Thu, 23 Mar 2023 09:48:39 +0000 (10:48 +0100)] 
Properly handle ISC_R_SHUTTINGDOWN in resquery_response()

When resquery_response() was called with ISC_R_SHUTTINDOWN, the region
argument would be NULL, but rctx_respinit() would try to pass
region->base and region->len to the isc_buffer_init() leading to
a NULL pointer dereference.  Properly handle non-ISC_R_SUCCESS by
ignoring the provided region.

(cherry picked from commit 93259812ddcb8dbc38c2f494465c74715893cbb4)

3 years agoMerge branch '3665-dupsigs-test-stability-9.18' into 'bind-9.18'
Tom Krizek [Wed, 22 Mar 2023 10:21:29 +0000 (10:21 +0000)] 
Merge branch '3665-dupsigs-test-stability-9.18' into 'bind-9.18'

[9.18] Improve dupsigs test stability

See merge request isc-projects/bind9!7706

3 years agoLighten the CI load during the dupsigs test
Tom Krizek [Mon, 13 Mar 2023 16:45:20 +0000 (17:45 +0100)] 
Lighten the CI load during the dupsigs test

Previously, an AXFR request would be issued every second while waiting
for the zone to be signed. This might've been the cause of issues in CI
where many tests are running in parallel and any extra load may increase
test instability.

Instead, check for the last NSEC record to have a signature before
commencing the AXFR request to check the zone has been fully signed.

Also increase the time for the zone signing to a total of 60+10 seconds
up from the previous 30.

(cherry picked from commit 3291c891f6a6990f7781aff878e8e51e08044f0b)

3 years agoEnd dupsigs test early if it fails
Tom Krizek [Mon, 13 Mar 2023 14:16:35 +0000 (15:16 +0100)] 
End dupsigs test early if it fails

There's no point in continuing the dupsigs test if a failure is
detected. End the test early to avoid wasting time and resources.

(cherry picked from commit ad647dca13216a886be8803c9fd46307ad3aabdf)

3 years agoStore dupsigs axfr to a file for easier debugging
Tom Krizek [Tue, 14 Mar 2023 09:33:47 +0000 (10:33 +0100)] 
Store dupsigs axfr to a file for easier debugging

(cherry picked from commit fad2eee631149d26f78b9d39adb3329deb0ed9c8)

3 years agoRedirect dupsigs test output to proper logger
Tom Krizek [Mon, 13 Mar 2023 14:13:44 +0000 (15:13 +0100)] 
Redirect dupsigs test output to proper logger

Ensure messages from dupsigs system test end up in its log rather than
stdout. Previously, the output was hard to debug when running the tests
in parallel and messages wouldn't end up in the dupsigs.log.

(cherry picked from commit cbe2559f37095cf827b6cc03d333328aa1d2a385)

3 years agoMerge branch '3955-hold-catz-reference-during-update-v9_18' into 'bind-9.18'
Arаm Sаrgsyаn [Tue, 21 Mar 2023 12:17:35 +0000 (12:17 +0000)] 
Merge branch '3955-hold-catz-reference-during-update-v9_18' into 'bind-9.18'

[9.18] Hold a catz reference while the update process is running

See merge request isc-projects/bind9!7705

3 years agoAdd a CHANGES note for [GL #3955]
Aram Sargsyan [Tue, 21 Mar 2023 10:06:07 +0000 (10:06 +0000)] 
Add a CHANGES note for [GL #3955]

(cherry picked from commit aee14ee5d9eb4267106f7f4381e710ae6bda4f12)

3 years agoHold a catz reference while the update process is running
Aram Sargsyan [Tue, 21 Mar 2023 11:42:28 +0000 (11:42 +0000)] 
Hold a catz reference while the update process is running

This should delay the catalog zone from being destroyed during
shutdown, if the update process is still running.

Doing this should not introduce significant shutdown delays, as
the update function constantly checks the 'shuttingdown' flag
and cancels the process if it is set.

(cherry picked from commit dc2b8bb1c970babe774dd32048ea182d74e8fb36)

3 years agoMerge branch 'mnowak/respdiff-drop-allow_failure-9.18' into 'bind-9.18'
Michal Nowak [Fri, 17 Mar 2023 10:18:25 +0000 (10:18 +0000)] 
Merge branch 'mnowak/respdiff-drop-allow_failure-9.18' into 'bind-9.18'

[9.18] respdiff jobs do not need "allow_failure: true"

See merge request isc-projects/bind9!7699

3 years agorespdiff jobs do not need "allow_failure: true"
Michal Nowak [Mon, 13 Mar 2023 15:46:13 +0000 (16:46 +0100)] 
respdiff jobs do not need "allow_failure: true"

ASAN and TSAN respdiff jobs should be stable and not require
"allow_failure: true" anymore.

(cherry picked from commit dd97ddca6fc9e9fc54a68ee4f2bc64303b1596ee)

3 years agoMerge branch 'tkrizek/ci-artifacts-1d-9.18' into 'bind-9.18'
Tom Krizek [Thu, 16 Mar 2023 14:14:28 +0000 (14:14 +0000)] 
Merge branch 'tkrizek/ci-artifacts-1d-9.18' into 'bind-9.18'

[9.18] Use the default retention time for CI artifacts

See merge request isc-projects/bind9!7694

3 years agoUse the default retention time for CI artifacts
Tom Krizek [Thu, 9 Mar 2023 12:33:31 +0000 (13:33 +0100)] 
Use the default retention time for CI artifacts

The instance-wide GitLab CI artifact retention time was changed to 1 day
up from the previous value of 12 hours. Remove our explicit overrides
for 1 day artifact retention time, as it is the default now.

Previously, most of our jobs had overrides for 1 day retention, while
some of our jobs used the default 12 hours. This discrepancy could be
quite impractical at times.

(cherry picked from commit 8fef5676fabd2815081d2560875b5c9f510b6a21)

3 years agoMove gitlab-ci.yml comment to its proper place
Tom Krizek [Thu, 9 Mar 2023 12:30:41 +0000 (13:30 +0100)] 
Move gitlab-ci.yml comment to its proper place

The comment refers to "interruptible" key, rather than the entire
"default" section.

(cherry picked from commit 11399074509b788ecfbbb2710bc65bd49b1970d2)

3 years agoMerge tag 'v9_18_13' into v9_18
Tom Krizek [Wed, 15 Mar 2023 17:38:23 +0000 (18:38 +0100)] 
Merge tag 'v9_18_13' into v9_18

BIND 9.18.13

3 years agoMerge branch '3867-fix-xot-hang' into 'v9_18'
Artem Boldariev [Tue, 14 Mar 2023 18:03:36 +0000 (18:03 +0000)] 
Merge branch '3867-fix-xot-hang' into 'v9_18'

DoT: remove TLS-related kludge in isc__nmsocket_connecttimeout_cb()

See merge request isc-projects/bind9!7687

3 years agoUpdate release notes [GL #3867]
Artem Boldariev [Tue, 14 Mar 2023 11:35:00 +0000 (13:35 +0200)] 
Update release notes [GL #3867]

Mention that XoT hangs have been fixed.

3 years agoUpdate CHANGES [GL #3867]
Artem Boldariev [Tue, 14 Mar 2023 11:28:09 +0000 (13:28 +0200)] 
Update CHANGES [GL #3867]

Mention that XoT hangs have been fixed.

3 years agoDoT: remove TLS-related kludge in isc__nmsocket_connecttimeout_cb()
Artem Boldariev [Tue, 7 Mar 2023 21:16:11 +0000 (23:16 +0200)] 
DoT: remove TLS-related kludge in isc__nmsocket_connecttimeout_cb()

This commit ensures that 'sock->tls.pending_req' is not getting
nullified during TLS connection timeout callback as it prevents the
connection callback being called when connecting was not successful.

We expect 'isc__nm_failed_connect_cb() to be called from
'isc__nm_tlsdns_shutdown()' when establishing connections was
successful, but with 'sock->tls.pending_req' nullified that will not
happen.

The code removed most likely was required in older iterations of the
NM, but to me it seems that now it does only harm. One of the well
know pronounced effects is leading to irrecoverable zone transfer
hangs via TLS.

3 years agoMerge branch '3937-zone-sign-kasp-v9_18' into 'v9_18'
Mark Andrews [Tue, 14 Mar 2023 14:00:49 +0000 (14:00 +0000)] 
Merge branch '3937-zone-sign-kasp-v9_18' into 'v9_18'

[9.18] Resolve "NSEC records aren't signed with both configured algorithms during NSEC3->NSEC transition"

See merge request isc-projects/bind9!7685

3 years agoAdd CHANGES for [GL #3937]
Mark Andrews [Tue, 14 Mar 2023 02:32:47 +0000 (13:32 +1100)] 
Add CHANGES for [GL #3937]

(cherry picked from commit aafcb8611c387615b6e7dc0aad8622e9252f9665)

3 years agoWhen signing with a new algorithm preserve NSEC/NSEC3 chains
Mark Andrews [Tue, 14 Mar 2023 02:13:14 +0000 (13:13 +1100)] 
When signing with a new algorithm preserve NSEC/NSEC3 chains

If the zone already has existing NSEC/NSEC3 chains then zone_sign
needs to continue to use them.  If there are no chains then use
kasp setting otherwise generate an NSEC chain.

(cherry picked from commit 4b5520145969222e6482e4552e49e96cc7d9bd97)

3 years agoMerge branch '3939-insufficient-information-to-identify-key-v9_18' into 'v9_18'
Mark Andrews [Tue, 14 Mar 2023 05:49:22 +0000 (05:49 +0000)] 
Merge branch '3939-insufficient-information-to-identify-key-v9_18' into 'v9_18'

[9.18] Resolve "Insufficient information to identify key"

See merge request isc-projects/bind9!7683

3 years agoReport key name when removing it
Mark Andrews [Mon, 13 Mar 2023 02:56:42 +0000 (13:56 +1100)] 
Report key name when removing it

(cherry picked from commit 9f161544fd1a6e3415bfb8be3095623592691e03)

3 years agoAdd ISC_FORMAT_PRINTF to report's declaration
Mark Andrews [Mon, 13 Mar 2023 02:48:20 +0000 (13:48 +1100)] 
Add ISC_FORMAT_PRINTF to report's declaration

dns_dnssec_updatekeys's 'report' could be called with invalid arguments
which the compiler should be be able to detect.

(cherry picked from commit 7a0a2fc3e4e3bb9c5869fe0953d97f6019fb0967)

3 years agoMerge branch '3924-dnstap-test-timing-issue-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Mon, 13 Mar 2023 13:23:37 +0000 (13:23 +0000)] 
Merge branch '3924-dnstap-test-timing-issue-v9_18' into 'v9_18'

[9.18] Resolve "missing messages in `dnstap` system test after query failure"

See merge request isc-projects/bind9!7677

3 years agoImprove dnstap system test reliability
Aram Sargsyan [Fri, 10 Mar 2023 11:07:13 +0000 (11:07 +0000)] 
Improve dnstap system test reliability

The dnstap system test fails intermittently, and it appears to be
a timing issue - adding a short delay after running 'fstrm_capture',
and before running 'dnstap -reopen' improves the situation from
50% failures (5 out of 10 times) to 0% failures (0 out of 20 times),
tested locally.

The reason is that 'fstrm_capture' is executed in the background,
and due to OS scheduling and other factors, the listener socket
may not be ready when the following command runs and tells 'named'
to (re)open it.

(cherry picked from commit fa686fcea5df03a8a9d696fbfe6f2e11d72ee3ed)

3 years agoMerge branch 'mnowak/stress-test-drop-parallel-build-v9_18' into 'v9_18'
Michal Nowak [Thu, 9 Mar 2023 17:36:26 +0000 (17:36 +0000)] 
Merge branch 'mnowak/stress-test-drop-parallel-build-v9_18' into 'v9_18'

[9.18] Drop parallel build from stress tests

See merge request isc-projects/bind9!7671

3 years agoDrop parallel build from stress tests
Michal Nowak [Thu, 9 Mar 2023 10:10:53 +0000 (11:10 +0100)] 
Drop parallel build from stress tests

BUILD_PARALLEL_JOBS environmental variable is set to 6, which does not
align well with 4 and 8 CPU core systems dedicated to CI "stress" tests.
When multiple parallel jobs run on the host, they compete for resources
with an undesirable result: 6 compiler processes of one job may starve
named, resulting in lower-than-expected throughput and minutes-long
query response latency spikes.

Better drop the build parallelism of BIND-under-test. About 1-2 minutes
are added to the 60-65 minutes long job duration.

(cherry picked from commit 3fd7e7c81f81e21adebde2930fe511fe335f825e)

3 years agoMerge branch '3923-doth-system-test-timing-issue-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Thu, 9 Mar 2023 11:30:00 +0000 (11:30 +0000)] 
Merge branch '3923-doth-system-test-timing-issue-v9_18' into 'v9_18'

[9.18] Resolve "timing issue with incoming XoT check in `doth` system test"

See merge request isc-projects/bind9!7667

3 years agoRetry multiple times in doth test when checking if the zone file exists
Aram Sargsyan [Tue, 7 Mar 2023 14:12:10 +0000 (14:12 +0000)] 
Retry multiple times in doth test when checking if the zone file exists

Dumping of the freshly transferred zone file can take some time.

Retry 5 times before failing.

The log excerpt below shows such a case, when dumping lasted more than
two seconds.

    06-Mar-2023 09:32:09.973 zone example6/IN: Transfer started.
    06-Mar-2023 09:32:10.301 zone example6/IN: zone transfer finished: success
    06-Mar-2023 09:32:10.301 zone_dump: zone example6/IN: enter
    06-Mar-2023 09:32:11.789 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): AXFR request
    06-Mar-2023 09:32:11.801 client @0x7fe9ab435d68 10.53.0.10#44113 (example6): transfer of 'example6/IN': AXFR ended: 5 messages, 2676 records, 55815 bytes, 0.011 secs (5074090 bytes/sec) (serial 1397051952)
    06-Mar-2023 09:32:12.409 zone_gotwritehandle: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 dump_done: zone example6/IN: enter
    06-Mar-2023 09:32:12.421 zone_journal_compact: zone example6/IN: target journal size 53044

(cherry picked from commit 5d5d4b523be029b4781fc53c3c95143d783db39f)

3 years agoFix the placement of printing dig output comments in doth system test
Aram Sargsyan [Tue, 7 Mar 2023 14:08:52 +0000 (14:08 +0000)] 
Fix the placement of printing dig output comments in doth system test

There can be comments in dig output for a zone transfer only in case
of an error, so we should print those errors not when wait_for_tls_xfer
succeeds, but when it fails.

Also, there is no point in printing those comments when a failure was
indeed expected.

(cherry picked from commit 9672b6be574ed35b18f81a302e4ff21f15e59ee2)

3 years agoFail early in doth system test when the expected failure doesn't happen
Aram Sargsyan [Tue, 7 Mar 2023 14:03:35 +0000 (14:03 +0000)] 
Fail early in doth system test when the expected failure doesn't happen

If wait_for_tls_xfer succeeds, while a failure was being expected,
set ret=1 to fail without further checking if the zone file exists.

(cherry picked from commit 2fdf01573c11ec3cf4105ba15ad42b925dff5cf9)

3 years agoMerge branch 'mnowak/stress-test-build-with-default-CFLAGS-v9_18' into 'v9_18'
Michal Nowak [Thu, 9 Mar 2023 10:03:22 +0000 (10:03 +0000)] 
Merge branch 'mnowak/stress-test-build-with-default-CFLAGS-v9_18' into 'v9_18'

[9.18] Build BIND in stress test jobs with common CFLAGS

See merge request isc-projects/bind9!7665

3 years agoBuild BIND in stress test jobs with common CFLAGS
Michal Nowak [Tue, 28 Feb 2023 16:49:43 +0000 (17:49 +0100)] 
Build BIND in stress test jobs with common CFLAGS

By omission, BIND was not built with common CFLAGS in the stress test
jobs. Building with common CFLAGS and -Og should help GDB produce a
backtrace with more information.

(cherry picked from commit d33bdd36b403be78452e74dc0f4213c93974246d)

3 years agoMerge branch '3925-serve-stale-system-test-failure-vv9_18' into 'v9_18'
Matthijs Mekking [Thu, 9 Mar 2023 08:56:03 +0000 (08:56 +0000)] 
Merge branch '3925-serve-stale-system-test-failure-vv9_18' into 'v9_18'

[9.18] Lower chance of intermittent serve-stale system test failure

See merge request isc-projects/bind9!7664

3 years agoUpdate serve-stale system test
Matthijs Mekking [Wed, 8 Mar 2023 08:11:19 +0000 (09:11 +0100)] 
Update serve-stale system test

The serve-stale system test was intermittently failing due to a timing
issue:

    I:serve-stale:check stale data.example TXT was refreshed...
    I:serve-stale:failed

The RRset is refreshed, however, it first checks for an expected log
line, prior checking that the stale data.example TXT was refreshed
(using dig). This log line is there to ensure the record is actually
refreshed before we start querying again. Alternatively we could just
retry_quiet 10 <wait for dig output matches expectations>. It would
lower the chances for intermittent test failures, since there is no
longer a "check for log line, sleep one second if check fails, check
for log line, ...", prior to the check.

(cherry picked from commit 0bf36da305bc2d028450fa2313f3c0789e6e7451)

3 years agoMerge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.18.14' into 'v9_18'
Tom Krizek [Tue, 7 Mar 2023 16:36:28 +0000 (16:36 +0000)] 
Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.18.14' into 'v9_18'

Set up version and release notes for BIND 9.18.14

See merge request isc-projects/bind9!7651

3 years agoSet up release notes for BIND 9.18.14
Tom Krizek [Tue, 7 Mar 2023 13:52:01 +0000 (14:52 +0100)] 
Set up release notes for BIND 9.18.14

3 years agoUpdate BIND version to 9.18.14-dev
Tom Krizek [Tue, 7 Mar 2023 13:49:39 +0000 (14:49 +0100)] 
Update BIND version to 9.18.14-dev

3 years agoUpdate BIND version for release v9.18.13
Tom Krizek [Fri, 3 Mar 2023 14:23:18 +0000 (15:23 +0100)] 
Update BIND version for release

3 years agoAdd a CHANGES marker
Tom Krizek [Fri, 3 Mar 2023 14:22:43 +0000 (15:22 +0100)] 
Add a CHANGES marker

3 years agoMerge branch 'tkrizek/prepare-documentation-for-bind-9.18.13' into 'v9_18_13-release'
Tom Krizek [Fri, 3 Mar 2023 14:21:06 +0000 (14:21 +0000)] 
Merge branch 'tkrizek/prepare-documentation-for-bind-9.18.13' into 'v9_18_13-release'

Prepare documentation for BIND 9.18.13

See merge request isc-private/bind9!501

3 years agoAdd release note for GL #3673
Tom Krizek [Fri, 3 Mar 2023 12:10:26 +0000 (13:10 +0100)] 
Add release note for GL #3673

3 years agoReorder release notes
Tom Krizek [Fri, 3 Mar 2023 12:08:34 +0000 (13:08 +0100)] 
Reorder release notes

3 years agoTweak and reword release notes
Tom Krizek [Fri, 3 Mar 2023 12:07:41 +0000 (13:07 +0100)] 
Tweak and reword release notes

3 years agoPrepare release notes for BIND 9.18.13
Tom Krizek [Fri, 3 Mar 2023 11:58:57 +0000 (12:58 +0100)] 
Prepare release notes for BIND 9.18.13

3 years agoMerge branch '3917-named-should-log-uv-version-when-starting-up-v9_18' into 'v9_18'
Tom Krizek [Fri, 3 Mar 2023 09:07:46 +0000 (09:07 +0000)] 
Merge branch '3917-named-should-log-uv-version-when-starting-up-v9_18' into 'v9_18'

[9.18] Resolve "Named should log UV version when starting up"

See merge request isc-projects/bind9!7644

3 years agoNow logs UV versions when starting up
Mark Andrews [Fri, 3 Mar 2023 03:04:34 +0000 (14:04 +1100)] 
Now logs UV versions when starting up

Named now logs both compile time and run time UV versions when
starting up.  This is useful information to have when debugging
network issues involving named.

(cherry picked from commit 5fd2cd80183f87a35550fc734d6256e8ee5158a0)

3 years agoMerge branch '3907-data-race-in-rbtdb-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Thu, 2 Mar 2023 20:22:15 +0000 (20:22 +0000)] 
Merge branch '3907-data-race-in-rbtdb-v9_18' into 'v9_18'

[9.18] Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1365 in newversion"

See merge request isc-projects/bind9!7640

3 years agoCheck if catz is active in dns__catz_update_cb()
Aram Sargsyan [Thu, 2 Mar 2023 13:32:21 +0000 (13:32 +0000)] 
Check if catz is active in dns__catz_update_cb()

A reconfiguration can deactivate the catalog zone, while the
offloaded update process was preparing to run.

(cherry picked from commit 6980e3b354778e3ff628d8e72ddf357cb0d8b2a0)

3 years agoCheck if catz is active in dns__catz_timer_cb()
Aram Sargsyan [Thu, 2 Mar 2023 13:19:53 +0000 (13:19 +0000)] 
Check if catz is active in dns__catz_timer_cb()

A reconfiguration can deactivate the catalog zone, while the
update process was deferred using a timer.

(cherry picked from commit 67c77aba380acd038bde11a5067189fed2ffb7d9)

3 years agoUse catzs->lock in dns_catz_prereconfig()
Aram Sargsyan [Thu, 2 Mar 2023 13:19:09 +0000 (13:19 +0000)] 
Use catzs->lock in dns_catz_prereconfig()

There can be an update running in another thread, so use a lock,
like it's done in dns_catz_postreconfig().

(cherry picked from commit 3973724d67651d3a3d90c6a4d32add040ba2b707)

3 years agoAdd a CHANGES note for [GL #3907]
Aram Sargsyan [Thu, 2 Mar 2023 09:43:01 +0000 (09:43 +0000)] 
Add a CHANGES note for [GL #3907]

(cherry picked from commit cb0d6393a7f382e5e05b009f3eefc13acfe99719)

3 years agocatz: protect db_registered and db callback (un)registration with a lock
Aram Sargsyan [Thu, 2 Mar 2023 10:18:11 +0000 (10:18 +0000)] 
catz: protect db_registered and db callback (un)registration with a lock

Doing this to avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions.

(cherry picked from commit a87859f1fa05ce92e99acb2c12aae0245bc8e79e)

3 years agocatz: use two pairs of dns_db_t and dns_dbversion_t in a catalog zone
Aram Sargsyan [Thu, 2 Mar 2023 08:52:25 +0000 (08:52 +0000)] 
catz: use two pairs of dns_db_t and dns_dbversion_t in a catalog zone

As it is done in the RPZ module, use 'db' and 'dbversion' for the
database we are going to update to, and 'updb' and 'updbversion' for
the database we are working on.

Doing this should avoid a race between the 'dns__catz_update_cb()' and
'dns_catz_dbupdate_callback()' functions.

(cherry picked from commit d2ecff3c4a0d961041b860515858d258d40462d7)

3 years agoUpdate the CHANGES note for [GL #3777]
Aram Sargsyan [Thu, 2 Mar 2023 09:39:32 +0000 (09:39 +0000)] 
Update the CHANGES note for [GL #3777]

Remove the part which is no longer true after reverting the commit
in question.

The CHANGES entry was never part of a released BIND 9 version.

(cherry picked from commit e1627e128959a077183d955beba19cce0fa991ff)

3 years agoRevert "Process db callbacks in zone_loaddone() after zone_postload()"
Aram Sargsyan [Thu, 2 Mar 2023 18:38:49 +0000 (18:38 +0000)] 
Revert "Process db callbacks in zone_loaddone() after zone_postload()"

This reverts commit a7196470233d4d79c6998d94e87d5a574f841644.

The commit introduced a data race, because dns_db_endload() is called
after unfreezing the zone.

(not cherry picked from commit 593dea871afe903fbff420be0ccb63c85152de4a)

3 years agoMerge branch 'aram/catz-add-lock-for-dns_catz_zone_t-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Wed, 1 Mar 2023 17:56:33 +0000 (17:56 +0000)] 
Merge branch 'aram/catz-add-lock-for-dns_catz_zone_t-v9_18' into 'v9_18'

[9.18] Add a lock for dns_catz_zone_t

See merge request isc-projects/bind9!7636

3 years agoAdd a lock for dns_catz_zone_t
Aram Sargsyan [Wed, 1 Mar 2023 14:41:59 +0000 (14:41 +0000)] 
Add a lock for dns_catz_zone_t

Use a lock for the catalog zones during dns__catz_zones_merge() to
avoid races between 'catz' and 'parentcatz'.

(cherry picked from commit 2ae3bc6e1d8c3c38ceeec276f2c5438a11474f2e)

3 years agoMerge branch '3911-reconfig-zone-view-revert-bugfix-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Wed, 1 Mar 2023 16:45:43 +0000 (16:45 +0000)] 
Merge branch '3911-reconfig-zone-view-revert-bugfix-v9_18' into 'v9_18'

[9.18] Fix view's zones reverting bug during reconfiguration

See merge request isc-projects/bind9!7634

3 years agoAdd CHANGES and release notes for [GL #3911]
Aram Sargsyan [Wed, 1 Mar 2023 13:45:03 +0000 (13:45 +0000)] 
Add CHANGES and release notes for [GL #3911]

(cherry picked from commit e1036253db90efbd17db0eef3b17e37d2db86176)

3 years agoFix view's zones reverting bug during reconfiguration
Aram Sargsyan [Wed, 1 Mar 2023 12:30:46 +0000 (12:30 +0000)] 
Fix view's zones reverting bug during reconfiguration

During reconfiguration, the configure_view() function reverts the
configured zones to the previous view in case if there is an error.

It uses the 'zones_configured' boolean variable to decide whether
it is required to revert the zones, i.e. the error happened after
all the zones were successfully configured.

The problem is that it does not account for the case when an error
happens during the configuration of one of the zones (not the first),
in which case there are zones that are already configured for the
new view (and they need to be reverted), and there are zones that
are not (starting from the failed one).

Since 'zones_configured' remains 'false', the configured zones are
not reverted.

Replace the 'zones_configured' variable with a pointer to the latest
successfully configured zone configuration element, and when reverting,
revert up to and including that zone.

(cherry picked from commit 84c235a4b0477a34c0ac2054af98b39efc5b0df5)

3 years agoAdd a catz system test check for [GL #3911]
Aram Sargsyan [Wed, 1 Mar 2023 12:47:25 +0000 (12:47 +0000)] 
Add a catz system test check for [GL #3911]

The trick is to configure a duplicate zone, which comes after the
catalog zone, where the duplicate zone is an existing member zone.

In that scenario, all the zones which come before the "faulty" zone
in the configuration file will fail to be reverted to the previous
version of the view after a reconfiguration error, and in this
particular case that will result in an assertion failure when the
catalog zone update is initiated, because it will be still tied to
the new version of the view, which was dismissed.

(cherry picked from commit 93c4f382f4a8a4d049cdcae5971412667a7bade9)

3 years agoMerge branch '3894-emit-coverage-summary-for-the-coverage-badge-v9_18' into 'v9_18'
Mark Andrews [Wed, 1 Mar 2023 00:57:07 +0000 (00:57 +0000)] 
Merge branch '3894-emit-coverage-summary-for-the-coverage-badge-v9_18' into 'v9_18'

[9.18] Resolve "Emit coverage summary for the coverage badge"

See merge request isc-projects/bind9!7628

3 years agoExtract test coverage statistics from the gcov job
Mark Andrews [Thu, 23 Feb 2023 22:39:34 +0000 (09:39 +1100)] 
Extract test coverage statistics from the gcov job

In older GitLab versions, the regular expression used for extracting
test coverage statistics from the output of GitLab CI jobs was
configured in the project's settings, using GitLab's web interface.
That changed in recent GitLab versions [1]; the previous configuration
method was removed from the web interface altogether as of GitLab 15.0.
The relevant regular expression is now supposed to be set in the
relevant job's definition in .gitlab-ci.yml.

Set the regular expression used for extracting test coverage
statistics in the definition of the "gcov" GitLab CI job.  Use the
regular expression suggested in GitLab's documentation [2].

[1] https://docs.gitlab.com/ee/update/deprecations.html#test-coverage-project-cicd-setting
[2] https://docs.gitlab.com/ee/ci/pipelines/settings.html#test-coverage-examples

(cherry picked from commit db7af9fcc1c91c3290982b555bdf1c55f6a73d66)

3 years agoMerge branch 'aram/catz-refactor-renaming-leftovers-finish-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Tue, 28 Feb 2023 16:21:12 +0000 (16:21 +0000)] 
Merge branch 'aram/catz-refactor-renaming-leftovers-finish-v9_18' into 'v9_18'

[9.18] Finish catalog zone 'zone' and 'zones' to 'catz' and 'catzs' renaming

See merge request isc-projects/bind9!7625

3 years agoFinish catalog zone 'zone' and 'zones' to 'catz' and 'catzs' renaming
Aram Sargsyan [Mon, 27 Feb 2023 19:45:09 +0000 (19:45 +0000)] 
Finish catalog zone 'zone' and 'zones' to 'catz' and 'catzs' renaming

There are leftovers from the previous refactoring effort, which left
some function declarations and comments in the header file unchanged.

Finish the renaming.

(cherry picked from commit 580ef2e18f64cb1c0da86ce6fcf109d1ff9e0386)

3 years agoMerge branch '3777-fix-crash-after-failed-ixfr-from-differences-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Tue, 28 Feb 2023 14:29:55 +0000 (14:29 +0000)] 
Merge branch '3777-fix-crash-after-failed-ixfr-from-differences-v9_18' into 'v9_18'

[9.18] Resolve "crash after failed ixfr-from-differences on a catalog zone"

See merge request isc-projects/bind9!7620

3 years agoAdd a CHANGES note for [GL #3777]
Aram Sargsyan [Fri, 27 Jan 2023 09:38:33 +0000 (09:38 +0000)] 
Add a CHANGES note for [GL #3777]

(cherry picked from commit 46b1c558ce706d8ffcd397da92b7fe429a74a1b1)

3 years agocatz: unregister the db update-notify callback before detaching from db
Aram Sargsyan [Fri, 27 Jan 2023 08:47:52 +0000 (08:47 +0000)] 
catz: unregister the db update-notify callback before detaching from db

When detaching from the previous version of the database, make sure
that the update-notify callback is unregistered, otherwise there is
an INSIST check which can generate an assertion failure in free_rbtdb(),
which checks that there are no outstanding update listeners in the list.

There is a similar code already in place for RPZ.

(cherry picked from commit cf79692a662b627d2230fbf7ae67f55cf729180c)

3 years agoSearching catzs->zones requires a read lock
Aram Sargsyan [Fri, 27 Jan 2023 18:04:41 +0000 (18:04 +0000)] 
Searching catzs->zones requires a read lock

Lock the catzs->lock mutex before searching in the catzs->zones
hash table.

(cherry picked from commit 0ef0c86632c838c3f342fe1c6d8cdef1b327cde6)

3 years agoProcess db callbacks in zone_loaddone() after zone_postload()
Aram Sargsyan [Thu, 26 Jan 2023 19:08:19 +0000 (19:08 +0000)] 
Process db callbacks in zone_loaddone() after zone_postload()

The zone_postload() function can fail and unregister the callbacks.

Call dns_db_endload() only after calling zone_postload() to make
sure that the registered update-notify callbacks are not called
when the zone loading has failed during zone_postload().

Also, don't ignore the return value of zone_postload().

(cherry picked from commit ed268b46f11706bde3da68bd2a4b45752350f736)

3 years agoAdd a system test for [GL #3777]
Aram Sargsyan [Fri, 27 Jan 2023 09:22:11 +0000 (09:22 +0000)] 
Add a system test for [GL #3777]

Add the 'ixfr-from-differences yes;' option to trigger a failed
zone postload operation when a zone is updated but the serial
number is not updated, then issue two successive 'rndc reload'
commands to trigger the bug, which causes an assertion failure.

(cherry picked from commit a73b67456e8ed70040fd3dd0bda1d97210bb9536)

3 years agoMerge branch '3269-increase-server-start-timeout-v9_18' into 'v9_18'
Michal Nowak [Tue, 28 Feb 2023 13:31:24 +0000 (13:31 +0000)] 
Merge branch '3269-increase-server-start-timeout-v9_18' into 'v9_18'

[9.18] Increase server start timeout for system tests

See merge request isc-projects/bind9!7619

3 years agoIncrease server start timeout for system tests
Artem Boldariev [Wed, 25 May 2022 11:49:32 +0000 (14:49 +0300)] 
Increase server start timeout for system tests

This commit increases server start timeout from 60 to 90 seconds in
order to avoid system test failures on some platforms due to inability
to initialise TLS contexts in time.

(cherry picked from commit 705f0d1ed13dfee180068d1e276af046eadbb3c3)

3 years agoMerge branch '3902-fetchlimit-system-test-failed-v9_18' into 'v9_18'
Mark Andrews [Tue, 28 Feb 2023 12:49:38 +0000 (12:49 +0000)] 
Merge branch '3902-fetchlimit-system-test-failed-v9_18' into 'v9_18'

[9.18] Resolve "'fetchlimit' system test failed"

See merge request isc-projects/bind9!7616

3 years agoFix 'checking drop statistics' test
Mark Andrews [Tue, 28 Feb 2023 03:24:20 +0000 (14:24 +1100)] 
Fix 'checking drop statistics' test

Wait for the desired log message to appear in ns3/named.stats rather
than the creation of the file.

(cherry picked from commit c7ae975ecf70fb6fc7c836f39b7f1ab4f2fe0129)

3 years agoFix 'lame server clients are dropped below the hard limit' test
Mark Andrews [Tue, 28 Feb 2023 03:10:56 +0000 (14:10 +1100)] 
Fix 'lame server clients are dropped below the hard limit' test

The test was setting a minimum count for recursive clients which
was not always being met (e.g. 91 instead of 100) producing a false
positive.  Lower the lower bound on recursive clients for this
test to 1.

(cherry picked from commit af47090d99d68f23107a65cbddea5d0231269484)

3 years agoMerge branch 'michal/add-a-dnsrps-enabled-build-to-regular-ci-pipelines-v9_18' into...
Michał Kępień [Tue, 28 Feb 2023 12:12:16 +0000 (12:12 +0000)] 
Merge branch 'michal/add-a-dnsrps-enabled-build-to-regular-ci-pipelines-v9_18' into 'v9_18'

[9.18] Add a DNSRPS-enabled build to regular CI pipelines

See merge request isc-projects/bind9!7621

3 years agoAdd a DNSRPS-enabled build to regular CI pipelines
Michał Kępień [Tue, 28 Feb 2023 11:54:02 +0000 (12:54 +0100)] 
Add a DNSRPS-enabled build to regular CI pipelines

DNSRPS-enabled builds have recently been silently broken a few times due
to that feature not being tested in regular CI pipelines.  Add the
--enable-dnsrps --enable-dnsrps-dl switches to the ./configure
invocation in one of the CI jobs run for all merge requests so that
DNSRPS-related build issues can be detected in advance.

It is important to note that this change by itself does NOT enable
actual testing of the DNSRPS feature as doing that requires a DNSRPS
provider library to be present on the test host.

(cherry picked from commit a4d6f5f6fdf2cee7a362f26566b2d33a687726b4)

3 years ago(Mostly) fix building bin/tests/system/rpz/dnsrps
Michał Kępień [Tue, 28 Feb 2023 11:54:02 +0000 (12:54 +0100)] 
(Mostly) fix building bin/tests/system/rpz/dnsrps

Building the bin/tests/system/rpz/dnsrps helper binary is currently not
possible at all as the necessary compiler and linker flag definitions
are missing from bin/tests/system/Makefile.am.  Add these as a basis for
addressing the problem.

Unfortunately, this is where the "mostly" bit mentioned in this commit's
subject line comes into play.  The dlopen() parts of DNSRPS code have
not yet been reworked to use libuv's dlopen() API (uv_dlopen() etc.)
(See commit 37b9511ce1dd9ba66a6620c5ff617016eb81188f for prior work in
this area.)  While it is certainly possible to do that, implementing
such a change without testing it in practice against a usable librpz.so
(i.e. a DNSRPS provider library) is bound to cause more trouble and
confusion than keeping the code the way it is right now.  However,
making that code buildable as-is requires linking against a C standard
library that exports the dlopen(), dlsym(), and dlclose() symbols used
by the DNSRPS dynamic loading code.  glibc 2.34+ satisfies that
requirement, but older glibc versions do not (these come with a separate
libdl shared library that would need to be linked in as well).  (Other
C standard library implementations have not been examined.)  Since the
long-term plan is to rely on libuv's dlopen() API exclusively and
detecting the shared object containing dlopen() & friends would only
pull in build system complexity for no good reason, assume for now that
the target system provides the dlopen() API in its C standard library.

This change enables the system test suite to be run for a BIND 9 build
prepared using --enable-dnsrps --enable-dnsrps-dl (on systems satisfying
the requirement explained above).  However, it is important to note that
this change by itself does NOT enable actual testing of the DNSRPS
feature as doing that requires a DNSRPS provider library to be present
on the test host.

(cherry picked from commit b396f555861f11d7d6cee2ceb0d94abb733e1101)

3 years agoMerge branch '3881-catz-offload-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Tue, 28 Feb 2023 11:36:21 +0000 (11:36 +0000)] 
Merge branch '3881-catz-offload-v9_18' into 'v9_18'

[9.18] Resolve "Run the catalog zone update as an offloaded work"

See merge request isc-projects/bind9!7614

3 years agoAdd CHANGES and release notes for [GL #3881]
Aram Sargsyan [Tue, 21 Feb 2023 14:39:27 +0000 (14:39 +0000)] 
Add CHANGES and release notes for [GL #3881]

(cherry picked from commit cb1cd67bea4cd004de6510e4c65a958fdd1ebe8a)

3 years agoPause the catz dbiterator while processing the zone
Ondřej Surý [Thu, 23 Feb 2023 10:10:39 +0000 (11:10 +0100)] 
Pause the catz dbiterator while processing the zone

The dbiterator read-locks the whole zone and it stayed locked during
whole processing time when catz is being read.  Pause the iterator, so
the updates to catz zone are not being blocked while processing the catz
update.

(cherry picked from commit 4e7187601f88a15c61282db862f5025703a7a78a)

3 years agoUnlock catzs during dns__catz_update_cb()
Ondřej Surý [Mon, 27 Feb 2023 23:00:23 +0000 (23:00 +0000)] 
Unlock catzs during dns__catz_update_cb()

Instead of holding the catzs->lock the whole time we process the catz
update, only hold it for hash table lookup and then release it.  This
should unblock any other threads that might be processing updates to
catzs triggered by extra incoming transfer.

(cherry picked from commit b1cd4a066a63f221a56d9565da4907c2aad7e524)

3 years agoOffload catalog zone updates
Aram Sargsyan [Mon, 27 Feb 2023 22:53:23 +0000 (22:53 +0000)] 
Offload catalog zone updates

Offload catalog zone processing so that the network manager threads
are not interrupted by a large catalog zone update.

Introduce a new 'updaterunning' state alongside with 'updatepending',
like it is done in the RPZ module.

Note that the dns__catz_update_cb() function currently holds the
catzs->lock during the whole process, which is far from being optimal,
but the issue is going to be addressed separately.

(cherry picked from commit 0b96c9234fb157e0a06c9906263fa7c631e20a4d)

3 years agoMerge branch 'mnowak/make-openbsd-allow_failure-true-v9_18' into 'v9_18'
Michal Nowak [Tue, 28 Feb 2023 10:40:36 +0000 (10:40 +0000)] 
Merge branch 'mnowak/make-openbsd-allow_failure-true-v9_18' into 'v9_18'

[9.18] Do not fail pipeline because of failed OpenBSD system test

See merge request isc-projects/bind9!7617

3 years agoDo not fail pipeline because of failed OpenBSD system test
Michal Nowak [Mon, 27 Feb 2023 18:22:52 +0000 (19:22 +0100)] 
Do not fail pipeline because of failed OpenBSD system test

System test on OpenBSD is unstable even when test parallelism is
disabled.

(cherry picked from commit fc26da6d894978638f127dc5dd466f76710aed1f)

3 years agoRevert "Disable OpenBSD system test parallelism in CI"
Michal Nowak [Mon, 27 Feb 2023 18:21:58 +0000 (19:21 +0100)] 
Revert "Disable OpenBSD system test parallelism in CI"

This reverts commit 5f21f3203d7abcc02201d276c4e43fe52f2ce070.

(cherry picked from commit a9d3ec33b3c28ccf6feb56e85e9ddace1a3cc03a)

3 years agoMerge branch 'aram/catz-add-shutdown-signaling-v9_18' into 'v9_18'
Arаm Sаrgsyаn [Tue, 28 Feb 2023 10:32:32 +0000 (10:32 +0000)] 
Merge branch 'aram/catz-add-shutdown-signaling-v9_18' into 'v9_18'

[9.18] Add shutdown signaling for catalog zones

See merge request isc-projects/bind9!7613

3 years agoAdd a CHANGES note for [GL !7571]
Aram Sargsyan [Tue, 21 Feb 2023 21:20:56 +0000 (21:20 +0000)] 
Add a CHANGES note for [GL !7571]

(cherry picked from commit c76cc5880380e4570c7c535f350b9459d8c50689)

3 years agoAdd shutdown signaling for catalog zones
Aram Sargsyan [Mon, 27 Feb 2023 21:29:24 +0000 (21:29 +0000)] 
Add shutdown signaling for catalog zones

This change should make sure that catalog zone update processing
doesn't happen when the catalog zone is being shut down. This
should help avoid races when offloading the catalog zone updates
in the follow-up commit.

(cherry picked from commit 246b7084d6ecb692643da464e734d719495ae63f)