2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

36832 Commits

Author SHA1 Message Date
Michał Kępień
cbb662607c Fix option name in the release note for GL #3140 2022-08-04 23:13:22 +02:00
Artem Boldariev
7126ed59db Merge branch 'tls-fix-readpaused-usage' into 'main'
TLS: do not ignore readpaused flag in certain circumstances

See merge request isc-projects/bind9!6627
2022-08-02 14:26:14 +00:00
Artem Boldariev
32565d0d65 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.
2022-08-02 14:02:01 +03:00
Arаm Sаrgsyаn
b2395f5644 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
2022-08-01 15:21:10 +00:00
Aram Sargsyan
1690af761b 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.
2022-08-01 14:42:27 +00:00
Arаm Sаrgsyаn
1f306f9a8a 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
2022-08-01 14:33:42 +00:00
Aram Sargsyan
50d57a7551 Add CHANGES and release notes for [GL #3461] 2022-08-01 13:49:46 +00:00
Aram Sargsyan
8cfacc6fe1 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.
2022-08-01 13:46:41 +00:00
Petr Špaček
0f6a6b9a70 Merge branch 'ron-tags-3' into 'main'
Add tags and short descriptions to all configuration statements

See merge request isc-projects/bind9!6592
2022-07-29 17:00:19 +00:00
Petr Špaček
9b3710987b Add last missing tags, finishing touches 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
f9a5f389ed Add descriptions of each tag 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
20d01ca2e3 Text edits to Statements and Statements by Tag sections 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
e14201a2f6 Reorder Statements and Statements by Tag sections 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
fc272863c6 Rephrase parental-agents description 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
7dcdeba117 Add short description for plugin statement 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
75ab5f81a4 Add tag and short description for dyndb statement 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
a8294e7af4 Add tags and short descriptions for dlz and search statements 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
017008c407 Add tag and short description for catalog-zones statement 2022-07-29 18:56:04 +02:00
Suzanne Goldlust
a470a6545f Add short descriptions and some tags to statements through line 1766 2022-07-29 18:56:00 +02:00
Arаm Sаrgsyаn
ac97d8de98 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
2022-07-28 10:16:24 +00:00
Aram Sargsyan
244bf0b3e4 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.
2022-07-28 09:08:13 +00:00
Mark Andrews
3b4b974df8 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
2022-07-27 16:24:02 +00:00
Mark Andrews
8a15577334 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        )
2022-07-27 15:55:25 +00:00
Artem Boldariev
a8679ccd51 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
2022-07-26 12:08:48 +00:00
Artem Boldariev
c52c691b18 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.
2022-07-26 14:25:59 +03:00
Artem Boldariev
5d450cd0ba 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.
2022-07-26 14:25:59 +03:00
Mark Andrews
6f15cace5e 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
2022-07-25 14:57:48 +00:00
Mark Andrews
0d31135ca2 Add release note for [GL #3469] 2022-07-25 10:32:48 -04:00
Mark Andrews
5bbbecc88a CHANGES note for [GL #3469] 2022-07-25 10:32:47 -04:00
Mark Andrews
edfbe5c30f 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
2022-07-25 10:32:13 -04:00
Matthijs Mekking
33acff2c67 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
2022-07-25 14:27:08 +00:00
Matthijs Mekking
113dcd124e Add change entry and release note for #3462
News worthy.
2022-07-25 16:05:29 +02:00
Matthijs Mekking
f8d866c6ef 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.
2022-07-25 16:05:21 +02:00
Arаm Sаrgsyаn
f66f1696fc 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
2022-07-22 10:11:14 +00:00
Aram Sargsyan
e991c69bc4 Add CHANGES note for [GL #3419] 2022-07-22 09:37:05 +00:00
Aram Sargsyan
61def2f4e3 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.
2022-07-22 09:37:05 +00:00
Aram Sargsyan
98da5129a5 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.
2022-07-22 09:26:25 +00:00
Arаm Sаrgsyаn
25f8570709 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
2022-07-22 09:20:35 +00:00
Aram Sargsyan
65d9d90b55 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.
2022-07-22 08:35:35 +00:00
Aram Sargsyan
a8dea1d1ad Add CHANGES note for [GL #3407] 2022-07-22 08:35:35 +00:00
Aram Sargsyan
c1eaf16293 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.
2022-07-22 08:35:35 +00:00
Aram Sargsyan
8611aa759f 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()`.
2022-07-22 08:35:35 +00:00
Aram Sargsyan
99085c587e 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.
2022-07-22 08:35:35 +00:00
Aram Sargsyan
060feeb454 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.
2022-07-22 08:34:32 +00:00
Petr Špaček
a248c129c4 Merge branch 'pspacek/arm-zombie-support' into 'main'
Support ancient build tools for the ARM

See merge request isc-projects/bind9!6598
2022-07-21 13:25:51 +00:00
Petr Špaček
f534ef291b 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.
2022-07-21 15:21:21 +02:00
Petr Špaček
ba10de32d3 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.
2022-07-21 15:21:21 +02:00
Petr Špaček
9405435a98 Merge branch 'pspacek/minor-arm-tweaks-and-fixes' into 'main'
Fix dnssec-signzone examples in DNSSEC Guide

See merge request isc-projects/bind9!6589
2022-07-21 13:18:06 +00:00
Petr Špaček
006ae7c43f 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
2022-07-21 15:12:06 +02:00
Petr Špaček
cb28a220ee 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.
2022-07-21 15:12:03 +02:00