Commit graph

36483 commits

Author SHA1 Message Date
Suzanne Goldlust
ac7d65557b
Rephrase parental-agents description
(cherry picked from commit 21c9166abb53a9f47017a43c380bc59320b6f0e4)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
7e13992ee7
Add short description for plugin statement
(cherry picked from commit d14828c5a71df0acd1eb5d465e9ae7d75d26a56c)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
16773a53ed
Add tag and short description for dyndb statement
(cherry picked from commit 5b90f4caa4481858b6c3a0e8fc0f5e38e5d1aa7a)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
8b0b402ec8
Add tags and short descriptions for dlz and search statements
(cherry picked from commit 93bb1a42f92dd01c90c13207196da12f3a46b972)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
c1c0197c9a
Add tag and short description for catalog-zones statement
(cherry picked from commit e4f991c1d475d0b6e6cfabe040518f7934cd756d)
2022-08-01 10:12:12 +02:00
Suzanne Goldlust
3c45f366a6
Add short descriptions and some tags to statements through line 1766
(cherry picked from commit 21b8988f803e60ad39f7bb7770d7761a37e1d372)
2022-08-01 10:12:07 +02:00
Arаm Sаrgsyаn
d82f56b972 Merge branch '3471-dig-add-qid-into-usage-summary-v9_18' into 'v9_18'
[v9_18] DiG: document +qid=<num> option in the usage summary

See merge request isc-projects/bind9!6621
2022-07-28 10:16:39 +00:00
Aram Sargsyan
80094e4503 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.

(cherry picked from commit 4dcc855093f7f5c6d46a88a6aabea5f53a673018)
2022-07-28 09:14:56 +00:00
Mark Andrews
78a14a5f07 Merge branch 'marka-set-suffix-in-ans.py-v9_18' into 'v9_18'
Ensure suffix is always valid in bin/tests/system/qmin/ans4/ans.py [v9_18]

See merge request isc-projects/bind9!6619
2022-07-27 19:07:11 +00:00
Mark Andrews
8fa29c5699 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        )

(cherry picked from commit eb798d047849aa28b0b0f14379a8e264dfa41c7f)
2022-07-27 14:27:18 -04:00
Artem Boldariev
a524cef8af Merge branch 'artem-tls-streamdns-fixes-part2-v9-18' into 'v9_18'
[Backport to v9.18] TLS-related fixes from Stream DNS and Loop Manager branches

See merge request isc-projects/bind9!6617
2022-07-26 13:03:42 +00:00
Artem Boldariev
a957511734 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 15:27:40 +03:00
Artem Boldariev
a165b66fc7 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 15:27:40 +03:00
Mark Andrews
80f777ccfe Merge branch '3469-auto-disable-rsasha1-and-nsec3rsasha1-when-not-supported-by-the-os-v9_18' into 'v9_18'
Check that we can verify a signature at initialisation time [v9_18]

See merge request isc-projects/bind9!6614
2022-07-25 15:51:23 +00:00
Mark Andrews
676a6456e8 Add release note for [GL #3469]
(cherry picked from commit 16b133af407e7659f6c46a81aa58e1d7891249d4)
2022-07-25 10:59:38 -04:00
Mark Andrews
d0b48df8ea CHANGES note for [GL #3469]
(cherry picked from commit c549249cb9020fa2138e7c7411bc64ebd4839557)
2022-07-25 10:59:38 -04:00
Mark Andrews
f3a0dac057 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

(cherry picked from commit cd3f00874f63a50954cebb78edac8f580a27c0de)
2022-07-25 10:59:38 -04:00
Matthijs Mekking
c3ab2a25ef Merge branch '3462-rndc-dumpdb-expired-doesnt-always-work-v9_18' into 'v9_18'
[v9_18] Fix rndc dumpdb -expired for stuck cache contents

See merge request isc-projects/bind9!6612
2022-07-25 14:54:30 +00:00
Matthijs Mekking
acdde6f0a4 Add change entry and release note for #3462
News worthy.

(cherry picked from commit 44bbc0175c5cd0df5c45b726464bcb82604d34ab)
2022-07-25 16:29:41 +02:00
Matthijs Mekking
56f1bf250d 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.

(cherry picked from commit 930ba2c914a0abc07fd087d663a7bfb57850d4ca)
2022-07-25 16:28:18 +02:00
Evan Hunt
78ea0a36a4 Merge branch '2918-deprecate-max-zone-ttl-v9_18' into 'v9_18'
dnssec-policy max-zone-ttl was not fully effective

See merge request isc-projects/bind9!6599
2022-07-22 20:34:16 +00:00
Evan Hunt
3c533374da CHANGES and release note for [GL #2918] 2022-07-22 13:13:43 -07:00
Evan Hunt
4720f13730 warn about zones with both dnssec-policy and max-zone-ttl
max-zone-ttl in zone/view/options is a no-op if dnssec-policy
is in use, so generate a warning.
2022-07-22 13:13:24 -07:00
Evan Hunt
a8e596e32c clarify "max-zone-ttl" documentation
The "max-zone-ttl" option should now be configured as part of
dnssec-policy. Use of this option in zone/view/options will be ignored
in any zone that also has dnssec-policy configured.
2022-07-22 13:13:24 -07:00
Matthijs Mekking
793554c6ce 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.
2022-07-22 13:13:24 -07:00
Matthijs Mekking
9c872756c3 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.
2022-07-22 13:13:24 -07:00
Arаm Sаrgsyаn
d8acad751e Merge branch '3419-dig-nssearch-query-failure-robustness-v9_18' into 'v9_18'
[v9_18] Fix DiG query error handling robustness in NSSEARCH mode

See merge request isc-projects/bind9!6609
2022-07-22 10:24:48 +00:00
Aram Sargsyan
525c0e9d38 Add CHANGES note for [GL #3419]
(cherry picked from commit e03897087256b394a5cbf6d8639410ed1bdc8451)
2022-07-22 09:41:53 +00:00
Aram Sargsyan
ab8343a5f6 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.

(cherry picked from commit 76bee507b7415b176897b2fb1a3497bfb8ab194a)
2022-07-22 09:41:47 +00:00
Aram Sargsyan
8fecc9dc1e 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.

(cherry picked from commit 49ac879dfad91ac08201be3e351450fd9d83b9f5)
2022-07-22 09:41:41 +00:00
Arаm Sаrgsyаn
5d47d4e342 Merge branch '3407-dighost-udp-fail-over-other-nameservers-v9_18' into 'v9_18'
[v9_18] Fix DiG UDP query retry and fail-over bug

See merge request isc-projects/bind9!6608
2022-07-22 09:37:53 +00:00
Aram Sargsyan
c0bb75e9ef 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.

(cherry picked from commit a5b2aa7c977b5c40b62698a8f46ffd839b764814)
2022-07-22 09:03:54 +00:00
Aram Sargsyan
8bdc4e40de Add CHANGES note for [GL #3407]
(cherry picked from commit 1554faa47659d68dc6c48fe177faba95ba57adb7)
2022-07-22 09:03:39 +00:00
Aram Sargsyan
048a035267 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.

(cherry picked from commit 626fbf325e048158625d197cd9734da932f6011d)
2022-07-22 09:00:31 +00:00
Aram Sargsyan
29057d9911 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()`.

(cherry picked from commit abfd0d363f4f495de00dc4bd41f74726370369ba)
2022-07-22 09:00:21 +00:00
Aram Sargsyan
6efb73d4bb 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.

(cherry picked from commit c2329dd110e88a194be4d9a3fe1571dbae8af178)
2022-07-22 09:00:15 +00:00
Aram Sargsyan
be8ec6ef18 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.

(cherry picked from commit 3f3108552577c326b4dab6c3b631c51cf0040144)
2022-07-22 09:00:08 +00:00
Petr Špaček
c003127717 Merge branch 'pspacek/arm-zombie-support-v9_18' into 'v9_18'
Support ancient build tools for the ARM [v9_18]

See merge request isc-projects/bind9!6605
2022-07-21 13:30:27 +00:00
Petr Špaček
c56bcbdb6a
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.

(cherry picked from commit 8796ad7fe8ed24d1287bfd94ef1ee283d778c047)
2022-07-21 15:26:26 +02:00
Petr Špaček
5864cac5d4
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.

(cherry picked from commit af5bbb433afca3bb600bd409c7421d33c3552aaa)
2022-07-21 15:26:22 +02:00
Petr Špaček
3818a87e95 Merge branch 'pspacek/minor-arm-tweaks-and-fixes-v9_18' into 'v9_18'
Fix dnssec-signzone examples in DNSSEC Guide [v9_18]

See merge request isc-projects/bind9!6603
2022-07-21 13:19:24 +00:00
Petr Špaček
d40615d881
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
(cherry picked from commit beae857288b52ee555bdf41491c5aa2eec390c10)
2022-07-21 15:18:55 +02:00
Petr Špaček
a927799e84
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.

(cherry picked from commit 1ab564d605450cb2c473ded28ff5e8891a4df83b)
2022-07-21 15:18:50 +02:00
Michal Nowak
d4b00b1dc1 BIND 9.18.5
-----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCgAtFiEENKwGS3ftSQfs1TU17QVz/8hFYQUFAmLG8fIPHG1pY2hhbEBp
 c2Mub3JnAAoJEO0Fc//IRWEFcDAP/1sbZd5p2vCh5T2guuEJX7x1kk/T9HkLKlTT
 UPNF/pIBzu7xG4oVxjNq74IiTEF5juUf8+YFBGah4woC+gfSmU9JF+4apLi5zjWk
 hJnS/51L1gu8/k4HNPGAvOg7wQq85g8OiM6AYjYxiYlCZUr5IT3elZxcHbdXQ2fL
 hcVy0NEEFYh+SK4ggra2cWrsH4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aFzK8VuhjrnrD3mshvJJqfyxQ
 THD2aRxTu7FXUQpeF5wq1DCEqT2tSk0XNlqptZ+O3uaNXTEZMGQTrroTn5QUwNLA
 4NUfWcV+yk4wBZIA4IGfQNiWFj7MPpC5FyD5AYKjFpx6XHSABECNQfjQvm82lQBE
 k800cqVTh2Ps8xXE9edZRQZNzQ9H1pt559axtaybBRFxXovHCxfXpJK6ov5zy2q+
 FgrSnqKmymOtRgfmUHV9f+zQuO88GJvRusnGCkd9lakmwtJO61k=
 =dajA
 -----END PGP SIGNATURE-----

Merge tag 'v9_18_5' into v9_18

BIND 9.18.5
2022-07-21 12:31:03 +02:00
Michał Kępień
98258e21b5 Merge branch 'michal/run-a-short-respdiff-test-for-all-merge-requests-v9_18' into 'v9_18'
[v9_18] Run a short respdiff test for all merge requests

See merge request isc-projects/bind9!6590
2022-07-18 13:33:49 +00:00
Michał Kępień
f3e647a4c1 Run a short respdiff test for all merge requests
Running a respdiff test for every merge request would be useful for
catching protocol-breaking changes before they are applied to the source
code.  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.

(cherry picked from commit 31ee43a314f17b433909a049fafa01200bac14ca)
2022-07-18 15:25:17 +02:00
Michał Kępień
82b6a388fc 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.

(cherry picked from commit ca20a189f7c020e67feebcabd436a02e69272164)
2022-07-18 15:25:17 +02:00
Michał Kępień
7d02e1088c 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.

(cherry picked from commit ab90a4705a13d1a5040bb361e20ff63b5d47d875)
2022-07-18 15:25:17 +02:00
Ondřej Surý
116b825b8d Merge branch '3453-cope-with-too-small-BUFSIZ-v9_18' into 'v9_18'
Increase the BUFSIZ-long buffers [v9.18]

See merge request isc-projects/bind9!6586
2022-07-15 20:40:03 +00:00
Ondřej Surý
3c1d6e164e
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.

(cherry picked from commit b19d932262e84608174cb89eeed32ae0212f8a87)
2022-07-15 21:16:51 +02:00