]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoAdd CHANGES note for [GL #1609]
Ondřej Surý [Tue, 14 Feb 2023 11:11:03 +0000 (12:11 +0100)] 
Add CHANGES note for [GL #1609]

3 years agoUse C-RW-WP lock in the dns_adb unit
Ondřej Surý [Mon, 13 Feb 2023 14:52:51 +0000 (15:52 +0100)] 
Use C-RW-WP lock in the dns_adb unit

Replace the isc_mutex in the dns_adb unit with isc_rwlock for better
performance.  Both ADB names and ADB entries hashtables and LRU are now
using isc_rwlock.

3 years agoUse C-RW-WP lock in the dns_resolver unit
Ondřej Surý [Mon, 13 Feb 2023 14:52:47 +0000 (15:52 +0100)] 
Use C-RW-WP lock in the dns_resolver unit

Replace the isc_mutex with isc_rwlock in the dns_resolver unit,
specifically, both fetch context and fetch counters now uses the C-RW-WP
locks.

3 years agoAdd the reader-writer synchronization with modified C-RW-WP
Ondřej Surý [Wed, 24 Mar 2021 16:52:56 +0000 (17:52 +0100)] 
Add the reader-writer synchronization with modified C-RW-WP

This changes the internal isc_rwlock implementation to:

  Irina Calciu, Dave Dice, Yossi Lev, Victor Luchangco, Virendra
  J. Marathe, and Nir Shavit.  2013.  NUMA-aware reader-writer locks.
  SIGPLAN Not. 48, 8 (August 2013), 157–166.
  DOI:https://doi.org/10.1145/2517327.24425

(The full article available from:
  http://mcg.cs.tau.ac.il/papers/ppopp2013-rwlocks.pdf)

The implementation is based on the The Writer-Preference Lock (C-RW-WP)
variant (see the 3.4 section of the paper for the rationale).

The implemented algorithm has been modified for simplicity and for usage
patterns in rbtdb.c.

The changes compared to the original algorithm:

  * We haven't implemented the cohort locks because that would require a
    knowledge of NUMA nodes, instead a simple atomic_bool is used as
    synchronization point for writer lock.

  * The per-thread reader counters are not being used - this would
    require the internal thread id (isc_tid_v) to be always initialized,
    even in the utilities; the change has a slight performance penalty,
    so we might revisit this change in the future.  However, this change
    also saves a lot of memory, because cache-line aligned counters were
    used, so on 32-core machine, the rwlock would be 4096+ bytes big.

  * The readers use a writer_barrier that will raise after a while when
    readers lock can't be acquired to prevent readers starvation.

  * Separate ingress and egress readers counters queues to reduce both
    inter and intra-thread contention.

3 years agoAdd missing <isc/atomic.h> include to dns/badcache.c
Ondřej Surý [Tue, 14 Feb 2023 12:40:45 +0000 (13:40 +0100)] 
Add missing <isc/atomic.h> include to dns/badcache.c

The dns_badcache was pulling the <isc/atomic.h> header only indirectly
via <isc/rwlock.h>, add the direct include as the <isc/rwlock.h> no
longer pulls the header when pthread_rwlock is used.

3 years agoAdd isc_hashmap_find() DbC check for valuep
Ondřej Surý [Mon, 13 Feb 2023 15:16:26 +0000 (16:16 +0100)] 
Add isc_hashmap_find() DbC check for valuep

This adds DbC check, so we don't pass non-NULL memory for a valued to
the isc_hashmap_find() function.

3 years agoMerge branch 'feature/main/fips-tests' into 'main'
Mark Andrews [Wed, 15 Feb 2023 08:16:52 +0000 (08:16 +0000)] 
Merge branch 'feature/main/fips-tests' into 'main'

FIPS tests changes for RHEL

Closes #3871

See merge request isc-projects/bind9!7417

3 years agoAdd CHANGES note for [GL !7417]
Mark Andrews [Wed, 15 Feb 2023 03:42:34 +0000 (14:42 +1100)] 
Add CHANGES note for [GL !7417]

3 years agoFIPS tests changes for RHEL
Petr Menšík [Thu, 2 Aug 2018 21:46:45 +0000 (23:46 +0200)] 
FIPS tests changes for RHEL

Include MD5 feature detection in featuretest tool and use it in some
places. When RHEL distribution or Fedora ELN is in FIPS mode, then MD5
algorithm is unavailable completely and even hmac-md5 algorithm usage
will always fail. Work that around by checking MD5 works and if not,
skipping its usage.

Those changes were dragged as downstream patch bind-9.11-fips-tests.patch
in Fedora and RHEL.

3 years agoMerge branch '3862-recusive-stress-crash' into 'main'
Ondřej Surý [Tue, 14 Feb 2023 18:19:54 +0000 (18:19 +0000)] 
Merge branch '3862-recusive-stress-crash' into 'main'

Fix change 6093 which broke rbtdb when it grew too large

Closes #3862

See merge request isc-projects/bind9!7533

3 years agoFix change 6093 which broke rbtdb when it grew too large
Tony Finch [Tue, 14 Feb 2023 12:26:28 +0000 (12:26 +0000)] 
Fix change 6093 which broke rbtdb when it grew too large

I misunderstood the purpose of the `heap_index` rdataset header
member; I thought it identified which heap to use, and could therefore
be smaller, the same size as `locknum` indexes. But in fact it is a
position within a heap, so it needs to be able to count up to the
total number of rdatasets in the rbtdb.

So this changes `heap_index` from `uint16_t` back to `unsigned int`.

To avoid re-embiggening the rdatasetheader, shrink the `count` member
from `uint32` to `uint16`. The `count` is used to rotate RRsets in
`dns_rdataset_towiresorted()`, so 16 bits is more than large enough.
This change also means we no longer need to avoid colliding with
`DNS_RDATASET_COUNT_UNDEFINED` i.e. UINT32_MAX.

Closes #3862

3 years agoMerge branch 'fanf-arm-spinloop' into 'main'
Tony Finch [Tue, 14 Feb 2023 17:53:26 +0000 (17:53 +0000)] 
Merge branch 'fanf-arm-spinloop' into 'main'

Improve the spinloop pause / yield hint

See merge request isc-projects/bind9!7469

3 years agoImprove the spinloop pause / yield hint
Tony Finch [Wed, 24 Mar 2021 16:52:56 +0000 (17:52 +0100)] 
Improve the spinloop pause / yield hint

Unfortunately, C still lacks a standard function for pause (x86,
sparc) or yeild (arm) instructions, for use in spin lock or CAS loops.
BIND has its own based on vendor intrinsics or inline asm.

Previously, it was buried in the `isc_rwlock` implementation. This
commit renames `isc_rwlock_pause()` to `isc_pause()` and moves
it into <isc/pause.h>.

This commit also fixes the configure script so that it detects ARM
yield support on systems that identify as `aarch*` instead of `arm*`.

On 64-bit ARM systems we now use the ISB (instruction synchronization
barrier) instruction in preference to yield. The ISB instruction
pauses the CPU for longer, several nanoseconds, which is more like the
x86 pause instruction. There are more details in a Rust pull request,
which also refers to MySQL making the same change:
https://github.com/rust-lang/rust/pull/84725

3 years agoMerge branch '3849-relax-diff-on-dig-short-output' into 'main'
Tom Krizek [Tue, 14 Feb 2023 12:39:38 +0000 (12:39 +0000)] 
Merge branch '3849-relax-diff-on-dig-short-output' into 'main'

Ignore dig errors in +short comparisons in tests

Closes #3849

See merge request isc-projects/bind9!7488

3 years agoIgnore dig errors in +short comparisons in tests
Tom Krizek [Mon, 13 Feb 2023 12:58:47 +0000 (13:58 +0100)] 
Ignore dig errors in +short comparisons in tests

Tests using diff to compare outputs of dig +short shall ignore lines
starting with ";". In dig +short output, such lines should only be
present for errors such as network issues. Since we utilize dig's
default timeout/retry mechanisms, these transitory issues should be
ignored and only the final output should be considered during the diff
comparison.

3 years agoMerge branch '3866-fix-rpz-reference-counting-bug' into 'main'
Arаm Sаrgsyаn [Tue, 14 Feb 2023 09:59:41 +0000 (09:59 +0000)] 
Merge branch '3866-fix-rpz-reference-counting-bug' into 'main'

Fix RPZ reference counting error on shutdown

Closes #3866

See merge request isc-projects/bind9!7526

3 years agoAdd a CHANGES note for [GL #3866]
Aram Sargsyan [Mon, 13 Feb 2023 15:19:08 +0000 (15:19 +0000)] 
Add a CHANGES note for [GL #3866]

3 years agoFix RPZ reference counting error on shutdown
Aram Sargsyan [Mon, 13 Feb 2023 14:47:09 +0000 (14:47 +0000)] 
Fix RPZ reference counting error on shutdown

A dns_rpz_unref_rpzs() call is missing when taking the 'goto unlock;'
path on shutdown, in order to compensate for the earlier
dns_rpz_ref_rpzs() call.

Move the dns_rpz_ref_rpzs() call after the shutdown check.

3 years agoMerge branch '3662-extend-mkeys-system-test-to-handle-islands-of-trust' into 'main'
Mark Andrews [Mon, 13 Feb 2023 23:32:05 +0000 (23:32 +0000)] 
Merge branch '3662-extend-mkeys-system-test-to-handle-islands-of-trust' into 'main'

Resolve "Extend mkeys system test to handle islands of trust"

Closes #3662

See merge request isc-projects/bind9!7049

3 years agoAdd CHANGES note for [GL #3662]
Mark Andrews [Thu, 17 Nov 2022 01:18:49 +0000 (12:18 +1100)] 
Add CHANGES note for [GL #3662]

3 years agoAdd islands of trust to mkeys test
Mark Andrews [Wed, 9 Nov 2022 16:01:42 +0000 (16:01 +0000)] 
Add islands of trust to mkeys test

This adds an island of trust that is reachable from the root
where the trust anchors are added to island.conf.

This add an island of trust that is not reachable from the root
where the trust anchors are added to private.conf.

3 years agoReport the key name that failed in retry_keyfetch
Mark Andrews [Wed, 9 Nov 2022 12:12:07 +0000 (12:12 +0000)] 
Report the key name that failed in retry_keyfetch

When there are multiple managed trust anchors we need to know the
name of the trust anchor that is failing.  Extend the error message
to include the trust anchor name.

3 years agoMerge branch '2971-cleanup-dead-functions' into 'main'
Evan Hunt [Mon, 13 Feb 2023 19:52:05 +0000 (19:52 +0000)] 
Merge branch '2971-cleanup-dead-functions' into 'main'

remove some unused functions

Closes #2971

See merge request isc-projects/bind9!7521

3 years agoremove some unused functions
Evan Hunt [Fri, 10 Feb 2023 18:18:38 +0000 (10:18 -0800)] 
remove some unused functions

removed some functions that are no longer used and unlikely to
be resurrected, and also some that were only used to support Windows
and can now be replaced with generic versions.

3 years agoMerge branch '3848-increase-wait-time-runtime-test' into 'main'
Tom Krizek [Mon, 13 Feb 2023 14:22:24 +0000 (14:22 +0000)] 
Merge branch '3848-increase-wait-time-runtime-test' into 'main'

Increase named startup wait time for runtime test

Closes #3848

See merge request isc-projects/bind9!7487

3 years agoIncrease named startup wait time for runtime test
Tom Krizek [Mon, 6 Feb 2023 13:16:44 +0000 (14:16 +0100)] 
Increase named startup wait time for runtime test

Occasionally, the allotted 10 seconds for the "running" line to appear
in log after named is started proved insufficient in CI, especially
during increased load. Give named up to 60 seconds to start up to
mitigate this issue.

3 years agoMerge branch 'mnowak/pairwise-test-auth-recursive-servers' into 'main'
Michal Nowak [Mon, 13 Feb 2023 12:24:25 +0000 (12:24 +0000)] 
Merge branch 'mnowak/pairwise-test-auth-recursive-servers' into 'main'

Test authoritative and recursive servers in pairwise

See merge request isc-projects/bind9!7397

3 years agoStart named as auth and recursive server in pairwise
Michal Nowak [Wed, 18 Jan 2023 16:41:21 +0000 (17:41 +0100)] 
Start named as auth and recursive server in pairwise

The script will start the named process configured as both an
authoritative and recursive server for each pairwise ./configure
configuration. The test is considered successful if the named process
runs until the 5-second timeout is triggered, and there is no named.lock
file present, indicating that named did not crash on shutdown.

3 years agoMerge branch '3814-tighten-the-locking-around-fctxcount' into 'main'
Ondřej Surý [Sat, 11 Feb 2023 20:22:01 +0000 (20:22 +0000)] 
Merge branch '3814-tighten-the-locking-around-fctxcount' into 'main'

Add magic to fctxcount and replace the atomics with integers

Closes #3814

See merge request isc-projects/bind9!7515

3 years agoAdd magic to fctxcount and replace the atomics with integers
Ondřej Surý [Thu, 9 Feb 2023 11:27:40 +0000 (12:27 +0100)] 
Add magic to fctxcount and replace the atomics with integers

Add magic value to the fctxcount, to check for completely invalid
counters, or counters that have been already destroyed.

Improve the locking around the counters, and because of that we can drop
the atomics and use simple integers - the counters were already locked
and the tiny bits that used the atomics were not worth the extra effort.

3 years agoMerge branch '3780-deprecated-obsolete-cleanup' into 'main'
Evan Hunt [Fri, 10 Feb 2023 17:55:40 +0000 (17:55 +0000)] 
Merge branch '3780-deprecated-obsolete-cleanup' into 'main'

clean up some deprecated/obsolete options and doc

Closes #3780

See merge request isc-projects/bind9!7506

3 years agoclean up some deprecated/obsolete options and doc
Evan Hunt [Wed, 8 Feb 2023 18:33:06 +0000 (10:33 -0800)] 
clean up some deprecated/obsolete options and doc

- removed documentation of -S option from named man page
- removed documentation of reserved-sockets from ARM
- simplified documentation of dnssec-secure-to-insecure - it
  now just says it's obsolete rather than describing what it
  doesn't do anymore
- marked three formerly obsolete options as ancient:
  parent-registration-delay, reserved-sockets, and
  suppress-initial-notify

3 years agoMerge branch 'pspacek/make-manin-on-dist' into 'main'
Ondřej Surý [Fri, 10 Feb 2023 11:02:03 +0000 (11:02 +0000)] 
Merge branch 'pspacek/make-manin-on-dist' into 'main'

Remove pregenerated manpages from the repo

See merge request isc-projects/bind9!6520

3 years agoTest the pre-generated man pages in GitLab CI
Ondřej Surý [Tue, 31 Jan 2023 07:59:17 +0000 (08:59 +0100)] 
Test the pre-generated man pages in GitLab CI

Add an extra job for a build from tarball, but without sphinx-build and
enable RUN_MAKE_INSTALL to check that man pages were generated and
installed.

Disable the RUN_MAKE_INSTALL on the systems without sphinx-build (sid).

3 years agoRemove pregenerated manpages from the repo
Petr Špaček [Mon, 4 Jul 2022 15:25:11 +0000 (17:25 +0200)] 
Remove pregenerated manpages from the repo

We don't need them in the repo, it's sufficient if we pregenerate them
while preparing the tarball.  That way we don't have overhead while
modifying them but they are still available for installations without
Sphinx.

I assume that this will make rebases and cherry-picks across branches
easier, with less trial and error churn required in the CI.

It's implemented in the way that we build the manpages only when we
either have pregenerated pages available at the configure time or
sphinx-build is installed and working.

3 years agoMerge branch 'each-remove-bind9-refvar' into 'main'
Evan Hunt [Thu, 9 Feb 2023 18:01:48 +0000 (18:01 +0000)] 
Merge branch 'each-remove-bind9-refvar' into 'main'

remove isc_bind9 variable

See merge request isc-projects/bind9!7508

3 years agoremove isc_bind9 variable
Evan Hunt [Thu, 9 Feb 2023 03:28:09 +0000 (19:28 -0800)] 
remove isc_bind9 variable

isc_bind9 was a global bool used to indicate whether the library
was being used internally by BIND or by an external caller. external
use is no longer supported, but the variable was retained for use
by dyndb, which needed it only when being built without libtool.
building without libtool is *also* no longer supported, so the variable
can go away.

3 years agoMerge branch '3840-avoid-libuv-with-broken-recvmmsg' into 'main'
Michał Kępień [Thu, 9 Feb 2023 14:10:19 +0000 (14:10 +0000)] 
Merge branch '3840-avoid-libuv-with-broken-recvmmsg' into 'main'

Avoid libuv 1.35 and 1.36 that have broken recvmmsg implementation

Closes #3840

See merge request isc-projects/bind9!7480

3 years agoAdd CHANGES and release note for [GL #3840]
Ondřej Surý [Fri, 3 Feb 2023 08:40:13 +0000 (09:40 +0100)] 
Add CHANGES and release note for [GL #3840]

3 years agoSync compile-time & run-time libuv requirements
Ondřej Surý [Wed, 8 Feb 2023 08:28:09 +0000 (09:28 +0100)] 
Sync compile-time & run-time libuv requirements

Bump the minimum libuv version required at runtime so that it matches
the compile-time requirements.

3 years agoEnforce version drift limits for libuv
Ondřej Surý [Wed, 8 Feb 2023 08:29:54 +0000 (09:29 +0100)] 
Enforce version drift limits for libuv

libuv support for receiving multiple UDP messages in a single system
call (recvmmsg()) has been tweaked several times between libuv versions
1.35.0 and 1.40.0.  Mixing and matching libuv versions within that span
may lead to assertion failures and is therefore considered harmful, so
try to limit potential damage be preventing users from mixing libuv
versions with distinct sets of recvmmsg()-related flags.

3 years agoAvoid libuv 1.35 and 1.36 that have broken recvmmsg implementation
Ondřej Surý [Fri, 3 Feb 2023 14:47:28 +0000 (15:47 +0100)] 
Avoid libuv 1.35 and 1.36 that have broken recvmmsg implementation

The implementation of UDP recvmmsg in libuv 1.35 and 1.36 is
incomplete and could cause assertion failure under certain
circumstances.

Modify the configure and runtime checks to report a fatal error when
trying to compile or run with the affected versions.

3 years agoMerge branch 'fanf-another-bitstring-remnant' into 'main'
Tony Finch [Thu, 9 Feb 2023 14:03:17 +0000 (14:03 +0000)] 
Merge branch 'fanf-another-bitstring-remnant' into 'main'

Remove another remnant of bitstring labels

See merge request isc-projects/bind9!7511

3 years agoFix CHANGES numbering
Tony Finch [Thu, 9 Feb 2023 13:41:04 +0000 (13:41 +0000)] 
Fix CHANGES numbering

Oops, I broke it

3 years agoRemove another remnant of bitstring labels
Tony Finch [Thu, 9 Feb 2023 12:16:46 +0000 (12:16 +0000)] 
Remove another remnant of bitstring labels

A comment referred to the mysterious label type 01000001

3 years agoMerge branch 'fanf-smaller-rdatasetheader' into 'main'
Tony Finch [Thu, 9 Feb 2023 09:09:05 +0000 (09:09 +0000)] 
Merge branch 'fanf-smaller-rdatasetheader' into 'main'

Reduce the size of rdatasetheader_t by 16 bytes

See merge request isc-projects/bind9!7505

3 years agoReduce the size of rdatasetheader_t by 16 bytes
Tony Finch [Wed, 8 Feb 2023 13:18:34 +0000 (13:18 +0000)] 
Reduce the size of rdatasetheader_t by 16 bytes

Re-order the fields to avoid padding, and change the type of
`heap_index` to `uint16_t` to match `dns_rbtnode_t->locknum`.

3 years agoMerge branch '3857-notify-source-port-test-is-not-reliable' into 'main'
Mark Andrews [Thu, 9 Feb 2023 08:38:12 +0000 (08:38 +0000)] 
Merge branch '3857-notify-source-port-test-is-not-reliable' into 'main'

Resolve "Notify source port test is not reliable"

Closes #3857

See merge request isc-projects/bind9!7509

3 years agoMake notify source port test reliable
Mark Andrews [Thu, 9 Feb 2023 04:11:24 +0000 (15:11 +1100)] 
Make notify source port test reliable

Send the test message from ns3 to ns2 instead of ns2 to ns3 as ns2
is started first and therefore the test doesn't have to wait on the
resend of the the NOTIFY message to be successful.

3 years agoMerge branch '3851-cleanup-nsupdate-system-test' into 'main'
Mark Andrews [Wed, 8 Feb 2023 22:39:51 +0000 (22:39 +0000)] 
Merge branch '3851-cleanup-nsupdate-system-test' into 'main'

Resolve "cleanup nsupdate system test"

Closes #3851

See merge request isc-projects/bind9!7490

3 years agoSend grep output to /dev/null in nsupdate test
Mark Andrews [Mon, 6 Feb 2023 23:07:17 +0000 (10:07 +1100)] 
Send grep output to /dev/null in nsupdate test

3 years agoMerge branch '3831-dnssec-cds-failed-to-cleanup-properly-on-some-non-error-paths...
Mark Andrews [Wed, 8 Feb 2023 21:56:11 +0000 (21:56 +0000)] 
Merge branch '3831-dnssec-cds-failed-to-cleanup-properly-on-some-non-error-paths' into 'main'

Resolve "dnssec-cds failed to cleanup properly on some non error paths"

Closes #3831

See merge request isc-projects/bind9!7445

3 years agoAdd CHANGES note for [GL #3831]
Mark Andrews [Mon, 30 Jan 2023 02:58:13 +0000 (13:58 +1100)] 
Add CHANGES note for [GL #3831]

3 years agodnssec-checkds: cleanup memory on error paths
Mark Andrews [Tue, 31 Jan 2023 02:50:36 +0000 (13:50 +1100)] 
dnssec-checkds: cleanup memory on error paths

Move and give unique names to the dns_db_t, dns_dbnode_t and
dns_dbversion_t pointers, so they have global scope and therefore
are visible to cleanup.  Unique names are not strictly necessary,
as none of the functions involved call each other.

Change free_db to handle NULL pointers and also an optional
(dns_dbversion_t **).

In match_keyset_dsset and free_keytable, ki to be handled
differently to prevent a false positive NULL pointer dereference
warning from scan.

In formatset moved dns_master_styledestroy earlier and freed
buf before calling check_result to prevent memory leak.

In append_new_ds_set freed ds on the default path before
calling check_result to prevent memory leak.

3 years agodnssec-cds failed to cleanup on non error paths
Mark Andrews [Mon, 30 Jan 2023 02:44:47 +0000 (13:44 +1100)] 
dnssec-cds failed to cleanup on non error paths

dnssec-cds failed to cleanup on non error paths which meant that
the OpenSSL libraries could not cleanup properly.

3 years agoDefine DNS_RDATASET_INIT for static initialisation
Mark Andrews [Fri, 13 Jan 2023 03:30:45 +0000 (14:30 +1100)] 
Define DNS_RDATASET_INIT for static initialisation

3 years agoMerge branch '3729-drop-RHEL-7-and-clones-support' into 'main'
Ondřej Surý [Wed, 8 Feb 2023 20:34:01 +0000 (20:34 +0000)] 
Merge branch '3729-drop-RHEL-7-and-clones-support' into 'main'

Drop RHEL / CentOS / Oracle Linux 7 support

Closes #3729

See merge request isc-projects/bind9!7346

3 years agoAdd CHANGES and release notes for [GL #3729]
Ondřej Surý [Tue, 10 Jan 2023 11:44:59 +0000 (12:44 +0100)] 
Add CHANGES and release notes for [GL #3729]

3 years agoRequire C11 Atomic Operations via <stdatomic.h>
Ondřej Surý [Tue, 10 Jan 2023 12:06:13 +0000 (13:06 +0100)] 
Require C11 Atomic Operations via <stdatomic.h>

Make the C11 Atomic Operations mandatory and drop the Gcc __atomic
builtin shims.

3 years agoRequire C11 thread_local keyword and <threads.h> header
Ondřej Surý [Tue, 10 Jan 2023 11:48:03 +0000 (12:48 +0100)] 
Require C11 thread_local keyword and <threads.h> header

Change the autoconf check to require C11 <threads.h> header and
thread_local keyword.

3 years agoDrop RHEL / CentOS / Oracle Linux 7 support
Ondřej Surý [Tue, 10 Jan 2023 10:47:44 +0000 (11:47 +0100)] 
Drop RHEL / CentOS / Oracle Linux 7 support

The RHEL (and clones) 7 will reach EOL in June 2024, shortly after BIND
9.20 will be released.  Drop the support for building on those
platforms, so we can use features of modern operating systems - newer
compiler that supports at least subset of C23 and OpenSSL 1.1/3.0.

This will simplify some of the code that we are using in BIND 9.

3 years agoMerge branch '3113-clientinfo-refactor' into 'main'
Evan Hunt [Wed, 8 Feb 2023 08:10:20 +0000 (08:10 +0000)] 
Merge branch '3113-clientinfo-refactor' into 'main'

refactor dns_clientinfo_init(); use separate function to set ECS

Closes #3113

See merge request isc-projects/bind9!5782

3 years agorefactor dns_clientinfo_init(); use separate function to set ECS
Evan Hunt [Mon, 31 Jan 2022 20:10:29 +0000 (12:10 -0800)] 
refactor dns_clientinfo_init(); use separate function to set ECS

Instead of using an extra rarely-used paramater to dns_clientinfo_init()
to set ECS information for a client, this commit adds a function
dns_clientinfo_setecs() which can be called only when ECS is needed.

3 years agoMerge branch '3846-nsupdate-test-fix' into 'main'
Evan Hunt [Wed, 8 Feb 2023 07:40:35 +0000 (07:40 +0000)] 
Merge branch '3846-nsupdate-test-fix' into 'main'

increase simultaneous updates for quota test

Closes #3846

See merge request isc-projects/bind9!7500

3 years agoincrease simultaneous updates for quota test
Evan Hunt [Tue, 7 Feb 2023 19:05:13 +0000 (11:05 -0800)] 
increase simultaneous updates for quota test

the nsupdate system test was intermittently failing due to the update
quota not being exceeded when it should have been.  this is most likely
a timing issue: the client is sending updates too slowly, or the server
is processing them too quickly, for the quota to fill. this commit
attempts to make that the failure less likely by increasing the number
of update transactions from 10 to 20.

3 years agoMerge branch '854-spurious-keytype-warning' into 'main'
Evan Hunt [Wed, 8 Feb 2023 07:29:46 +0000 (07:29 +0000)] 
Merge branch '854-spurious-keytype-warning' into 'main'

silence a spurious warning during key generation

Closes #854

See merge request isc-projects/bind9!7501

3 years agosilence a spurious warning during key generation
Evan Hunt [Tue, 7 Feb 2023 20:37:25 +0000 (12:37 -0800)] 
silence a spurious warning during key generation

when generating a key, if a DH key already existed for the same
name, a spurious warning message was generated saying "bad key
type". this is fixed.

3 years agoMerge branch '3852-follow-up-from-9-18-merge-branch-3790-use-configured-udp-port...
Mark Andrews [Tue, 7 Feb 2023 13:40:22 +0000 (13:40 +0000)] 
Merge branch '3852-follow-up-from-9-18-merge-branch-3790-use-configured-udp-port-into-main' into 'main'

Resolve "Wait longer for rndc reconfig effects to complete"

Closes #3852

See merge request isc-projects/bind9!7493

3 years agoAllow some time to the root trust anchor to appear
Mark Andrews [Tue, 7 Feb 2023 01:08:31 +0000 (12:08 +1100)] 
Allow some time to the root trust anchor to appear

Following deleting the root trust anchor and reconfiguring the
server it takes some time to for trust anchor to appear in 'rndc
managed-keys status' output.  Retry several times.

3 years agoMerge branch '3836-missing-ossl_store_info_free-calls-in-dst__openssl_fromlabel_provi...
Mark Andrews [Tue, 7 Feb 2023 12:59:06 +0000 (12:59 +0000)] 
Merge branch '3836-missing-ossl_store_info_free-calls-in-dst__openssl_fromlabel_provider-on-error-path' into 'main'

Resolve "Missing OSSL_STORE_INFO_free calls in dst__openssl_fromlabel_provider on error path"

Closes #3836

See merge request isc-projects/bind9!7456

3 years agoCall OSSL_STORE_INFO_free on error path
Mark Andrews [Mon, 30 Jan 2023 13:57:57 +0000 (00:57 +1100)] 
Call OSSL_STORE_INFO_free on error path

3 years agoMerge branch '3839-fix-resume_dslookup-bug' into 'main'
Arаm Sаrgsyаn [Tue, 7 Feb 2023 12:22:31 +0000 (12:22 +0000)] 
Merge branch '3839-fix-resume_dslookup-bug' into 'main'

Fix a bug in resolver's resume_dslookup() function

Closes #3839

See merge request isc-projects/bind9!7476

3 years agocheck that delv handles REFUSED when chasing DS records
Mark Andrews [Tue, 7 Feb 2023 04:05:39 +0000 (15:05 +1100)] 
check that delv handles REFUSED when chasing DS records

3 years agoAdd a CHANGES note for [GL #3839]
Aram Sargsyan [Wed, 1 Feb 2023 14:49:49 +0000 (14:49 +0000)] 
Add a CHANGES note for [GL #3839]

3 years agoFix a bug in resolver's resume_dslookup() function
Aram Sargsyan [Wed, 1 Feb 2023 14:41:58 +0000 (14:41 +0000)] 
Fix a bug in resolver's resume_dslookup() function

A recent refactoring in 7e4e125e5ea5b29c946ce4646461d06a75cd8702
had introduced a logical error which could result in calling the
dns_resolver_createfetch() function with 'nameservers' pointer set
to NULL, but with 'domain' not set to NULL, which is not allowed
by the function.

Make sure 'domain' is set only when 'nsrdataset' is valid.

3 years agoMerge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.19.11' into 'main'
Michal Nowak [Tue, 7 Feb 2023 10:03:17 +0000 (10:03 +0000)] 
Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.19.11' into 'main'

Set up version and release notes for bind 9.19.11

See merge request isc-projects/bind9!7495

3 years agoSet up release notes for BIND 9.19.11
Michal Nowak [Tue, 7 Feb 2023 09:25:44 +0000 (10:25 +0100)] 
Set up release notes for BIND 9.19.11

3 years agoUpdate BIND version to 9.19.11-dev
Michal Nowak [Tue, 7 Feb 2023 09:22:26 +0000 (10:22 +0100)] 
Update BIND version to 9.19.11-dev

3 years agoMerge branch '3838-named-rrchecker-should-cleanup-when-it-detects-an-error' into...
Mark Andrews [Tue, 7 Feb 2023 00:00:54 +0000 (00:00 +0000)] 
Merge branch '3838-named-rrchecker-should-cleanup-when-it-detects-an-error' into 'main'

Resolve "named-rrchecker should cleanup when it detects an error"

Closes #3838

See merge request isc-projects/bind9!7473

3 years agonamed-rrchecker: have fatal cleanup
Mark Andrews [Mon, 30 Jan 2023 07:06:57 +0000 (18:06 +1100)] 
named-rrchecker: have fatal cleanup

It is trivial to fully cleanup memory on all the error paths in
named-rrchecker, many of which are triggered by bad user input.
This involves freeing lex and mctx if they exist when fatal is
called.

3 years agoMerge branch '3790-use-configured-udp-port' into 'main'
Evan Hunt [Mon, 6 Feb 2023 23:28:13 +0000 (23:28 +0000)] 
Merge branch '3790-use-configured-udp-port' into 'main'

use configured source ports for UDP requests

Closes #3790

See merge request isc-projects/bind9!7479

3 years agoCHANGES for [GL #3790]
Evan Hunt [Thu, 2 Feb 2023 20:22:27 +0000 (12:22 -0800)] 
CHANGES for [GL #3790]

3 years agoadd source port configuration tests
Evan Hunt [Thu, 2 Feb 2023 21:35:32 +0000 (13:35 -0800)] 
add source port configuration tests

check in the log files of receiving servers that the originating
ports for notify and SOA query messages were set correctly from
configured notify-source and transfer-source options.

3 years agouse configured source ports for UDP requests
Evan Hunt [Thu, 2 Feb 2023 20:16:49 +0000 (12:16 -0800)] 
use configured source ports for UDP requests

the optional 'port' option, when used with notify-source,
transfer-source, etc, is used to set up UDP dispatches with a
particular source port, but when the actual UDP connection was
established the port would be overridden with a random one. this
has been fixed.

(configuring source ports is deprecated in 9.20 and slated for
removal in 9.22, but should still work correctly until then.)

3 years agoMerge branch 'each-remove-bindkeys' into 'main'
Evan Hunt [Mon, 6 Feb 2023 23:03:08 +0000 (23:03 +0000)] 
Merge branch 'each-remove-bindkeys' into 'main'

remove /etc/bind.keys

Closes #3850

See merge request isc-projects/bind9!7484

3 years agoCHANGES for [GL #3850]
Evan Hunt [Mon, 6 Feb 2023 22:39:43 +0000 (14:39 -0800)] 
CHANGES for [GL #3850]

3 years agoremove /etc/bind.keys
Evan Hunt [Fri, 3 Feb 2023 22:57:17 +0000 (14:57 -0800)] 
remove /etc/bind.keys

the built-in trust anchors in named and delv are sufficent for
validation. named still needs to be able to load trust anchors from
a bind.keys file for testing purposes, but it doesn't need to be
the default behavior.

we now only load trust anchors from a file if explicitly specified
via the "bindkeys-file" option in named or the "-a" command line
argument to delv. documentation has been cleaned up to remove references
to /etc/bind.keys.

Closes #3850.

3 years agoMerge branch '3673-delay-trust-anchor-management' into 'main'
Evan Hunt [Mon, 6 Feb 2023 22:12:32 +0000 (22:12 +0000)] 
Merge branch '3673-delay-trust-anchor-management' into 'main'

delay trust anchor management until zones are loaded

Closes #3673

See merge request isc-projects/bind9!7441

3 years agodelay trust anchor management until zones are loaded
Evan Hunt [Fri, 27 Jan 2023 22:43:11 +0000 (14:43 -0800)] 
delay trust anchor management until zones are loaded

it was possible for a managed trust anchor needing to send a key
refresh query to be unable to do so because an authoritative zone
was not yet loaded. this has been corrected by delaying the
synchronization of managed-keys zones until after all zones are
loaded.

3 years agoMerge branch 'fanf-unused-fromwire-downcase' into 'main'
Tony Finch [Mon, 6 Feb 2023 14:20:42 +0000 (14:20 +0000)] 
Merge branch 'fanf-unused-fromwire-downcase' into 'main'

Remove unused support for fromwire(DNS_NAME_DOWNCASE)

See merge request isc-projects/bind9!7467

3 years agoRemove unused support for fromwire(DNS_NAME_DOWNCASE)
Tony Finch [Wed, 9 Nov 2022 17:10:59 +0000 (17:10 +0000)] 
Remove unused support for fromwire(DNS_NAME_DOWNCASE)

Most of this change is fixing dns_rdata_fromwire() so
it does not propagate the unused options variable.

3 years agoMerge branch 'fanf-bitstring-cleanup' into 'main'
Tony Finch [Mon, 6 Feb 2023 13:23:46 +0000 (13:23 +0000)] 
Merge branch 'fanf-bitstring-cleanup' into 'main'

Remove some remnants of bitstring labels

See merge request isc-projects/bind9!7196

3 years agoRemove some remnants of bitstring labels
Tony Finch [Wed, 7 Dec 2022 19:58:40 +0000 (19:58 +0000)] 
Remove some remnants of bitstring labels

* rbt node chains were sized to allow for bitstring labels, so they
  had 256 levels; but in the absence of bistrings, 128 is enough.

* dns_byaddr_createptrname() had a redundant options argument,
  and a very outdated doc comment.

* A number of comments referred to bitstring labels in a way that is
  no longer helpful. (A few informative comments remain.)

3 years agoMerge branch 'fanf-named-compilezone-stray-backtick' into 'main'
Tony Finch [Mon, 6 Feb 2023 12:31:08 +0000 (12:31 +0000)] 
Merge branch 'fanf-named-compilezone-stray-backtick' into 'main'

Fix the reference to RFC 1035 in named-compilezone(1)

See merge request isc-projects/bind9!7485

3 years agoFix the reference to RFC 1035 in named-compilezone(1)
Tony Finch [Sun, 5 Feb 2023 20:04:02 +0000 (20:04 +0000)] 
Fix the reference to RFC 1035 in named-compilezone(1)

There was a stray backquote

3 years agoMerge branch 'fanf-time-monotonic' into 'main'
Tony Finch [Mon, 6 Feb 2023 12:23:14 +0000 (12:23 +0000)] 
Merge branch 'fanf-time-monotonic' into 'main'

Add isc_time_monotonic()

See merge request isc-projects/bind9!7486

3 years agoAdd isc_time_monotonic()
Tony Finch [Tue, 17 Jan 2023 16:05:01 +0000 (16:05 +0000)] 
Add isc_time_monotonic()

This is to simplify measurements of how long things take.

3 years agoMerge branch '3845-mem-zero-non-zero' into 'main'
Tony Finch [Mon, 6 Feb 2023 12:09:28 +0000 (12:09 +0000)] 
Merge branch '3845-mem-zero-non-zero' into 'main'

Fix ISC_MEM_ZERO on allocators with malloc_usable_size()

Closes #3845

See merge request isc-projects/bind9!7481

3 years agoFix ISC_MEM_ZERO on allocators with malloc_usable_size()
Tony Finch [Fri, 3 Feb 2023 12:29:00 +0000 (12:29 +0000)] 
Fix ISC_MEM_ZERO on allocators with malloc_usable_size()

ISC_MEM_ZERO requires great care to use when the space returned by
the allocator is larger than the requested space, and when memory is
reallocated. You must ensure that _every_ call to allocate or
reallocate a particular block of memory uses ISC_MEM_ZERO, to ensure
that the extra space is zeroed as expected. (When ISC_MEMFLAG_FILL
is set, the extra space will definitely be non-zero.)

When BIND is built without jemalloc, ISC_MEM_ZERO is implemented in
`jemalloc_shim.h`. This had a bug on systems that have malloc_size()
or malloc_usable_size(): memory was only zeroed up to the requested
size, not the allocated size. When an oversized allocation was
returned, and subsequently reallocated larger, memory between the
original requested size and the original allocated size could
contain unexpected nonzero junk. The realloc call does not know the
original requested size and only zeroes from the original allocated
size onwards.

After this change, `jemalloc_shim.h` always zeroes up to the
allocated size, not the requested size.

3 years agoMerge branch '3827-fix-dnsrps-builds' into 'main'
Michał Kępień [Wed, 1 Feb 2023 10:24:22 +0000 (10:24 +0000)] 
Merge branch '3827-fix-dnsrps-builds' into 'main'

Fix DNSRPS builds

Closes #3827

See merge request isc-projects/bind9!7450