]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoMerge branch '3479-mysql-is-not-ldap' into 'main'
Matthijs Mekking [Mon, 8 Aug 2022 07:45:23 +0000 (07:45 +0000)] 
Merge branch '3479-mysql-is-not-ldap' into 'main'

Fix mysql bindings

Closes #3479

See merge request isc-projects/bind9!6636

3 years agoFix mysql bindings
Matthijs Mekking [Fri, 5 Aug 2022 09:43:00 +0000 (11:43 +0200)] 
Fix mysql bindings

There was a copy paste error in the Makefile of the mysql dlz modules,
instead of setting the MYSQL_LIBS, LDAP_LIBS where set. This caused
the mysql bindings not to be generated.

3 years agoMerge branch 'michal/set-up-version-and-release-notes-for-bind-9.19.5' into 'main'
Michał Kępień [Fri, 5 Aug 2022 06:40:34 +0000 (06:40 +0000)] 
Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.19.5' into 'main'

Set up version and release notes for BIND 9.19.5

See merge request isc-projects/bind9!6632

3 years agoSet up release notes for BIND 9.19.5
Michał Kępień [Fri, 5 Aug 2022 04:56:30 +0000 (06:56 +0200)] 
Set up release notes for BIND 9.19.5

3 years agoUpdate BIND version to 9.19.5-dev
Michał Kępień [Fri, 5 Aug 2022 04:56:30 +0000 (06:56 +0200)] 
Update BIND version to 9.19.5-dev

3 years agoUpdate BIND version for release v9.19.4
Michał Kępień [Thu, 4 Aug 2022 21:29:55 +0000 (23:29 +0200)] 
Update BIND version for release

3 years agoAdd a CHANGES marker
Michał Kępień [Thu, 4 Aug 2022 21:29:55 +0000 (23:29 +0200)] 
Add a CHANGES marker

3 years agoMerge branch 'michal/prepare-documentation-for-bind-9.19.4' into 'v9_19_4-release'
Michał Kępień [Thu, 4 Aug 2022 21:28:46 +0000 (21:28 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.19.4' into 'v9_19_4-release'

Prepare documentation for BIND 9.19.4

See merge request isc-private/bind9!418

3 years agoTweak and reword release notes
Michał Kępień [Thu, 4 Aug 2022 21:13:22 +0000 (23:13 +0200)] 
Tweak and reword release notes

3 years agoPrepare release notes for BIND 9.19.4
Michał Kępień [Thu, 4 Aug 2022 21:13:22 +0000 (23:13 +0200)] 
Prepare release notes for BIND 9.19.4

3 years agoFix option name in the release note for GL #3140
Michał Kępień [Thu, 4 Aug 2022 21:13:22 +0000 (23:13 +0200)] 
Fix option name in the release note for GL #3140

4 years agoMerge branch 'tls-fix-readpaused-usage' into 'main'
Artem Boldariev [Tue, 2 Aug 2022 14:26:14 +0000 (14:26 +0000)] 
Merge branch 'tls-fix-readpaused-usage' into 'main'

TLS: do not ignore readpaused flag in certain circumstances

See merge request isc-projects/bind9!6627

4 years agoTLS: do not ignore readpaused flag in certain circumstances
Artem Boldariev [Fri, 29 Jul 2022 16:33:25 +0000 (19:33 +0300)] 
TLS: do not ignore readpaused flag in certain circumstances

In some circumstances generic TLS code could have resumed data reading
unexpectedly on the TCP layer code. Due to this, the behaviour of
isc_nm_pauseread() and isc_nm_resumeread() might have been
unexpected. This commit fixes that.

The bug does not seems to have real consequences in the existing code
due to the way the code is used. However, the bug could have lead to
unexpected behaviour and, at any rate, makes the TLS code behave
differently from the TCP code, with which it attempts to be as
compatible as possible.

4 years agoMerge branch 'aram/fetches-per-zone-improve-log-message' into 'main'
Arаm Sаrgsyаn [Mon, 1 Aug 2022 15:21:10 +0000 (15:21 +0000)] 
Merge branch 'aram/fetches-per-zone-improve-log-message' into 'main'

Differentiate between initial and cumulative fetch limit logging

See merge request isc-projects/bind9!6607

4 years agoDifferentiate between initial and cumulative fetch limit logging
Aram Sargsyan [Fri, 22 Jul 2022 08:01:17 +0000 (08:01 +0000)] 
Differentiate between initial and cumulative fetch limit logging

Cumulative fetch limit logging happens on an event of a dropped
fetch if 60 seconds have been passed since the previous log message.
This change makes the log message different for the initial event
and for the later cumulative events to provide more useful information
to the system administrator.

4 years agoMerge branch '3461-fetches-per-zone-final-log-message' into 'main'
Arаm Sаrgsyаn [Mon, 1 Aug 2022 14:33:42 +0000 (14:33 +0000)] 
Merge branch '3461-fetches-per-zone-final-log-message' into 'main'

Resolve "Do a better job of logging when fetches-per-zone is triggered"

Closes #3461

See merge request isc-projects/bind9!6595

4 years agoAdd CHANGES and release notes for [GL #3461]
Aram Sargsyan [Tue, 19 Jul 2022 14:34:33 +0000 (14:34 +0000)] 
Add CHANGES and release notes for [GL #3461]

4 years agoImprove fetch limit logging
Aram Sargsyan [Tue, 19 Jul 2022 13:57:48 +0000 (13:57 +0000)] 
Improve fetch limit logging

When initially hitting the `fetches-per-zone` value, a log message
is being generated for the event of dropping the first fetch, then
any further log events occur only when another fetch is being dropped
and 60 seconds have been passed since the last logged message.

That logic isn't ideal because when the counter of the outstanding
fetches reaches zero, the structure holding the counters' values will
get deleted, and the information about the dropped fetches accumulated
during the last minute will not be logged.

Improve the fcount_logspill() function to makie sure that the final
values are getting logged before the counter object gets destroyed.

4 years agoMerge branch 'ron-tags-3' into 'main'
Petr Špaček [Fri, 29 Jul 2022 17:00:19 +0000 (17:00 +0000)] 
Merge branch 'ron-tags-3' into 'main'

Add tags and short descriptions to all configuration statements

See merge request isc-projects/bind9!6592

4 years agoAdd last missing tags, finishing touches
Petr Špaček [Fri, 29 Jul 2022 13:00:28 +0000 (15:00 +0200)] 
Add last missing tags, finishing touches

4 years agoAdd descriptions of each tag
Suzanne Goldlust [Tue, 19 Jul 2022 14:30:55 +0000 (14:30 +0000)] 
Add descriptions of each tag

4 years agoText edits to Statements and Statements by Tag sections
Suzanne Goldlust [Wed, 13 Jul 2022 19:34:59 +0000 (19:34 +0000)] 
Text edits to Statements and Statements by Tag sections

4 years agoReorder Statements and Statements by Tag sections
Suzanne Goldlust [Wed, 13 Jul 2022 19:28:33 +0000 (19:28 +0000)] 
Reorder Statements and Statements by Tag sections

4 years agoRephrase parental-agents description
Suzanne Goldlust [Wed, 13 Jul 2022 19:12:18 +0000 (19:12 +0000)] 
Rephrase parental-agents description

4 years agoAdd short description for plugin statement
Suzanne Goldlust [Wed, 13 Jul 2022 19:07:47 +0000 (19:07 +0000)] 
Add short description for plugin statement

4 years agoAdd tag and short description for dyndb statement
Suzanne Goldlust [Wed, 13 Jul 2022 19:04:18 +0000 (19:04 +0000)] 
Add tag and short description for dyndb statement

4 years agoAdd tags and short descriptions for dlz and search statements
Suzanne Goldlust [Wed, 13 Jul 2022 18:59:34 +0000 (18:59 +0000)] 
Add tags and short descriptions for dlz and search statements

4 years agoAdd tag and short description for catalog-zones statement
Suzanne Goldlust [Wed, 13 Jul 2022 18:51:37 +0000 (18:51 +0000)] 
Add tag and short description for catalog-zones statement

4 years agoAdd short descriptions and some tags to statements through line 1766
Suzanne Goldlust [Thu, 7 Jul 2022 21:18:16 +0000 (21:18 +0000)] 
Add short descriptions and some tags to statements through line 1766

4 years agoMerge branch '3471-dig-add-qid-into-usage-summary' into 'main'
Arаm Sаrgsyаn [Thu, 28 Jul 2022 10:16:24 +0000 (10:16 +0000)] 
Merge branch '3471-dig-add-qid-into-usage-summary' into 'main'

DiG: document +qid=<num> option in the usage summary

Closes #3471

See merge request isc-projects/bind9!6618

4 years agoDiG: document +qid=<num> option in the usage summary
Aram Sargsyan [Wed, 27 Jul 2022 15:48:01 +0000 (15:48 +0000)] 
DiG: document +qid=<num> option in the usage summary

The +qid=<num> option, which sets the outgoing query ID, was missing
from the usage summary printed using `dig -h` command.

4 years agoMerge branch 'marka-set-suffix-in-ans.py' into 'main'
Mark Andrews [Wed, 27 Jul 2022 16:24:02 +0000 (16:24 +0000)] 
Merge branch 'marka-set-suffix-in-ans.py' into 'main'

Ensure suffix is always valid in bin/tests/system/qmin/ans4/ans.py (CID 350722)

See merge request isc-projects/bind9!6593

4 years agoEnsure suffix is always valid in bin/tests/system/qmin/ans4/ans.py
Mark Andrews [Mon, 18 Jul 2022 23:57:47 +0000 (09:57 +1000)] 
Ensure suffix is always valid in bin/tests/system/qmin/ans4/ans.py

initalise suffix to ""

    170        r.answer.append(
    171            dns.rrset.from_text(
    172                lqname + suffix, 1, IN, NS, "a.bit.longer.ns.name." + suffix
    173            )
    174        )
    175        r.flags |= dns.flags.AA
           15. Condition endswith(lqname, "icky.ptang.zoop.boing."), taking true branch.
    176    elif endswith(lqname, "icky.ptang.zoop.boing."):
           CID 350722 (#7 of 7): Bad use of null-like value (FORWARD_NULL)
           16. invalid_operation: Invalid operation on null-like value suffix.
    177        r.authority.append(
    178            dns.rrset.from_text(
    179                "icky.ptang.zoop.boing." + suffix,
    180                1,
    181                IN,
    182                SOA,
    183                "ns2." + suffix + " hostmaster.arpa. 2018050100 1 1 1 1",
    184            )
    185        )

4 years agoMerge branch 'artem-tls-streamdns-fixes-part2' into 'main'
Artem Boldariev [Tue, 26 Jul 2022 12:08:48 +0000 (12:08 +0000)] 
Merge branch 'artem-tls-streamdns-fixes-part2' into 'main'

TLS-related fixes from Stream DNS and Loop Manager branches

See merge request isc-projects/bind9!6616

4 years agoTLS: fix double resumption in isc__nm_tls_resumeread()
Artem Boldariev [Fri, 15 Jul 2022 17:38:52 +0000 (20:38 +0300)] 
TLS: fix double resumption in isc__nm_tls_resumeread()

This commit fixes an obvious error in isc__nm_tls_resumeread() so that
read cannot be resumed twice.

4 years agoTLS: clear 'errno' when handling SSL status
Artem Boldariev [Thu, 14 Jul 2022 20:33:26 +0000 (23:33 +0300)] 
TLS: clear 'errno' when handling SSL status

Sometimes tls_do_bio() might be called when there is no new data to
process (most notably, when resuming reads), in such a case internal
TLS session state will remain untouched and old value in 'errno' will
alter the result of SSL_get_error() call, possibly making it to return
SSL_ERROR_SYSCALL. This value will be treated as an error, and will
lead to closing the connection, which is not what expected.

4 years agoMerge branch '3469-auto-disable-rsasha1-and-nsec3rsasha1-when-not-supported-by-the...
Mark Andrews [Mon, 25 Jul 2022 14:57:48 +0000 (14:57 +0000)] 
Merge branch '3469-auto-disable-rsasha1-and-nsec3rsasha1-when-not-supported-by-the-os' into 'main'

Resolve "Auto disable RSASHA1 and NSEC3RSASHA1 when not supported by the OS"

Closes #3469

See merge request isc-projects/bind9!6606

4 years agoAdd release note for [GL #3469]
Mark Andrews [Thu, 21 Jul 2022 23:13:09 +0000 (09:13 +1000)] 
Add release note for [GL #3469]

4 years agoCHANGES note for [GL #3469]
Mark Andrews [Thu, 21 Jul 2022 23:05:31 +0000 (09:05 +1000)] 
CHANGES note for [GL #3469]

4 years agoCheck that we can verify a signature at initialisation time
Mark Andrews [Tue, 22 Mar 2022 05:16:57 +0000 (16:16 +1100)] 
Check that we can verify a signature at initialisation time

Fedora 33 doesn't support RSASHA1 in future mode.  There is no easy
check for this other than by attempting to perform a verification
using known good signatures.  We don't attempt to sign with RSASHA1
as that would not work in FIPS mode.  RSASHA1 is verify only.

The test vectors were generated using OpenSSL 3.0 and
util/gen-rsa-sha-vectors.c.  Rerunning will generate a new set of
test vectors as the private key is not preserved.

e.g.
cc util/gen-rsa-sha-vectors.c -I /opt/local/include \
-L /opt/local/lib -lcrypto

4 years agoMerge branch '3462-rndc-dumpdb-expired-doesnt-always-work' into 'main'
Matthijs Mekking [Mon, 25 Jul 2022 14:27:08 +0000 (14:27 +0000)] 
Merge branch '3462-rndc-dumpdb-expired-doesnt-always-work' into 'main'

Fix rndc dumpdb -expired for stuck cache contents

Closes #3462

See merge request isc-projects/bind9!6596

4 years agoAdd change entry and release note for #3462
Matthijs Mekking [Wed, 20 Jul 2022 09:33:32 +0000 (11:33 +0200)] 
Add change entry and release note for #3462

News worthy.

4 years agoFix rndc dumpdb -expired for stuck cache contents
Matthijs Mekking [Wed, 20 Jul 2022 09:22:01 +0000 (11:22 +0200)] 
Fix rndc dumpdb -expired for stuck cache contents

The command 'rndc dumpdb -expired' will include expired RRsets in the
output, but only for the RBTDB_VIRTUAL time (of 5 minutes). This means
that if there is a cache cleaning problem and contents are not cleaned
up, the rndc command has little diagnostic value. Fix this by including
all RRsets in the dumpdb output if the '-expired' flag is set.

4 years agoMerge branch '3419-dig-nssearch-query-failure-robustness' into 'main'
Arаm Sаrgsyаn [Fri, 22 Jul 2022 10:11:14 +0000 (10:11 +0000)] 
Merge branch '3419-dig-nssearch-query-failure-robustness' into 'main'

Fix DiG query error handling robustness in NSSEARCH mode

Closes #3419

See merge request isc-projects/bind9!6484

4 years agoAdd CHANGES note for [GL #3419]
Aram Sargsyan [Thu, 23 Jun 2022 11:19:24 +0000 (11:19 +0000)] 
Add CHANGES note for [GL #3419]

4 years agodig +nssearch: send more queries even if setting up one of them fails
Aram Sargsyan [Wed, 22 Jun 2022 14:52:26 +0000 (14:52 +0000)] 
dig +nssearch: send more queries even if setting up one of them fails

In the NSSEARCH followup lookup, when one of the queries fails to be
set up (UDP) or connected (TCP), DiG doesn't start the next query.
This is a mistake, because in NSSEARCH mode the queries are independent
and DiG shouldn't stop the lookup process just because setting up (or
connecting to) one of the name servers returns an error code in the
`udp_ready()` or `tcp_connected()` callbacks.

Write a new `nssearch_next()` function which takes care of starting the
next query in NSSEARCH mode, so it can be used in several places without
code repetition.

Make sure that the `udp_ready()` and `tcp_connected()` functions call
`nssearch_next()` in case they won't be calling `send_udp()` and
`send_tcp()` respectively, because in that case the `send_done()`
callback, which usually does the job, won't be called.

Refactor `send_done()` to use the newly written `nssearch_next()`
function.

4 years agodig +nssearch: send more queries even if sending the previous one fails
Aram Sargsyan [Tue, 21 Jun 2022 11:54:50 +0000 (11:54 +0000)] 
dig +nssearch: send more queries even if sending the previous one fails

In the NSSEARCH followup lookup, when one of the queries fails to be
sent, DiG doesn't start the next query. This is a mistake, because in
NSSEARCH mode the queries are independent and DiG shouldn't stop the
lookup process just because sending a query to one of the name servers
returns an error code.

Restructure the `send_done()` function to unconditionally send the next
query in NSSEARCH mode, if it exists.

4 years agoMerge branch '3407-dighost-udp-fail-over-other-nameservers' into 'main'
Arаm Sаrgsyаn [Fri, 22 Jul 2022 09:20:35 +0000 (09:20 +0000)] 
Merge branch '3407-dighost-udp-fail-over-other-nameservers' into 'main'

Fix DiG query retry and fail-over issues

Closes #3407

See merge request isc-projects/bind9!6462

4 years agoSuppress warning/error comments in dig outputs for "rrsetorder" test
Aram Sargsyan [Thu, 23 Jun 2022 16:24:29 +0000 (16:24 +0000)] 
Suppress warning/error comments in dig outputs for "rrsetorder" test

In the CI dig sometimes produces warning/error comments when
communicating with the server, which produces problems when comparing
the outputs.

Here is an example of a dig output with a warning message which
is benign, because dig, after a retry, managed to query the server.

;; communications error to 10.53.0.3#7529: timed out
1.2.3.1
1.2.3.2
1.2.3.3
1.2.3.4

When comparing this to the expected output, which doesn't contain
the comment line (starting with double ';'), the outputs don't match.

Use grep inverse logic to strip the comments from the dig outputs.

4 years agoAdd CHANGES note for [GL #3407]
Aram Sargsyan [Mon, 20 Jun 2022 12:32:45 +0000 (12:32 +0000)] 
Add CHANGES note for [GL #3407]

4 years agoAdd "digdelv" test to simulate DiG network unreachable error
Aram Sargsyan [Mon, 20 Jun 2022 12:13:44 +0000 (12:13 +0000)] 
Add "digdelv" test to simulate DiG network unreachable error

There are existing tests for simulating timeouts, read errors, and
refused connecion errors. Implement also "network unreachable"
simulation.

Use "fixed" string search mode `-F` for `grep` in more places where
it is appropriate to do so.

4 years agoDiG: use the same retry and fail-over logic for different failure types
Aram Sargsyan [Wed, 15 Jun 2022 13:41:10 +0000 (13:41 +0000)] 
DiG: use the same retry and fail-over logic for different failure types

DiG implements different logic in the `recv_done()` callback function
when processing a failure:

1. For a timed-out query it applies the "retries" logic first, then,
   when it fails, fail-overs to the next server.

2. For an EOF (end-of-file, or unexpected disconnect) error it tries to
   make a single retry attempt (even if the user has requested more
   retries), then, when it fails, fail-overs to the next server.

3. For other types of failures, DiG does not apply the "retries" logic,
   and tries to fail-over to the next servers (again, even if the user
   has requested to make retries).

Simplify the logic and apply the same logic (1) of first retries, and
then fail-over, for different types of failures in `recv_done()`.

4 years agoFix DiG query retry and fail-over bug
Aram Sargsyan [Wed, 15 Jun 2022 12:58:00 +0000 (12:58 +0000)] 
Fix DiG query retry and fail-over bug

When the `send_done()` callback function gets called with a failure
result code, DiG erroneously cancels the lookup.

Stop canceling the lookup and give DiG a chance to retry the failed
query, or fail-over to another server, using the logic implemented in
the `recv_done()` callback function.

4 years agoFix DiG UDP query retry and fail-over bug
Aram Sargsyan [Wed, 15 Jun 2022 12:57:14 +0000 (12:57 +0000)] 
Fix DiG UDP query retry and fail-over bug

When the `udp_ready()` callback function gets called with a failure
result code, DiG erroneously cancels the lookup.

Copy the logic behind `tcp_connected()` callback function into
`udp_ready()` so that DiG will now retry the failed query (if retries
are enabled) and then, if it fails again, it will fail-over to the next
server in the list, which synchronizes the behavior between TCP and UDP
modes.

Also, `udp_ready()` was calling `lookup_detach()` without calling
`lookup_attach()` first, but the issue was masked behind the fact
that `clear_current_lookup()` wasn't being called when needed, and
`lookup_detach()` was compensating for that. This also has been fixed.

4 years agoMerge branch 'pspacek/arm-zombie-support' into 'main'
Petr Špaček [Thu, 21 Jul 2022 13:25:51 +0000 (13:25 +0000)] 
Merge branch 'pspacek/arm-zombie-support' into 'main'

Support ancient build tools for the ARM

See merge request isc-projects/bind9!6598

4 years agoSupport Sphinx 1.6.7
Petr Špaček [Wed, 20 Jul 2022 16:44:48 +0000 (18:44 +0200)] 
Support Sphinx 1.6.7

Luckily we don't rely on SphinxDirective functionality which does not
exist in 1.6.7. Replace it with docutils Directive.

transform_content() callback was added only in Sphinx 3.0.0.
Detect if it was not called and call it manually.
The transform_content() function requires access to inner "contentnode"
which is created inside run(). This workaround relies on the order of
node as it was in the pre-3.0.0 versions, but it should not matter as
new versions will not trigger the workaround.

4 years agoSupport docutils 0.14+dfsg-4
Petr Špaček [Wed, 20 Jul 2022 15:57:17 +0000 (17:57 +0200)] 
Support docutils 0.14+dfsg-4

Ancient versions of docutils cannot cope with bare text inside a table
cell. Wrap text in a paragraph to work around that.

4 years agoMerge branch 'pspacek/minor-arm-tweaks-and-fixes' into 'main'
Petr Špaček [Thu, 21 Jul 2022 13:18:06 +0000 (13:18 +0000)] 
Merge branch 'pspacek/minor-arm-tweaks-and-fixes' into 'main'

Fix dnssec-signzone examples in DNSSEC Guide

See merge request isc-projects/bind9!6589

4 years agoAvoid opt-out flag in dnssec-signzone examples
Petr Špaček [Mon, 18 Jul 2022 11:23:47 +0000 (13:23 +0200)] 
Avoid opt-out flag in dnssec-signzone examples

Since !6413 we discourage opt-out, so we should not be advertising it in
the examples. Even worse, it was just thrown into the command line
without even mentioning its meaning in the surrounding text.

Related: !6413

4 years agoRemove errorneous shell output redirection from dnssec-signzone example
Petr Špaček [Mon, 18 Jul 2022 11:17:49 +0000 (13:17 +0200)] 
Remove errorneous shell output redirection from dnssec-signzone example

The > looked like shell output redirection. It was present since we
imported DNSSEC Guide into the ARM.

4 years agoMerge tag 'v9_19_3'
Michal Nowak [Thu, 21 Jul 2022 09:48:25 +0000 (11:48 +0200)] 
Merge tag 'v9_19_3'

BIND 9.19.3

4 years agoMerge branch '2918-deprecate-max-zone-ttl' into 'main'
Evan Hunt [Wed, 20 Jul 2022 19:24:18 +0000 (19:24 +0000)] 
Merge branch '2918-deprecate-max-zone-ttl' into 'main'

mark max-zone-ttl deprecated in options and zone

Closes #2918

See merge request isc-projects/bind9!6542

4 years agoCHANGES and release note for [GL #2918]
Evan Hunt [Mon, 11 Jul 2022 20:48:21 +0000 (13:48 -0700)] 
CHANGES and release note for [GL #2918]

4 years agoForbid zones with both dnssec-policy and max-zone-ttl
Evan Hunt [Tue, 19 Jul 2022 19:13:42 +0000 (12:13 -0700)] 
Forbid zones with both dnssec-policy and max-zone-ttl

Since max-zone-ttl in zone/view/options is a no-op if dnssec-policy
is in use, let's make that a fatal error.

4 years agoReject zones with TTL higher than dnssec-policy max-zone-ttl
Matthijs Mekking [Wed, 13 Jul 2022 08:28:59 +0000 (10:28 +0200)] 
Reject zones with TTL higher than dnssec-policy max-zone-ttl

Reject loading of zones with TTL higher than the max-zone-ttl
from the dnssec-policy.

With this change, any zone with a dnssec-policy in use will ignore
the max-zone-ttl option in zone/view/options.

4 years agoTest dnssec-policy max-zone-ttl rejects zone with too high TTL
Matthijs Mekking [Wed, 13 Jul 2022 08:27:18 +0000 (10:27 +0200)] 
Test dnssec-policy max-zone-ttl rejects zone with too high TTL

Similar to the 'max-zone-ttl' zone option, the 'dnssec-policy' option
should reject zones with TTLs that are out of range.

4 years agomark max-zone-ttl deprecated in options and zone
Evan Hunt [Mon, 11 Jul 2022 20:38:51 +0000 (13:38 -0700)] 
mark max-zone-ttl deprecated in options and zone

The "max-zone-ttl" option should now be configured as part of
"dnssec-policy". The option with the same name in "zone" and
"options" is hereby flagged as deprecated, and its functionality
will be removed in a future release.

4 years agoMerge branch 'marka-placeholder' into 'main'
Mark Andrews [Tue, 19 Jul 2022 02:45:11 +0000 (02:45 +0000)] 
Merge branch 'marka-placeholder' into 'main'

Add placeholder for [GL #3460]

See merge request isc-projects/bind9!6594

4 years agoAdd placeholder for [GL #3460]
Mark Andrews [Tue, 19 Jul 2022 02:39:29 +0000 (12:39 +1000)] 
Add placeholder for [GL #3460]

4 years agoMerge branch 'ron-server' into 'main'
Petr Špaček [Mon, 18 Jul 2022 16:26:16 +0000 (16:26 +0000)] 
Merge branch 'ron-server' into 'main'

ARM tagging: logging, server, view, zone

See merge request isc-projects/bind9!6535

4 years agoDocument qname-minimization off equals disabled
Greg Choules [Tue, 12 Jul 2022 13:34:43 +0000 (13:34 +0000)] 
Document qname-minimization off equals disabled

4 years agoFix http block short description
Suzanne Goldlust [Fri, 8 Jul 2022 16:09:11 +0000 (16:09 +0000)] 
Fix http block short description

4 years agoAdd headings for server, logging, zone, and view statements
Suzanne Goldlust [Thu, 7 Jul 2022 14:25:42 +0000 (14:25 +0000)] 
Add headings for server, logging, zone, and view statements

4 years agoAdd tags/short descriptions for the "view" category
Suzanne Goldlust [Wed, 6 Jul 2022 18:15:54 +0000 (18:15 +0000)] 
Add tags/short descriptions for the "view" category

4 years agoAdd tags/short descriptions for "zone" category
Suzanne Goldlust [Wed, 6 Jul 2022 16:57:05 +0000 (16:57 +0000)] 
Add tags/short descriptions for "zone" category

4 years agoAdd tags/short descriptions for "logging" category
Suzanne Goldlust [Wed, 6 Jul 2022 15:54:08 +0000 (15:54 +0000)] 
Add tags/short descriptions for "logging" category

4 years agoAdd tags and short descriptions for tag "server"
Suzanne Goldlust [Tue, 5 Jul 2022 20:20:08 +0000 (20:20 +0000)] 
Add tags and short descriptions for tag "server"

4 years agoMerge branch 'michal/run-a-short-respdiff-test-for-all-merge-requests' into 'main'
Michał Kępień [Mon, 18 Jul 2022 13:16:01 +0000 (13:16 +0000)] 
Merge branch 'michal/run-a-short-respdiff-test-for-all-merge-requests' into 'main'

Run a short respdiff test for all merge requests

See merge request isc-projects/bind9!6585

4 years agoRun a short respdiff test for all merge requests
Michał Kępień [Mon, 18 Jul 2022 12:39:02 +0000 (14:39 +0200)] 
Run a short respdiff test for all merge requests

Now that the respdiff tests can detect memory leaks, it is worth running
them for every merge request.  However, the existing respdiff-based
tests take a while to complete (about half an hour with our current CI
infrastructure), which does not make them a good fit for this purpose.
Add a new GitLab CI job, "respdiff-short", which uses a smaller query
set that gets processed within a couple of minutes on our current CI
infrastructure.  Rename the existing respdiff-based jobs to make
distinguishing them easier.

4 years agoExtract respdiff job definition to a YAML anchor
Michał Kępień [Mon, 18 Jul 2022 12:39:02 +0000 (14:39 +0200)] 
Extract respdiff job definition to a YAML anchor

Ensure the common parts of all jobs using respdiff are available in the
form of a reusable YAML anchor, to reduce code duplication and to
simplify adding more respdiff-based jobs to GitLab CI.

4 years agoUse a pre-built executable as the reference named
Michał Kępień [Mon, 18 Jul 2022 12:39:02 +0000 (14:39 +0200)] 
Use a pre-built executable as the reference named

The "respdiff" GitLab CI job compares DNS responses produced by the
current version of named with those produced by a reference version.
The latter is built from source in each "respdiff" job, despite the fact
that the reference version changes very rarely.  Use a pre-built named
executable as the reference version instead, assuming it is available in
the OS image used for "respdiff" tests.

4 years agoMerge branch 'ossl-fixes' into 'main'
Ondřej Surý [Mon, 18 Jul 2022 12:14:34 +0000 (12:14 +0000)] 
Merge branch 'ossl-fixes' into 'main'

Clean up OpenSSL usage a bit

See merge request isc-projects/bind9!6436

4 years agoRemove DH_clear_flags call
David Benjamin [Tue, 14 Jun 2022 03:37:55 +0000 (23:37 -0400)] 
Remove DH_clear_flags call

These calls have not been needed since OpenSSL 0.9.7h.

This dates to commit 704d6eeab1d8d6a2aeb99c37fa5a97322d9340fc, "Work
around non-reentrancy in openssl by disabling precomputation in keys".
This was in the bundled OpenSSL 0.9.3a era and made two changes. First,
it registered a locking callback because, in those days, OpenSSL needed
a callback to support locks. Second, it set flags to disable various
bits of cached state on DH, DSA, and RSA objects.

Looking back in OpenSSL 0.9.3a, that cached state was not protected by a
lock:
https://github.com/openssl/openssl/blob/OpenSSL_0_9_3a/crypto/rsa/rsa_eay.c#L137-L142

However, this was fixed in OpenSSL 0.9.7h:
https://github.com/openssl/openssl/commit/6ec8e63af6c1835a8b222350dbabf7bb2ace094f

The other flags (DSA and RSA) have since fallen away, DSA with the
removal of DSA altogether (3994b1f9c2bd4438586523fb2e49b0fb847b487b) and
RSA with 3a8d4a316eae09966c85e7e5befc682bd4744b34, "openssl 0.9.6a and
higher don't have the RSA locking bug [...] other algorithms still don't
do locking when performing precomputation [...]".

That seems to be referring to this OpenSSL change, which indeed fixed it
for RSA but not others:
https://github.com/openssl/openssl/commit/bb617a9646d95d0454edda995518f370172390e9

The 0.9.7h change above fixed it across the board, but there was never a
similar update to the workaround for DSA and DH. With such OpenSSL
versions long since out of support, the last remains of this workaround
can finally be removed.

4 years agoSimplify BN_GENCB handling
David Benjamin [Tue, 14 Jun 2022 03:29:07 +0000 (23:29 -0400)] 
Simplify BN_GENCB handling

When callback was NULL, bind9 would use BN_GENCB_set_old to set a NULL
callback because OpenSSL happened to allow a NULL "old" callback, but
not a NULL "new" callback. Instead, the way to turn off the callback is
to pass a NULL BN_GENCB itself.

Switch to doing that.

4 years agoMerge branch '3453-cope-with-too-small-BUFSIZ' into 'main'
Ondřej Surý [Fri, 15 Jul 2022 17:30:03 +0000 (17:30 +0000)] 
Merge branch '3453-cope-with-too-small-BUFSIZ' into 'main'

Increase the BUFSIZ-long buffers

Closes #3453

See merge request isc-projects/bind9!6579

4 years agoIncrease the BUFSIZ-long buffers
Ondřej Surý [Thu, 14 Jul 2022 11:48:45 +0000 (13:48 +0200)] 
Increase the BUFSIZ-long buffers

The BUFSIZ value varies between platforms, it could be 8K on Linux and
512 bytes on mingw.  Make sure the buffers are always big enough for the
output data to prevent truncation of the output by appropriately
enlarging or sizing the buffers.

4 years agoMerge branch '3443-memory-related-cleanups' into 'main'
Michał Kępień [Fri, 15 Jul 2022 08:31:23 +0000 (08:31 +0000)] 
Merge branch '3443-memory-related-cleanups' into 'main'

Memory-related cleanups

Closes #3443

See merge request isc-projects/bind9!6567

4 years agoUpdate documentation for named's -M option
Michał Kępień [Fri, 15 Jul 2022 08:23:03 +0000 (10:23 +0200)] 
Update documentation for named's -M option

Remove "external" from the list of legal values for the -M command-line
option as it has not been allowed since the internal memory allocator
was removed by commit 55ace5d3aa4cb8c1b70a94679e1dd6d716dfd8bb.

Make the style of the relevant paragraph more in line with the next one
and split its contents up into an unordered list of options for improved
readability.

4 years agoMerge branch '3456-dispatch-connect-race' into 'main'
Evan Hunt [Fri, 15 Jul 2022 02:26:41 +0000 (02:26 +0000)] 
Merge branch '3456-dispatch-connect-race' into 'main'

remove unnecessary assertion in dns_dispatch_connect()

Closes #3456

See merge request isc-projects/bind9!6573

4 years agoremove unnecessary assertion in dns_dispatch_connect()
Evan Hunt [Wed, 13 Jul 2022 19:38:55 +0000 (12:38 -0700)] 
remove unnecessary assertion in dns_dispatch_connect()

When a thread calls dns_dispatch_connect() on an unconnected TCP socket
it sets `tcpstate` from `DNS_DISPATCHSTATE_NONE` to `_CONNECTING`.
Previously, it then INSISTed that there were no pending connections
before calling isc_nm_tcpdnsconnect().

If a second thread called dns_dispatch_connect() during that window
of time, it could add a pending connection to the list, and trigger
an assertion failure.

This commit removes the INSIST since the condition is actually
harmless.

4 years agoMerge branch 'ondrej-fix-timing-error-in-statistics-system-test' into 'main'
Ondřej Surý [Thu, 14 Jul 2022 20:33:16 +0000 (20:33 +0000)] 
Merge branch 'ondrej-fix-timing-error-in-statistics-system-test' into 'main'

Wait for TCP connection refused in the statistics system test

See merge request isc-projects/bind9!6580

4 years agoWait for TCP connection refused in the statistics system test
Ondřej Surý [Thu, 14 Jul 2022 13:37:32 +0000 (15:37 +0200)] 
Wait for TCP connection refused in the statistics system test

The statistics system test makes a query to foo.info to check for the
pending connections because the ans4 doesn't respond to the query.

This might or might not (depending on exact timing) increment the failed
TCP connection counter when the query is retried over TCP because ans4
doesn't listen on the TCP.

Wait for the 'connection refused' in the ns3 log file to be able to
count the exactly 1 failed TCP connection.

4 years agoMerge branch '3451-handle-transient-TCP-connect-EADDRINUSE-on-BSDs' into 'main'
Ondřej Surý [Thu, 14 Jul 2022 19:38:33 +0000 (19:38 +0000)] 
Merge branch '3451-handle-transient-TCP-connect-EADDRINUSE-on-BSDs' into 'main'

Handle the transient TCP connect() failures on FreeBSD

Closes #3451 and #3452

See merge request isc-projects/bind9!6562

4 years agoAdd CHANGES note for [GL #3451]
Ondřej Surý [Wed, 13 Jul 2022 07:43:00 +0000 (09:43 +0200)] 
Add CHANGES note for [GL #3451]

4 years agoCleanup the STATID_CONNECT and STATID_CONNECTFAIL stat counters
Ondřej Surý [Thu, 14 Jul 2022 11:22:34 +0000 (13:22 +0200)] 
Cleanup the STATID_CONNECT and STATID_CONNECTFAIL stat counters

The STATID_CONNECT and STATID_CONNECTFAIL statistics were used
incorrectly. The STATID_CONNECT was incremented twice (once in
the *_connect_direct() and once in the callback) and STATID_CONNECTFAIL
would not be incremented at all if the failure happened in the callback.

Closes: #3452
4 years agoHandle the transient TCP connect() failures on FreeBSD
Ondřej Surý [Wed, 13 Jul 2022 07:34:47 +0000 (09:34 +0200)] 
Handle the transient TCP connect() failures on FreeBSD

On FreeBSD (and perhaps other *BSD) systems, the TCP connect() call (via
uv_tcp_connect()) can fail with transient UV_EADDRINUSE error.  The UDP
code already handles this by trying three times (is a charm) before
giving up.  Add a code for the TCP, TCPDNS and TLSDNS layers to also try
three times before giving up by calling uv_tcp_connect() from the
callback two more time on UV_EADDRINUSE error.

Additionally, stop the timer only if we succeed or on hard error via
isc__nm_failed_connect_cb().

4 years agoMerge branch '3448-redundant-assignment-of-clistenon-in-bin-named-server-c' into...
Mark Andrews [Thu, 14 Jul 2022 01:14:14 +0000 (01:14 +0000)] 
Merge branch '3448-redundant-assignment-of-clistenon-in-bin-named-server-c' into 'main'

Resolve "Redundant assignment of clistenon in bin/named/server.c"

Closes #3448

See merge request isc-projects/bind9!6560

4 years agoRemove redundant assignment of 'clistenon = NULL'
Mark Andrews [Tue, 4 Jan 2022 00:51:56 +0000 (11:51 +1100)] 
Remove redundant assignment of 'clistenon = NULL'

4 years agoMerge branch '3454-check-putstr' into 'main'
Evan Hunt [Thu, 14 Jul 2022 00:23:17 +0000 (00:23 +0000)] 
Merge branch '3454-check-putstr' into 'main'

check putstr return values

Closes #3454

See merge request isc-projects/bind9!6574

4 years agocheck putstr return values
Evan Hunt [Wed, 13 Jul 2022 23:15:53 +0000 (16:15 -0700)] 
check putstr return values

The calls to putstr() in named_server_fetchlimit() were not checked
for failure.