Commit graph

37614 commits

Author SHA1 Message Date
Petr Špaček
fc30d2523e
Set up release notes for BIND 9.18.15 2023-04-14 10:45:38 +02:00
Petr Špaček
ae77ab4ca5
Update BIND version to 9.18.15-dev 2023-04-14 10:45:38 +02:00
Ondřej Surý
19bf6c846f Merge branch '3980-revert-unit-test-forking-9.18' into 'bind-9.18'
Revert "Kill unit tests that run more than 1200 seconds"

See merge request isc-projects/bind9!7834
2023-04-14 04:22:20 +00:00
Ondřej Surý
f7bdab0591
Revert "Kill unit tests that run more than 1200 seconds"
This reverts commit 6cdeb5b046 which added
wrapper around all the unit tests that would run the unit test in the
forked process.

This makes any debugging of the unit tests too hard. Futures attempts to
fix #3980 (closed) should add a custom automake test harness (log
driver) that would kill the unit test after configured timeout.
2023-04-14 06:21:03 +02:00
Michal Nowak
a901bf893f Merge branch '3916-legacy-test-no-retries-in-resolution_fails-9.18' into 'bind-9.18'
[9.18] Do not retry in resolution_fails() on timeout

See merge request isc-projects/bind9!7816
2023-04-06 10:14:21 +00:00
Michal Nowak
fab91f89e6
Do not retry in resolution_fails() on timeout
At the time of test number (19), there were 10 "sending packet to
10.53.0.7" lines in the "legacy/ns1/named.run" file; usually, only seven
are present:

    I:legacy:checking recursive lookup to edns 512 + no tcp server does not cause query loops (19)
    I:legacy:ns1 sent 10 queries to ns7, expected less than 10
    I:legacy:failed

Those three can be attributed to tests "8", "10", and "18", where the
dig of "resolution_fails()" retried after a timeout to succeed with
"status: SERVFAIL" subsequently, as seen in each of
dig.out.test{8,10,18} files.

    ;; communications error to 10.53.0.1#13093: timed out

    ; <<>> DiG 9.19.12-dev <<>> -p 13093 +tcp @10.53.0.1 edns512-notcp. TXT
    ; (1 server found)
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 5368
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

This retry is unnecessary because "resolution_fails()" considers timeout
a positive result.

(cherry picked from commit e05460c813)
2023-04-06 11:39:57 +02:00
Michal Nowak
17b31a95dc Merge branch 'mnowak/looking-for-dig-errors-must-not-fail-9.18' into 'bind-9.18'
[9.18] Looking for errors in dig output files must not fail

See merge request isc-projects/bind9!7815
2023-04-06 09:33:51 +00:00
Michal Nowak
5eb0a4e537
Looking for errors in dig output files must not fail
If no errors in dig output files of failed tests are found, TSAN file
parsing won't occur.

(cherry picked from commit 28a0df3081)
2023-04-06 11:04:14 +02:00
Petr Špaček
7956df54d7 Merge branch 'pspacek/log-roll-doc-nits-9.18' into 'bind-9.18'
[9.18] Log rotation doc improvements

See merge request isc-projects/bind9!7807
2023-04-05 14:08:25 +00:00
Petr Špaček
9659d40148
Remove erroneous cross-references to suffix statement
Logging section referenced to "suffix" statement definition for dns64.

(cherry picked from commit 1dada31187)
2023-04-05 16:03:24 +02:00
Petr Špaček
8f86b48c46
Make rndc dnstap -roll docs easier to read
(cherry picked from commit 2897a45644)
2023-04-05 16:03:24 +02:00
Petr Špaček
d9a745e310 Merge branch 'bug/main/rndc-dnstap-roll-9.18' into 'bind-9.18'
[9.18] Document that rndc dnstap -roll number is optional

See merge request isc-projects/bind9!7801
2023-04-05 12:06:06 +00:00
Petr Menšík
c16cabff04
Make it obvious -roll number is optional
Manual page were updated to indicate it, but rndc -h still displays it
as required parameter. Make it look like optional.

(cherry picked from commit 0627214568)
2023-04-05 14:05:14 +02:00
Petr Špaček
996f635991 Merge branch '3990-remove-dead-code-from-dst_api--9.18' into 'bind-9.18'
[9.18] Eliminate the dead code in dst_api.c

See merge request isc-projects/bind9!7775
2023-04-05 11:45:12 +00:00
Ondřej Surý
07720989a0
Eliminate the dead code in dst_api.c
In write_public_key() and write_key_state(), there were left-over checks
for result, that were effectively dead code after the last refactoring.
Remove those.

(cherry picked from commit 766366e934)
2023-04-05 09:11:24 +02:00
Mark Andrews
052422b1a8 Merge branch '3994-unnecessary-null-check-bind-9.18' into 'bind-9.18'
[9.18] Resolve "Unnecessary NULL check"

See merge request isc-projects/bind9!7798
2023-04-05 00:51:59 +00:00
Mark Andrews
bb705e9a90 Remove 'inst != NULL' from cleanup check in plugin_register
'inst' is guarenteed to be non NULL at this point.

    358        *instp = inst;
    359
    360cleanup:

    CID 281450 (#2 of 2): Dereference before null check (REVERSE_INULL)
    check_after_deref: Null-checking inst suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
    361        if (result != ISC_R_SUCCESS && inst != NULL) {
    362                plugin_destroy((void **)&inst);
    363        }
    364
    365        return (result);

(cherry picked from commit 8c5539e905)
2023-04-05 10:27:52 +10:00
Ondřej Surý
09e0c5f14a Merge branch 'ondrej/require-dnspyton-2.0.0-in-shutdown-system-test-9.18' into 'bind-9.18'
[9.18] Bump the requirement in the shutdown test to dnspython 2.0.0

See merge request isc-projects/bind9!7797
2023-04-04 19:58:55 +00:00
Ondřej Surý
36572d4a1a Bump the requirement in the shutdown test to dnspython 2.0.0
The dnspython.Resolve.resolve() requires at least dnspython >= 2.0.0,
this wasn't enforced in the shutdown system test leading to infinite
loop waiting for the server start due to failing resolve() call.
2023-04-04 19:58:45 +00:00
Ondřej Surý
7f8528cc09 Merge branch 'ondrej/require-dnspyton-2.0.0-in-dnstap-system-test-9.18' into 'bind-9.18'
[9.18] Bump the requirement in dnstap test to dnspython 2.0.0

See merge request isc-projects/bind9!7794
2023-04-04 19:58:14 +00:00
Ondřej Surý
947540fc7f Bump the requirement in dnstap test to dnspython 2.0.0
The dnspython.Resolve.resolve() requires at least dnspython >= 2.0.0,
this wasn't enforced in the dnstap system test.
2023-04-04 16:44:19 +00:00
Ondřej Surý
7873e37778 Merge branch 'ondrej/add-tests-for-rpz-in-multiple-views--9.18' into 'bind-9.18'
[9.18] Add test for RPZ in multiple views

See merge request isc-projects/bind9!7792
2023-04-04 15:05:41 +00:00
Ondřej Surý
1b1eaa20bc
Squash both rpzextra tests into tests_rpzextra.py
We don't need a separate module/file for every test. Both the rpz tests
could live in the same file.

The setup/teardown of servers if performed separately for each module --
unless there is a need to do that, it's better to avoid it.

(cherry picked from commit 1734d4a33e)
2023-04-04 16:27:48 +02:00
Tom Krizek
b765eac703
Use more concise syntax to check responses in rpzextra tests
All the answers are expected to have exactly one resource record. Check
it directly instead of iterating over all (possible) records.

(cherry picked from commit 2ed26609b8)
2023-04-04 16:27:48 +02:00
Ondřej Surý
f60bed5eb1
Add test for RPZ in multiple views
This adds rudimentary test for response-policy zones in multiple
views.  Different combinations are tested:

- two views with response-policy inherited from options {};
- two views view explicit response-policy using same RPZ zone name
- two views view explicit response-policy using secondary RPZ zone

(cherry picked from commit 1649c768e9)
2023-04-04 16:27:46 +02:00
Ondřej Surý
f38860d561
Replace dnspython resolver.query() with resolver.resolve()
The resolver.query() has been deprecated in favor of resolver.resolve();
used that.

(cherry picked from commit 3b1756d450)
2023-04-04 16:27:31 +02:00
Arаm Sаrgsyаn
e793fcefc7 Merge branch '3997-catz-shutdown-crash-in-dns_catz_zones_unref-9.18' into 'bind-9.18'
[9.18] Resolve "Catalog zone shutdown crash in dns_catz_zones_unref"

See merge request isc-projects/bind9!7789
2023-04-04 12:43:56 +00:00
Aram Sargsyan
f2d5f9d8f1 Add a CHANGES note for [GL #3997]
(cherry picked from commit 4a0bd69056)
2023-04-04 11:48:36 +00:00
Ondřej Surý
7e7985c9c7 Attach catzs to catz instead of doing this explicitly
Instead of explicitly adding a reference to catzs (catalog zones) when
calling the update callback, attach the catzs to the catz (catalog zone)
object to keep it referenced for the whole time the catz exists.

(cherry picked from commit 2ded876db2)
2023-04-04 11:47:43 +00:00
Ondřej Surý
05400684a6 Merge branch '3989-remove-dead-code-from-dns_xfrin--9.18' into 'bind-9.18'
[9.18] Fix xfrin_connect_done() error paths

See merge request isc-projects/bind9!7785
2023-04-04 09:33:19 +00:00
Ondřej Surý
d0f72756b6
Add CHANGES note for [GL #3989]
(cherry picked from commit 04b851342b)
2023-04-04 10:07:27 +02:00
Ondřej Surý
2bb4fa34cc
Fix xfrin_connect_done() error paths
The xfrin_connect_done() had several problems:

- it would not add the server to unreachable table in case of the
  failure coming from the dispatch [GL #3989]

- if dns_dispatch_checkperm() disallowed the connection, the xfr would
  be left undetached

- if xfrin_send_request() failed to send the request, the xfr would be
  left undetached

All of these have been fixed in this commit.

(cherry picked from commit 536e439c79)
2023-04-04 10:07:27 +02:00
Arаm Sаrgsyаn
3d341d090b Merge branch '3674-nsupdate--t-timeout-does-not-work-9.18' into 'bind-9.18'
[9.18] Resolve "nsupdate -t timeout does not work"

See merge request isc-projects/bind9!7779
2023-04-03 17:14:19 +00:00
Aram Sargsyan
a7d5ccdb1b nsupdate: set network manager default timeout values
The default values are currently set to 30 seconds, use nsupdate
default (or overriden using the -t option) timeout value instead.

(cherry picked from commit 98c8135692)
2023-04-03 16:19:18 +00:00
Aram Sargsyan
1287b0b0e8 Add a CHANGES note for [GL #3674]
(cherry picked from commit ef81775e7b)
2023-04-03 16:19:17 +00:00
Aram Sargsyan
9e42bfd1a0 nsupdate: use the configurable timeout and retry values for all queries
The 'nsupdate' tool, when sending SOA queries, uses a hard-coded value
3 UDP retries and of 5 seconds of timeout for UDP queries, and 100
seconds of timeout for TCP queries.

Use the timeout and retry values which can be configured using the
-t, -u, -r command line options, and which are already used for
sending the update query.

(cherry picked from commit 3ef2a30c75)
2023-04-03 16:18:39 +00:00
Aram Sargsyan
d861433ad4 Update nsupdate -t option's documentation
Add some clarifications about the -t option's behavior differences
in TCP and UDP modes.

(cherry picked from commit a00540ac24)
2023-04-03 16:18:39 +00:00
Aram Sargsyan
7beda284d2 Do not resend TCP requests
The req_response() function is using 'udpcount' variable to resend
the request 'udpcount' times on timeout even for TCP requests,
which does not make sense, as it would use the same connection.

Add a condition to use the resend logic only for UDP requests.

(cherry picked from commit edcdb881da)
2023-04-03 16:18:39 +00:00
Aram Sargsyan
14084d8eac Perform request validation in req_response() before using the pointer
The 'request' pointer is used before it is checked. Perform the check
before using the pointer.

(cherry picked from commit 5b37359697)
2023-04-03 16:18:39 +00:00
Aram Sargsyan
4dc2ff79d6 Synchronize dns_request_createraw() and dns_request_create() UDP timeout
The dns_request_createraw() function, unlike dns_request_create(), when
calculating the UDP timeout value, doesn't check that 'udpretries' is
not zero, and that is the more logical behavior, because the calculation
formula uses division to 'udpretries + 1', where '1' is the first try.

Change the dns_request_create() function to remove the 'udpretries != 0'
condition.

Add a 'REQUIRE(udpretries != UINT_MAX)' check to protect from a division
by zero.

Make the 'request->udpcount' field to represent the number of tries,
instead of the number of retries.

(cherry picked from commit 643abfbba7)
2023-04-03 16:18:39 +00:00
Aram Sargsyan
b015b87fdc nsupdate: when set to 0, UDP timeout should be calculated by dns_request
The manual page of nsupdate's '-u udptimeout' option states that, quote:

> If zero, the interval is computed from the timeout interval and number
> of UDP retries.

However, nsupdate sets the UDP timeout value to UINT_MAX when it is 0,
thus, not behaving as documented.

Let dns_request_create() calculate the UDP timeout, if it was set to 0.

(cherry picked from commit 0ef11c0ccb)
2023-04-03 16:18:39 +00:00
Aram Sargsyan
9597a3aaca Add nsupdate timeout tests
* nsupdate should take 12 seconds (one try and three retries with
  3 second timeout for each), UDP mode
* nsupdate -u 4 -r 1 should take 8 seconds (one try and one retry with
  4 second timeout for each), UDP mode
* nsupdate -u 0 -t 8 -r 1 should also take 8 seconds, UDP mode
* nsupdate -u 4 -t 30 -r 1 should also take 8 seconds, as -u takes
  precedence over -t, UDP mode
* nsupdate -t 8 -v should also take 8 seconds, TCP mode

(cherry picked from commit 5ce2ed0688)
2023-04-03 16:18:39 +00:00
Petr Špaček
347222ad82 Merge branch '3981-reduce-dnssec-verify-calls-9.18' into 'bind-9.18'
[9.18] Reduce dns_dnssec_verify calls made checking for revoked trust anchor

See merge request isc-projects/bind9!7777
2023-04-03 16:17:09 +00:00
Petr Špaček
6f3d3d7eff
Add release note for [GL #3981]
(cherry picked from commit 705a9ced01)
2023-04-03 17:47:36 +02:00
Mark Andrews
ed6ba1d273
Add CHANGES for [GL #3981]
(cherry picked from commit 5de552d545)
2023-04-03 17:46:42 +02:00
Mark Andrews
39c82bf429
dns_view_untrust modifies dnskey->flags when it shouldn't
Copy the structure and declare dnskey as const.

(cherry picked from commit 21d828241b)
2023-04-03 17:46:13 +02:00
Mark Andrews
972c245065
Handle dns_rdata_fromstruct failure dns_keytable_deletekey
dns_rdata_fromstruct in dns_keytable_deletekey can potentially
fail with ISC_R_NOSPACE.  Handle the error condition.

(cherry picked from commit b5df9b8591)
2023-04-03 17:46:13 +02:00
Mark Andrews
4920fca095
Reduce the number of verifiations required
In selfsigned_dnskey only call dns_dnssec_verify if the signature's
key id matches a revoked key, the trust is pending and the key
matches a trust anchor.  Previously named was calling dns_dnssec_verify
unconditionally resulted in busy work.

(cherry picked from commit e68fecbdaa)
2023-04-03 17:46:13 +02:00
Mark Andrews
59f17be969
Add new view method dns_view_istrusted
dns_view_istrusted determines if the given key is treated as
being trusted by the view.

(cherry picked from commit 7278fff579)
2023-04-03 17:46:13 +02:00
Tom Krizek
ad6990f019 Merge branch '3915-check-dig-output-for-errors-9.18' into 'bind-9.18'
[9.18] Find errors in dig output in system tests

See merge request isc-projects/bind9!7769
2023-04-03 11:13:11 +00:00