]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 years agoUpdate copyrights to 2022
Michal Nowak [Mon, 3 Jan 2022 09:29:49 +0000 (10:29 +0100)] 
Update copyrights to 2022

4 years agoMerge branch '2782-set-version-and-release-variables-in-conf.py' into 'main'
Michał Kępień [Wed, 29 Dec 2021 09:02:10 +0000 (09:02 +0000)] 
Merge branch '2782-set-version-and-release-variables-in-conf.py' into 'main'

Set version and release variables in conf.py

Closes #2782

See merge request isc-projects/bind9!5205

4 years agoClarify use of the "today" Sphinx variable
Michał Kępień [Wed, 29 Dec 2021 08:58:48 +0000 (09:58 +0100)] 
Clarify use of the "today" Sphinx variable

Add a comment explaining the purpose of setting the "today" variable in
Sphinx invocations to prevent confusion caused by the absence of that
variable from reStructuredText sources.

Drop the -A command-line option from the sphinx-build invocation for
EPUB output as "today" is already set in the ALLSPHINXOPTS variable.

4 years agoSet version and release variables in conf.py
Michał Kępień [Wed, 29 Dec 2021 08:58:48 +0000 (09:58 +0100)] 
Set version and release variables in conf.py

Some Sphinx variables used in the ARM are only set in Makefile.docs.
This works fine when building the ARM using "make", but does not work
with Read the Docs, which only looks at conf.py files.

Since Read the Docs does not run ./configure, renaming conf.py to
conf.py.in and using Autoconf output variables is not a feasible
solution.

Instead, extend doc/arm/conf.py with some Python code which processes
configure.ac using regular expressions and sets the relevant Sphinx
variables accordingly.  As this solution also works fine when building
the ARM using "make", drop the relevant -D options from the list of
sphinx-build options used for building the ARM in Makefile.docs.

Note that the man_SPHINXOPTS counterparts of the removed -D switches are
left intact because doc/man/conf.py is a separate Sphinx project which
is only processed using "make" and duplicating the Python code added to
doc/arm/conf.py by this commit would be inelegant.

4 years agoMerge branch 'artem-tlsctx-caching' into 'main'
Artem Boldariev [Wed, 29 Dec 2021 08:58:10 +0000 (08:58 +0000)] 
Merge branch 'artem-tlsctx-caching' into 'main'

Add TLS context cache

Closes #3067

See merge request isc-projects/bind9!5672

4 years agoAdd a CHANGES entry [GL !5672]
Artem Boldariev [Fri, 24 Dec 2021 12:54:19 +0000 (14:54 +0200)] 
Add a CHANGES entry [GL !5672]

Mention that TLS contexts reuse was implemented.

4 years agoUse the TLS context cache for client-side contexts (XoT)
Artem Boldariev [Thu, 23 Dec 2021 14:08:41 +0000 (16:08 +0200)] 
Use the TLS context cache for client-side contexts (XoT)

This commit enables client-side TLS contexts re-use for zone transfers
over TLS. That, in turn, makes it possible to use the internal session
cache associated with the contexts, allowing the TLS connections to be
established faster and requiring fewer resources by not going through
the full TLS handshake procedure.

Previously that would recreate the context on every connection, making
TLS session resumption impossible.

Also, this change lays down a foundation for Strict TLS (when the
client validates a server certificate), as the TLS context cache can
be extended to store additional data required for validation (like
intermediates CA chain).

4 years agoUse the TLS context cache for server-side contexts
Artem Boldariev [Thu, 23 Dec 2021 10:01:34 +0000 (12:01 +0200)] 
Use the TLS context cache for server-side contexts

Using the TLS context cache for server-side contexts could reduce the
number of contexts to initialise in the configurations when e.g. the
same 'tls' entry is used in multiple 'listen-on' statements for the
same DNS transport, binding to multiple IP addresses.

In such a case, only one TLS context will be created, instead of a
context per IP address, which could reduce the initialisation time, as
initialising even a non-ephemeral TLS context introduces some delay,
which can be *visually* noticeable by log activity.

Also, this change lays down a foundation for Mutual TLS (when the
server validates a client certificate, additionally to a client
validating the server), as the TLS context cache can be extended to
store additional data required for validation (like intermediates CA
chain).

Additionally to the above, the change ensures that the contexts are
not being changed after initialisation, as such a practice is frowned
upon. Previously we would set the supported ALPN tags within
isc_nm_listenhttp() and isc_nm_listentlsdns(). We do not do that for
client-side contexts, so that appears to be an overlook. Now we set
the supported ALPN tags right after server-side contexts creation,
similarly how we do for client-side ones.

4 years agoAdd TLS context cache
Artem Boldariev [Wed, 22 Dec 2021 15:11:11 +0000 (17:11 +0200)] 
Add TLS context cache

This commit adds a TLS context object cache implementation. The
intention of having this object is manyfold:

- In the case of client-side contexts: allow reusing the previously
created contexts to employ the context-specific TLS session resumption
cache. That will enable XoT connection to be reestablished faster and
with fewer resources by not going through the full TLS handshake
procedure.

- In the case of server-side contexts: reduce the number of contexts
created on startup. That could reduce startup time in a case when
there are many "listen-on" statements referring to a smaller amount of
`tls` statements, especially when "ephemeral" certificates are
involved.

- The long-term goal is to provide in-memory storage for additional
data associated with the certificates, like runtime
representation (X509_STORE) of intermediate CA-certificates bundle for
Strict TLS/Mutual TLS ("ca-file").

4 years agoMerge branch 'michal/fix-error-codes-passed-to-connection-callbacks' into 'main'
Michał Kępień [Tue, 28 Dec 2021 15:14:11 +0000 (15:14 +0000)] 
Merge branch 'michal/fix-error-codes-passed-to-connection-callbacks' into 'main'

Fix error codes passed to connection callbacks

See merge request isc-projects/bind9!5675

4 years agoFix error codes passed to connection callbacks
Michał Kępień [Tue, 28 Dec 2021 14:09:50 +0000 (15:09 +0100)] 
Fix error codes passed to connection callbacks

Commit 9ee60e7a17bf34c7ef7f4d79e6a00ca45444ec8c erroneously introduced
duplicate conditions to several existing conditional statements
responsible for determining error codes passed to connection callbacks
upon failure.  Fix the affected expressions to ensure connection
callbacks are invoked with:

  - the ISC_R_SHUTTINGDOWN error code when a global netmgr shutdown is
    in progress,

  - the ISC_R_CANCELED error code when a specific operation has been
    canceled.

This does not fix any known bugs, it only adjusts the changes introduced
by commit 9ee60e7a17bf34c7ef7f4d79e6a00ca45444ec8c so that they match
its original intent.

4 years agoMerge branch '3068-fix-rare-control-channel-socket-reference-leak' into 'main'
Michał Kępień [Tue, 28 Dec 2021 12:42:45 +0000 (12:42 +0000)] 
Merge branch '3068-fix-rare-control-channel-socket-reference-leak' into 'main'

Fix rare control channel socket reference leak

Closes #3068

See merge request isc-projects/bind9!5673

4 years agoFix rare control channel socket reference leak
Michał Kępień [Mon, 27 Dec 2021 14:41:04 +0000 (15:41 +0100)] 
Fix rare control channel socket reference leak

Commit 9ee60e7a17bf34c7ef7f4d79e6a00ca45444ec8c enabled netmgr shutdown
to cause read callbacks for active control channel sockets to be invoked
with the ISC_R_SHUTTINGDOWN result code.  However, control channel code
only recognizes ISC_R_CANCELED as an indicator of an in-progress netmgr
shutdown (which was correct before the above commit).  This discrepancy
enables the following scenario to happen in rare cases:

 1. A control channel request is received and responded to.  libuv
    manages to write the response to the TCP socket, but the completion
    callback (control_senddone()) is yet to be invoked.

 2. Server shutdown is initiated.  All TCP sockets are shut down, which
    i.a. causes control_recvmessage() to be invoked with the
    ISC_R_SHUTTINGDOWN result code.  As the result code is not
    ISC_R_CANCELED, control_recvmessage() does not set
    listener->controls->shuttingdown to 'true'.

 3. control_senddone() is called with the ISC_R_SUCCESS result code.  As
    neither listener->controls->shuttingdown is 'true' nor is the result
    code ISC_R_CANCELED, reading is resumed on the control channel
    socket.  However, this read can never be completed because the read
    callback on that socket was cleared when the TCP socket was shut
    down.  This causes a reference on the socket's handle to be held
    indefinitely, leading to a hang upon shutdown.

Ensure listener->controls->shuttingdown is also set to 'true' when
control_recvmessage() is invoked with the ISC_R_SHUTTINGDOWN result
code.  This ensures the send completion callback does not resume reading
after the control channel socket is shut down.

4 years agoMerge branch 'mnowak/make-debian-11-bullseye-base-image' into 'main'
Michal Nowak [Thu, 23 Dec 2021 14:41:45 +0000 (14:41 +0000)] 
Merge branch 'mnowak/make-debian-11-bullseye-base-image' into 'main'

Make bullseye the base image

See merge request isc-projects/bind9!5367

4 years agoUse /dev/urandom as BIND 9.11 randomness source
Michal Nowak [Mon, 6 Sep 2021 10:04:49 +0000 (12:04 +0200)] 
Use /dev/urandom as BIND 9.11 randomness source

This prevents resolver timeouts for the reference (BIND 9.11) servers
used in respdiff tests run on Debian 11 "bullseye".

4 years agoMake bullseye the base image
Michal Nowak [Wed, 25 Aug 2021 16:11:43 +0000 (18:11 +0200)] 
Make bullseye the base image

"buster" jobs are now only going to be run in scheduled pipelines.

"--without-gssapi" ./configure option of "bullseye" before it became
the base image is dropped from "bullseye"-the-base-image because it
reduces gcov coverage by 0.38 % (651 lines) and is used in Debian 9
"stretch".

4 years agoMerge branch '3041-decide-what-to-do-with-reject-000-and-other-obscure-options-for...
Mark Andrews [Thu, 23 Dec 2021 05:14:50 +0000 (05:14 +0000)] 
Merge branch '3041-decide-what-to-do-with-reject-000-and-other-obscure-options-for-synth-from-dnssec-feature' into 'main'

remove reject-000 and broken-nsec options (related to synth-from-dnssec feature)

Closes #3041

See merge request isc-projects/bind9!5621

4 years agoremove broken-nsec and reject-000-label options
Mark Andrews [Wed, 8 Dec 2021 07:02:28 +0000 (18:02 +1100)] 
remove broken-nsec and reject-000-label options

4 years agoMerge branch 'rhbz/fedora/2032704' into 'main'
Michał Kępień [Wed, 22 Dec 2021 21:14:22 +0000 (21:14 +0000)] 
Merge branch 'rhbz/fedora/2032704' into 'main'

Avoid conflict with ldap_connect function of openldap

See merge request isc-projects/bind9!5665

4 years agoChange all internal functions to dlz_ldap prefix
Petr Mensik [Wed, 22 Dec 2021 12:38:02 +0000 (13:38 +0100)] 
Change all internal functions to dlz_ldap prefix

To prevent any conflict in the future, avoid ldap_ prefix in any
internal functions. Keep it reserved for openldap only.

4 years agoAvoid conflict with ldap_connect function of openldap
Petr Mensik [Wed, 22 Dec 2021 12:36:39 +0000 (13:36 +0100)] 
Avoid conflict with ldap_connect function of openldap

ldap_connect is defined by OpenLDAP 2.6. Compiler complains there are
conflicting declarations. Use dlz_ldap prefix instead of ldap to avoid
conflict.

4 years agoMerge branch '2723-add-SSLKEYLOGFILE-support' into 'main'
Michał Kępień [Wed, 22 Dec 2021 20:08:46 +0000 (20:08 +0000)] 
Merge branch '2723-add-SSLKEYLOGFILE-support' into 'main'

Add SSLKEYLOGFILE support

Closes #2723

See merge request isc-projects/bind9!5661

4 years agoAdd CHANGES entry for GL #2723
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Add CHANGES entry for GL #2723

4 years agoAdd release note for GL #2723
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Add release note for GL #2723

4 years agoDocument SSLKEYLOGFILE handling
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Document SSLKEYLOGFILE handling

Add a section to the ARM explaining how to set the SSLKEYLOGFILE
environment variable in order to prepare a key log file for debugging
purposes.

4 years agoSet up default logging for SSLKEYLOGFILE
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Set up default logging for SSLKEYLOGFILE

A customary method of exporting TLS pre-master secrets used by a piece
of software (for debugging purposes, e.g. to examine decrypted traffic
in a packet sniffer) is to set the SSLKEYLOGFILE environment variable to
the path to the file in which this data should be logged.

In order to enable writing any data to a file using the logging
framework provided by libisc, a logging channel needs to be defined and
the relevant logging category needs to be associated with it.  Since the
SSLKEYLOGFILE variable is only expected to contain a path, some defaults
for the logging channel need to be assumed.  Add a new function,
named_log_setdefaultsslkeylogfile(), for setting up those implicit
defaults, which are equivalent to the following logging configuration:

    channel default_sslkeylogfile {
        file "${SSLKEYLOGFILE}" versions 10 size 100m suffix timestamp;
    };

    category sslkeylog {
     default_sslkeylogfile;
    };

This ensures TLS pre-master secrets do not use up more than about 1 GB
of disk space, which should be enough to hold debugging data for the
most recent 1 million TLS connections.

As these values are arguably not universally appropriate for all
deployment environments, a way for overriding them needs to exist.
Suppress creation of the default logging channel for TLS pre-master
secrets when the SSLKEYLOGFILE variable is set to the string "config".
This enables providing custom logging configuration for the relevant
category via the "logging" stanza.  (Note that it would have been
simpler to only skip setting up the default logging channel for TLS
pre-master secrets if the SSLKEYLOGFILE environment variable is not set
at all.  However, libisc only logs pre-master secrets if that variable
is set.  Detecting a "magic" string enables the SSLKEYLOGFILE
environment variable to serve as a single control for both enabling TLS
pre-master secret collection and potentially also indicating where and
how they should be exported.)

4 years agoCheck for SSL_CTX_set_keylog_callback() support
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Check for SSL_CTX_set_keylog_callback() support

The SSL_CTX_set_keylog_callback() function is a fairly recent OpenSSL
addition, having first appeared in version 1.1.1.  Add a configure.ac
check for the availability of that function to prevent build errors on
older platforms.  Sort similar checks alphabetically.

This makes the SSLKEYLOGFILE mechanism a silent no-op on unsupported
platforms, which is considered acceptable for a debugging feature.

4 years agoLog TLS pre-master secrets when requested
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Log TLS pre-master secrets when requested

Generate log messages containing TLS pre-master secrets when the
SSLKEYLOGFILE environment variable is set.  This only ensures such
messages are prepared using the right logging category and passed to
libisc for further processing.

The TLS pre-master secret logging callback needs to be set on a
per-context basis, so ensure it happens for both client-side and
server-side TLS contexts.

4 years agoAdd a logging category for TLS pre-master secrets
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Add a logging category for TLS pre-master secrets

TLS pre-master secrets will be dumped to disk using the logging
framework provided by libisc.  Add a new logging category for this type
of debugging data in order to enable exporting it to a dedicated
channel.  Derive the name of the new category from the name of the
relevant environment variable, SSLKEYLOGFILE.

4 years agoMerge branch 'mnowak/respdiff-job-dependency-fix' into 'main'
Michal Nowak [Wed, 22 Dec 2021 14:18:44 +0000 (14:18 +0000)] 
Merge branch 'mnowak/respdiff-job-dependency-fix' into 'main'

Execute respdiff jobs out-of-order

See merge request isc-projects/bind9!5664

4 years agoExecute respdiff jobs out-of-order
Michal Nowak [Wed, 22 Dec 2021 10:14:56 +0000 (11:14 +0100)] 
Execute respdiff jobs out-of-order

Commit 2ececf2c dropped dependency of "respdiff" and
"respdiff-third-party" jobs on "tarball-create" job because these jobs
don't need to depend on in (e.g., for its artifacts). This, however,
caused that respdiff jobs weren't started out-of-order and artifacts
from all the "Build" stage jobs plus "unit:gcc:buster:amd64" job were
downloaded to project directory and caused problems with compilation:

Originally, the dependency on "tarball-create" has been added in
04f8b65a to indicate that respdiff "is meant to operate on two different
BIND versions". It seems that the intent didn't work out, and we better
make it obvious that respdiff jobs don't depend on any other job and
should be run out-of-order.

4 years agoMerge branch 'mnowak/freebsd-12.3' into 'main'
Michal Nowak [Mon, 20 Dec 2021 15:58:38 +0000 (15:58 +0000)] 
Merge branch 'mnowak/freebsd-12.3' into 'main'

Add FreeBSD 12.3

See merge request isc-projects/bind9!5619

4 years agoAdd FreeBSD 12.3
Michal Nowak [Tue, 7 Dec 2021 16:08:49 +0000 (17:08 +0100)] 
Add FreeBSD 12.3

4 years agoMerge branch 'artem-doth-reconfig-fix' into 'main'
Artem Boldariev [Mon, 20 Dec 2021 12:46:44 +0000 (12:46 +0000)] 
Merge branch 'artem-doth-reconfig-fix' into 'main'

Fix flakiness in the doth reconfig test

See merge request isc-projects/bind9!5656

4 years agodoth system test: reduce number of contexts in ns3
Artem Boldariev [Fri, 17 Dec 2021 12:03:56 +0000 (14:03 +0200)] 
doth system test: reduce number of contexts in ns3

This commit removes unused listen-on statements from the ns3 instance
in order to reduce the startup time. That should help with occasional
system test initialisation hiccups in the CI which happen because the
required instances cannot initialise in time.

4 years agoFix flakiness in the doth reconfig test
Artem Boldariev [Fri, 17 Dec 2021 11:57:42 +0000 (13:57 +0200)] 
Fix flakiness in the doth reconfig test

Due to the fact that the primary nameserver creates a lot of TLS
contexts, its reconfiguration could take too much time on the CI,
leading to spurious test failures, while in reality it works just
fine.

This commit adds a separate instance for this test which does not use
ephemeral keys (these are costly to generate) and creates minimal
amount of TLS contexts.

4 years agoMerge branch '2264-tls-ephemeral-rsa-to-ecc' into 'main'
Arаm Sаrgsyаn [Mon, 20 Dec 2021 12:10:42 +0000 (12:10 +0000)] 
Merge branch '2264-tls-ephemeral-rsa-to-ecc' into 'main'

Use ECDSA P-256 instead of 4096-bit RSA for 'tls ephemeral'

Closes #2264

See merge request isc-projects/bind9!5627

4 years agoAdd CHANGES for [GL #2264]
Aram Sargsyan [Wed, 8 Dec 2021 16:04:32 +0000 (16:04 +0000)] 
Add CHANGES for [GL #2264]

4 years agoUse ECDSA P-256 instead of 4096-bit RSA for 'tls ephemeral'
Aram Sargsyan [Wed, 8 Dec 2021 16:04:15 +0000 (16:04 +0000)] 
Use ECDSA P-256 instead of 4096-bit RSA for 'tls ephemeral'

ECDSA P-256 performs considerably better than the previously used
4096-bit RSA (can be observed using `openssl speed`), and, according
to RFC 6605, provides a security level comparable to 3072-bit RSA.

4 years agoMerge branch 'mnowak/add-fedora-35' into 'main'
Michal Nowak [Fri, 17 Dec 2021 14:37:56 +0000 (14:37 +0000)] 
Merge branch 'mnowak/add-fedora-35' into 'main'

Add Fedora 35

See merge request isc-projects/bind9!5554

4 years agoAdd Fedora 35
Michal Nowak [Tue, 2 Nov 2021 19:56:25 +0000 (20:56 +0100)] 
Add Fedora 35

4 years agoMerge branch 'ondrej/simplify-address-sanitizer-use-in-mem.c' into 'main'
Ondřej Surý [Fri, 17 Dec 2021 14:25:54 +0000 (14:25 +0000)] 
Merge branch 'ondrej/simplify-address-sanitizer-use-in-mem.c' into 'main'

Simplify Address Sanitizer tweaks in mem.c

See merge request isc-projects/bind9!5643

4 years agoSimplify Address Sanitizer tweaks in mem.c
Ondřej Surý [Wed, 15 Dec 2021 11:07:22 +0000 (12:07 +0100)] 
Simplify Address Sanitizer tweaks in mem.c

Previously, whole isc_mempool_get() and isc_mempool_set() would be
replaced by simpler version when run with address sanitizer.

Change the code to limit the fillcount to 1 and freemax to 0.  This
change will make isc_mempool_get() to always allocate and use a single
new item and isc_mempool_put() will always return the item to the
allocator.

4 years agoMerge branch 'mnowak/drop-freebsd-11' into 'main'
Michal Nowak [Fri, 17 Dec 2021 11:48:34 +0000 (11:48 +0000)] 
Merge branch 'mnowak/drop-freebsd-11' into 'main'

Drop FreeBSD 11

See merge request isc-projects/bind9!5606

4 years agoDrop FreeBSD 11
Michal Nowak [Tue, 30 Nov 2021 14:45:39 +0000 (15:45 +0100)] 
Drop FreeBSD 11

Support for FreeBSD 11.4, the last FreeBSD 11.x release, ended on
September 30, 2021.

The "--with-readline" ./configure option has been added to gcc:sid:amd64
CI job; otherwise, it would be lost with the FreeBSD 11 removal.

Link: https://www.freebsd.org/security/unsupported/
4 years agoMerge branch '3057-evp_digestsignfinal-needs-the-buffer-length-passed-in' into 'main'
Mark Andrews [Fri, 17 Dec 2021 10:27:41 +0000 (10:27 +0000)] 
Merge branch '3057-evp_digestsignfinal-needs-the-buffer-length-passed-in' into 'main'

Resolve "EVP_DigestSignFinal needs the buffer length passed in"

Closes #3057

See merge request isc-projects/bind9!5642

4 years agoAdd CHANGES for [GL #3057]
Mark Andrews [Wed, 15 Dec 2021 10:32:49 +0000 (21:32 +1100)] 
Add CHANGES for [GL #3057]

4 years agoPass the digest buffer length to EVP_DigestSignFinal
Mark Andrews [Wed, 15 Dec 2021 10:27:49 +0000 (21:27 +1100)] 
Pass the digest buffer length to EVP_DigestSignFinal

OpenSSL 3.0.1 does not accept 0 as a digest buffer length when
calling EVP_DigestSignFinal as it now checks that the digest buffer
length is large enough for the digest.  Pass the digest buffer
length instead.

4 years agoMerge branch 'mnowak/alpine-3.15' into 'main'
Michal Nowak [Thu, 16 Dec 2021 15:52:18 +0000 (15:52 +0000)] 
Merge branch 'mnowak/alpine-3.15' into 'main'

Add Alpine Linux 3.15

See merge request isc-projects/bind9!5595

4 years agoAdd Alpine Linux 3.15
Michal Nowak [Thu, 25 Nov 2021 17:59:57 +0000 (18:59 +0100)] 
Add Alpine Linux 3.15

4 years agoMerge branch 'pspacek/ci-api-triggers' into 'main'
Petr Špaček [Thu, 16 Dec 2021 15:00:29 +0000 (15:00 +0000)] 
Merge branch 'pspacek/ci-api-triggers' into 'main'

Enable regular pipeline jobs to be triggered from Gitlab API

See merge request isc-projects/bind9!5648

4 years agoEnable regular pipeline jobs to be triggered from Gitlab API
Petr Špaček [Thu, 16 Dec 2021 14:55:01 +0000 (15:55 +0100)] 
Enable regular pipeline jobs to be triggered from Gitlab API

4 years agoMerge branch 'v9_17_21-release' into 'main'
Petr Špaček [Thu, 16 Dec 2021 12:22:45 +0000 (12:22 +0000)] 
Merge branch 'v9_17_21-release' into 'main'

Merge 9.17.21 release branch

See merge request isc-projects/bind9!5644

4 years agoSet up release notes for BIND 9.17.22
Petr Špaček [Wed, 15 Dec 2021 15:50:49 +0000 (16:50 +0100)] 
Set up release notes for BIND 9.17.22

4 years agoUpdate BIND version to 9.17.21
Petr Špaček [Mon, 6 Dec 2021 16:19:03 +0000 (17:19 +0100)] 
Update BIND version to 9.17.21

4 years agoAdd a CHANGES marker
Petr Špaček [Mon, 6 Dec 2021 16:18:10 +0000 (17:18 +0100)] 
Add a CHANGES marker

4 years agoMerge branch 'michal/prepare-documentation-for-bind-9.17.21' into 'v9_17_21-release'
Petr Špaček [Mon, 6 Dec 2021 16:14:47 +0000 (16:14 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.17.21' into 'v9_17_21-release'

Prepare documentation for BIND 9.17.21

See merge request isc-private/bind9!338

4 years agoPrepare release notes for BIND 9.17.21
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Prepare release notes for BIND 9.17.21

4 years agoReorder release notes
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Reorder release notes

4 years agoMention GL #3040 in the release notes
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Mention GL #3040 in the release notes

4 years agoAdd release note for GL #853
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Add release note for GL #853

4 years agoTweak and reword release notes
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Tweak and reword release notes

4 years agoTweak recent additions to the ARM
Michał Kępień [Mon, 6 Dec 2021 14:51:24 +0000 (15:51 +0100)] 
Tweak recent additions to the ARM

4 years agoMerge branch 'mnowak/respdiff-add-third-party-server-support' into 'main'
Michal Nowak [Thu, 16 Dec 2021 11:51:46 +0000 (11:51 +0000)] 
Merge branch 'mnowak/respdiff-add-third-party-server-support' into 'main'

Add respdiff jobs with third-party recursors

See merge request isc-projects/bind9!5355

4 years agoAdd respdiff job with third-party recursors
Michal Nowak [Mon, 16 Aug 2021 17:07:07 +0000 (19:07 +0200)] 
Add respdiff job with third-party recursors

The order of directories with reference and test BIND 9 are now reversed
for respdiff.sh.

Drop unnecessary dependency on the tarball-create job.

The data.mdb file has more than 10 GB and makes artifact download take
an unnecessarily long time.

4 years agoMerge branch '2398-adjust-the-dns_message-mempools' into 'main'
Ondřej Surý [Wed, 15 Dec 2021 20:43:00 +0000 (20:43 +0000)] 
Merge branch '2398-adjust-the-dns_message-mempools' into 'main'

Reduce freemax values for dns_message mempools

Closes #2398

See merge request isc-projects/bind9!5646

4 years agoReduce freemax values for dns_message mempools
Ondřej Surý [Wed, 15 Dec 2021 16:48:28 +0000 (17:48 +0100)] 
Reduce freemax values for dns_message mempools

It was discovered that NAME_FREEMAX and RDATASET_FREEMAX was based on
the NAME_FILLCOUNT and RDATASET_FILLCOUNT respectively multiplied by 8
and then when used in isc_mempool_setfreemax, the value would be again
multiplied by 32.

Keep the 8 multiplier in the #define and remove the 32 multiplier as it
was kept in error.  The default fillcount can fit 99.99% of the requests
under normal circumstances, so we don't need to keep that many free
items on the mempool.

4 years agoMerge branch '3055-examine-netlink-messages' into 'main'
Artem Boldariev [Wed, 15 Dec 2021 18:04:25 +0000 (18:04 +0000)] 
Merge branch '3055-examine-netlink-messages' into 'main'

Resolve #3055 by examining RTM_NEWADDR, RTM_DELADDR messages contents

Closes #3056 and #3055

See merge request isc-projects/bind9!5638

4 years agoModify CHANGES [GL #3055]
Artem Boldariev [Tue, 14 Dec 2021 17:30:45 +0000 (19:30 +0200)] 
Modify CHANGES [GL #3055]

Mention that we try to avoid spurious interface re-scans on Linux.

4 years agoremove ns_interface reference counting
Evan Hunt [Wed, 15 Dec 2021 16:27:28 +0000 (08:27 -0800)] 
remove ns_interface reference counting

reference counting of ns_interface objects has not been used
since the clientmgr cleanup in #2433, and it no longer really
makes sense now - when we want to destroy an interface on a
rescan, we want it to be destroyed, not kept active by some
other caller. so ns_interface_attach() has been removed,
ns_interface_detach() has been replaced with a static
interface_destroy(), and do_scan() has been simplified
accordingly.

4 years agokeep track of non-listening interfaces
Evan Hunt [Wed, 15 Dec 2021 00:51:02 +0000 (16:51 -0800)] 
keep track of non-listening interfaces

previously, if "listen-on-v6" was set to "none", then every
time a scan saw an IPv6 address it would appear to be a new
one.  this commit retains all known interfaces in a list
and sets a flag in the ones that are listening, so that
configured interfaces that have been seen before will be
recognized as such.

as an incidental fix, the ns__interfacemgr_getif() and _nextif()
functions have been removed since they were never used.

4 years agoExamine RTM_NEWADDR, RTM_DELADDR messages contents
Artem Boldariev [Tue, 14 Dec 2021 11:38:28 +0000 (13:38 +0200)] 
Examine RTM_NEWADDR, RTM_DELADDR messages contents

This commit modifies the NetLink handling code in such a way
that the contents of the messages we are interested in is checked
for the local addresses changes only. This helps to avoid spurious
interface re-scans.

The 'route_recv' log messages are also reduced from DEBUG(3) to
DEBUG(9).

4 years agoMerge branch 'ondrej/fix-isc_mem_setname-usage' into 'main'
Ondřej Surý [Tue, 14 Dec 2021 19:46:00 +0000 (19:46 +0000)] 
Merge branch 'ondrej/fix-isc_mem_setname-usage' into 'main'

Set the clientmgr isc_mem_t context name

See merge request isc-projects/bind9!5639

4 years agoSet the clientmgr isc_mem_t context name
Ondřej Surý [Tue, 14 Dec 2021 12:02:50 +0000 (13:02 +0100)] 
Set the clientmgr isc_mem_t context name

The memory context created in the clientmgr context was missing a name,
so it was nameless in the memory context statistics.

Set the clientmgr memory context name to "clientmgr".

4 years agoMerge branch '2886-drop-cppcheck' into 'main'
Michal Nowak [Tue, 14 Dec 2021 14:07:57 +0000 (14:07 +0000)] 
Merge branch '2886-drop-cppcheck' into 'main'

Drop cppcheck

Closes #2886 and #2698

See merge request isc-projects/bind9!5574

4 years agoAdd CHANGES note for [GL #2886]
Michal Nowak [Tue, 30 Nov 2021 13:24:36 +0000 (14:24 +0100)] 
Add CHANGES note for [GL #2886]

4 years agoDrop cppcheck workarounds
Michal Nowak [Tue, 30 Nov 2021 15:31:48 +0000 (16:31 +0100)] 
Drop cppcheck workarounds

As cppcheck was removed from the CI, associated workarounds and
suppressions are not required anymore.

4 years agoDrop cppcheck CI job
Michal Nowak [Tue, 30 Nov 2021 12:52:49 +0000 (13:52 +0100)] 
Drop cppcheck CI job

Every cppcheck update brings the cost of addressing new false positives
in the BIND 9 source code while not reaping any benefits in case of
identified issues with the code.

4 years agoMerge branch '3056-interface-scan-tls-https-recreate-only-when-reconfiguring' into...
Arаm Sаrgsyаn [Tue, 14 Dec 2021 13:28:54 +0000 (13:28 +0000)] 
Merge branch '3056-interface-scan-tls-https-recreate-only-when-reconfiguring' into 'main'

Recreate HTTPS and TLS interfaces only during reconfiguration

Closes #3056

See merge request isc-projects/bind9!5636

4 years agoRecreate HTTPS and TLS interfaces only during reconfiguration
Aram Sargsyan [Tue, 14 Dec 2021 09:28:01 +0000 (09:28 +0000)] 
Recreate HTTPS and TLS interfaces only during reconfiguration

The 850e9e59bf8c29f895a981211c72c0b3c294bcfd commit intended to recreate
the HTTPS and TLS interfaces during reconfiguration, but they are being
recreated also during regular interface re-scans.

Make sure the HTTPS and TLS interfaces are being recreated only during
reconfiguration.

4 years agoMerge branch '3053-tls-listeners-recreate-on-reconfiguration' into 'main'
Arаm Sаrgsyаn [Mon, 13 Dec 2021 11:06:09 +0000 (11:06 +0000)] 
Merge branch '3053-tls-listeners-recreate-on-reconfiguration' into 'main'

Recreate TLS interfaces during reconfiguration

Closes #3053

See merge request isc-projects/bind9!5634

4 years agoAdd system test for checking TLS interfaces after a reconfiguration
Aram Sargsyan [Fri, 10 Dec 2021 10:12:20 +0000 (10:12 +0000)] 
Add system test for checking TLS interfaces after a reconfiguration

4 years agoAdd CHANGES for [GL #3053]
Aram Sargsyan [Fri, 10 Dec 2021 09:44:17 +0000 (09:44 +0000)] 
Add CHANGES for [GL #3053]

4 years agoRecreate TLS interfaces during reconfiguration
Aram Sargsyan [Thu, 9 Dec 2021 14:49:51 +0000 (14:49 +0000)] 
Recreate TLS interfaces during reconfiguration

For DoH and DoT listeners, a reconfiguration event triggers a creation
of a new 'SSL_CTX' TLS context, and a destruction of the old one.

The network manager, though, keeps using the old context which causes
errors.

During interface scanning, when a matching existing interface is found,
reuse it only when it doesn't have a TLS context, otherwise shut it down
and recreate with a new TLS context.

4 years agoMerge branch 'matthijs/pemensik-bug-main-isdir-error-rhbz490837' into 'main'
Matthijs Mekking [Fri, 10 Dec 2021 10:24:54 +0000 (10:24 +0000)] 
Merge branch 'matthijs/pemensik-bug-main-isdir-error-rhbz490837' into 'main'

Improve error message when directory name is given

See merge request isc-projects/bind9!5633

4 years agoImprove error message when directory name is given
Petr Menšík [Mon, 29 Nov 2021 23:04:35 +0000 (00:04 +0100)] 
Improve error message when directory name is given

Surprising error IO error is returned when directory name
is given instead of named.conf file. It can be passed to named-checkconf
or include statement. Make a simple change to return Invalid file
instead. Still not precise, but much better error message is returned.

Fix of rhbz#490837.

4 years agoMerge branch 'michal/remove-mutex-profiling-code' into 'main'
Michał Kępień [Thu, 9 Dec 2021 13:47:44 +0000 (13:47 +0000)] 
Merge branch 'michal/remove-mutex-profiling-code' into 'main'

Remove mutex profiling code

See merge request isc-projects/bind9!5629

4 years agoRemove mutex debugging code
Michał Kępień [Thu, 9 Dec 2021 13:02:36 +0000 (14:02 +0100)] 
Remove mutex debugging code

Mutex debugging code (used when the ISC_MUTEX_DEBUG preprocessor macro
is set to 1 and PTHREAD_MUTEX_ERRORCHECK is defined) has been broken for
the past 3 years (since commit 2f3eee5a4fdad6606135116c70875b3180c7ed83)
and nobody complained, which is a strong indication that this code is
not being used these days any more.  External tools for detecting
locking issues are already wired into various GitLab CI checks.  Drop
all code depending on the ISC_MUTEX_DEBUG preprocessor macro being set.

4 years agoRemove mutex profiling code
Michał Kępień [Thu, 9 Dec 2021 11:24:12 +0000 (12:24 +0100)] 
Remove mutex profiling code

Mutex profiling code (used when the ISC_MUTEX_PROFILE preprocessor macro
is set to 1) has been broken for the past 3 years (since commit
0bed9bfc28a204cde57c6f68170ecc89ebfa6dc8) and nobody complained, which
is a strong indication that this code is not being used these days any
more.  External tools for both measuring performance and detecting
locking issues are already wired into various GitLab CI checks.  Drop
all code depending on the ISC_MUTEX_PROFILE preprocessor macro being
set.

4 years agoMerge branch '3042-tcp-hang' into 'main'
Evan Hunt [Wed, 8 Dec 2021 18:48:34 +0000 (18:48 +0000)] 
Merge branch '3042-tcp-hang' into 'main'

prevent a shutdown hang on non-matching TCP responses

Closes #3042

See merge request isc-projects/bind9!5616

4 years agoCHANGES for [GL #3042]
Evan Hunt [Thu, 2 Dec 2021 20:13:56 +0000 (12:13 -0800)] 
CHANGES for [GL #3042]

4 years agoadd system test for a no-questions reply over TCP
Evan Hunt [Fri, 3 Dec 2021 19:29:56 +0000 (11:29 -0800)] 
add system test for a no-questions reply over TCP

4 years agoincidental cleanups
Evan Hunt [Thu, 2 Dec 2021 20:10:54 +0000 (12:10 -0800)] 
incidental cleanups

the 'dipsatchmgr->state' was never set, so the MGR_IS_SHUTTINGDOWN
macro was always false. both of these have been removed.

renamed the 'dispatch->state' field to 'tcpstate' to make its purpose
less ambiguous.

changed an FCTXTRACE log message from "response did not match question"
to the more correctly descriptive "invalid question section".

4 years agoprevent a shutdown hang on non-matching TCP responses
Evan Hunt [Thu, 2 Dec 2021 20:04:42 +0000 (12:04 -0800)] 
prevent a shutdown hang on non-matching TCP responses

When a non-matching DNS response is received by the resolver,
it calls dns_dispatch_getnext() to resume reading. This is necessary
for UDP but not for TCP, because TCP connections automatically
resume reading after any valid DNS response.

This commit adds a 'tcpreading' flag to TCP dispatches, so that
`dispatch_getnext()` can be called multiple times without subsequent
calls having any effect.

4 years agoMerge branch '3051-missing-destroy-for-pthread-primitives' into 'main'
Ondřej Surý [Wed, 8 Dec 2021 17:17:17 +0000 (17:17 +0000)] 
Merge branch '3051-missing-destroy-for-pthread-primitives' into 'main'

Stop leaking mutex in nmworker and cond in nm socket

Closes #3051

See merge request isc-projects/bind9!5622

4 years agoAdd CHANGES and release not for [GL #3051]
Ondřej Surý [Wed, 8 Dec 2021 10:24:47 +0000 (11:24 +0100)] 
Add CHANGES and release not for [GL #3051]

4 years agoStop leaking mutex in nmworker and cond in nm socket
Ondřej Surý [Mon, 6 Dec 2021 10:10:17 +0000 (11:10 +0100)] 
Stop leaking mutex in nmworker and cond in nm socket

On FreeBSD, the pthread primitives are not solely allocated on stack,
but part of the object lives on the heap.  Missing pthread_*_destroy
causes the heap memory to grow and in case of fast lived object it's
possible to run out-of-memory.

Properly destroy the leaking mutex (worker->lock) and
the leaking condition (sock->cond).

4 years agoMerge branch '3048-fix-isc_hp-initialization' into 'main'
Ondřej Surý [Wed, 8 Dec 2021 16:33:40 +0000 (16:33 +0000)] 
Merge branch '3048-fix-isc_hp-initialization' into 'main'

Fix the isc_hp initialization and memory usage

Closes #3048

See merge request isc-projects/bind9!5620

4 years agoReduce the number of hazard pointers
Ondřej Surý [Tue, 7 Dec 2021 19:35:58 +0000 (20:35 +0100)] 
Reduce the number of hazard pointers

Previously, we set the number of the hazard pointers to be 4 times the
number of workers because the dispatch ran on the old socket code.
Since the old socket code was removed there's a smaller number of
threads, namely:

 - 1 main thread
 - 1 timer thread
 - <n> netmgr threads
 - <n> threadpool threads

Set the number of hazard pointers to 2 + 2 * workers.

4 years agoFix the isc_hp initialization and memory usage
Ondřej Surý [Tue, 7 Dec 2021 10:15:27 +0000 (11:15 +0100)] 
Fix the isc_hp initialization and memory usage

Previously, the isc_hp_init() could not lower the value of
isc__hp_max_threads, but because of a mistake the isc__hp_max_threads
would be set to HP_MAX_THREADS (e.g. 128 threads) thus it would be
always set to 128.  This would result in increased memory usage even
when small number of workers were in use.

Change the default value of isc__hp_max_threads to be 1.

Additionally, enforce the max_hps value in isc_hp_new() to be smaller or
equal to HP_MAX_HPS.  The only user is isc_queue which uses just 1
hazard pointer, so it's only theoretical issue.