]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoUpdate clang to version 15
Michal Nowak [Thu, 8 Sep 2022 18:47:09 +0000 (20:47 +0200)] 
Update clang to version 15

3 years agoMerge branch '3702-man-page-dig-1-typo-in-options' into 'main'
Mark Andrews [Mon, 28 Nov 2022 22:43:01 +0000 (22:43 +0000)] 
Merge branch '3702-man-page-dig-1-typo-in-options' into 'main'

Resolve "man page dig(1): Typo in options"

Closes #3702

See merge request isc-projects/bind9!7131

3 years agoFix typo in dig man page '+qr' should be '+noqr'
Mark Andrews [Mon, 28 Nov 2022 21:47:18 +0000 (08:47 +1100)] 
Fix typo in dig man page '+qr' should be '+noqr'

Reported by Fabian P. Schmidt

3 years agoMerge branch 'fanf-gen-faster' into 'main'
Tony Finch [Mon, 28 Nov 2022 10:03:44 +0000 (10:03 +0000)] 
Merge branch 'fanf-gen-faster' into 'main'

Speed up lib/dns/gen.c

See merge request isc-projects/bind9!7121

3 years agoSpeed up lib/dns/gen.c
Tony Finch [Thu, 24 Nov 2022 17:38:16 +0000 (17:38 +0000)] 
Speed up lib/dns/gen.c

The `gen` program was causing a lengthy single-threaded pause in
the BIND build. When generating RDATATYPE_FROMTEXT_SW(), `gen` hit
the inner loop of `find_typename()` over 1.2 billion times. This
change avoids long deeply-nested loops, so `gen` now runs in less
than 10ms, about 300x faster.

No changes to the output.

3 years agoMerge branch '3693-crash-when-restarting-server-with-active-statschannel-connection...
Ondřej Surý [Fri, 25 Nov 2022 16:15:08 +0000 (16:15 +0000)] 
Merge branch '3693-crash-when-restarting-server-with-active-statschannel-connection' into 'main'

Be more resilient when destroying the httpd requests

Closes #3693

See merge request isc-projects/bind9!7120

3 years agoAdd CHANGES and release note for [GL #3693]
Ondřej Surý [Wed, 23 Nov 2022 13:23:40 +0000 (14:23 +0100)] 
Add CHANGES and release note for [GL #3693]

3 years agoBe more resilient when destroying the httpd requests
Ondřej Surý [Thu, 24 Nov 2022 14:03:23 +0000 (15:03 +0100)] 
Be more resilient when destroying the httpd requests

Don't restart reading in the send callback after the httpdmgr has been
shut down, and call httpd_request(..., ISC_R_SHUTDOWN, ...) when
shutting down the httpdmgr to reduce code duplication.

3 years agoMerge branch '3696-make-the-read-and-send-callbacks-more-synchronous' into 'main'
Ondřej Surý [Fri, 25 Nov 2022 15:19:51 +0000 (15:19 +0000)] 
Merge branch '3696-make-the-read-and-send-callbacks-more-synchronous' into 'main'

Make the netmgr read callback to be asynchronous only when needed

Closes #3696

See merge request isc-projects/bind9!7119

3 years agoMake the netmgr send callback to be asynchronous only when needed
Ondřej Surý [Thu, 24 Nov 2022 16:11:22 +0000 (17:11 +0100)] 
Make the netmgr send callback to be asynchronous only when needed

Previously, the send callback would be synchronous only on success.  Add
an option (similar to what other callbacks have) to decide whether we
need the asynchronous send callback on a higher level.

On a general level, we need the asynchronous callbacks to happen only
when we are invoking the callback from the public API.  If the path to
the callback went through the libuv callback or netmgr callback, we are
already on asynchronous path, and there's no need to make the call to
the callback asynchronous again.

For the send callback, this means we need the asynchronous path for
failure paths inside the isc_nm_send() (which calls isc__nm_udp_send(),
isc__nm_tcp_send(), etc...) - all other invocations of the send callback
could be synchronous, because those are called from the respective libuv
send callbacks.

3 years agoMake the netmgr read callback to be asynchronous only when needed
Ondřej Surý [Wed, 23 Nov 2022 13:03:23 +0000 (14:03 +0100)] 
Make the netmgr read callback to be asynchronous only when needed

Previously, the read callback would be synchronous only on success or
timeout.  Add an option (similar to what other callbacks have) to decide
whether we need the asynchronous read callback on a higher level.

On a general level, we need the asynchronous callbacks to happen only
when we are invoking the callback from the public API.  If the path to
the callback went through the libuv callback or netmgr callback, we are
already on asynchronous path, and there's no need to make the call to
the callback asynchronous again.

For the read callback, this means we need the asynchronous path for
failure paths inside the isc_nm_read() (which calls isc__nm_udp_read(),
isc__nm_tcp_read(), etc...) - all other invocations of the read callback
could be synchronous, because those are called from the respective libuv
or netmgr read callbacks.

3 years agoMerge branch 'fanf-deduplicate-time-units' into 'main'
Tony Finch [Fri, 25 Nov 2022 13:47:15 +0000 (13:47 +0000)] 
Merge branch 'fanf-deduplicate-time-units' into 'main'

Deduplicate time unit conversion factors

See merge request isc-projects/bind9!7033

3 years agoDeduplicate time unit conversion factors
Tony Finch [Fri, 4 Nov 2022 12:02:33 +0000 (12:02 +0000)] 
Deduplicate time unit conversion factors

The various factors like NS_PER_MS are now defined in a single place
and the names are no longer inconsistent. I chose the _PER_SEC names
rather than _PER_S because it is slightly more clear in isolation;
but the smaller units are always NS, US, and MS.

3 years agoMerge branch 'tkrizek/system-tests-start-stop-helpers' into 'main'
Tom Krizek [Fri, 25 Nov 2022 11:55:55 +0000 (11:55 +0000)] 
Merge branch 'tkrizek/system-tests-start-stop-helpers' into 'main'

Simplify start/stop helper func in system tests

See merge request isc-projects/bind9!7123

3 years agoSimplify start/stop helper func in system tests
Tom Krizek [Thu, 24 Nov 2022 16:42:43 +0000 (17:42 +0100)] 
Simplify start/stop helper func in system tests

The system test should never attempt to start or stop any other server
than those that belong to that system test. Therefore, it is not
necessary to specify the system test name in function calls.

Additionally, this makes it possible to run the test inside a
differently named directory, as its name is automatically detected with
the $SYSTESTDIR variable. This enables running the system tests inside a
temporary directory.

Direct use of stop.pl was replaced with a more systematic approach to
use stop_servers helper function.

3 years agoMerge branch '3638-tls-settings-for-primaries-not-saved-for-catalog-zone-entries...
Mark Andrews [Thu, 24 Nov 2022 22:52:53 +0000 (22:52 +0000)] 
Merge branch '3638-tls-settings-for-primaries-not-saved-for-catalog-zone-entries' into 'main'

Resolve "TLS settings for primaries not saved for catalog zone entries."

Closes #3638

See merge request isc-projects/bind9!7010

3 years agoAdd release note for [GL #3638]
Mark Andrews [Fri, 18 Nov 2022 05:57:47 +0000 (16:57 +1100)] 
Add release note for [GL #3638]

3 years agoAdd CHANGES note for [GL #3638]
Mark Andrews [Fri, 18 Nov 2022 05:54:34 +0000 (16:54 +1100)] 
Add CHANGES note for [GL #3638]

3 years agoAdd catalog zone that requires TLS for all transfers
Mark Andrews [Fri, 18 Nov 2022 04:44:27 +0000 (15:44 +1100)] 
Add catalog zone that requires TLS for all transfers

Both the catalog zone (catalog-tls.example) the zone managed using
the catalog zone (tls1.example) require TLS and a TSIG for zone
transfers.

3 years agoFix log messages incorrectly logged at error
Mark Andrews [Thu, 17 Nov 2022 06:33:15 +0000 (17:33 +1100)] 
Fix log messages incorrectly logged at error

The log message "got TLS configuration for zone transfer" is not
an error, setting to info.

3 years agoTLS setting of primaries with catalog zones where being ignored
Mark Andrews [Wed, 2 Nov 2022 06:55:52 +0000 (06:55 +0000)] 
TLS setting of primaries with catalog zones where being ignored

Extract the tlss values if present from the ipkeylist entry and add
the resulting tls setting to the constructed configuration for the
primary.

When comparing catalog zone entries for reuse also check the
masters.tlss values for equality.

3 years agoMerge branch '3680-remove-nupdates' into 'main'
Evan Hunt [Thu, 24 Nov 2022 00:01:56 +0000 (00:01 +0000)] 
Merge branch '3680-remove-nupdates' into 'main'

remove unused 'nupdates' field from client

Closes #3680

See merge request isc-projects/bind9!7098

3 years agoremove unused 'nupdates' field from client
Evan Hunt [Mon, 21 Nov 2022 06:02:38 +0000 (22:02 -0800)] 
remove unused 'nupdates' field from client

the 'nupdates' field was originally used to track whether a client
was ready to shut down, along with other similar counters nreads,
nrecvs, naccepts and nsends. this is now tracked differently, but
nupdates was overlooked when the other counters were removed.

3 years agoMerge branch '3310-build-contrib-in-ci' into 'main'
Michal Nowak [Wed, 23 Nov 2022 17:14:00 +0000 (17:14 +0000)] 
Merge branch '3310-build-contrib-in-ci' into 'main'

Build contrib in CI & associated fixes

Closes #3310

See merge request isc-projects/bind9!6363

3 years agoHelp gcovr find contrib files
Michal Nowak [Mon, 30 May 2022 19:23:47 +0000 (21:23 +0200)] 
Help gcovr find contrib files

3 years agoAdd install target for Perl DLZ module
Michal Nowak [Mon, 30 May 2022 18:55:30 +0000 (20:55 +0200)] 
Add install target for Perl DLZ module

Perl DLZ module Makefile lacked "install" target, add it as we want to
test DLZ module installation in the CI.

3 years agoDisable compound-token-split-by-macro warning with Clang
Michal Nowak [Mon, 30 May 2022 16:53:09 +0000 (18:53 +0200)] 
Disable compound-token-split-by-macro warning with Clang

Perl DLZ module compilation with Clang produces the following warning:

    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/zaphod32_hash.h:150:5: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
        ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/zaphod32_hash.h:80:38: note: expanded from macro 'ZAPHOD32_SCRAMBLE32'
    #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
                                         ^~~~~~~~~~
    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/perl.h:666:29: note: expanded from macro 'STMT_START'
    #   define STMT_START   (void)( /* gcc supports "({ STATEMENTS; })" */
                                  ^
    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/zaphod32_hash.h:150:5: note: '{' token is here
        ZAPHOD32_SCRAMBLE32(state[0],0x9fade23b);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/lib/x86_64-linux-gnu/perl/5.32/CORE/zaphod32_hash.h:80:49: note: expanded from macro 'ZAPHOD32_SCRAMBLE32'
    #define ZAPHOD32_SCRAMBLE32(v,prime) STMT_START {  \
                                                    ^

3 years agoBuild contrib dlz modules in the CI
Michal Nowak [Mon, 30 May 2022 14:20:53 +0000 (16:20 +0200)] 
Build contrib dlz modules in the CI

3 years agoLeverage CFLAGS from environment in contrib Makefiles
Michal Nowak [Mon, 30 May 2022 13:50:15 +0000 (15:50 +0200)] 
Leverage CFLAGS from environment in contrib Makefiles

3 years agoFix statement may fall through warnings in dlz_ldap_dynamic.c
Michal Nowak [Mon, 30 May 2022 13:49:34 +0000 (15:49 +0200)] 
Fix statement may fall through warnings in dlz_ldap_dynamic.c

    dlz_ldap_dynamic.c: In function ‘dlz_create’:
    dlz_ldap_dynamic.c:971:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
      971 |                 if (result != ISC_R_SUCCESS) {
          |                    ^
    dlz_ldap_dynamic.c:974:9: note: here
      974 |         case 11:
          |         ^~~~
    dlz_ldap_dynamic.c:976:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
      976 |                 if (result != ISC_R_SUCCESS) {
          |                    ^
    dlz_ldap_dynamic.c:979:9: note: here
      979 |         case 10:
          |         ^~~~
    dlz_ldap_dynamic.c:980:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
      980 |                 if (strlen(argv[9]) > 0) {
          |                    ^
    dlz_ldap_dynamic.c:987:9: note: here
      987 |         case 9:
          |         ^~~~

3 years agoFix compilation warnings in dlz_wildcard_dynamic.c
Michal Nowak [Mon, 30 May 2022 13:42:16 +0000 (15:42 +0200)] 
Fix compilation warnings in dlz_wildcard_dynamic.c

    dlz_wildcard_dynamic.c: In function ‘dlz_lookup’:
    dlz_wildcard_dynamic.c:227:14: warning: variable ‘origin’ set but not used [-Wunused-but-set-variable]
      227 |         bool origin = true;
          |              ^~~~~~
    dlz_wildcard_dynamic.c: In function ‘dlz_lookup’:
    dlz_wildcard_dynamic.c:252:28: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
      252 |                 cd->record = "@";
          |                            ^
    dlz_wildcard_dynamic.c: In function ‘dlz_authority’:
    dlz_wildcard_dynamic.c:328:22: warning: unused variable ‘origin’ [-Wunused-variable]
      328 |                 bool origin;
          |                      ^~~~~~
    dlz_wildcard_dynamic.c:312:25: warning: unused variable ‘name’ [-Wunused-variable]
      312 |         const char *p, *name = "@";
          |                         ^~~~
    dlz_wildcard_dynamic.c: In function ‘dlz_create’:
    dlz_wildcard_dynamic.c:441:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      441 |         for (i = 4; i < argc; i += 4) {
          |                       ^

3 years agoFix compilation warnings in dlz_sqlite3_dynamic.c
Michal Nowak [Mon, 30 May 2022 13:23:45 +0000 (15:23 +0200)] 
Fix compilation warnings in dlz_sqlite3_dynamic.c

    dlz_sqlite3_dynamic.c: In function ‘dlz_sqlite3_fetch_row’:
    dlz_sqlite3_dynamic.c:447:31: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
      447 |                 if (rs->pnRow > 0U && rs->curRow < rs->pnRow) {
          |                               ^
    dlz_sqlite3_dynamic.c:447:50: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
      447 |                 if (rs->pnRow > 0U && rs->curRow < rs->pnRow) {
          |                                                  ^

3 years agoFix warnings in dlz_mysqldyn_mod.c
Michal Nowak [Mon, 30 May 2022 12:36:49 +0000 (14:36 +0200)] 
Fix warnings in dlz_mysqldyn_mod.c

    dlz_mysqldyn_mod.c: In function ‘dlz_findzonedb’:
    dlz_mysqldyn_mod.c:1079:73: warning: unused parameter ‘methods’ [-Wunused-parameter]
     1079 | dlz_findzonedb(void *dbdata, const char *name, dns_clientinfomethods_t *methods,
          |                                                ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    dlz_mysqldyn_mod.c:1080:34: warning: unused parameter ‘clientinfo’ [-Wunused-parameter]
     1080 |                dns_clientinfo_t *clientinfo) {
          |                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~
    dlz_mysqldyn_mod.c: In function ‘dlz_lookup’:
    dlz_mysqldyn_mod.c:1111:63: warning: unused parameter ‘methods’ [-Wunused-parameter]
     1111 |            dns_sdlzlookup_t *lookup, dns_clientinfomethods_t *methods,
          |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
    dlz_mysqldyn_mod.c: In function ‘build_query’:
    dlz_mysqldyn_mod.c:465:19: warning: pointer ‘item’ used after ‘free’ [-Wuse-after-free]
      465 |              item = DLZ_LIST_NEXT(item, link))
    dlz_mysqldyn_mod.c:470:17: note: call to ‘free’ here
      470 |                 free(item);
          |                 ^~~~~~~~~~

3 years agoFix compilation warnings in dlz_perl_driver.c
Michal Nowak [Mon, 30 May 2022 10:36:27 +0000 (12:36 +0200)] 
Fix compilation warnings in dlz_perl_driver.c

    dlz_perl_driver.c: In function ‘dlz_version’:
    dlz_perl_driver.c:116:27: warning: unused parameter ‘flags’ [-Wunused-parameter]
      116 | dlz_version(unsigned int *flags) {
          |             ~~~~~~~~~~~~~~^~~~~
    In file included from /usr/lib64/perl5/CORE/perl.h:5685,
                     from dlz_perl_driver.c:33:
    dlz_perl_driver.c: In function ‘dlz_allnodes’:
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:151:17: note: in expansion of macro ‘POPs’
      151 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c: In function ‘dlz_allowzonexfr’:
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:251:17: note: in expansion of macro ‘POPs’
      251 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c: In function ‘dlz_findzonedb’:
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:328:17: note: in expansion of macro ‘POPs’
      328 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c: In function ‘dlz_lookup’:
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:407:17: note: in expansion of macro ‘POPs’
      407 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c:472:1: error: no previous prototype for ‘missing_perl_method’ [-Werror=missing-prototypes]
      472 | missing_perl_method(const char *perl_class_name, PerlInterpreter *my_perl)
          | ^~~~~~~~~~~~~~~~~~~
    dlz_perl_driver.c: In function ‘missing_perl_method’:
    dlz_perl_driver.c:485:9: error: ISO C90 forbids array ‘full_name’ whose size cannot be evaluated [-Werror=vla]
      485 |         char full_name[BUF_LEN];
          |         ^~~~
    dlz_perl_driver.c: In function ‘dlz_create’:
    dlz_perl_driver.c:613:13: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
      613 |         if (missing_method_name = missing_perl_method(perl_class_name, my_perl))
          |             ^~~~~~~~~~~~~~~~~~~
    /usr/lib64/perl5/CORE/pp.h:162:26: warning: value computed is not used [-Wunused-value]
      162 | #define POPs            (*sp--)
          |                         ~^~~~~~
    dlz_perl_driver.c:657:17: note: in expansion of macro ‘POPs’
      657 |                 POPs;
          |                 ^~~~
    dlz_perl_driver.c:502:15: warning: unused variable ‘init_args’ [-Wunused-variable]
      502 |         char *init_args[] = { NULL, NULL };
          |               ^~~~~~~~~

3 years agoMerge branch 'mnowak/gcovr-cleanup' into 'main'
Michal Nowak [Wed, 23 Nov 2022 14:03:27 +0000 (14:03 +0000)] 
Merge branch 'mnowak/gcovr-cleanup' into 'main'

Various gcovr clean-ups

See merge request isc-projects/bind9!7104

3 years agoRestructure inline-function helpers for code coverage
Michal Nowak [Mon, 21 Nov 2022 16:34:50 +0000 (17:34 +0100)] 
Restructure inline-function helpers for code coverage

3 years agoDrop redundant code coverage helper
Michal Nowak [Mon, 21 Nov 2022 16:26:44 +0000 (17:26 +0100)] 
Drop redundant code coverage helper

The "hash.h" file does not need to be copied to "lib/dns/" for the gcovr
tool to generate the code coverage report, as it has been copied
already.

3 years agoDrop buffer.h helper for fuzz directory
Michal Nowak [Mon, 21 Nov 2022 16:20:37 +0000 (17:20 +0100)] 
Drop buffer.h helper for fuzz directory

The "fuzz" directory is no longer included in the code coverage report
and the associated buffer.h helper is no longer needed.

3 years agoExclude fuzz directory from code coverage report
Michal Nowak [Fri, 18 Nov 2022 12:30:32 +0000 (13:30 +0100)] 
Exclude fuzz directory from code coverage report

gcovr fails to process fuzz/old.gcda and fuzz/old.gcno files after !7045
MR with:

    (WARNING) GCOV produced the following errors processing /builds/isc-projects/bind9/fuzz/old.gcda:
     Cannot open source file ../../fuzz/old.c
    Cannot open source file ../../lib/dns/include/dns/compress.h
    Cannot open source file ../../lib/isc/include/isc/buffer.h
    ...
    (gcovr could not infer a working directory that resolved it.)

Given that code coverage inspection is meant only for BIND 9 code and
not its tests and auxiliary tools, the "fuzz" directory should be
excluded from being included in the code coverage report.

3 years agoMerge branch '3667-deprecate-auto-dnssec' into 'main'
Matthijs Mekking [Wed, 23 Nov 2022 10:00:33 +0000 (10:00 +0000)] 
Merge branch '3667-deprecate-auto-dnssec' into 'main'

Deprecate auto-dnssec

Closes #3667

See merge request isc-projects/bind9!7075

3 years agoAdd CHANGES and release note for GL #3667
Matthijs Mekking [Fri, 11 Nov 2022 13:43:36 +0000 (14:43 +0100)] 
Add CHANGES and release note for GL #3667

Announce deprecation of 'auto-dnssec'.

3 years agoDeprecate auto-dnssec
Matthijs Mekking [Fri, 11 Nov 2022 13:39:07 +0000 (14:39 +0100)] 
Deprecate auto-dnssec

Deprecate auto-dnssec, add specific log warning to migrate to
dnssec-policy.

3 years agoMerge branch 'mnowak/fedora-37' into 'main'
Michal Nowak [Mon, 21 Nov 2022 12:46:52 +0000 (12:46 +0000)] 
Merge branch 'mnowak/fedora-37' into 'main'

Add Fedora 37

See merge request isc-projects/bind9!7062

3 years agoAdd Fedora 37
Michal Nowak [Tue, 8 Nov 2022 19:04:02 +0000 (20:04 +0100)] 
Add Fedora 37

3 years agoMerge branch 'matthijs-remove-key-operations-after-update' into 'main'
Matthijs Mekking [Fri, 18 Nov 2022 10:24:35 +0000 (10:24 +0000)] 
Merge branch 'matthijs-remove-key-operations-after-update' into 'main'

Remove dynamic update DNSSEC management

Closes #3686

See merge request isc-projects/bind9!7043

3 years agoAdd CHANGES and release note for removed feature
Matthijs Mekking [Mon, 7 Nov 2022 13:47:33 +0000 (14:47 +0100)] 
Add CHANGES and release note for removed feature

Also mention that 'dnssec-secure-to-insecure' is obsoleted.

3 years agoObsolete dnssec-secure-to-insecure option
Matthijs Mekking [Mon, 7 Nov 2022 13:40:28 +0000 (14:40 +0100)] 
Obsolete dnssec-secure-to-insecure option

Now that the key management operations using dynamic updates feature
has been removed, the 'dnssec-secure-to-insecure' option has become
obsoleted.

3 years agoRemove dynamic update key management documentation
Matthijs Mekking [Mon, 7 Nov 2022 12:40:41 +0000 (13:40 +0100)] 
Remove dynamic update key management documentation

Remove the text from the ARM and DNSSEC guide that describes how to do
key and denial of existence operations using dynamic update. Add a new
section about DNSSEC multi-signer models, but no longer suggest using
dynamic update and auto-dnssec allow.

3 years agoRemove dynamic update key management code
Matthijs Mekking [Mon, 7 Nov 2022 12:31:34 +0000 (13:31 +0100)] 
Remove dynamic update key management code

Remove code that triggers key and denial of existence management
operations. Dynamic update should no longer be used to do DNSSEC
maintenance (other than that of course signatures need to be
created for the new zone contents).

3 years agoRemove dynamic update key management tests
Matthijs Mekking [Mon, 7 Nov 2022 12:24:08 +0000 (13:24 +0100)] 
Remove dynamic update key management tests

Remove test cases that rely upon key and denial of existence
management operations triggered by dynamic updates.

The autosign system test needed a bit more care than just removing
because the test cases are dependent on each other, so there are some
additional tweaks such as setting the NSEC3PARAM via rndc signing,
and renaming zone input files. In the process, some additional
debug output files have been added, and a 'ret' fail case overwrite
was fixed.

3 years agoMerge branch '3655-decompress-faster' into 'main'
Tony Finch [Thu, 17 Nov 2022 09:06:12 +0000 (09:06 +0000)] 
Merge branch '3655-decompress-faster' into 'main'

Simplify and speed up DNS name decompression

Closes #3655

See merge request isc-projects/bind9!7045

3 years agoFuzzing and benchmarking for dns_name_fromwire()
Tony Finch [Mon, 7 Nov 2022 16:22:48 +0000 (16:22 +0000)] 
Fuzzing and benchmarking for dns_name_fromwire()

Since this is very sensitive code which has often had security
problems in many DNS implementations, it needs a decent amount of
validation. This fuzzer ensures that the new code has the same output
as the old code, and that it doesn't take longer than a second.

The benchmark uses the fuzzer's copy of the old dns_name_fromwire()
code to compare a number of scenarios: many compression pointers, many
labels, long labels, random data, with/without downcasing.

3 years agoSimplify and speed up DNS name decompression
Tony Finch [Mon, 7 Nov 2022 14:00:45 +0000 (14:00 +0000)] 
Simplify and speed up DNS name decompression

The aim is to do less work per byte:

  * Check the bounds for each label, instead of checking the
    bounds for each character.

  * Instead of copying one character at a time from the wire to
    the name, copy entire runs of sequential labels using memmove()
    to make the most of its fast loop.

  * To remember where the name ends, we only need to set the end
    marker when we see a compression pointer or when we reach the
    root label. There is no need to check if we jumped back and
    conditionally update the counter for every character.

  * To parse a compression pointer, we no longer take a diversion
    around the outer loop in between reading the upper byte of the
    pointer and the lower byte.

  * The parser state machine is now implicit in the instruction
    pointer, instead of being an explicit variable. Similarly,
    when we reach the root label we break directly out of the loop
    instead of setting a second state machine variable.

  * DNS_NAME_DOWNCASE is never used with dns_name_fromwire() so
    that option is no longer supported.

I have removed this comment which dated from January 1999 when
dns_name_fromwire() was first introduced:

   /*
    * Note:  The following code is not optimized for speed, but
    * rather for correctness.  Speed will be addressed in the future.
    */

No functional change, apart from removing support for the unused
DNS_NAME_DOWNCASE option. The new code is about 2x faster than the
old code: best case 11x faster, worst case 1.4x faster.

3 years agoClean up remnants of label types
Tony Finch [Wed, 9 Nov 2022 16:51:34 +0000 (16:51 +0000)] 
Clean up remnants of label types

There were a few comments referring obliquely to different kinds of
labels, which became obsolete a long time ago.

3 years agoAvoid unspecified behaviour in name_test
Tony Finch [Wed, 9 Nov 2022 17:32:05 +0000 (17:32 +0000)] 
Avoid unspecified behaviour in name_test

C does not make any guarantees about the value of padding in a
structure, so bytewise comparison of two semantically equal structures
with padding can be spuriously non-equal due to non-equal padding
bytes.

Compare each member of name.attributes individually to avoid this
problem.

3 years agoMerge branch '3607-apex-in-name_external-may-be-invalid-when-using-dual-stack-servers...
Mark Andrews [Thu, 17 Nov 2022 01:50:10 +0000 (01:50 +0000)] 
Merge branch '3607-apex-in-name_external-may-be-invalid-when-using-dual-stack-servers' into 'main'

Resolve "apex in name_external may be invalid when using dual stack servers"

Closes #3607

See merge request isc-projects/bind9!6924

3 years agoAdd CHANGES note for [GL #3607]
Mark Andrews [Mon, 17 Oct 2022 23:46:48 +0000 (10:46 +1100)] 
Add CHANGES note for [GL #3607]

3 years agoAdd system test for dual-stack-servers with possible DNAME response
Mark Andrews [Wed, 19 Oct 2022 05:53:11 +0000 (16:53 +1100)] 
Add system test for dual-stack-servers with possible DNAME response

Create a zone that triggers DNAME owner name checks in a zone that
is only reachable using a dual stack server.  The answer contains
a name that is higher in the tree than the query name.

e.g.
foo.v4only.net. CNAME v4only.net.
v4only.net. A 10.0.0.1

ns4 is serving the test zone (ipv4-only)
ns6 is the root server for this test (dual stacked)
ns7 is acting as the dual stack server (dual stacked)
ns9 is the server under test (ipv6-only)

3 years agoSupport starting and stopping IPv6 only servers
Mark Andrews [Tue, 18 Oct 2022 01:19:35 +0000 (12:19 +1100)] 
Support starting and stopping IPv6 only servers

Look for $testdir/$server/named.ipv6-only and use
fd92:7065:b8e:ffff::$n instead of 10.53.0.$n to
communicate with the server.

3 years agoSelect the appropriate namespace when using a dual stack server
Mark Andrews [Mon, 17 Oct 2022 23:02:08 +0000 (10:02 +1100)] 
Select the appropriate namespace when using a dual stack server

When using dual-stack-servers the covering namespace to check whether
answers are in scope or not should be fctx->domain.  To do this we need
to be able to distingish forwarding due to forwarders clauses and
dual-stack-servers.  A new flag FCTX_ADDRINFO_DUALSTACK has been added
to signal this.

3 years agoMerge branch '1905-check-wildcard-in-checkconf-z' into 'main'
Mark Andrews [Wed, 16 Nov 2022 22:55:00 +0000 (22:55 +0000)] 
Merge branch '1905-check-wildcard-in-checkconf-z' into 'main'

Fix 'named-checkconf -z' was ignoring check-wildcard settings in named.conf

See merge request isc-projects/bind9!7063

3 years agoCheck 'named-checkconf -z' and check-wildcard
Mark Andrews [Wed, 9 Nov 2022 11:12:20 +0000 (11:12 +0000)] 
Check 'named-checkconf -z' and check-wildcard

Add tests to check the behavior of 'named-checkconf -z' and
check-wildcard setting in named.conf.

3 years agonamed-checkzone -z ignored the check-wildcard option
Mark Andrews [Wed, 9 Nov 2022 09:50:32 +0000 (09:50 +0000)] 
named-checkzone -z ignored the check-wildcard option

Lookup and set the wildcard option according to the configuration
settings.  The default is on as per bin/named/config.c.

3 years agoMerge tag 'v9_19_7'
Michal Nowak [Wed, 16 Nov 2022 14:10:51 +0000 (15:10 +0100)] 
Merge tag 'v9_19_7'

BIND 9.19.7

3 years agoMerge branch 'mnowak/openbsd-7.2' into 'main'
Michal Nowak [Tue, 15 Nov 2022 07:31:46 +0000 (07:31 +0000)] 
Merge branch 'mnowak/openbsd-7.2' into 'main'

Add OpenBSD 7.2

See merge request isc-projects/bind9!7034

3 years agoAdd OpenBSD 7.2
Michal Nowak [Fri, 4 Nov 2022 13:20:41 +0000 (14:20 +0100)] 
Add OpenBSD 7.2

3 years agoMerge branch '2265-fix-and-check-bashisms' into 'main'
Michal Nowak [Mon, 14 Nov 2022 19:59:19 +0000 (19:59 +0000)] 
Merge branch '2265-fix-and-check-bashisms' into 'main'

Fix and check bashisms in system test

Closes #2265

See merge request isc-projects/bind9!6630

3 years agoAdd checkbashisms CI job
Michal Nowak [Tue, 2 Aug 2022 14:56:48 +0000 (16:56 +0200)] 
Add checkbashisms CI job

3 years agoReplace "sha1sum" with "openssl sha1 -r"
Michal Nowak [Thu, 8 Sep 2022 17:31:58 +0000 (19:31 +0200)] 
Replace "sha1sum" with "openssl sha1 -r"

"sha1sum" is part of GNU Coreutils, neither BIND 9 dependency nor POSIX.
Replace it with "openssl sha1 -r" as OpenSSL is BIND 9 dependency.

3 years agoRename $HOSTNAME to $HOST_NAME to silence checkbashisms
Michal Nowak [Thu, 8 Sep 2022 15:12:46 +0000 (17:12 +0200)] 
Rename $HOSTNAME to $HOST_NAME to silence checkbashisms

checkbashisms warns about possible reliance on HOSTNAME environmental
variable which Bash sets to the name of the current host, and some
commands may leverage it:

    possible bashism in builtin/tests.sh line 199 ($HOST(TYPE|NAME)):
    grep "^\"$HOSTNAME\"$" dig.out.ns1.$n > /dev/null || ret=1
    possible bashism in builtin/tests.sh line 221 ($HOST(TYPE|NAME)):
    grep "^\"$HOSTNAME\"$" dig.out.ns2.$n > /dev/null || ret=1
    possible bashism in builtin/tests.sh line 228 ($HOST(TYPE|NAME)):
    grep "^; NSID: .* (\"$HOSTNAME\")$" dig.out.ns2.$n > /dev/null || ret=1

We don't use the variable this way but rename it to HOST_NAME to silence
the tool.

3 years agoRemove no-op assignment from kasp/tests.sh
Michal Nowak [Wed, 3 Aug 2022 09:03:05 +0000 (11:03 +0200)] 
Remove no-op assignment from kasp/tests.sh

"next_key_event_threshold" is assigned with
"next_key_event_threshold+i", but "i" is empty (never set, nor used
afterwards).

posh, the Policy-compliant Ordinary SHell, failed on this assignment
with:

    tests.sh:253: : unexpected `end of expression'

3 years agoRemove unused $@ array from cds/setup.sh
Michal Nowak [Wed, 3 Aug 2022 08:58:58 +0000 (10:58 +0200)] 
Remove unused $@ array from cds/setup.sh

posh, the Policy-compliant Ordinary SHell, failed with:

    setup.sh:57: @: parameter not set

3 years agoDrop interpolated string replacement
Michal Nowak [Tue, 2 Aug 2022 13:44:16 +0000 (15:44 +0200)] 
Drop interpolated string replacement

Interpolated string is Bashism:

    possible bashism in bin/tests/system/engine_pkcs11/setup.sh line 34 ($'...' should be "$(printf '...')"):
            pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-engine_pkcs11" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id 2> pkcs11-tool.err.$zone.$id || return 1
    possible bashism in bin/tests/system/engine_pkcs11/setup.sh line 34 (${parm/?/pat[/str]}):
            pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-engine_pkcs11" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id 2> pkcs11-tool.err.$zone.$id || return 1
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 27 ($'...' should be "$(printf '...')"):
            pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-keyfromlabel" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id || return 1
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 27 (${parm/?/pat[/str]}):
            pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-keyfromlabel" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id || return 1

The replacement is actually not needed as $p11id holds only one line.

Also see https://www.shellcheck.net/wiki/SC3003 and
https://www.shellcheck.net/wiki/SC3060.

3 years agoJoin two rndc lines not to confuse checkbashisms
Michal Nowak [Tue, 2 Aug 2022 13:36:26 +0000 (15:36 +0200)] 
Join two rndc lines not to confuse checkbashisms

checkbashisms gets confused by the rndc command being on two lines:

    possible bashism in bin/tests/system/nzd2nzf/tests.sh line 37 (type):
    rndccmd 10.53.0.1 addzone "added.example { type primary; file \"added.db\";

3 years agoReplace string comparisons with integer comparisons
Michal Nowak [Tue, 2 Aug 2022 13:07:49 +0000 (15:07 +0200)] 
Replace string comparisons with integer comparisons

checkbashisms reports Bash-style ("==") string comparisons inside test/[
command:

    possible bashism in bin/tests/system/checkconf/tests.sh line 105 (should be 'b = a'):
                    if [ $? == 0 ]; then echo_i "failed"; ret=1; fi
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 62 (should be 'b = a'):
                    test $ret == 0 || continue
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 79 (should be 'b = a'):
                    test $ret == 0 || continue

3 years agoAdd shell interpreter line where missing
Michal Nowak [Tue, 2 Aug 2022 13:01:01 +0000 (15:01 +0200)] 
Add shell interpreter line where missing

The checkbashisms script reports errors like this one:

    script util/check-line-length.sh does not appear to have a #! interpreter line;
    you may get strange results

3 years agoMerge branch '3676-deprecate-operating-system-resource-limits' into 'main'
Ondřej Surý [Mon, 14 Nov 2022 17:18:52 +0000 (17:18 +0000)] 
Merge branch '3676-deprecate-operating-system-resource-limits' into 'main'

Deprecate setting operating system limits from named.conf

Closes #3676

See merge request isc-projects/bind9!7078

3 years agoAdd CHANGES and release note [GL #3676]
Ondřej Surý [Sun, 13 Nov 2022 09:20:00 +0000 (10:20 +0100)] 
Add CHANGES and release note [GL #3676]

3 years agoDeprecate setting operating system limits from named.conf
Ondřej Surý [Sun, 13 Nov 2022 09:12:52 +0000 (10:12 +0100)] 
Deprecate setting operating system limits from named.conf

It was possible to set operating system limits (RLIMIT_DATA,
RLIMIT_STACK, RLIMIT_CORE and RLIMIT_NOFILE) from named.conf.  It's
better to leave these untouched as setting these is responsibility of
the operating system and/or supervisor.

Deprecate the configuration options and remove them in future BIND 9
release.

3 years agoMerge branch '3664-remote-with-tuning-large' into 'main'
Ondřej Surý [Mon, 14 Nov 2022 09:03:28 +0000 (09:03 +0000)] 
Merge branch '3664-remote-with-tuning-large' into 'main'

Remove the last remnants of --with-tuning=large

Closes #3664

See merge request isc-projects/bind9!7052

3 years agoAdd CHANGES and release note for [GL #3664]
Ondřej Surý [Tue, 8 Nov 2022 11:54:03 +0000 (12:54 +0100)] 
Add CHANGES and release note for [GL #3664]

3 years agoUpdate the build requirements in the ARM
Ondřej Surý [Fri, 11 Nov 2022 15:39:35 +0000 (16:39 +0100)] 
Update the build requirements in the ARM

The build requirements have been updated to state that libcap is now
required on Linux and removed mention of --with-tuning configure option.

3 years agoRemove the last remnants of --with-tuning=large
Ondřej Surý [Tue, 8 Nov 2022 11:46:50 +0000 (12:46 +0100)] 
Remove the last remnants of --with-tuning=large

The small/large tuning has been completely removed from the code with
last remnant of the dead code in ns_interfacemgr.  Remove the dead code
and the configure option.

3 years agoMerge branch '3468-statistics-xml-rendering-does-not-seem-to-protect-against-concurre...
Mark Andrews [Fri, 11 Nov 2022 15:56:04 +0000 (15:56 +0000)] 
Merge branch '3468-statistics-xml-rendering-does-not-seem-to-protect-against-concurrent-changes' into 'main'

Resolve "Statistics XML rendering does not seem to protect against concurrent changes"

Closes #3468

See merge request isc-projects/bind9!6695

3 years agoAdd CHANGES note for [GL #3468]
Mark Andrews [Wed, 24 Aug 2022 02:52:49 +0000 (12:52 +1000)] 
Add CHANGES note for [GL #3468]

3 years agoHave dns_zt_apply lock the zone table
Mark Andrews [Wed, 24 Aug 2022 02:21:50 +0000 (12:21 +1000)] 
Have dns_zt_apply lock the zone table

There were a number of places where the zone table should have been
locked, but wasn't, when dns_zt_apply was called.

Added a isc_rwlocktype_t type parameter to dns_zt_apply and adjusted
all calls to using it.  Removed locks in callers.

3 years agoMerge branch 'matthijs-tweak-kasp-test' into 'main'
Matthijs Mekking [Fri, 11 Nov 2022 14:03:46 +0000 (14:03 +0000)] 
Merge branch 'matthijs-tweak-kasp-test' into 'main'

Tweak kasp system test script

See merge request isc-projects/bind9!7064

3 years agoTweak kasp system test script
Matthijs Mekking [Wed, 9 Nov 2022 13:45:06 +0000 (14:45 +0100)] 
Tweak kasp system test script

The retry 3 times when checking signatures did not make sense because
at this point the input file does not change.

Raise the number of retries when checking the apex DNSKEY response to
reduce the number of intermittent failures due to unexpected delays.

3 years agoMerge branch 'mnowak/add-git-fsck' into 'main'
Michal Nowak [Fri, 11 Nov 2022 13:39:01 +0000 (13:39 +0000)] 
Merge branch 'mnowak/add-git-fsck' into 'main'

Verify Git repo validity

See merge request isc-projects/bind9!7048

3 years agoVerify Git repo validity
Michal Nowak [Mon, 7 Nov 2022 16:50:10 +0000 (17:50 +0100)] 
Verify Git repo validity

This check should help catching issues like [1] early.

[1] https://gitlab.isc.org/isc-projects/bind9/-/wikis/%22main%22-branch-partial-history-rewrite-in-August-2022

3 years agoMerge branch '3570-nsec3param-ttl-default-soa-minimum' into 'main'
Matthijs Mekking [Fri, 11 Nov 2022 11:07:15 +0000 (11:07 +0000)] 
Merge branch '3570-nsec3param-ttl-default-soa-minimum' into 'main'

Change default NSEC3PARAM TTL

Closes #3570

See merge request isc-projects/bind9!6897

3 years agoTest NSEC3PARAM TTL is not preserved
Matthijs Mekking [Fri, 14 Oct 2022 10:02:26 +0000 (12:02 +0200)] 
Test NSEC3PARAM TTL is not preserved

Now that we are setting the NSEC3PARAM TTL to SOA MINIMUM, we should
not preserve the TTL, otherwise a SOA MINIMUM change would not be
picked up.

3 years agoAdd change and release note for #3570
Matthijs Mekking [Wed, 12 Oct 2022 14:39:05 +0000 (16:39 +0200)] 
Add change and release note for #3570

Feature change.

3 years agoChange default TTL of NSEC3PARAM to SOA MINIMUM
Matthijs Mekking [Wed, 12 Oct 2022 14:24:13 +0000 (16:24 +0200)] 
Change default TTL of NSEC3PARAM to SOA MINIMUM

Despite the RFC says that the NSEC3PARAM is not something that is
intended for the resolver to be cached, and thus the TTL of 0 is most
logical, a zero TTL RRset can be abused by bad actors.

Change the default to SOA MINIMUM.

3 years agoAdd test that checks NSEC3PARAM TTL
Matthijs Mekking [Wed, 12 Oct 2022 14:23:11 +0000 (16:23 +0200)] 
Add test that checks NSEC3PARAM TTL

The TTL should be equal to the SOA MINIMUM by default.

3 years agoMerge branch 'ondrej-dns_view-resolver-can-be-NULL' into 'main'
Ondřej Surý [Fri, 11 Nov 2022 10:49:35 +0000 (10:49 +0000)] 
Merge branch 'ondrej-dns_view-resolver-can-be-NULL' into 'main'

Don't use view->resolver directly when priming in dns_view_find()

See merge request isc-projects/bind9!7065

3 years agoCheck view->adb in dns_view_flushcache()
Ondřej Surý [Thu, 10 Nov 2022 08:30:52 +0000 (09:30 +0100)] 
Check view->adb in dns_view_flushcache()

The call to dns_view_flushcache() is done under exclusive mode, but we
still need to check if view->adb is still attached before calling
dns_adb_flush() because the shutdown might have been already
initialized.  This most likely only a theoretical problem on shutdown
because there's either no way how to initiate cache flush when shutting
down or very slim window where the `rndc flush` would have to hit the
slim time during named shutdown.

3 years agoDon't use view->resolver directly when priming in dns_view_find()
Ondřej Surý [Wed, 9 Nov 2022 17:04:23 +0000 (18:04 +0100)] 
Don't use view->resolver directly when priming in dns_view_find()

When starting priming from dns_view_find(), the dns_view shutdown could
be initiated by different thread, detaching from the resolver.  Use
dns_view_getresolver() to attach to the resolver under view->lock, so we
don't try to call dns_resolver_prime() with NULL pointer.

There are more accesses to view->resolver, (and also view->adb and
view->requestmgr that suffer from the same problem) in the dns_view
module, but they are all done in exclusive mode or under a view->lock.

3 years agoMerge branch '3669-update-policy-external-synchronous-doc' into 'main'
Petr Špaček [Fri, 11 Nov 2022 09:37:40 +0000 (09:37 +0000)] 
Merge branch '3669-update-policy-external-synchronous-doc' into 'main'

Document that update-policy external is synchronous

See merge request isc-projects/bind9!7066

3 years agoDocument that update-policy external is synchronous
Petr Špaček [Thu, 10 Nov 2022 15:11:00 +0000 (16:11 +0100)] 
Document that update-policy external is synchronous