Commit Graph
37045 Commits
Author SHA1 Message Date
Mark Andrews 0033c12002 Add CHANGES note for [GL #3721]
(cherry picked from commit 27168dbf43)
2022-12-06 09:22:39 +11:00
Mark Andrews 0569fa0d25 Remember that the port was set in host and nslookup
Set 'port_set = true;' so that the TCP/DOT/DOH code doesn't reset
the port when making connections.

(cherry picked from commit 8caa94bdf1)
2022-12-06 09:21:43 +11:00
Mark Andrews e1234f66c6 Add checks for 'host'
(cherry picked from commit e9c4192ee5)
2022-12-06 09:21:43 +11:00
Mark Andrews 375918493e Check ANY lookup using nslookup
(cherry picked from commit c367dd1b0b)
2022-12-06 09:21:43 +11:00
Artem Boldariev 825c40697e Merge branch 'artem-tls-tcp-compatibility-fixes-v9-18' into 'v9_18'
[Partial backport to 9.18] TLS Stream: TCP transport compatibility fixes

See merge request isc-projects/bind9!7160
2022-12-02 21:45:54 +00:00
Artem Boldariev f921cb4579 TLS: take 'sock->recv_read' flag into assumption
For compatibility with TCP this commit adds some trivial logic related
to 'sock->recv_read' flag processing.
2022-12-02 15:37:41 +02:00
Artem Boldariev c1c22ad69a TLS stream: always handle send callbacks asynchronously
This commit ensures that send callbacks are always called from within
the context of its worker thread even in the case of
shuttigdown/inactive socket, just like TCP transport does and with
which TLS attempts to be as compatible as possible.

(cherry picked from commit 2bfc079946)
2022-12-02 15:37:41 +02:00
Artem Boldariev 66bec1d886 TLS Stream: use ISC_R_CANCELLED error when shutting down
This commit changes ISC_R_NOTCONNECTED error code to ISC_R_CANCELLED
when attempting to start reading data on the shutting down socket in
order to make its behaviour compatible with that of TCP and not break
the common code in the unit tests.

(cherry picked from commit ef659365ce)
2022-12-02 15:37:41 +02:00
Artem Boldariev fbec0ece73 Merge branch 'artem-tls-check-for-recv_cb-v9-18' into 'v9_18'
TLS: check for sock->recv_cb when handling received data

See merge request isc-projects/bind9!7159
2022-12-02 13:31:42 +00:00
Artem Boldariev fc637fbdc3 TLS: check for sock->recv_cb when handling received data
This commit adds a check if 'sock->recv_cb' might have been nullified
during the call to 'sock->recv_cb'. That could happen, e.g. by an
indirect call to 'isc_nmhandle_close()' from within the callback when
wrapping up.

In this case, let's close the TLS connection.

(cherry picked from commit bed5e2bb08)
2022-12-02 14:29:36 +02:00
Tom Krizek 90b924be13 Merge branch 'tkrizek/system-tests-prereqs-v9_18' into 'v9_18'
Unify system test feature detection and add missing prerequisites [v9_18]

See merge request isc-projects/bind9!7156
2022-12-02 11:33:38 +00:00
Tom Krizek ca4ebedf02 Add dnstap prerequisite for dnstap system test
(cherry picked from commit 9846c920c3)
2022-12-02 10:45:21 +01:00
Tom Krizek 5a0d5c6e6f Add libnghttp2 prerequisite for doth system test
While some of these tests are for DoT which doesn't require nghttp2,
the server configs won't allow the server to start without nghttp2
support during compile time.

It might be possible to split these tests into DoT and DoH and only
require nghttp2 for DoH tests, but since almost all of our CI jobs are
compiled with nghttp2, we wouldn't gain a lot of coverage, so it's
probably not worth the effort.

(cherry picked from commit f514604613)
2022-12-02 10:45:21 +01:00
Tom Krizek 184f6d25e5 Add lmdb prerequisite for nzd2nzf system test
(cherry picked from commit b1e011e158)
2022-12-02 10:45:21 +01:00
Tom Krizek 8339c60346 Check for pkcs11-tool in keyfromlabel system test
pkcs11-tool which is typically part of the opensc package is required
for the keyfromlabel test.

(cherry picked from commit e9d9f11539)
2022-12-02 10:45:21 +01:00
Tom Krizek e8f1c7e1fb Use feature-test feature detection in pytests
Avoid using the environment variables for feature detection and use the
feature-test utility instead.

Remove the obsolete environment variables from conf.sh, since they're no
longer used anywhere.

(cherry picked from commit 9730ac4c56)
2022-12-02 10:45:21 +01:00
Tom Krizek a97a72fb8b Use feature-test to detect feature support in system tests
Previously, there were two different ways to detect feature support.
Either through an environment variable set by configure in conf.sh, or
using the feature-test utility.

It is more simple and consistent to have only one way of detecting the
feature support. Using the feature-test utility seems superior the the
environment variables set by configure.

(cherry picked from commit d24fb1122e)
2022-12-02 10:45:20 +01:00
Tom Krizek 418f7bb0ae Add missing options to feature-test utility
(cherry picked from commit e22d27da71)
2022-12-02 10:45:18 +01:00
Ondřej Surý 8b51844c2d Merge branch 'ondrej-fix-single-read-tlsdns-client-v9_18' into 'v9_18'
Honour single read per client isc_nm_read() call in the TLSDNS [v9.18]

See merge request isc-projects/bind9!7153
2022-12-01 18:33:06 +00:00
Ondřej Surý f17f5e831b Honour single read per client isc_nm_read() call in the TLSDNS
The TLSDNS transport was not honouring the single read callback for
TLSDNS client.  It would call the read callbacks repeatedly in case the
single TLS read would result in multiple DNS messages in the decoded
buffer.

(cherry picked from commit e3c628d562)
2022-12-01 19:07:22 +01:00
Matthijs Mekking 8b14eb577f Merge branch 'matthijs-deprecate-alt-transfer-source-v9_18' into 'v9_18'
[v9_18] Deprecate alt-transfer-source and companions

See merge request isc-projects/bind9!7149
2022-12-01 07:39:45 +00:00
Matthijs Mekking 9f73e2d6f8 Mention deprecation of alternate transfer source
In the CHANGES and release notes.

(cherry picked from commit 7920347077)
2022-12-01 08:15:45 +01:00
Matthijs Mekking 132387b658 Add missing deprecated tag to max-zone-ttl
This option was deprecated in commit 19352dd187 but at that time
we didn't mark it deprecated in the ARM reference.

(cherry picked from commit 13a16c1f4d)
2022-12-01 08:14:49 +01:00
Matthijs Mekking b4429660da Deprecate alt-transfer-source and companions
Deprecate the alternate transfer sources from BIND 8.

(cherry picked from commit 105465d316)
2022-12-01 08:14:42 +01:00
Michał Kępień 2b242cb9e3 Merge branch 'matthijs/update-serve-stale-test-messages-to-include-rrtype-v9_18' into 'v9_18'
[v9_18] Update serve-stale test messages to include RRtype

See merge request isc-projects/bind9!7146
2022-11-30 13:59:43 +00:00
Matthijs MekkingandMichał Kępień fe910b2cc0 Update serve-stale test messages to include RRtype
(cherry picked from commit 45f7a15785)
2022-11-30 14:29:30 +01:00
Michał Kępień cd195ba77e Merge branch '3707-dont-log-final-reference-detached-on-LOG_INFO-v9_18' into 'v9_18'
Don't log "final reference detached" on INFO level [v9.18]

See merge request isc-projects/bind9!7143
2022-11-30 13:27:42 +00:00
Ondřej Surý 8675a1ac53 Add CHANGES and release note for [GL #3707]
(cherry picked from commit 116d1b94a9)
2022-11-30 11:50:19 +01:00
Ondřej Surý 343e67ad39 Don't log "final reference detached" on INFO level
The "final reference detached" message was meant to be DEBUG(1), but was
instead kept at INFO level.  Move it to the DEBUG(1) logging level, so
it's not printed under normal operations.

(cherry picked from commit 1816244725)
2022-11-30 11:49:51 +01:00
Ondřej Surý 06216b0117 Merge branch '3693-crash-when-restarting-server-with-active-statschannel-connection-v9_18' into 'v9_18'
Be more resilient when destroying the httpd request [v9.18]

See merge request isc-projects/bind9!7112
2022-11-29 09:32:35 +00:00
Ondřej Surý 469579e71e Add CHANGES and release note for [GL #3693]
(cherry picked from commit 32e0df2a13)
2022-11-29 10:11:36 +01:00
Ondřej Surý 349b0f433b Be more resilient when destroying the httpd request
Handle the situation in the read and send callbacks when the
httpd->readhandle has been already detached; f.e. from the previous
iteration of the read callback.

Don't detach the httpd->readcallback from the isc_httpdmgr_shutdown()
and the send callback, but rather call isc_nm_cancelread() to shutdown
the http request from the read callback.
2022-11-29 10:11:28 +01:00
Michal Nowak bc8c055c6d Merge branch 'mnowak/llvm-15-v9_18' into 'v9_18'
[v9_18] Update clang to version 15

See merge request isc-projects/bind9!7133
2022-11-29 09:00:23 +00:00
Michal Nowak 1d7d504338 Update sources to Clang 15 formatting 2022-11-29 09:14:07 +01:00
Michal Nowak 6fac8ef4be Update clang to version 15
(cherry picked from commit 26a42ed1ac)
2022-11-29 09:05:16 +01:00
Mark Andrews 81e9636d6d Merge branch '3702-man-page-dig-1-typo-in-options-v9_18' into 'v9_18'
Fix typo in dig man page '+qr' should be '+noqr' [v9_18]

See merge request isc-projects/bind9!7132
2022-11-28 23:07:10 +00:00
Mark Andrews acdf043360 Fix typo in dig man page '+qr' should be '+noqr'
Reported by Fabian P. Schmidt

(cherry picked from commit 3769266318)
2022-11-29 09:45:36 +11:00
Michal Nowak 8abb2b780f Merge branch '3310-build-contrib-in-ci-v9_18' into 'v9_18'
[v9_18] Build contrib in CI & associated fixes

See merge request isc-projects/bind9!7113
2022-11-28 13:24:23 +00:00
Michal Nowak 65cc924042 Help gcovr find contrib files
(cherry picked from commit 445a90fb78)
2022-11-28 13:30:38 +01:00
Michal Nowak 56abbea62c 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.

(cherry picked from commit 35e44978b5)
2022-11-28 13:30:38 +01:00
Michal Nowak 2d747f7312 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 {  \
                                                    ^

(cherry picked from commit 69b7e4362d)
2022-11-28 13:30:37 +01:00
Michal Nowak c49b5d9d1d Build contrib dlz modules in the CI
(cherry picked from commit 4a4a91b012)
2022-11-28 13:30:37 +01:00
Michal Nowak d25dc23563 Leverage CFLAGS from environment in contrib Makefiles
(cherry picked from commit 4affc436d3)
2022-11-28 13:30:37 +01:00
Michal Nowak e23fb140fa 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:
          |         ^~~~

(cherry picked from commit 99912ed2f7)
2022-11-28 13:30:37 +01:00
Michal Nowak f47990aa6e 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) {
          |                       ^

(cherry picked from commit 76c8c58d54)
2022-11-28 13:30:37 +01:00
Michal Nowak 48c3891603 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) {
          |                                                  ^

(cherry picked from commit 60f68dc0d6)
2022-11-28 13:30:37 +01:00
Michal Nowak 2a52f343a3 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);
          |                 ^~~~~~~~~~

(cherry picked from commit 587ea10567)
2022-11-28 13:30:37 +01:00
Michal Nowak 0d8032842c 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 };
          |               ^~~~~~~~~

(cherry picked from commit be928dbba2)
2022-11-28 13:30:36 +01:00
Tony Finch 204387be3c Merge branch 'fanf-deduplicate-time-units-v9_18' into 'v9_18'
Deduplicate time unit conversion factors [v9_18]

See merge request isc-projects/bind9!7126
2022-11-25 15:08:39 +00:00
Tony FinchandTony Finch 303cdf8e27 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.

(cherry picked from commit 00307fe318)
2022-11-25 14:16:09 +00:00