]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 years agoFix a memory leak in dns_dlzcreate()
Aram Sargsyan [Tue, 4 Jan 2022 18:49:20 +0000 (18:49 +0000)] 
Fix a memory leak in dns_dlzcreate()

dns_dlzcreate() fails to free the memory allocated for dlzname
when an error occurs.

Free dlzname's memory (acquired earlier with isc_mem_strdup())
by calling isc_mem_free() before returning an error code.

4 years agoFix invalid control port number in the catz system test
Aram Sargsyan [Tue, 4 Jan 2022 17:22:32 +0000 (17:22 +0000)] 
Fix invalid control port number in the catz system test

When failure is expected, the `rndc` command in the catz system test
is being called directly instead of using a function, i.e.:

    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig \
        > /dev/null 2>&1 && ret=1

... instead of:

    rndccmd 10.53.0.2 reconfig && ret=1

This is done to suppress messages like "lt-rndc: 'reconfig' failed:
failure" appearing in the message log of the test, because failure
is actually expected, and the appearance of that message can be
confusing.

The port value used in this case is not correct, making the
`rndc reload` command to fail.  This error was not detected earlier
only because the failure of the command is actually expected, but
the failure happens for a "wrong" reason, and the test still passes.

Fix the error by using the existing variable instead of the fixed
number.

4 years agoAdd a system test for view reverting after a failed reconfiguration
Aram Sargsyan [Wed, 29 Dec 2021 09:07:03 +0000 (09:07 +0000)] 
Add a system test for view reverting after a failed reconfiguration

Test the view reverting code by introducing a faulty dlz configuration
in named.conf and using `rndc reconfig` to check if named handles the
situation correctly.

We use "dlz" because the dlz processing code is located in an ideal
place in the view configuration function for the test to cover the
view reverting code.

This test is specifically added to the catz system test to additionally
cover the catz reconfiguration during the mentioned failed
reconfiguration attempt.

4 years agoAdd CHANGES and release notes for [GL #3060]
Aram Sargsyan [Tue, 28 Dec 2021 12:31:10 +0000 (12:31 +0000)] 
Add CHANGES and release notes for [GL #3060]

4 years agoImprove the zones' view reverting logic when a zone is a catalog zone
Aram Sargsyan [Tue, 28 Dec 2021 12:08:48 +0000 (12:08 +0000)] 
Improve the zones' view reverting logic when a zone is a catalog zone

When a zone is being configured with a new view, the catalog zones
structure will also be linked to that view. Later on, in case of some
error, should the zone be reverted to the previous view, the link
between the catalog zones structure and the view won't be reverted.

Change the dns_zone_setviewrevert() function so it calls
dns_zone_catz_enable() during a zone revert, which will reset the
link between `catzs` and view.

4 years agoSeparate the locked parts of dns_zone_catz_enable/disable functions
Aram Sargsyan [Wed, 5 Jan 2022 09:38:36 +0000 (09:38 +0000)] 
Separate the locked parts of dns_zone_catz_enable/disable functions

Separate the locked parts of dns_zone_catz_enable() and
dns_zone_catz_disable() functions into static functions.  This will
let us perform those tasks from the other parts of the module while
the zone is locked, avoiding one pair of additional unlocking and
locking operations.

4 years agoImprove the view configuration error handling and reverting logic
Aram Sargsyan [Tue, 28 Dec 2021 11:51:01 +0000 (11:51 +0000)] 
Improve the view configuration error handling and reverting logic

If a view configuration error occurs during a named reconfiguration
procedure, BIND can end up having twin views (old and new), with some
zones and internal structures attached to the old one, and others
attached to the new one, which essentially creates chaos.

Implement some additional view reverting mechanisms to avoid the
situation described above:

 1. Revert rpz configuration.

 2. Revert catz configuration.

 3. Revert zones to view attachments.

4 years agoMerge branch 'pspacek/misc-doc-cleanups' into 'main'
Petr Špaček [Tue, 25 Jan 2022 08:15:07 +0000 (08:15 +0000)] 
Merge branch 'pspacek/misc-doc-cleanups' into 'main'

Miscellaneous documentation cleanups

See merge request isc-projects/bind9!5752

4 years agoFix incorrect RFC footnote about A6 RR type in RFC4033
Petr Špaček [Fri, 21 Jan 2022 12:46:49 +0000 (13:46 +0100)] 
Fix incorrect RFC footnote about A6 RR type in RFC4033

A6 type is not mentioned anywhere in RFC4033.

4 years agoRemove RFCs not implemented in BIND from list in the ARM
Petr Špaček [Thu, 20 Jan 2022 16:18:06 +0000 (17:18 +0100)] 
Remove RFCs not implemented in BIND from list in the ARM

This commit partially removes extra RFCs which are not listed in
file doc/misc/rfc-compliance.

Most of the removed RFCs are either outright obsolete, irrelevant,
or not implemented. Rationale:
- 974 - obsolete
- 1033 - ops info, hardly followed today
- 1464 - ops info
- 1591 - policy
- 1537 - obsolete
- 1713 - obsolete
- 1794 - notimp
- 2010 - ops info
- 2052 - obsolete
- 2065 - obsolete
- 2137 - obsolete
- 2168 - obsolete
- 2240 - obsolete
- 2345 - not dns
- 2352 - not dns
- 2540 - notimp
- 2825 - notimp, info, obsolete
- 2826 - notimp
- 2929 - obsolete
- 3071 - policy
- 3090 - obsolete
- 3258 - notimp
- 6594 - iana, SSHFP
- 7216 - not dns
- 8482 - notimp
- 8490 - notimp

Probably most notable RFCs removed are:
- 8482 for special ANY handling
- 8490 for Stateful Operations
As far as I can tell BIND does not implement those.

4 years agoReword RFC section in the ARM
Petr Špaček [Thu, 20 Jan 2022 16:04:00 +0000 (17:04 +0100)] 
Reword RFC section in the ARM

Add couple links and caveant for uninitiated readers.

4 years agoAdd RFCs listed in doc/misc/rfc-compliance to doc/arm/general.rst
Petr Špaček [Thu, 20 Jan 2022 13:07:25 +0000 (14:07 +0100)] 
Add RFCs listed in doc/misc/rfc-compliance to doc/arm/general.rst

There were three RFCs listed in list of "RFCs we implement" but missing
in the ARM.

Command to compare lists in the two documents:

    diff <(grep -o '^  RFC[0-9]\+' doc/misc/rfc-compliance | sed -e 's/[^0-9]//g' | sort -n) <(grep  '^:rfc:`' doc/arm/general.rst | sed -e 's/^.*`\([0-9]*\)`.*$/\1/' | sort -n)

4 years agoRework doc/arm/build.rst
Petr Špaček [Thu, 20 Jan 2022 10:31:40 +0000 (11:31 +0100)] 
Rework doc/arm/build.rst

  - Revise the list of required libraries.
  - Apply miscellaneous tweaks to style, formatting, and ordering.

4 years agoDeduplicate text between Building BIND 9 / Supported Platforms in the ARM
Petr Špaček [Wed, 19 Jan 2022 15:37:04 +0000 (16:37 +0100)] 
Deduplicate text between Building BIND 9 / Supported Platforms in the ARM

Supported Platforms section is now really only about platforms and not
libraries. Libraries were moved to the Building BIND section.

We now have section for required libraries, and second with optional
features.  Wordy explanations were taken verbatim from the original
README.md.

4 years agoReplace Building BIND 9 section in README with reference to ARM
Petr Špaček [Thu, 20 Jan 2022 09:47:31 +0000 (10:47 +0100)] 
Replace Building BIND 9 section in README with reference to ARM

4 years agoConvert "Building BIND" section from README.md to reStructuredText
Petr Špaček [Thu, 20 Jan 2022 09:24:38 +0000 (10:24 +0100)] 
Convert "Building BIND" section from README.md to reStructuredText

Converted using pandoc 2.14.2-9 on Arch Linux:

    $ pandoc --shift-heading-level-by=-1 -f markdown -t rst README.md > doc/arm/build.rst

Plus hand-edit to remove sections other than Building BIND 9, remove
misindentation in section headers, and add a standard copyright header.

4 years agoLink to ISC KB for most up-to-date platform support statuses
Petr Špaček [Wed, 19 Jan 2022 15:36:27 +0000 (16:36 +0100)] 
Link to ISC KB for most up-to-date platform support statuses

4 years agoReplace all occurences of PLATFORMS file with reference to the ARM
Petr Špaček [Wed, 19 Jan 2022 15:30:18 +0000 (16:30 +0100)] 
Replace all occurences of PLATFORMS file with reference to the ARM

The conf.py exclude_patterns now includes platforms.rst to avoid
problems with redefining labels:
https://github.com/sphinx-doc/sphinx/issues/1668#issuecomment-71376208

4 years agoReplace duplicate Supported Operating Systems in the ARM by PLATFORMS.rst
Petr Špaček [Wed, 19 Jan 2022 14:40:56 +0000 (15:40 +0100)] 
Replace duplicate Supported Operating Systems in the ARM by PLATFORMS.rst

4 years agoConvert PLATFORMS file from Markdown to reStructuredText
Petr Špaček [Wed, 19 Jan 2022 14:24:39 +0000 (15:24 +0100)] 
Convert PLATFORMS file from Markdown to reStructuredText

Converted using pandoc 2.14.2-9 on Arch Linux:

    $ pandoc -f markdown -t rst PLATFORMS.md > PLATFORMS.rst

The pandoc-generated copyright header was subsequently replaced with
usual one for .rst files.

4 years agoUpdate BIND version number in PLATFORMS.md to 9.19
Petr Špaček [Wed, 19 Jan 2022 10:47:10 +0000 (11:47 +0100)] 
Update BIND version number in PLATFORMS.md to 9.19

4 years agoDocument that tls statement is subject to change
Petr Špaček [Fri, 21 Jan 2022 10:13:05 +0000 (11:13 +0100)] 
Document that tls statement is subject to change

4 years agoClarify XoT usage and warn about the unauthenticated mode
Petr Špaček [Mon, 17 Jan 2022 18:49:48 +0000 (19:49 +0100)] 
Clarify XoT usage and warn about the unauthenticated mode

4 years agoMerge branch 'ondrej/use-utc-for-reproducible-builds' into 'main'
Ondřej Surý [Mon, 24 Jan 2022 15:32:18 +0000 (15:32 +0000)] 
Merge branch 'ondrej/use-utc-for-reproducible-builds' into 'main'

Use UTC datetime for reproducible builds

See merge request isc-projects/bind9!5750

4 years agoUse UTC datetime for reproducible builds
Ondřej Surý [Mon, 24 Jan 2022 15:09:48 +0000 (16:09 +0100)] 
Use UTC datetime for reproducible builds

For reproducible builds, we use last modification time of the CHANGES
file.  This works pretty well, unless the builds are made in different
timezones.

Use UTC option to date command to make the builds reproducible.

4 years agoMerge branch '3108-bind9-fails-to-start-on-machines-where-glibc-does-not-provide...
Michał Kępień [Mon, 24 Jan 2022 08:24:12 +0000 (08:24 +0000)] 
Merge branch '3108-bind9-fails-to-start-on-machines-where-glibc-does-not-provide-l1-cache-size' into 'main'

Ignore the invalid L1 cache line size returned by sysconf()

Closes #3108

See merge request isc-projects/bind9!5748

4 years agoAdd CHANGES note for [GL #3108]
Ondřej Surý [Sat, 22 Jan 2022 16:04:17 +0000 (17:04 +0100)] 
Add CHANGES note for [GL #3108]

4 years agoIgnore the invalid L1 cache line size returned by sysconf()
Ondřej Surý [Sat, 22 Jan 2022 15:59:50 +0000 (16:59 +0100)] 
Ignore the invalid L1 cache line size returned by sysconf()

On some systems, the glibc can return 0 instead of cache-line size to
indicate the cache line sizes cannot be determined.  This is comment
from glibc source code:

    /* In general we cannot determine these values.  Therefore we
       return zero which indicates that no information is
       available.  */

As the goal of the check is to determine whether the L1 cache line size
is still 64 and we would use this value in case the sysconf() call is
not available, we can also ignore the invalid values returned by the
sysconf() call.

4 years agoMerge branch 'pspacek/remove-duplicate-named.conf.rst' into 'main'
Petr Špaček [Fri, 21 Jan 2022 14:32:38 +0000 (14:32 +0000)] 
Merge branch 'pspacek/remove-duplicate-named.conf.rst' into 'main'

Remove duplicate named.conf.rst file

See merge request isc-projects/bind9!5731

4 years agoRemove duplicate named.conf.rst file
Petr Špaček [Mon, 17 Jan 2022 13:53:59 +0000 (14:53 +0100)] 
Remove duplicate named.conf.rst file

As far as I can tell, it is some leftover from the times when Sphinx
docs were introduced (commit 9fb6d11abbdb10ded128f0ee5c004f24b4030ede).
It seems like it is not referenced from anywhere.

4 years agoMerge branch 'michal/miscellaneous-text-tweaks-related-to-doh-and-dot' into 'main'
Michał Kępień [Thu, 20 Jan 2022 17:38:50 +0000 (17:38 +0000)] 
Merge branch 'michal/miscellaneous-text-tweaks-related-to-doh-and-dot' into 'main'

Miscellaneous text tweaks related to DNS-over-HTTPS and DNS-over-TLS

See merge request isc-projects/bind9!5743

4 years agoSuggest --disable-doh when libnghttp2 is not found
Michał Kępień [Thu, 20 Jan 2022 14:40:37 +0000 (15:40 +0100)] 
Suggest --disable-doh when libnghttp2 is not found

Extend the error message displayed when support for DNS over HTTPS is
requested but libnghttp2 is unavailable at build time, in order to help
the user find a way out of such a situation.

4 years agoAvoid use of the DoH acronym in ./configure output
Michał Kępień [Thu, 20 Jan 2022 14:40:37 +0000 (15:40 +0100)] 
Avoid use of the DoH acronym in ./configure output

Replace all uses of the DoH acronym in ./configure output with
"DNS-over-HTTPS support" in order to improve error message readability.

4 years agoFix spelling of "DNS over HTTPS" & "DNS over TLS"
Michał Kępień [Thu, 20 Jan 2022 14:40:37 +0000 (15:40 +0100)] 
Fix spelling of "DNS over HTTPS" & "DNS over TLS"

The terms "DNS over HTTPS" and "DNS over TLS" should be hyphenated when
they are used as adjectives and non-hyphenated otherwise.  Ensure all
occurrences of these terms in the source tree follow the above rule.
(CHANGES and release notes are intentionally left intact.)

Tweak a related ARM snippet, fixing a typo in the process.

4 years agoMerge branch 'v9_17_22-release' into 'main'
Michał Kępień [Thu, 20 Jan 2022 10:26:54 +0000 (10:26 +0000)] 
Merge branch 'v9_17_22-release' into 'main'

Merge 9.17.22 release branch

See merge request isc-projects/bind9!5741

4 years agoPrepare release notes for BIND 9.17.23
Michał Kępień [Thu, 20 Jan 2022 10:20:03 +0000 (11:20 +0100)] 
Prepare release notes for BIND 9.17.23

4 years agoUpdate BIND version to 9.17.22
Michał Kępień [Wed, 12 Jan 2022 11:25:11 +0000 (12:25 +0100)] 
Update BIND version to 9.17.22

4 years agoAdd a CHANGES marker
Michał Kępień [Wed, 12 Jan 2022 11:25:11 +0000 (12:25 +0100)] 
Add a CHANGES marker

4 years agoMerge branch 'pspacek/prepare-documentation-for-bind-9.17.22' into 'v9_17_22-release'
Michał Kępień [Wed, 12 Jan 2022 11:23:56 +0000 (11:23 +0000)] 
Merge branch 'pspacek/prepare-documentation-for-bind-9.17.22' into 'v9_17_22-release'

Prepare documentation for BIND 9.17.22

See merge request isc-private/bind9!345

4 years agoPrepare release notes for BIND 9.17.22
Michał Kępień [Wed, 12 Jan 2022 10:48:45 +0000 (11:48 +0100)] 
Prepare release notes for BIND 9.17.22

4 years agoReorder release notes
Michał Kępień [Wed, 12 Jan 2022 10:48:45 +0000 (11:48 +0100)] 
Reorder release notes

4 years agoAdd release note for GL #2398 and GL #3048
Petr Špaček [Fri, 7 Jan 2022 14:35:13 +0000 (15:35 +0100)] 
Add release note for GL #2398 and GL #3048

Related: !5620
Fix the isc_hp initialization and memory usage

Related: !5646
Reduce freemax values for dns_message mempools

4 years agoAdd release note for GL #2264
Petr Špaček [Fri, 7 Jan 2022 14:23:36 +0000 (15:23 +0100)] 
Add release note for GL #2264

Related: !5627
Use ECDSA P-256 instead of 4096-bit RSA for 'tls ephemeral'

4 years agoTweak and reword release notes
Petr Špaček [Fri, 7 Jan 2022 15:07:54 +0000 (16:07 +0100)] 
Tweak and reword release notes

4 years agoRemove release note for GL #3079
Michał Kępień [Wed, 12 Jan 2022 10:48:45 +0000 (11:48 +0100)] 
Remove release note for GL #3079

4 years agoMerge branch '3080-rndc-catch-canceled' into 'main'
Michał Kępień [Thu, 20 Jan 2022 08:03:18 +0000 (08:03 +0000)] 
Merge branch '3080-rndc-catch-canceled' into 'main'

rndc: catch ISC_R_CANCELED in rndc_recvdone()

Closes #3080

See merge request isc-projects/bind9!5716

4 years agoCHANGES for [GL #3080]
Evan Hunt [Thu, 13 Jan 2022 19:21:45 +0000 (11:21 -0800)] 
CHANGES for [GL #3080]

4 years agorndc: prevent crashing after receiving a signal
Michał Kępień [Wed, 19 Jan 2022 13:30:17 +0000 (14:30 +0100)] 
rndc: prevent crashing after receiving a signal

If isc_app_run() gets interrupted by a signal, the global 'rndc_task'
variable may already be detached from (set to NULL) by the time the
outstanding netmgr callbacks are run.  This triggers an assertion
failure in isc_task_shutdown().  However, explicitly calling
isc_task_shutdown() from rndc code is redundant because it does not use
isc_task_onshutdown() and the task_shutdown() function gets
automatically called anyway when the task manager gets destroyed (after
isc_app_run() returns).  Remove the redundant isc_task_shutdown() calls
to prevent crashes after receiving a signal.

4 years agorndc: sync ISC_R_CANCELED handling in callbacks
Evan Hunt [Thu, 13 Jan 2022 19:18:27 +0000 (11:18 -0800)] 
rndc: sync ISC_R_CANCELED handling in callbacks

rndc_recvdone() is not treating the ISC_R_CANCELED result code as a
request to stop data processing, which may cause a crash when trying to
dereference ccmsg->buffer.  Fix by ensuring ISC_R_CANCELED results in an
early exit from rndc_recvdone().

Make sure the logic for handling ISC_R_CANCELED in rndc_recvnonce()
matches the one present in rndc_recvdone() to ensure consistent behavior
between these two sibling functions.

4 years agoMerge branch 'pspacek/doc-cleanup' into 'main'
Petr Špaček [Tue, 18 Jan 2022 16:20:55 +0000 (16:20 +0000)] 
Merge branch 'pspacek/doc-cleanup' into 'main'

Developer docs cleanup

See merge request isc-projects/bind9!4527

4 years agoReplace obsolete references to ATF with Cmocka
Petr Špaček [Tue, 5 Jan 2021 13:04:50 +0000 (14:04 +0100)] 
Replace obsolete references to ATF with Cmocka

Fixup for MR!886.

4 years agoDocument new system test output format after build system rewrite
Petr Špaček [Tue, 5 Jan 2021 14:32:33 +0000 (15:32 +0100)] 
Document new system test output format after build system rewrite

Fixup to MR !985.

4 years agoFix command to run all unit tests in doc/dev/dev.md
Petr Špaček [Tue, 5 Jan 2021 12:46:16 +0000 (13:46 +0100)] 
Fix command to run all unit tests in doc/dev/dev.md

Fixup for build system rewrite 978c7b2e89aa37a7ddfe2f6b6ba12ce73dd04528,
MR !985.

4 years agoMerge branch 'artem-doth-test-fix-failure-after-reconfig' into 'main'
Artem Boldariev [Tue, 18 Jan 2022 12:43:42 +0000 (12:43 +0000)] 
Merge branch 'artem-doth-test-fix-failure-after-reconfig' into 'main'

doth test: fix failure after reconfig

See merge request isc-projects/bind9!5720

4 years agodoth test: fix failure after reconfig
Artem Boldariev [Fri, 14 Jan 2022 10:25:04 +0000 (12:25 +0200)] 
doth test: fix failure after reconfig

Sometimes the serving a query or two might fail in the test due to the
listeners not being reinitialised on time. This commit makes the test
suite to wait for reconfiguration message in the log file to detect
the time when the reconfiguration request completed.

4 years agoMerge branch '3099-reimplement-the-gnutls-cli-check-in-python' into 'main'
Michał Kępień [Tue, 18 Jan 2022 10:03:09 +0000 (10:03 +0000)] 
Merge branch '3099-reimplement-the-gnutls-cli-check-in-python' into 'main'

Reimplement the gnutls-cli check in Python

Closes #3099

See merge request isc-projects/bind9!5732

4 years agoReimplement the gnutls-cli check in Python
Michał Kępień [Tue, 18 Jan 2022 10:00:46 +0000 (11:00 +0100)] 
Reimplement the gnutls-cli check in Python

gnutls-cli is tricky to script around as it immediately closes the
server connection when its standard input is closed.  This prevents
simple shell-based I/O redirection from being used for capturing the DNS
response sent over a TLS connection and the workarounds for this issue
employ non-standard utilities like "timeout".

Instead of resorting to clever shell hacks, reimplement the relevant
check in Python.  Exit immediately upon receiving a valid DNS response
or when gnutls-cli exits in order to decrease the test's run time.
Employ dnspython to avoid the need for storing DNS queries in binary
files and to improve test readability.  Capture more diagnostic output
to facilitate troubleshooting.  Use a pytest fixture instead of an
Autoconf macro to keep test requirements localized.

4 years agoMerge branch '3093-restore-setting-IPV6_V6ONLY-on-IPv6-sockets' into 'main'
Ondřej Surý [Mon, 17 Jan 2022 22:55:20 +0000 (22:55 +0000)] 
Merge branch '3093-restore-setting-IPV6_V6ONLY-on-IPv6-sockets' into 'main'

Explicitly enable IPV6_V6ONLY on the netmgr sockets

Closes #3093

See merge request isc-projects/bind9!5714

4 years agoAdd CHANGES and release notes for [GL #3093]
Ondřej Surý [Thu, 13 Jan 2022 15:57:37 +0000 (16:57 +0100)] 
Add CHANGES and release notes for [GL #3093]

4 years agoRemove +mapped option from dig
Ondřej Surý [Thu, 13 Jan 2022 12:29:09 +0000 (13:29 +0100)] 
Remove +mapped option from dig

The network manager doesn't have support for IPv4-mapped IPv6 addresses,
thus we are removing the +mapped option from dig command.

4 years agoExplicitly enable IPV6_V6ONLY on the netmgr sockets
Ondřej Surý [Thu, 13 Jan 2022 12:24:55 +0000 (13:24 +0100)] 
Explicitly enable IPV6_V6ONLY on the netmgr sockets

Some operating systems (OpenBSD and DragonFly BSD) don't restrict the
IPv6 sockets to sending and receiving IPv6 packets only.  Explicitly
enable the IPV6_V6ONLY socket option on the IPv6 sockets to prevent
failures from using the IPv4-mapped IPv6 address.

4 years agoMerge branch '3101-use-ext-regex-to-check-for-http2-support-in-curl' into 'main'
Artem Boldariev [Mon, 17 Jan 2022 17:14:45 +0000 (17:14 +0000)] 
Merge branch '3101-use-ext-regex-to-check-for-http2-support-in-curl' into 'main'

doth test: use extended reg. expression to check for HTTP/2 support

Closes #3101

See merge request isc-projects/bind9!5733

4 years agodoth test: use extended reg. expression to check for HTTP/2 support
Artem Boldariev [Mon, 17 Jan 2022 14:32:10 +0000 (16:32 +0200)] 
doth test: use extended reg. expression to check for HTTP/2 support

Using extended regular expressions to check for HTTP/2 support in curl
appears to be a more portable option, which also works on
e.g. OpenBSD.

4 years agoMerge branch 'djt-update-cookie-secret-doc' into 'main'
Ondřej Surý [Mon, 17 Jan 2022 10:50:30 +0000 (10:50 +0000)] 
Merge branch 'djt-update-cookie-secret-doc' into 'main'

Update docs to reflect changes to acceptable cookie-secret values

See merge request isc-projects/bind9!5628

4 years agodocs: Update ARM to reflect changes to acceptable cookie-secret values
Dan Theisen [Fri, 7 Jan 2022 02:11:49 +0000 (18:11 -0800)] 
docs: Update ARM to reflect changes to acceptable cookie-secret values

4 years agoMerge branch '3093-missing-libuv-code' into 'main'
Ondřej Surý [Mon, 17 Jan 2022 10:46:35 +0000 (10:46 +0000)] 
Merge branch '3093-missing-libuv-code' into 'main'

add UV_ENOTSUP to isc___nm_uverr2result()

Closes #3093

See merge request isc-projects/bind9!5712

4 years agoadd UV_ENOTSUP to isc___nm_uverr2result()
Evan Hunt [Wed, 12 Jan 2022 18:43:18 +0000 (10:43 -0800)] 
add UV_ENOTSUP to isc___nm_uverr2result()

This error code is now mapped to ISC_R_FAMILYNOSUPPORT.

4 years agoMerge branch 'ondrej/fix-missing-backtick-in-host.rst' into 'main'
Ondřej Surý [Sun, 16 Jan 2022 07:01:45 +0000 (07:01 +0000)] 
Merge branch 'ondrej/fix-missing-backtick-in-host.rst' into 'main'

Add missing backtick to host.rst

See merge request isc-projects/bind9!5724

4 years agoAdd missing backtick to host.rst
Ondřej Surý [Sun, 16 Jan 2022 06:56:17 +0000 (07:56 +0100)] 
Add missing backtick to host.rst

The missing backtick was causing formatting problems in the host
manpage.

4 years agoMerge branch 'artem-better-doh-error-logging' into 'main'
Artem Boldariev [Fri, 14 Jan 2022 14:23:43 +0000 (14:23 +0000)] 
Merge branch 'artem-better-doh-error-logging' into 'main'

DoH: log bad HTTP/2 requests

See merge request isc-projects/bind9!5679

4 years agoDoH: ensure that server_send_error_response() is used properly
Artem Boldariev [Fri, 14 Jan 2022 12:14:53 +0000 (14:14 +0200)] 
DoH: ensure that server_send_error_response() is used properly

The server_send_error_response() function is supposed to be used only
in case of failures and never in case of legitimate requests. Ensure
that ISC_HTTP_ERROR_SUCCESS is never passed there by mistake.

4 years agoDoH: add bad HTTP/2 requests logging
Artem Boldariev [Thu, 30 Dec 2021 11:16:05 +0000 (13:16 +0200)] 
DoH: add bad HTTP/2 requests logging

Add some error logging when facing bad requests over HTTP/2. Log the
address and the error description.

4 years agoMerge branch '3069-increase-dig-timeout-in-resolver-test-v2' into 'main'
Ondřej Surý [Fri, 14 Jan 2022 13:51:16 +0000 (13:51 +0000)] 
Merge branch '3069-increase-dig-timeout-in-resolver-test-v2' into 'main'

Increase the timeout to 15 seconds for the resolver test

Closes #3069

See merge request isc-projects/bind9!5721

4 years agoIncrease the timeout to 15 seconds for the resolver test
Ondřej Surý [Fri, 14 Jan 2022 11:27:19 +0000 (12:27 +0100)] 
Increase the timeout to 15 seconds for the resolver test

1. 10 seconds is an unfortunate pick because that reintroduces the
   problem described in commit 5307bf64 (for an earlier check).

   Change the +tries=3 +timeout=10 to +tries=2 +time=15, so that we
   minimize the risk of dig missing any responses sent by the server in
   the first 15 seconds while also increasing our chances of the
   response arriving in time on machines under heavy load and allowing
   it a single retry in case things go awry.

2. The comment about TCP above was misleading: as painfully proven by
   GitLab CI, using TCP is no guarantee of receiving a response in a
   timely manner.  It may help a bit, but it is certainly not a 100%
   reliable solution.

   Change the dig invocation to just use UDP like in the two prior
   tests for consistency (and revise that comment accordingly).

4 years agoMerge branch '3069-increase-dig-timeout-in-resolver-test' into 'main'
Ondřej Surý [Fri, 14 Jan 2022 11:16:11 +0000 (11:16 +0000)] 
Merge branch '3069-increase-dig-timeout-in-resolver-test' into 'main'

Make resolver system test shellcheck clean

Closes #3069

See merge request isc-projects/bind9!5719

4 years agoIncrease the dig timeout in resolver test to 10 seconds
Ondřej Surý [Fri, 14 Jan 2022 10:01:36 +0000 (11:01 +0100)] 
Increase the dig timeout in resolver test to 10 seconds

The resolver system tests was exhibiting often intermitten failures,
increase the timeout from default 5 second to 10 seconds to give the dig
more leeway for providing an answer.

4 years agoMake resolver system test shellcheck clean
Ondřej Surý [Fri, 14 Jan 2022 10:00:24 +0000 (11:00 +0100)] 
Make resolver system test shellcheck clean

The resolver system test shell scripts were using legacy syntax.
Convert the script into POSIX shell syntax and make them shellcheck
clean.

4 years agoMerge branch '3095-detect-padding-in-struct_msghdr' into 'main'
Ondřej Surý [Thu, 13 Jan 2022 23:26:54 +0000 (23:26 +0000)] 
Merge branch '3095-detect-padding-in-struct_msghdr' into 'main'

Instead of detecting MUSL libc, detect padding in struct msghdr

Closes #3095

See merge request isc-projects/bind9!5718

4 years agoInstead of detecting MUSL libc, detect padding in struct msghdr
Ondrej Sury [Thu, 13 Jan 2022 21:43:20 +0000 (22:43 +0100)] 
Instead of detecting MUSL libc, detect padding in struct msghdr

The detection of MUSL libc via autoconf $host turned out to be
not reliable.

Convert the autoconf check from $host detection to actually detect
the padding used in the struct msghdr.

4 years agoMerge branch '3095-invalid-recvmmsg-detection' into 'main'
Ondřej Surý [Thu, 13 Jan 2022 18:43:00 +0000 (18:43 +0000)] 
Merge branch '3095-invalid-recvmmsg-detection' into 'main'

Fix the UDP recvmmsg support

Closes #3095

See merge request isc-projects/bind9!5713

4 years agoAdd CHANGES and release notes for [GL #3095]
Ondřej Surý [Thu, 13 Jan 2022 08:39:41 +0000 (09:39 +0100)] 
Add CHANGES and release notes for [GL #3095]

4 years agoRevert "Always enqueue isc__nm_tcp_resumeread()"
Ondřej Surý [Tue, 11 Jan 2022 13:49:51 +0000 (14:49 +0100)] 
Revert "Always enqueue isc__nm_tcp_resumeread()"

The commit itself is harmless, but at the same time it is also useless,
so we are reverting it.

This reverts commit 11c869a3d53eafa4083b404e6b6686a120919c26.

4 years agoDisable udp recvmmsg support on systems with MUSL libc
Ondrej Sury [Wed, 12 Jan 2022 23:04:57 +0000 (00:04 +0100)] 
Disable udp recvmmsg support on systems with MUSL libc

The Linux kernel diverts from the POSIX specification for two members of
struct msghdr making them size_t sized (instead of int and socklen_t).
In glibc, the developers have decided to use that.  However, the MUSL
developers used padding for the struct and kept the members defined
according to the POSIX.

This creates a problem, because libuv doesn't use recvmmsg() library
call where the padding members are correctly zeroed and instead calls
the syscall directly, the struct msghdr is passed to the kernel with
enormous values in those two members (because of the random junk in the
padding members) and the syscall thus fail with EMSGSIZE.

Disable udp recvmmsg support on systems with MUSL libc until the libuv
starts zeroing the struct msghdr before passing it to the syscall.

4 years agoFix the UDP recvmmsg support
Ondřej Surý [Tue, 11 Jan 2022 11:14:23 +0000 (12:14 +0100)] 
Fix the UDP recvmmsg support

Previously, the netmgr/udp.c tried to detect the recvmmsg detection in
libuv with #ifdef UV_UDP_<foo> preprocessor macros.  However, because
the UV_UDP_<foo> are not preprocessor macros, but enum members, the
detection didn't work.  Because the detection didn't work, the code
didn't have access to the information when we received the final chunk
of the recvmmsg and tried to free the uvbuf every time.  Fortunately,
the isc__nm_free_uvbuf() had a kludge that detected attempt to free in
the middle of the receive buffer, so the code worked.

However, libuv 1.37.0 changed the way the recvmmsg was enabled from
implicit to explicit, and we checked for yet another enum member
presence with preprocessor macro, so in fact libuv recvmmsg support was
never enabled with libuv >= 1.37.0.

This commit changes to the preprocessor macros to autoconf checks for
declaration, so the detection now works again.  On top of that, it's now
possible to cleanup the alloc_cb and free_uvbuf functions because now,
the information whether we can or cannot free the buffer is available to
us.

4 years agoMerge branch '2951-dont-schedule-zone-refresh-when-shutting-down' into 'main'
Ondřej Surý [Thu, 13 Jan 2022 17:46:08 +0000 (17:46 +0000)] 
Merge branch '2951-dont-schedule-zone-refresh-when-shutting-down' into 'main'

Refactor zone stub, refresh and notify event callbacks

Closes #2951

See merge request isc-projects/bind9!5715

4 years agoAdd CHANGES note for [GL #3084]
Ondřej Surý [Fri, 7 Jan 2022 12:23:09 +0000 (13:23 +0100)] 
Add CHANGES note for [GL #3084]

4 years agoDon't schedule next zone events when shutting down
Ondřej Surý [Fri, 7 Jan 2022 12:12:22 +0000 (13:12 +0100)] 
Don't schedule next zone events when shutting down

When the named is shutting down, the zone event callbacks could
re-schedule the stub and refresh events leading to assertion failure.

Handle the ISC_R_SHUTTINGDOWN event state gracefully by bailing out.

4 years agoRefactor zone stub, refresh and notify event callbacks
Ondřej Surý [Fri, 7 Jan 2022 12:10:09 +0000 (13:10 +0100)] 
Refactor zone stub, refresh and notify event callbacks

This commit cleanups the way how we handle the revent->result in the
stub_callback(), refresh_callback() and notify_done() zone callbacks.

4 years agoMerge branch '3086-remove-workaround-for-server-mishandling-notify-with-soa-record...
Ondřej Surý [Thu, 13 Jan 2022 16:56:19 +0000 (16:56 +0000)] 
Merge branch '3086-remove-workaround-for-server-mishandling-notify-with-soa-record-in-answer-section' into 'main'

Remove the workaround for broken handling of NOTIFY with SOA

Closes #3086

See merge request isc-projects/bind9!5704

4 years agoAdd CHANGES note for [GL #3086]
Ondřej Surý [Fri, 7 Jan 2022 12:27:44 +0000 (13:27 +0100)] 
Add CHANGES note for [GL #3086]

4 years agoRemove the workaround for broken handling of NOTIFY with SOA
Ondřej Surý [Fri, 7 Jan 2022 12:14:12 +0000 (13:14 +0100)] 
Remove the workaround for broken handling of NOTIFY with SOA

In 2000, old BIND instances (BIND 8?) would return FORMERR if the SOA is
included in the NOTIFY.

Remove the workaround that detected the state and resent the NOTIFY
without SOA record.

4 years agoMerge branch '3087-tls-ephemeral-ecc-gnutls-nss-compat' into 'main'
Arаm Sаrgsyаn [Thu, 13 Jan 2022 13:11:14 +0000 (13:11 +0000)] 
Merge branch '3087-tls-ephemeral-ecc-gnutls-nss-compat' into 'main'

Use uncompressed point conversion form for 'tls ephemeral' ECC keys

Closes #3087

See merge request isc-projects/bind9!5705

4 years agoAdd a test to query DoT using gnutls-cli
Aram Sargsyan [Mon, 10 Jan 2022 12:42:09 +0000 (12:42 +0000)] 
Add a test to query DoT using gnutls-cli

Add a test to check BIND's DoT (DNS-over-TLS) implementation using
gnutls-cli to confirm that it is compatibe with the GnuTLS library.

4 years agoGenerate a random serial number for 'tls ephemeral' certificates
Aram Sargsyan [Fri, 7 Jan 2022 20:32:18 +0000 (20:32 +0000)] 
Generate a random serial number for 'tls ephemeral' certificates

Clients can cache the TLS certificates and refuse to accept
another one with the same serial number from the same issuer.

Generate a random serial number for the self-signed certificates
instead of using a fixed value.

4 years agoUse uncompressed point conversion form for 'tls ephemeral' ECC keys
Aram Sargsyan [Fri, 7 Jan 2022 20:37:46 +0000 (20:37 +0000)] 
Use uncompressed point conversion form for 'tls ephemeral' ECC keys

GnuTLS, NSS, and possibly other TLS libraries currently fail to work
with compressed point conversion form supported by OpenSSL.

Use uncompressed point conversion form for better compatibility.

4 years agoMerge branch '3079-assertion-failure-on-TCP-read' into 'main'
Ondřej Surý [Thu, 13 Jan 2022 09:26:31 +0000 (09:26 +0000)] 
Merge branch '3079-assertion-failure-on-TCP-read' into 'main'

Use ISC_R_SHUTTINGDOWN to detect netmgr shutting down

Closes #3079

See merge request isc-projects/bind9!5710

4 years agoUpdate CHANGES and release notes for [GL #3079]
Ondřej Surý [Thu, 13 Jan 2022 08:48:38 +0000 (09:48 +0100)] 
Update CHANGES and release notes for [GL #3079]

4 years agoUse ISC_R_SHUTTINGDOWN to detect netmgr shutting down
Ondřej Surý [Tue, 11 Jan 2022 13:27:28 +0000 (14:27 +0100)] 
Use ISC_R_SHUTTINGDOWN to detect netmgr shutting down

When the dispatch code was refactored in libdns, the netmgr was changed
to return ISC_R_SHUTTINGDOWN when the netmgr is shutting down, and the
ISC_R_CANCELED is now reserved only for situation where the callback was
canceled by the caller.

This change wasn't reflected in the controlconf.c channel which was
still looking for ISC_R_CANCELED as the shutdown event.

4 years agoMerge branch 'ondrej/remove-util-copyrights' into 'main'
Ondřej Surý [Tue, 11 Jan 2022 08:58:14 +0000 (08:58 +0000)] 
Merge branch 'ondrej/remove-util-copyrights' into 'main'

Remove the copyright handling via util/copyrights

See merge request isc-projects/bind9!5147

4 years agoRemove util/copyrights
Ondřej Surý [Mon, 10 Jan 2022 20:10:22 +0000 (21:10 +0100)] 
Remove util/copyrights