Commit Graph
41807 Commits
Author SHA1 Message Date
Michal Nowak b5bdc3ff30 Add isctest.check.notimp()
(cherry picked from commit a2d2d9c0d3)
2024-10-01 12:06:40 +00:00
Michal Nowak 8f5fcf6441 Report expected and last returned rcode on query timeout
Sometimes it's useful to see what was the server returning that did not
match the expected rcode.

(cherry picked from commit 4cb52f072e)
2024-10-01 12:06:40 +00:00
Mark Andrews 72626cf940 [9.20] fix: usr: Fix a bug in the static-stub implementation
Static-stub addresses and addresses from other sources were being
mixed together, resulting in static-stub queries going to addresses
not specified in the configuration, or alternatively, static-stub
addresses being used instead of the correct server addresses.

Closes #4850

Backport of MR !9314

Merge branch 'backport-4850-add-an-additional-class-of-names-to-adb-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9571
2024-10-01 02:07:40 +00:00
Mark Andrews 7e8ffe3d63 Store static-stub addresses seperately in the adb
Static-stub address and addresses from other sources where being
mixed together resulting in static-stub queries going to addresses
not specified in the configuration or alternatively static-stub
addresses being used instead of the real addresses.

(cherry picked from commit b3a2c790f3)
2024-10-01 01:27:55 +00:00
Mark Andrews cee11c8610 [9.20] new: usr: Log query response status to the query log
Log a query response summary using the new category `responses`.  Logging can be controlled by the option `responselog` and `rndc responselog`.

Closes #459

Backport of MR !9449

Merge branch 'backport-459-log-query-response-status-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9526
2024-09-30 01:14:26 +00:00
Mark Andrews 3c0515b349 Document 'responselog' in the ARM
(cherry picked from commit 452db02c19)
2024-09-30 00:10:47 +00:00
Mark Andrews 39afab41f0 Check responselog behaviour
Extends the resolver system test to to check whether responses are
logged to the query log in addition to the queries.

(cherry picked from commit 61415432ec)
2024-09-30 00:10:47 +00:00
Petr MenšíkandMark Andrews 59770f281c Move common flags logging to shared functions
Query and response log shares the same flags. Move flags logging out of
log_query to share it with log_response. Use buffer instead of snprintf
to fill flags a bit faster.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
(cherry picked from commit e6b19af2dd)
2024-09-30 00:10:47 +00:00
Petr MenšíkandMark Andrews d9d50f6274 Make responselog flags similar to querylog
Remove answer flag from log, log instead count of records for each
message section. Include EDNS version and few flags of response. Add
also status of result.

Still does not include body of responses rrset.

(cherry picked from commit 6f879aba65)
2024-09-30 00:10:47 +00:00
Evan HuntandMark Andrews b9f4a1b029 Reduce code duplication
combined named_server_togglequerylog() and
named_server_toggleresponselog() into named_server_setortoggle().

(cherry picked from commit c4b7dce376)
2024-09-30 00:10:47 +00:00
Mark Andrews 3968813724 Log the rcode returned to for a query
Log to the querylog the rcode of a previous query using
the identifier 'response:' to diffenciate queries from
responses.

(cherry picked from commit 5fad79c92f)
2024-09-30 00:10:47 +00:00
Arаm Sаrgsyаn 5db2ec0739 [9.20] fix: dev: Add a missing rcu_read_unlock() call on exit path
An exit path in the dns_dispatch_add() function fails to get out of
the RCU critical section when returning early. Add the missing
rcu_read_unlock() call.

Backport of MR !9561

Merge branch 'backport-aram/add-missing-rcu_read_unlock-in-dns_dispatch_add-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9564
2024-09-27 14:29:46 +00:00
Aram Sargsyan 346850954c Add a missing rcu_read_unlock() call on exit path
An exit path in the dns_dispatch_add() function fails to get out of
the RCU critical section when returning early. Add the missing
rcu_read_unlock() call.

(cherry picked from commit 4123d59fbc)
2024-09-27 13:53:31 +00:00
Ondřej Surý 5e6594b1f7 [9.20] dev: Add full Alessio's name to .mailmap to fix some of the older commits
Backport of MR !9557

Merge branch 'backport-ondrej/add-alessio-to-.mailmap-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9558
2024-09-26 11:55:07 +00:00
Ondřej Surý 6444583f65 Add full Alessio's name to .mailmap to fix some of the older commits
(cherry picked from commit 1bc9eb0fc8)
2024-09-26 11:51:08 +00:00
Mark Andrews dad3fafe9e [9.20] new: usr: Added WALLET type
Add the new record type WALLET (262).  This provides a mapping from a domain name to a cryptographic currency wallet.  Multiple mappings can exist if multiple records exist.

Closes #4947

Backport of MR !9521

Merge branch 'backport-4947-add-wallet-type-to-named-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9554
2024-09-25 12:49:22 +00:00
Mark Andrews 00287db8ed Add examples of WALLET records
(cherry picked from commit 9b358e6e8b)
2024-09-25 12:07:52 +00:00
Mark Andrews c6045acc41 Add the new record type WALLET (262)
This provides a mapping from a domain name to a cryptographic
currency wallet and is a clone of TXT.

(cherry picked from commit b919b9b4f3)
2024-09-25 12:07:52 +00:00
Arаm Sаrgsyаn d35f654d67 [9.20] fix: usr: Fix the 'rndc dumpdb' command's error reporting
The 'rndc dumpdb' command wasn't reporting errors which
occurred when starting up the database dump process by named,
like, for example, a permission denied error for the
'dump-file' file. This has been fixed. Note, however, that
'rndc dumpdb' performs asynchronous writes, so errors can
also occur during the dumping process, which will not be
reported back to 'rndc', but which will still be logged by
named.

Closes #4944

Backport of MR !9547

Merge branch 'backport-4944-rndc-dumpdb-do-not-ignore-errors-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9553
2024-09-25 10:05:52 +00:00
Aram Sargsyan cc038054e1 Test 'rndc dumpdb' with an unwritable dump-file
Check that with a preexisting dump file without a write permission
no actual dump happens, and rndc returns an error result.

Also add a couple of missing entries in the cleaning script.

(cherry picked from commit 63bddd7192)
2024-09-25 09:11:49 +00:00
Aram Sargsyan 782a570052 Do not ignore named_server_dumpdb() result code
The named_server_dumpdb() function, which is called when a 'rndc dumpdb'
command is issued, returns a 'isc_result_t' result code and it has been
always ignored since its introduction in
eb8713ed94, where it was still called
ns_server_dumpdb(). The orignal reasoning is not preserved, but it could
have been also a simple copy-paste mistake, as there are commands, which
return 'void' and require manually setting 'result = ISC_R_SUCCESS;', as
it was done here. Anyway, named will now return the actual result, and
'rndc' will report an error, when the 'dumpdb' command fails.

(cherry picked from commit 8b866ba8a0)
2024-09-25 09:11:49 +00:00
Nicki Křížek 12fe4d9f75 [9.20] chg: doc: Track changes in separate files
Keep the changelog for each version in a separate source file to avoid
rebase conflicts when handling the -S version.

---

Related !9549 

Closes #4946

Merge branch 'nicki/reorganize-changelog-docfiles-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9550
2024-09-24 14:59:54 +00:00
Nicki Křížek 55af00f6d5 Fix changelog entry for [GL #4759] 2024-09-24 16:13:50 +02:00
Nicki Křížek 9accdf345f Generate changelog to stdout
Since the changes aren't tracked in the single changelog.rst file,
generate the changelog to stdout instead, so it can be easily redirected
to the proper file.
2024-09-24 16:13:50 +02:00
Nicki Křížek 5e771e7735 Track changes in separate files
Keep the changelog for each version in a separate source file to avoid
rebase conflicts when handling the -S version.
2024-09-24 16:13:50 +02:00
Nicki Křížek 2258bd1518 [9.20] chg: ci: Increase the load TCP/DoT shotgun perf tests
Due to the recent improvements to the TCP processing, much higher loads
can be handled by BIND9 without causing client timeouts. The updated
parameters give us useful data for both cold and hot cache testing.

Backport of MR !9494

Merge branch 'backport-nicki/increase-tcp-dot-shotgun-load-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9548
2024-09-24 11:52:55 +00:00
Nicki Křížek c4ba41f498 Increase the load TCP/DoT shotgun perf tests
Due to the recent improvements to the TCP processing, much higher loads
can be handled by BIND9 without causing client timeouts. The updated
parameters give us useful data for both cold and hot cache testing.

(cherry picked from commit e89afd3349)
2024-09-24 11:17:43 +00:00
Mark Andrews b30274bc8c [9.20] fix: test: Check read value in upforwd/ans4
The ans4 server wasn't shutting down cleanly sometimes.  Check that read returns the
expected value for the message length or exit read loop.

Closes #4301

Backport of MR !9537

Merge branch 'backport-4301-check-read-value-in-ans4-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9545
2024-09-24 09:23:57 +00:00
Mark Andrews 2952f8339d Check read value in upforwd/ans4
The ans4 server wasn't shutting down cleanly sometimes.  Check that
read returns the expected value for the message length or exit read
loop.

(cherry picked from commit 21baad0a8f)
2024-09-24 07:29:29 +00:00
Michal Nowak 7c8f0afd44 [9.20] chg: test: Downgrade "timeout" and "attempts" arguments in shutdown
The shutdown system test sends queries when named is shutting down, not
in an attempt to get answers but to destabilize the server into a crash.
With isctest.query.udp() defaulting to try up to ten times with a
ten-second timeout to get a response we don't care about from a likely
terminated server, we make the test run much longer than needed because
of retries and long timeouts.

Also, see isc-projects/bind9#4943.

Backport of MR !9507

Merge branch 'backport-mnowak/shutdown-downgrade-timeout-and-attempts-arguments-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9541
2024-09-23 16:16:02 +00:00
Michal Nowak e7dd232320 Print correct udp/tcp function name in generic_query()
(cherry picked from commit 1c637e96d1)
2024-09-23 15:40:40 +00:00
Michal Nowak 69b116b788 Downgrade "timeout" and "attempts" arguments in shutdown
The shutdown system test sends queries when named is shutting down, not
in an attempt to get answers but to destabilize the server into a crash.
With isctest.query.udp() defaulting to try up to ten times with a
ten-second timeout to get a response we don't care about from a likely
terminated server, we make the test run much longer than needed because
of retries and long timeouts.

(cherry picked from commit 463ab2f3f5)
2024-09-23 15:40:39 +00:00
Michal Nowak f4489d0ded [9.20] chg: ci: Exclude some RPZ files from long stress test artifacts
This fixes 6f86885304, that excluded files
only from short stress tests.

Validation jobs:
- [x] short - [#4756989](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4756989/artifacts/browse/output/ns4/) - 
- [x] long - [#4757196](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4757196/artifacts/browse/output/ns4/)

Backport of MR !9522

Merge branch 'backport-mnowak/exclude-some-rpz-files-from-long-stress-tests-artifacts-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9538
2024-09-23 12:25:11 +00:00
Michal Nowak aed660e57d Exclude some RPZ files from long stress test artifacts
This fixes 6f86885304, that excluded files
only from short stress tests.

(cherry picked from commit 871eeed519)
2024-09-23 11:20:49 +00:00
Ondřej Surý c511535b72 [9.20] chg: ci: Update code formatting
Backport of MR !9533

Merge branch 'backport-nicki/update-code-format-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9534
2024-09-21 11:20:07 +00:00
Nicki KřížekandOndřej Surý 7bb0a15578 Ignore clang-format reformatting commit
(cherry picked from commit 28d4e866c7)
2024-09-21 12:45:45 +02:00
Nicki KřížekandOndřej Surý 5662236fa1 Fix arguments-renamed pylint issue in iscconf.py
The argument name was different in the base class.

(cherry picked from commit 833ea7926c)
2024-09-21 12:45:27 +02:00
Nicki KřížekandOndřej Surý f2fa1b7d63 Update code formatting
clang 19 was updated in the base image.

(cherry picked from commit ebb5bd9c0f)
2024-09-21 12:45:27 +02:00
Ondřej Surý c5cadd29d8 [9.20] fix: usr: Fix long-running incoming transfers
Incoming transfers that took longer than 30 seconds would stop reading from the TCP stream and the incoming transfer would be indefinitely stuck causing BIND 9 to hang during shutdown.

This has been fixed and the `max-transfer-time-in` and `max-transfer-idle-in` timeouts are now honoured.

Closes #4949

Backport of MR !9531

Merge branch 'backport-4949-fix-ignored-and-invalid-dispatch-timeout-in-dns_xfrin-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9536
2024-09-21 10:37:48 +00:00
Ondřej Surý deba4670cb Don't enable timeouts in dns_dispatch for incoming transfers
The dns_dispatch_add() call in the dns_xfrin unit had hardcoded 30
second limit.  This meant that any incoming transfer would be stopped in
it didn't finish within 30 seconds limit.  Additionally, dns_xfrin
callback was ignoring the return value from dns_dispatch_getnext() when
restarting the reading from the TCP stream; this could cause transfers
to get stuck waiting for a callback that would never come due to the
dns_dispatch having already been shut down.

Call the dns_dispatch_add() without a timeout and properly handle the
result code from the dns_dispatch_getnext().

(cherry picked from commit 96ef98558c)
2024-09-21 08:53:25 +00:00
Ondřej Surý 4127068305 Modify dns_dispatch API to accept zero timeout
The dns_dispatch_add() has timeout parameter that could not be 0 (for
not timeout).  Modify the dns_dispatch implementation to accept a zero
timeout for cases where the timeouts are undesirable because they are
managed externally.

(cherry picked from commit 0f810b3144)
2024-09-21 08:53:25 +00:00
Nicki Křížek a0eada5388 [9.20] chg: dev: Restore the number of threadpool threads back to original value
The issue of long-running operations potentially blocking query resolution has been fixed. Revert this temporary workaround and restore the number of threadpool threads.

Related #4898

Backport of MR !9530

Merge branch 'backport-4898-remove-workaround-and-note-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9532
2024-09-20 15:46:12 +00:00
Nicki Křížek a2a4eef5b0 Remove fixed known issue [GL #4898]
(cherry picked from commit 9fc773ce4c)
2024-09-20 14:51:33 +00:00
Nicki Křížek 38fb8bed49 Revert "Double the number of threadpool threads"
This reverts commit 6857df20a4.

(cherry picked from commit 842abe9fbf)
2024-09-20 14:51:33 +00:00
Evan Hunt b1b2ab0cb3 [9.20] chg: minor cleanup in qpcache
when the QP cache was adapted from the RBTDB, some variable names weren't changed, and still incorrectly reference the RBT.

Backport of MR !9515

Merge branch 'backport-each-qpcache-nits-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9525
2024-09-19 22:37:07 +00:00
Evan Hunt c1b94dc622 rename 'rbtiterator' and similar names in qpcache
when the QP cache was adapted from the RBT database, some names
weren't changed. this could be confusing, so let's change them now.
also, we no longer need to include rbt.h.

(cherry picked from commit 5a444838db)
2024-09-19 15:02:23 -07:00
Nicki Křížek 379d7faeac Merge tag 'v9.20.2' into bind-9.20 2024-09-18 18:06:27 +02:00
Arаm Sаrgsyаn 1f553c61f7 [9.20] chg: usr: Set logging category for notify/xfer-in related messages
Some 'notify' and 'xfer-in' related log messages were logged at the
'general' category instead of their own category. This has been fixed.

Closes #2730

Backport of MR !9451

Merge branch 'backport-2730-logging-category-for-notify-and-xfer-related-messages-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9514
2024-09-17 17:45:30 +00:00
Aram Sargsyan 0098ff6456 Set logging category for notify/xfer related messages
Some notify/xfer related log messages are logged at the general
category. Set a more suitable caterogry for those messages.

(cherry picked from commit 7c45caa8a5)
2024-09-17 16:14:52 +00:00
Ondřej Surý 251b90c25e [9.20] fix: usr: Limit the outgoing UDP send queue size
If the operating system UDP queue gets full and the outgoing UDP sending
starts to be delayed, BIND 9 could exhibit memory spikes as it tries to
enqueue all the outgoing UDP messages.  Try a bit harder to deliver the
outgoing UDP messages synchronously and if that fails, drop the outgoing
DNS message that would get queued up and then timeout on the client side.

Closes #4930

Backport of MR !9506

Merge branch 'backport-4930-limit-the-UDP-send-queue-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!9511
2024-09-17 15:37:22 +00:00