]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
13 months agochg: doc: Set up version for BIND 9.21.8
Nicki Křížek [Thu, 10 Apr 2025 13:32:31 +0000 (13:32 +0000)] 
chg: doc: Set up version for BIND 9.21.8

Merge branch 'nicki/set-up-version-for-bind-9.21.8' into 'main'

See merge request isc-projects/bind9!10378

13 months agoUpdate BIND version to 9.21.8-dev
Nicki Křížek [Thu, 10 Apr 2025 13:21:13 +0000 (15:21 +0200)] 
Update BIND version to 9.21.8-dev

13 months agofix: usr: `check_private` failed to account for the length byte before the OID
Mark Andrews [Wed, 9 Apr 2025 20:05:54 +0000 (20:05 +0000)] 
fix: usr: `check_private` failed to account for the length byte before the OID

In PRIVATEOID keys, the key data begins with a length byte followed
by an ASN.1 object identifier that indicates the cryptographic algorithm
to use. Previously, the length byte was not accounted for when
checking the contents of keys and signatures, which could have led
to interoperability problems with any zones signed using PRIVATEOID.
This has been fixed.

Closes #5270

Merge branch '5270-fix-check-private' into 'main'

See merge request isc-projects/bind9!10372

13 months agoUpdate BIND version for release v9.21.7
Nicki Křížek [Wed, 9 Apr 2025 14:18:20 +0000 (16:18 +0200)] 
Update BIND version for release

13 months agonew: doc: Prepare documentation for BIND 9.21.7
Nicki Křížek [Wed, 9 Apr 2025 14:04:01 +0000 (14:04 +0000)] 
new: doc: Prepare documentation for BIND 9.21.7

Merge branch 'nicki/prepare-documentation-for-bind-9.21.7' into 'v9.21.7-release'

See merge request isc-private/bind9!789

13 months agoTweak and reword release notes
Nicki Křížek [Thu, 3 Apr 2025 13:36:08 +0000 (15:36 +0200)] 
Tweak and reword release notes

13 months agoFix rndc reset-stats documentation
Nicki Křížek [Thu, 3 Apr 2025 13:30:31 +0000 (15:30 +0200)] 
Fix rndc reset-stats documentation

Reformat the section to be more consistent with the rest of the rndc
documentation and avoid using :program: directive which would needlessly
break rst links.

13 months agoAdd missing commands to rndc --help
Nicki Křížek [Thu, 3 Apr 2025 12:59:07 +0000 (14:59 +0200)] 
Add missing commands to rndc --help

13 months agoFix OID check for PRIVATEOID keys and signatures
Mark Andrews [Thu, 3 Apr 2025 01:49:39 +0000 (12:49 +1100)] 
Fix OID check for PRIVATEOID keys and signatures

We were failing to account for the length byte before the OID.
See RFC 4034.

   Algorithm number 254 is reserved for private use and will never be
   assigned to a specific algorithm.  The public key area in the DNSKEY
   RR and the signature area in the RRSIG RR begin with an unsigned
   length byte followed by a BER encoded Object Identifier (ISO OID) of
   that length.  The OID indicates the private algorithm in use, and the
   remainder of the area is whatever is required by that algorithm.
   Entities should only use OIDs they control to designate their private
   algorithms.

13 months agoPrepare release notes for BIND 9.21.7
Nicki Křížek [Thu, 3 Apr 2025 11:11:46 +0000 (13:11 +0200)] 
Prepare release notes for BIND 9.21.7

13 months agoGenerate changelog for BIND 9.21.7
Nicki Křížek [Thu, 3 Apr 2025 11:10:36 +0000 (13:10 +0200)] 
Generate changelog for BIND 9.21.7

13 months agofix: usr: Stop caching lack of EDNS support
Nicki Křížek [Thu, 3 Apr 2025 10:51:47 +0000 (10:51 +0000)] 
fix: usr: Stop caching lack of EDNS support

`named` could falsely learn that a server doesn't support EDNS when
a spoofed response was received; that subsequently prevented DNSSEC
lookups from being made.  This has been fixed.

Closes https://gitlab.isc.org/isc-projects/bind9/-/issues/3949

Closes https://gitlab.isc.org/isc-projects/bind9/-/issues/5066

Merge branch '5066-stop-caching-lack-of-edns-support' into 'v9.21.7-release'

See merge request isc-private/bind9!776

13 months agoDon't cache lack of EDNS based on received responses
Mark Andrews [Thu, 16 Jan 2025 05:24:05 +0000 (16:24 +1100)] 
Don't cache lack of EDNS based on received responses

Caching prevents server upgrades being detected in a timely manner
and it can also prevent DNSSEC responses being requested.

13 months agofix: usr: Nested DNS validation could cause assertion failure
Ondřej Surý [Wed, 2 Apr 2025 16:41:57 +0000 (16:41 +0000)] 
fix: usr: Nested DNS validation could cause assertion failure

When multiple nested DNS validations were destroyed out of order,
the EDE context could be freed before all EDE codes were copied,
which could cause an assertion failure. This has been fixed.

Closes #5213

Merge branch '5213-use-dns_ede_copy-in-dns_validator' into 'main'

See merge request isc-projects/bind9!10365

13 months agoDon't copy EDE codes if source is same as destination
Ondřej Surý [Wed, 2 Apr 2025 16:06:52 +0000 (18:06 +0200)] 
Don't copy EDE codes if source is same as destination

If the nested DNS validator ends up in the same fetch because of the
loops, the code could be copying the EDE codes from the same source EDE
context as the destination EDE context.  Skip copying the EDE codes if
the source and the destination is the same.

13 months agoDon't pass edectx from fetch_and_forget
Ondřej Surý [Wed, 2 Apr 2025 15:38:31 +0000 (17:38 +0200)] 
Don't pass edectx from fetch_and_forget

Pass NULL as edectx for the fetch_and_forget() fetches as nobody
is reading the EDE contexts and it can mess the main client buffer.

13 months agoAdd static ede context into each validator layer
Ondřej Surý [Wed, 2 Apr 2025 14:31:54 +0000 (16:31 +0200)] 
Add static ede context into each validator layer

Instead of passing the edectx from the fetchctx into all subvalidators,
make the ede context ownership explict for dns_resolver_createfetch()
callers, and copy the ede result codes from the children validators to
the parent when finishing the validation process.

13 months agochg: dev: Remove zero initialization of large buffers
Alessio Podda [Wed, 2 Apr 2025 15:00:34 +0000 (15:00 +0000)] 
chg: dev: Remove zero initialization of large buffers

Profiles show that an high amount of CPU time spent in memset.
By removing zero initalization of certain large buffers we improve
performance in certain authoritative workloads.

Closes #5159

Merge branch '5159-do-not-zero-qp-search-buffers' into 'main'

See merge request isc-projects/bind9!10058

13 months agoRemove zero initialization of large buffers
alessio [Thu, 30 Jan 2025 11:33:48 +0000 (12:33 +0100)] 
Remove zero initialization of large buffers

Profiles show that an high amount of CPU time spent in memset.
By removing zero initalization of certain large buffers we improve
performance in certain authoritative workloads.

13 months agochg: ci: Update issue closing regex in dangerfile.py
Andoni Duarte [Wed, 2 Apr 2025 13:38:40 +0000 (13:38 +0000)] 
chg: ci: Update issue closing regex in dangerfile.py

Update issue regex in danger file

The regular expression in `dangerfile.py` has been updated to match
the one in GitLab and bind9-qa (isc-projects/bind9-qa!41), i.e.
https://docs.gitlab.com/user/project/issues/managing_issues/#default-closing-pattern.

Merge branch 'andoni/update-issue-regex-in-danger-file' into 'main'

See merge request isc-projects/bind9!10361

13 months agoUpdate issue closing regex in dangerfile.py
Andoni Duarte Pintado [Wed, 2 Apr 2025 12:14:36 +0000 (14:14 +0200)] 
Update issue closing regex in dangerfile.py

Update the regular expression used for extracting references to GitLab
issues closed by a given merge request so that it is identical to the
one used by GitLab [1].

See also isc-projects/bind9-qa!41

[1] https://docs.gitlab.com/user/project/issues/managing_issues/#default-closing-pattern

13 months agochg: nil: Suppress FreeBSD-specific TSAN false-positive lock-order-inversion
Arаm Sаrgsyаn [Wed, 2 Apr 2025 12:33:00 +0000 (12:33 +0000)] 
chg: nil: Suppress FreeBSD-specific TSAN false-positive lock-order-inversion

TSAN reports a lock-order-inversion (potential deadlock) issue in
`add_trace_entry()`.

While it is true that in one case a lock in the `isc_mem_t` structure is
locked first, and then a lock in the `FILE` structure is locked second,
and in the the second case it is the other way around, this isn't an
issue, because those are `FILE` structures for totally different files,
used in different parts of the code.

Closes #5266

Merge branch '5266-freebsd-suppress-tsan-lock-order-inversion-false-positive' into 'main'

See merge request isc-projects/bind9!10355

13 months agoSuppress FreeBSD-specific TSAN false-positive lock-order-inversion
Aram Sargsyan [Wed, 2 Apr 2025 08:38:58 +0000 (08:38 +0000)] 
Suppress FreeBSD-specific TSAN false-positive lock-order-inversion

TSAN reports a lock-order-inversion (potential deadlock) issue in
add_trace_entry():

    WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock)
      Cycle in lock order graph: M0001 (0x000000000001) => M0002 (0x000000000002) => M0001
      Mutex M0002 acquired here while holding mutex M0001 in main thread:
        #0 _pthread_mutex_lock /usr/src/contrib/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1342:3
        #1 add_trace_entry lib/isc/mem.c:210:2
        #2 isc__mem_get lib/isc/mem.c:606:2
        #3 isc_buffer_allocate lib/isc/./include/isc/buffer.h:1080:23
        #4 pushandgrow lib/isc/lex.c:321:3
        #5 isc_lex_gettoken lib/isc/lex.c:445:22
        #6 cfg_gettoken lib/isccfg/parser.c:3490:11
        #7 cfg_parse_mapbody lib/isccfg/parser.c:2230:3
        #8 cfg_parse_obj lib/isccfg/parser.c:247:11
        #9 parse2 lib/isccfg/parser.c:628:11
        #10 cfg_parse_file lib/isccfg/parser.c:668:11
        #11 load_configuration bin/named/server.c:8069:13
        #12 run_server bin/named/server.c:9518:2
        #13 isc__async_cb lib/isc/async.c:110:3
        #14 uv__async_io /tmp/libuv-1.50.0/src/unix/async.c:208:5
        #15 uv__io_poll /tmp/libuv-1.50.0/src/unix/kqueue.c:369:9
        #16 uv_run /tmp/libuv-1.50.0/src/unix/core.c:460:5
        #17 loop_thread lib/isc/loop.c:327:6
        #18 thread_body lib/isc/thread.c:89:8
        #19 isc_thread_main lib/isc/thread.c:124:2
        #20 isc_loopmgr_run lib/isc/loop.c:513:2
        #21 main bin/named/main.c:1469:2
      Mutex M0001 previously acquired by the same thread here:
        #0 _pthread_mutex_lock /usr/src/contrib/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1342:3
        #1 _flockfile /usr/src/lib/libc/stdio/_flock_stub.c:72:3
        #2 cfg_gettoken lib/isccfg/parser.c:3490:11
        #3 cfg_parse_mapbody lib/isccfg/parser.c:2230:3
        #4 cfg_parse_obj lib/isccfg/parser.c:247:11
        #5 parse2 lib/isccfg/parser.c:628:11
        #6 cfg_parse_file lib/isccfg/parser.c:668:11
        #7 load_configuration bin/named/server.c:8069:13
        #8 run_server bin/named/server.c:9518:2
        #9 isc__async_cb lib/isc/async.c:110:3
        #10 uv__async_io /tmp/libuv-1.50.0/src/unix/async.c:208:5
        #11 uv__io_poll /tmp/libuv-1.50.0/src/unix/kqueue.c:369:9
        #12 uv_run /tmp/libuv-1.50.0/src/unix/core.c:460:5
        #13 loop_thread lib/isc/loop.c:327:6
        #14 thread_body lib/isc/thread.c:89:8
        #15 isc_thread_main lib/isc/thread.c:124:2
        #16 isc_loopmgr_run lib/isc/loop.c:513:2
        #17 main bin/named/main.c:1469:2
      Mutex M0001 acquired here while holding mutex M0002 in main thread:
        #0 _pthread_mutex_lock /usr/src/contrib/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1342:3
        #1 _flockfile /usr/src/lib/libc/stdio/_flock_stub.c:72:3
        #2 print_active lib/isc/mem.c:629:3
        #3 isc_mem_stats lib/isc/mem.c:694:2
        #4 main bin/named/main.c:1498:4
      Mutex M0002 previously acquired by the same thread here:
        #0 _pthread_mutex_lock /usr/src/contrib/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1342:3
        #1 isc_mem_stats lib/isc/mem.c:668:2
        #2 main bin/named/main.c:1498:4
    SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) lib/isc/mem.c:210:2 in add_trace_entry

In the first stack frame ('M0001'->'M0002' lock order) cfg_gettoken()
uses flockfile() to lock 'M0001' for the 'FILE' object associated with
the configuration file (e.g. the configuration file itself and
whatever it includes, like a zone database), then it locks a memory
context mutex M0002.

In the other stack frmae ('M0002'->'M0001' lock order) isc_mem_stats()
locks a memory context mutex M0002, then it uses fprintf(), which
internally locks a 'M0001' mutex with flockfile() to write into the
'named.memstats' memory statistics file.

While it is true that in one case a lock in the 'isc_mem_t' structure is
locked first, and then a lock in the 'FILE' structure is locked second,
and in the the second case it is the other way around, this isn't an
issue, because those are 'FILE' structures for totally different files,
used in different parts of the code.

It was also manually confirmed that 'named.memstats' doesn't get
processed by cfg_gettoken(), and is used only in the second stack
frame's code flow when named is exiting.

13 months agonew: ci: Allow pushing branches and tags to customer git repos
Nicki Křížek [Wed, 2 Apr 2025 11:03:30 +0000 (11:03 +0000)] 
new: ci: Allow pushing branches and tags to customer git repos

For pipelines in the private repository, add an optional manual job,
which allows the current branch to be pushed into the specified
customer's git repository. This can be useful to provide patch previews
for early testing.

For tags created in a private repository, add a manual job which pushes
the created tag to all entitled customers.

Merge branch 'nicki/ci-customer-git-automation' into 'main'

See merge request isc-projects/bind9!10323

13 months agoAllow pushing branches and tags to customer git repos
Nicki Křížek [Tue, 25 Mar 2025 15:51:24 +0000 (16:51 +0100)] 
Allow pushing branches and tags to customer git repos

For pipelines in the private repository, add an optional manual job,
which allows the current branch to be pushed into the specified
customer's git repository. This can be useful to provide patch previews
for early testing.

For tags created in a private repository, add a manual job which pushes
the created tag to all entitled customers.

13 months agochg: nil: Suppress FreeBSD-specific TSAN false-positive data race
Arаm Sаrgsyаn [Wed, 2 Apr 2025 08:35:04 +0000 (08:35 +0000)] 
chg: nil: Suppress FreeBSD-specific TSAN false-positive data race

TSAN reports a data race in FreeBSD's memset(), called by its
__crt_calloc() memory allocation function. There is a very similar
bug report [1] in FreeBSD bug tracker, and an existing code-review [2]
that tries to address an issue, the description of which is very
similar to what we are seeing.

Suppress this report by adding its signature to '.tsan-suppress'.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282794

[2] https://reviews.freebsd.org/D28536?id=86694

Closes #5267

Merge branch '5267-freebsd-suppress-tsan-data-race-false-positive' into 'main'

See merge request isc-projects/bind9!10353

13 months agoSuppress FreeBSD-specific TSAN false-positive data race
Aram Sargsyan [Tue, 1 Apr 2025 13:36:33 +0000 (13:36 +0000)] 
Suppress FreeBSD-specific TSAN false-positive data race

TSAN reports a data race in FreeBSD's memset(), called by its
__crt_calloc() memory allocation function. There is a very similar
bug report [1] in FreeBSD bug tracker, and an existing code-review [2]
that tries to address an issue, the description of which is very
similar to what we are seeing.

Suppress this report by adding its signature to '.tsan-suppress'.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282794
[2] https://reviews.freebsd.org/D28536?id=86694

13 months agofix: dev: Switch to ISC_LIST_FOREACH everywhere
Evan Hunt [Mon, 31 Mar 2025 21:21:06 +0000 (21:21 +0000)] 
fix: dev: Switch to ISC_LIST_FOREACH everywhere

The pattern `for (x = ISC_LIST_HEAD(...); x != NULL; ISC_LIST_NEXT(...)` has been changed to `ISC_LIST_FOREACH` throughout BIND, except in a few
cases where the change would be excessively complex.

In most cases this was a straightforward change. In some places, however, the list element variable was referenced after the loop ended. Where possible, code has now been refactored to avoid this necessity.

`ISC_LIST_FOREACH` has also been modified to use `typeof(list.head)` to declare list elements automatically. When the list object to be iterated is declared with a `const` qualifier, the qualifier is passed along to the element declaration, causing a compilation failure. To avoid this problem, some `const` qualifiers have been removed; where that was not possible, `UNCONST` was used.

Merge branch 'each-isc-list-foreach' into 'main'

See merge request isc-projects/bind9!10310

13 months agouse ISC_LIST_FOREACH in more places
Evan Hunt [Sat, 22 Mar 2025 22:26:16 +0000 (15:26 -0700)] 
use ISC_LIST_FOREACH in more places

use the ISC_LIST_FOREACH pattern in places where lists had
been iterated using a different pattern from the typical
`for` loop: for example, `while (!ISC_LIST_EMPTY(...))` or
`while ((e = ISC_LIST_HEAD(...)) != NULL)`.

13 months agoswitch to ISC_LIST_FOREACH everywhere
Evan Hunt [Fri, 21 Mar 2025 05:25:56 +0000 (22:25 -0700)] 
switch to ISC_LIST_FOREACH everywhere

the pattern `for (x = ISC_LIST_HEAD(...); x != NULL; ISC_LIST_NEXT(...)`
has been changed to `ISC_LIST_FOREACH` throughout BIND, except in a few
cases where the change would be excessively complex.

in most cases this was a straightforward change. in some places,
however, the list element variable was referenced after the loop
ended, and the code was refactored to avoid this necessity.

also, because `ISC_LIST_FOREACH` uses typeof(list.head) to declare
the list elements, compilation failures can occur if the list object
has a `const` qualifier.  some `const` qualifiers have been removed
from function parameters to avoid this problem, and where that was not
possible, `UNCONST` was used.

13 months agoimplicitly declare list elements in ISC_LIST_FOREACH macros
Evan Hunt [Thu, 20 Mar 2025 22:46:35 +0000 (15:46 -0700)] 
implicitly declare list elements in ISC_LIST_FOREACH macros

ISC_LIST_FOREACH and related macros now use 'typeof(list.head)' to
declare the list elements automatically; the caller no longer needs
to do so.

ISC_LIST_FOREACH_SAFE also now implicitly declares its own 'next'
pointer, so it only needs three parameters instead of four.

13 months agorem: dev: Cleanup dead code: CID 548247
Mark Andrews [Mon, 31 Mar 2025 20:17:57 +0000 (20:17 +0000)] 
rem: dev:  Cleanup dead code: CID 548247

Clean up dead code following merge of !10302.

Closes #5262

Merge branch '5262-cleanup-dead-code-cid-548247' into 'main'

See merge request isc-projects/bind9!10346

13 months agoRemove dead code in dns_message_sectiontotext
Mark Andrews [Sun, 30 Mar 2025 23:36:45 +0000 (10:36 +1100)] 
Remove dead code in dns_message_sectiontotext

Following the merge of !10302 this code to reset the result code
on ISC_R_NOMORE is no longer needed.

13 months agorem: usr: Drop readline alternatives in favor of libedit
Ondřej Surý [Mon, 31 Mar 2025 14:02:59 +0000 (14:02 +0000)] 
rem: usr: Drop readline alternatives in favor of libedit

Libedit is now ubiquitous and has a license compatible with
MPL 2.0. We are now dropping readline (GPL 3.0) and editline (obsolete) support
in favor of libedit.

Merge branch 'ondrej/cleanup-various-readline-libraries' into 'main'

See merge request isc-projects/bind9!10202

13 months agoDrop readline alternatives in favor of libedit
Ondřej Surý [Mon, 3 Mar 2025 11:32:14 +0000 (12:32 +0100)] 
Drop readline alternatives in favor of libedit

The libedit is now ubiquitous and has a licences compatible with
MPL 2.0.  Drop readline (GPL 3.0) and editline (obsolete) support
in favor of libedit.

13 months agochg: dev: Carefully check if the server name used for SNI is a hostname
Artem Boldariev [Mon, 31 Mar 2025 11:57:49 +0000 (11:57 +0000)] 
chg: dev: Carefully check if the server name used for SNI is a hostname

Previously the code would not check if the string intended to be used
for SNI is a hostname.

See also: !9923

Closes #5225

Merge branch '5225-dig-sni-fix' into 'main'

See merge request isc-projects/bind9!10254

13 months agoDispatch: carefully check if the server name for SNI is a hostname
Artem Boldariev [Tue, 18 Mar 2025 10:52:18 +0000 (12:52 +0200)] 
Dispatch: carefully check if the server name for SNI is a hostname

Previously the code would not check if the string intended to be used
for SNI is a hostname.

13 months agoDig: carefully check if the server name for SNI is a hostname
Artem Boldariev [Fri, 14 Mar 2025 19:35:39 +0000 (21:35 +0200)] 
Dig: carefully check if the server name for SNI is a hostname

Previously the code would not check if the string intended to be used
for SNI is a hostname.

13 months agoAdd isc_tls_valid_sni_hostname()
Artem Boldariev [Fri, 28 Mar 2025 07:20:16 +0000 (09:20 +0200)] 
Add isc_tls_valid_sni_hostname()

Add a function that checks if a 'hostname' is not a valid IPv4 or IPv6
address. Returns 'true' if the hostname is likely a domain name, and
'false' if it represents an IP address.

13 months agofix: test: fix out-of-tree mem_test
Colin Vidal [Fri, 28 Mar 2025 14:51:59 +0000 (14:51 +0000)] 
fix: test: fix out-of-tree mem_test

Previously changed mem_test (!10320) introduces a test which checks for
the value of `__FILE__`, which is different if the build is done
out-of-tree or not, even though this is not relevant for the test (only
the base filename is). This result in a broken test for out-of-tree
builds. Fix this by changing the way the "grep" is done in the test,
ignoring the optional path prefix in the filename.

Merge branch 'colin-fix-outoftree-memtest' into 'main'

See merge request isc-projects/bind9!10343

13 months agofix out-of-tree mem_test
Colin Vidal [Fri, 28 Mar 2025 11:55:49 +0000 (12:55 +0100)] 
fix out-of-tree mem_test

Previously changed mem_test (!10320) introduces a test which checks for
the value of `__FILE__`, which is different if the build is done
out-of-tree or not, even though this is not relevant for the test (only
the base filename is). This result in a broken test for out-of-tree
builds. Fix this by changing the way the "grep" is done in the test,
ignoring the optional path prefix in the filename.

13 months agofix: nil: Fix out-of-tree test
Evan Hunt [Fri, 28 Mar 2025 04:03:42 +0000 (04:03 +0000)] 
fix: nil: Fix out-of-tree test

A recent change to the dnssec system test depended on a file
that is only in the source tree, not in the build tree, and was
therefore not available in out-of-tree builds.

Merge branch 'each-fix-dnssec-oot' into 'main'

See merge request isc-projects/bind9!10342

13 months agoFix out-of-tree test
Evan Hunt [Fri, 28 Mar 2025 02:59:53 +0000 (19:59 -0700)] 
Fix out-of-tree test

A recent change to the dnssec system test depended on a file
that is only in the source tree, not in the build tree, and was
therefore not available in out-of-tree builds.

13 months agorem: pkg: Implement the systemd notification protocol manually to remove dependency...
Aydın Mercan [Thu, 27 Mar 2025 19:54:49 +0000 (19:54 +0000)] 
rem: pkg: Implement the systemd notification protocol manually to remove dependency on libsystemd.

Merge branch 'aydin/standalone-notification' into 'main'

See merge request isc-projects/bind9!10263

13 months agoimplement the systemd notification protocol manually, drop libsystemd
Aydın Mercan [Sun, 16 Mar 2025 16:54:18 +0000 (19:54 +0300)] 
implement the systemd notification protocol manually, drop libsystemd

libsystemd, despite being useful, adds a huge surface area for just
using the sd_notify API. libsystemd's surface has been exploited in the
past [1].

Implement the systemd notification protocol by hand since it is just
sending newline-delimited datagrams to a UNIX socket. The code shouldn't
need more attention in the future since the notification protocol is
covered under systemd's stability promise [2].

We don't need to support VSOCK-backed service notifications since they
are only intended for virtual machine inits.

[1]: https://www.openwall.com/lists/oss-security/2024/03/29/4
[2]: https://systemd.io/PORTABILITY_AND_STABILITY/

13 months agofix: dev: copy __FILE__ when allocating memory
Colin Vidal [Thu, 27 Mar 2025 12:15:24 +0000 (12:15 +0000)] 
fix: dev: copy __FILE__ when allocating memory

When allocating memory under -m trace|record, the __FILE__ pointer is
stored, so it can be printed out later in order to figure out in which
file an allocation leaked. (among others, like the line number).

However named crashes when called with -m record and using a plugin
leaking memory. The reason is that plugins are unloaded earlier than
when the leaked allocations are dumped (obviously, as it's done as late
as possible). In such circumstances, `__FILE__` is dangling because the
dynamically loaded library (the plugin) is not in memory anymore.

Fix the crash by systematically copying the `__FILE__` string
instead of copying the pointer. Of course, this make each allocation to
consume a bit more memory (and longer, as it needs to calculate the
length of `__FILE__`) but this occurs only under -m trace|record debugging
flags.

Merge branch 'colin-memdump-plugins' into 'main'

See merge request isc-projects/bind9!10320

13 months agocopy __FILE__ when allocating memory
Colin Vidal [Tue, 25 Mar 2025 13:35:49 +0000 (14:35 +0100)] 
copy __FILE__ when allocating memory

When allocating memory under -m trace|record, the __FILE__ pointer is
stored, so it can be printed out later in order to figure out in which
file an allocation leaked. (among others, like the line number).

However named crashes when called with -m record and using a plugin
leaking memory. The reason is that plugins are unloaded earlier than
when the leaked allocations are dumped (obviously, as it's done as late
as possible). In such circumstances, __FILE__ is dangling because the
dynamically loaded library (the plugin) is not in memory anymore.

Fix the crash by systematically copying the __FILE__ string
instead of copying the pointer. Of course, this make each allocation to
consume a bit more memory (and longer, as it needs to calculate the
length of __FILE__) but this occurs only under -m trace|record debugging
flags.

In term of unit test, because grepping in C is not fun, and because the
whole "syntax" of the dump output is tested in other tests, this simply
search for a substring in the whole buffer to make sure the expected
allocations are found.

13 months agonew: usr: Add an rndc command to reset some statistics counters
Arаm Sаrgsyаn [Thu, 27 Mar 2025 09:35:14 +0000 (09:35 +0000)] 
new: usr: Add an rndc command to reset some statistics counters

The new ``reset-stats`` command for ``rndc`` allows some statistics
counters to be reset during runtime. At the moment only two "high-water"
counters are supported, so the ability to reset them after the
initial peaks during the server's "warm-up" phase may be useful for
some operators.

Closes #5251

Merge branch '5251-feature-rndc-reset-high-water-statistics' into 'main'

See merge request isc-projects/bind9!10318

13 months agoDocument rndc reset-stats
Aram Sargsyan [Tue, 25 Mar 2025 10:50:08 +0000 (10:50 +0000)] 
Document rndc reset-stats

Add documentation for 'rndc reset-stats'.

13 months agoTest rndc reset-stats counter-name
Aram Sargsyan [Tue, 25 Mar 2025 10:49:03 +0000 (10:49 +0000)] 
Test rndc reset-stats counter-name

A a check to test if 'rndc reset-stats' works as expected.

13 months agoImplement rndc reset-stats counter-name
Aram Sargsyan [Tue, 25 Mar 2025 10:44:20 +0000 (10:44 +0000)] 
Implement rndc reset-stats counter-name

This new rndc option allows to reset some statistics counters during
runtime. At this moment only the high-water type counters are supported
as such an ability to reset them after the initial peaks during the
server's "warm-up" phase can be useful for some operators.

13 months agofix: dev: Refactor to use list-like macro for message sections
Alessio Podda [Thu, 27 Mar 2025 03:23:47 +0000 (03:23 +0000)] 
fix: dev: Refactor to use list-like macro for message sections

In the code base it is very common to iterate over all names in a message
section and all rdatasets for each name, but various idioms are used for
iteration.

This commit standardizes them as much as possible to a single idiom,
through the macro `MSG_SECTION_FOREACH`, similar to the existing
`ISC_LIST_FOREACH`.

Merge branch 'alessio/message-namelist-refactor' into 'main'

See merge request isc-projects/bind9!10302

13 months agoRefactor to use list-like macro for message sections
alessio [Wed, 19 Mar 2025 19:29:17 +0000 (20:29 +0100)] 
Refactor to use list-like macro for message sections

In the code base it is very common to iterate over all names in a message
section and all rdatasets for each name, but various idioms are used for
iteration.

This commit standardizes them as much as possible to a single idiom,
using the macro MSG_SECTION_FOREACH, similar to the existing
ISC_LIST_FOREACH.

13 months agochg: nil: Move application of dns64 to a separate function
Evan Hunt [Thu, 27 Mar 2025 00:06:22 +0000 (00:06 +0000)] 
chg: nil: Move application of dns64 to a separate function

The code in `query_dns64()` that applies the dns64 prefixes to an A rdataset has been moved into the `dns_dns64` module, and `dns_dns64_destroy()` now unlinks the dns64 object from its containing list.

With these changes, we no longer need the list-manipulation API calls, `dns_dns64_next()` and `dns_dns64_unlink()`.

Merge branch 'each-simplify-dns64' into 'main'

See merge request isc-projects/bind9!10324

13 months agomove application of dns64 to a separate function
Evan Hunt [Sun, 23 Mar 2025 20:45:04 +0000 (13:45 -0700)] 
move application of dns64 to a separate function

the code in query_dns64() that applies the dns64 prefixes to
an A rdataset has been moved into the dns_dns64 module, and
dns_dns64_destroy() now unlinks the dns64 object from its
containing list. with these changes, we no longer need the
list-manipulation API calls dns_dns64_next() and
dns_dns64_unlink().

13 months agodns_message_gettemp*() resets objects
Evan Hunt [Sun, 23 Mar 2025 20:45:04 +0000 (13:45 -0700)] 
dns_message_gettemp*() resets objects

callers of dns_message_gettemprdata() and dns_message_getrdatalist()
initialize the objects after retrieving them. this is no longer
necessary.

13 months agochg: usr: Improve the LRU cache-expiration mechanism
Evan Hunt [Wed, 26 Mar 2025 23:21:15 +0000 (23:21 +0000)] 
chg: usr: Improve the LRU cache-expiration mechanism

Improve the LRU cache-expiration mechanism to a SIEVE-LRU based mechanism that triggers when the cache is close to the `max-cache-size` limit.  This improves the recursive server performance.

Merge branch 'ondrej/sieve' into 'main'

See merge request isc-projects/bind9!10153

13 months agoAdd isc_sieve unit implementing SIEVE-LRU algorithm
Ondřej Surý [Sun, 23 Feb 2025 13:36:35 +0000 (14:36 +0100)] 
Add isc_sieve unit implementing SIEVE-LRU algorithm

This is the core implementation of the SIEVE algorithm described in the
following paper:

  Zhang, Yazhuo, Juncheng Yang, Yao Yue, Ymir Vigfusson, and K V
  Rashmi. “SIEVE Is Simpler than LRU: An Efficient Turn-Key Eviction
  Algorithm for Web Caches,” n.d.. available online from
  https://junchengyang.com/publication/nsdi24-SIEVE.pdf

13 months agonew: test: IPv6 case to isc_netaddr_masktoprefixlen tests
Colin Vidal [Wed, 26 Mar 2025 13:30:01 +0000 (13:30 +0000)] 
new: test: IPv6 case to isc_netaddr_masktoprefixlen tests

Unit test for isc_netaddr_masktoprefixlen were missing IPv6 mask cases.
Add those and few other IPv4 cases. Also, the test is refactored in
order to make it easy to add new cases.

Merge branch 'colin-netaddrmasktest' into 'main'

See merge request isc-projects/bind9!10328

13 months agoIPv6 case to isc_netaddr_masktoprefixlen tests
Colin Vidal [Wed, 26 Mar 2025 09:44:11 +0000 (10:44 +0100)] 
IPv6 case to isc_netaddr_masktoprefixlen tests

Unit test for isc_netaddr_masktoprefixlen were missing IPv6 mask cases.
Add those and few other IPv4 cases. Also, the test is refactored in
order to make it easy to add new cases.

13 months agofix: test: Silence warning initialising compressed
Mark Andrews [Wed, 26 Mar 2025 12:42:53 +0000 (12:42 +0000)] 
fix: test: Silence warning initialising compressed

The string literal initialalising compressed was too big for the
array as it has an unwanted NUL terminator.  This is allowed for
in C for historical reasons but produces a warning with some
compilers.  Adjust the declaration to include the NUL and adjust
the users to pass in an adjusted size which excludes the NUL rather
than sizeof(compressed).

Closes #5258

Merge branch '5258-avoid-warning-initialising-compresss' into 'main'

See merge request isc-projects/bind9!10326

13 months agoSilence warning when initialising compress
Mark Andrews [Wed, 26 Mar 2025 03:31:25 +0000 (14:31 +1100)] 
Silence warning when initialising compress

The string literal initialalising compressed was too big for the
array as it has an unwanted NUL terminator.  This is allowed for
in C for historical reasons but produces a warning with some
compilers.  Adjust the declaration to include the NUL and adjust
the users to pass in an adjusted size which excludes the NUL rather
than sizeof(compressed).

13 months agofix: ci: cross-version-config-tests should allow_failure due to !10262
Michal Nowak [Wed, 26 Mar 2025 10:18:38 +0000 (10:18 +0000)] 
fix: ci: cross-version-config-tests should allow_failure due to !10262

Merge branch 'mnowak/cross-version-config-tests-allow_failure' into 'main'

See merge request isc-projects/bind9!10327

13 months agocross-version-config-tests should allow_failure due to !10262
Michal Nowak [Wed, 26 Mar 2025 09:45:13 +0000 (10:45 +0100)] 
cross-version-config-tests should allow_failure due to !10262

13 months agofix: nil: Fix broken dnssec test
Evan Hunt [Wed, 26 Mar 2025 01:37:49 +0000 (01:37 +0000)] 
fix: nil: Fix broken dnssec test

When !10262 was rebased prior to merging, there was a new
use of dnssec-keygen -n in the dnssec system test that had
not been removed in the branch, causing a test failure.
This has been fixed.

Merge branch 'each-merge-error' into 'main'

See merge request isc-projects/bind9!10325

13 months agofix broken dnssec test
Evan Hunt [Wed, 26 Mar 2025 01:01:24 +0000 (18:01 -0700)] 
fix broken dnssec test

When !10262 was rebased prior to merging, there was a
use of dnssec-keygen -n in the dnssec system test that had
not been removed, causing a test failure. This has been fixed.

13 months agorem: usr: Remove unnecessary options in dnssec-keygen and dnssec-keyfromlabel
Evan Hunt [Tue, 25 Mar 2025 23:49:11 +0000 (23:49 +0000)] 
rem: usr: Remove unnecessary options in dnssec-keygen and dnssec-keyfromlabel

The `dnssec-keygen` utility (and `dnssec-keyfromlabel`, which was derived from it) had several options dating to the time when keys in DNS were still experimental and not fully specified, and when `dnssec-keygen` had the additional function of generating TSIG keys, which are now generated by `tsig-keygen`. These options are no longer necessary in the modern DNSSEC environment, and have been removed.

The removed options are:
- `-t` (key type), which formerly set flags to disable confidentiality or authentication support in a key; these are no longer used.
- `-n` (name type), which is now always set to "ZONE" for DNSKEY and "HOST" for KEY.
- `-p` (protocol), which is now always set to 3 (DNSSEC); no other value has ever been defined.
- `-s` (signatory field), which was never fully defined.
- `-d` (digest bits), which is meaningful only for TSIG keys.

Merge branch 'each-remove-keygen-options' into 'main'

See merge request isc-projects/bind9!10262

13 months agoRemove -d option from dnssec-keygen
Evan Hunt [Sat, 15 Mar 2025 19:07:42 +0000 (12:07 -0700)] 
Remove -d option from dnssec-keygen

The -d (digestbits) option was only applicable to HMAC keys, which
are no longer created by dnssec-keygen. The option can be removed.

13 months agoRemove -s option from dnssec-keygen
Evan Hunt [Sat, 15 Mar 2025 05:50:44 +0000 (22:50 -0700)] 
Remove -s option from dnssec-keygen

The -s option (previously incorrectly documented as "strength")
actually set the signatory flags for KEY fields, which are unused.
The option is not needed.

13 months agoRemove -p option from dnssec-keygen/keyfromlabel
Evan Hunt [Sat, 15 Mar 2025 05:41:12 +0000 (22:41 -0700)] 
Remove -p option from dnssec-keygen/keyfromlabel

The -p (protocol) option for all keys defaults to 3 (DNSSEC).
There is currently no practical reason to use any other value;
we can simplify things by removing the option.

13 months agoRemove -n option from dnssec-keygen/keyfromlabel
Evan Hunt [Fri, 14 Mar 2025 02:57:24 +0000 (19:57 -0700)] 
Remove -n option from dnssec-keygen/keyfromlabel

The -n (nametype) option for keys defaults to ZONE for DNSKEY
type keys, and HOST for KEY type keys. There is currently no
practical reason to use any other name type; we can simplify
things by removing the option.

13 months agoRemove -t option from dnssec-keygen/keyfromlabel
Evan Hunt [Thu, 13 Mar 2025 19:20:55 +0000 (12:20 -0700)] 
Remove -t option from dnssec-keygen/keyfromlabel

The key type flag (indicating whether a key is valid for
authentication, confidentiality, or both) is essentially
unused. By default, all DNSKEY and KEY records are valid
for both uses. Non-authenticating DNSKEY records are undefined
and meaningless, and validity checks for flags in KEY records
are sporadic at best.

We can simplify the parameters to dnssec-keygen by removing
the -t option completely.

13 months agofix: test: Limit X-Bloat header size to 100KB
Michal Nowak [Tue, 25 Mar 2025 15:52:47 +0000 (15:52 +0000)] 
fix: test: Limit X-Bloat header size to 100KB

Otherwise curl 8.13 rejects the line with:

    I:Check HTTP/1.1 keep-alive with truncated stream (21)
    curl: option --header: error encountered when reading a file
    curl: try 'curl --help' or 'curl --manual' for more information

Also, see https://github.com/curl/curl/pull/16572.

Closes #5249

Merge branch '5249-statschannel-limit-http-header-size' into 'main'

See merge request isc-projects/bind9!10319

13 months agoLimit X-Bloat header size to 100KB
Michal Nowak [Tue, 25 Mar 2025 13:14:52 +0000 (14:14 +0100)] 
Limit X-Bloat header size to 100KB

Otherwise curl 8.13 rejects the line with:

    I:Check HTTP/1.1 keep-alive with truncated stream (21)
    curl: option --header: error encountered when reading a file
    curl: try 'curl --help' or 'curl --manual' for more information

Also, see https://github.com/curl/curl/pull/16572.

13 months agorem: dev: Remove lock upgrading from the hot path in the QP cache
Ondřej Surý [Tue, 25 Mar 2025 09:58:09 +0000 (09:58 +0000)] 
rem: dev: Remove lock upgrading from the hot path in the QP cache

In QPcache, there were two places that tried to upgrade the lock.  In `clean_stale_header()`, the code would try to upgrade the lock and clean up the header, and in `qpzonode_release()`, the tree lock would be optionally upgraded, so we can clean up the node directly if empty. These
optimizations are not needed and they have no effect on the performance.

Merge branch 'ondrej/no-lock-upgrade-in-check_stale_headers' into 'main'

See merge request isc-projects/bind9!10305

13 months agoRemove lock upgrading from the hot path in the cache
Ondřej Surý [Fri, 21 Mar 2025 02:06:16 +0000 (03:06 +0100)] 
Remove lock upgrading from the hot path in the cache

In QPcache, there were two places that tried to upgrade the lock.  In
clean_stale_header(), the code would try to upgrade the lock and cleanup
the header, and in qpzonode_release(), the tree lock would be optionally
upgraded, so we can cleanup the node directly if empty.  These
optimizations are not needed and they have no effect on the performance.

13 months agofix: dev: Fix invalid cache-line padding for qpcache buckets
Ondřej Surý [Tue, 25 Mar 2025 09:56:49 +0000 (09:56 +0000)] 
fix: dev: Fix invalid cache-line padding for qpcache buckets

The isc_queue_t was missing in the calculation of the required
padding size inside the qpcache bucket structure.

Merge branch 'ondrej/qpcache-fix-invalid-padding' into 'main'

See merge request isc-projects/bind9!10306

13 months agoFix invalid cache-line padding for qpcache buckets
Ondřej Surý [Fri, 21 Mar 2025 08:29:17 +0000 (09:29 +0100)] 
Fix invalid cache-line padding for qpcache buckets

The isc_queue_t was missing in the calculation of the required
padding size inside the qpcache bucket structure.

13 months agofix: dev: Fix a bug in the ns_query's get_key() function
Arаm Sаrgsyаn [Tue, 25 Mar 2025 09:25:15 +0000 (09:25 +0000)] 
fix: dev: Fix a bug in the ns_query's get_key() function

After a refactoring in 2e6107008dae09d32e3d34fb5423b3d78c4ff651 the
dst_key_free() call is invalid and can cause an assertion. Remove the
dst_key_free() call.

Merge branch 'aram/fix-ns_query-get_key-bug' into 'main'

See merge request isc-projects/bind9!10311

13 months agoDon't call dst_key_free(keyp) on an invalid 'keyp'
Aram Sargsyan [Mon, 24 Mar 2025 16:34:00 +0000 (16:34 +0000)] 
Don't call dst_key_free(keyp) on an invalid 'keyp'

After a refactoring in 2e6107008dae09d32e3d34fb5423b3d78c4ff651 the
dst_key_free() call is invalid and can cause an assertion. Remove the
dst_key_free() call.

13 months agofix: usr: Don't enforce NOAUTH/NOCONF flags in DNSKEYs
Evan Hunt [Tue, 25 Mar 2025 06:39:07 +0000 (06:39 +0000)] 
fix: usr: Don't enforce NOAUTH/NOCONF flags in DNSKEYs

All DNSKEY keys are able to authenticate. The `DNS_KEYTYPE_NOAUTH` (and `DNS_KEYTYPE_NOCONF`) flags were defined for the KEY rdata type, and are not applicable to DNSKEY. Previously, however, because the DNSKEY implementation was built on top of KEY, the `_NOAUTH` flag prevented authentication in DNSKEYs as well. This has been corrected.

Closes #5240

Merge branch '5240-ignore-noauth-flag' into 'main'

See merge request isc-projects/bind9!10261

13 months agoDNS_KEYTYPE_NOKEY is only applicable to KEY
Mark Andrews [Tue, 25 Mar 2025 03:15:37 +0000 (14:15 +1100)] 
DNS_KEYTYPE_NOKEY is only applicable to KEY

13 months agoDon't check DNS_KEYFLAG_NOAUTH
Evan Hunt [Fri, 14 Mar 2025 00:44:49 +0000 (17:44 -0700)] 
Don't check DNS_KEYFLAG_NOAUTH

All DNSKEY keys are able to authenticate. The DNS_KEYTYPE_NOAUTH
(and DNS_KEYTYPE_NOCONF) flags were defined for the KEY rdata type,
and are not applicable to DNSKEY.

Previously, because the DNSKEY implementation was built on top of
KEY, the NOAUTH flag prevented authentication in DNSKEYs as well.
This has been corrected.

13 months agoTidy up keyvalue.h definitions
Evan Hunt [Thu, 13 Mar 2025 19:20:40 +0000 (12:20 -0700)] 
Tidy up keyvalue.h definitions

Use enums for DNS_KEYFLAG_, DNS_KEYTYPE_, DNS_KEYOWNER_, DNS_KEYALG_,
and DNS_KEYPROTO_ values.

Remove values that are never used.

Eliminate the obsolete DNS_KEYFLAG_SIGNATORYMASK. Instead, add three
more RESERVED bits for the key flag values that it covered but which
were never used.

13 months agorem: dev: Remove dns_qpmulti_lockedread declaration
Evan Hunt [Tue, 25 Mar 2025 05:58:47 +0000 (05:58 +0000)] 
rem: dev: Remove dns_qpmulti_lockedread declaration

This function was removed in 6217e434b57bd5d60ed69f792ae9a1a65a008f57 but not from the header file.

Merge branch 'matthijs-remove-unused-qpmulti-lockedread' into 'main'

See merge request isc-projects/bind9!10308

13 months agoRemove dns_qpmulti_lockedread declaration
Matthijs Mekking [Fri, 21 Mar 2025 09:20:07 +0000 (10:20 +0100)] 
Remove dns_qpmulti_lockedread declaration

This function was removed in 6217e434b57bd5d60ed69f792ae9a1a65a008f57
but not from the header file.

13 months agochg: test: Use isctest.asyncserver in the "upforwd" test 5256-add-code-to-allow-all-key-flags-to-be-set-for-testing 10313/head
Michał Kępień [Tue, 25 Mar 2025 04:06:01 +0000 (04:06 +0000)] 
chg: test: Use isctest.asyncserver in the "upforwd" test

Replace the custom DNS server used in the "upforwd" system test with new
code based on the isctest.asyncserver module.  The ans4 server currently
used in that test is a copy of bin/tests/system/ans.pl modified to
receive queries over UDP and TCP without ever responding to any of them.

Closes #5012

Merge branch '5012-upforwd-asyncserver' into 'main'

See merge request isc-projects/bind9!10283

13 months agoUse isctest.asyncserver in the "upforwd" test
Michał Kępień [Tue, 25 Mar 2025 04:01:34 +0000 (05:01 +0100)] 
Use isctest.asyncserver in the "upforwd" test

Replace the custom DNS server used in the "upforwd" system test with new
code based on the isctest.asyncserver module.  The ans4 server currently
used in that test is a copy of bin/tests/system/ans.pl modified to
receive queries over UDP and TCP without ever responding to any of them.

13 months agoAdd a response handler for ignoring all queries
Michał Kępień [Tue, 25 Mar 2025 04:01:34 +0000 (05:01 +0100)] 
Add a response handler for ignoring all queries

Dropping all incoming queries is a typical use case for a custom server
used in BIND 9 system tests.  Add a response handler implementing that
behavior so that it can be reused.

13 months agoMake response handlers global by default
Michał Kępień [Tue, 25 Mar 2025 04:01:34 +0000 (05:01 +0100)] 
Make response handlers global by default

Instead of requiring each class inheriting from ResponseHandler to
define its match() method, make the latter non-abstract and default to
returning True for all queries.  This will reduce the amount of
boilerplate code in custom servers.

13 months agochg: usr: When forwarding, query with CD=0 first
Evan Hunt [Tue, 25 Mar 2025 01:11:07 +0000 (01:11 +0000)] 
chg: usr: When forwarding, query with CD=0 first

Previously, when queries were forwarded to a remote resolver, the CD (checking disabled) bit was used, which could lead to bogus data being retrieved that might have been corrected if validation had been permitted. The CD bit is now only used as a fallback if an initial query without CD fails. See #5132.

Merge branch '5132-cd-retry' into 'main'

See merge request isc-projects/bind9!10024

13 months agowhen forwarding, try with CD=0 first
Evan Hunt [Sat, 25 Jan 2025 02:00:14 +0000 (18:00 -0800)] 
when forwarding, try with CD=0 first

when sending a query to a forwarder for a name within a secure domain,
the first query is now sent with CD=0. when the forwarder itself
is validating, this will give it a chance to detect bogus data and
replace it with valid data before answering. this reduces our chances
of being stuck with data that can't be validated.

if the forwarder returns SERVFAIL to the initial query, the query
will be repeated with CD=1, to allow for the possibility that the
forwarder's validator is faulty or that the bogus answer is covered
by an NTA.

note: previously, CD=1 was only sent when the query name was in a
secure domain. today, validating servers have a trust anchor at the
root by default, so virtually all queries are in a secure domain.
therefore, the code has been simplified.  as long as validation is
enabled, any forward query that receives a SERVFAIL response will be
retried with CD=1.

13 months agonew: usr: Add support for EDNS ZONEVERSION option
Mark Andrews [Mon, 24 Mar 2025 23:09:39 +0000 (23:09 +0000)] 
new: usr: Add support for EDNS ZONEVERSION option

`dig` and `named` can now make requests with an EDNS `ZONEVERSION` option present.

Two new `named.conf` options have been added: `request-zoneversion` and
`provide-zoneversion`.  `request-zoneversion` is `off` by default. `provide-zoneversion`
is `on` by default.

Closes #4767

Merge branch '4767-implement-zoneversion' into 'main'

See merge request isc-projects/bind9!9103

13 months agoReturn raw zone serial for inline zones
Mark Andrews [Fri, 4 Oct 2024 01:55:58 +0000 (11:55 +1000)] 
Return raw zone serial for inline zones

13 months agoDisable ZONEVERSION for built-in chaos and empty zones
Mark Andrews [Thu, 29 Aug 2024 03:15:29 +0000 (13:15 +1000)] 
Disable ZONEVERSION for built-in chaos and empty zones

13 months agoCheck that 'provide-zoneversion no;' works
Mark Andrews [Thu, 29 Aug 2024 00:09:34 +0000 (10:09 +1000)] 
Check that 'provide-zoneversion no;' works

13 months agoAdd an option to disable ZONEVERSION responses
Mark Andrews [Wed, 28 Aug 2024 23:43:21 +0000 (09:43 +1000)] 
Add an option to disable ZONEVERSION responses

The option provide-zoneversion controls whether ZONEVERSION is
returned.  This applies to primary, secondary and mirror zones.

13 months agoCheck that received ZONEVERSION is logged
Mark Andrews [Mon, 17 Jun 2024 01:38:19 +0000 (11:38 +1000)] 
Check that received ZONEVERSION is logged

13 months agoAdd option request-zoneversion
Mark Andrews [Fri, 14 Jun 2024 01:23:53 +0000 (11:23 +1000)] 
Add option request-zoneversion

This can be set at the option, view and server levels and causes
named to add an EDNS ZONEVERSION option to requests.  Replies are
logged to the 'zoneversion' category.

13 months agoAdd system tests for EDNS zoneversion
Mark Andrews [Thu, 13 Jun 2024 00:32:49 +0000 (10:32 +1000)] 
Add system tests for EDNS zoneversion