Commit Graph

39425 Commits

Author SHA1 Message Date
Michal Nowak
a5cc3bfbe3 Add isctest.check.notimp()
(cherry picked from commit a2d2d9c0d3)
2024-10-01 12:06:47 +00:00
Michal Nowak
077b2b56d9 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:47 +00:00
Evan Hunt
1e5bc23921 [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!9572
2024-10-01 07:37:21 +00:00
Mark Andrews
b1cf7997a7 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 15:30:17 +10:00
Ondřej Surý
436e6955ca [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!9559
2024-09-26 11:55:11 +00:00
Ondřej Surý
23f4b87536 Add full Alessio's name to .mailmap to fix some of the older commits
(cherry picked from commit 1bc9eb0fc8)
2024-09-26 11:51:12 +00:00
Mark Andrews
65d9f28b32 [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!9555
2024-09-25 12:45:06 +00:00
Mark Andrews
1a68cc6cfa Add examples of WALLET records
(cherry picked from commit 9b358e6e8b)
2024-09-25 12:07:57 +00:00
Mark Andrews
314ff56081 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:57 +00:00
Mark Andrews
4d573a2111 [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!9546
2024-09-24 09:53:15 +00:00
Mark Andrews
a0522653ca 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 09:22:22 +00:00
Nicki Křížek
5afcb291a3 [9.18] chg: doc: Track changes in separate files
Keeping a single changelog file creates annoying conflicts when rebasing
the -S version. To eliminate these, keep the changelog for each version
in a separate file and also create files for the -S versions to include
them in the docs. In the open source version, these files will remain
empty and thus won't affect the documentation, while in the -S edition
they'll be filled in and included without introducing any conflicts.

---

Closes #4946

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

See merge request isc-projects/bind9!9528
2024-09-24 08:17:20 +00:00
Nicki Křížek
bf5c21f3f6 Fix changelog formatting for #4579 2024-09-24 10:15:48 +02:00
Nicki Křížek
9bd8d34ffe 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 10:15:48 +02:00
Nicki Křížek
f80d4d8367 Track changes in separate files
Keeping a single changelog file creates annoying conflicts when rebasing
the -S version. To eliminate these, keep the changelog for each version
in a separate file and also create files for the -S versions to include
them in the docs. In the open source version, these files will remain
empty and thus won't affect the documentation, while in the -S edition
they'll be filled in and included without introducing any conflicts.
2024-09-24 10:15:48 +02:00
Michal Nowak
cecadee2e9 [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!9542
2024-09-23 16:31:50 +00:00
Michal Nowak
20cab85f41 Print correct udp/tcp function name in generic_query()
(cherry picked from commit 1c637e96d1)
2024-09-23 15:40:44 +00:00
Michal Nowak
86c7bb4a0c 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:44 +00:00
Michal Nowak
a1fae6152d [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!9539
2024-09-23 12:25:23 +00:00
Michal Nowak
f4122dfcd0 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:54 +00:00
Ondřej Surý
5744c009eb [9.18] chg: ci: Update code formatting
Backport of MR !9533

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

See merge request isc-projects/bind9!9535
2024-09-21 11:20:47 +00:00
Nicki Křížek
c8438e80f1 Ignore clang-format reformatting commit
(cherry picked from commit 28d4e866c7)
2024-09-21 12:47:04 +02:00
Nicki Křížek
15b61602c6 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 07:20:11 +00:00
Nicki Křížek
50221d6ff1 Update code formatting
clang 19 was updated in the base image.

(cherry picked from commit ebb5bd9c0f)
2024-09-21 07:20:11 +00:00
Alessio Podda
694cb11a17 [9.18] fix: usr: Do not set SO_INCOMING_CPU
We currently set SO_INCOMING_CPU incorrectly, and testing by Ondrej
shows that fixing the issue by setting affinities is worse than letting
the kernel schedule threads without constraints. So we should not set
SO_INCOMING_CPU anymore.

Closes #4936

Backport of MR !9497

Merge branch 'backport-4936-remove-so-incoming-cpu-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9505
2024-09-20 06:58:40 +00:00
alessio
01e3567243 Do not set SO_INCOMING_CPU
We currently set SO_INCOMING_CPU incorrectly, and testing by Ondrej
shows that fixing the issue and setting affinities is worse than letting
the kernel schedule threads without constraints. So we should not set
SO_INCOMING_CPU anymore.

(cherry picked from commit 8b8149cdd2)
2024-09-19 16:40:59 +02:00
Nicki Křížek
0b386fc34c Merge tag 'v9.18.30' into bind-9.18 2024-09-18 18:08:01 +02:00
Arаm Sаrgsyаn
5a6c5218ad [9.18] fix: usr: Fix a statistics channel counter bug when 'forward only' zones are used
When resolving a zone with a 'forward only' policy, and
finding out that all the forwarders are marked as "bad",
the 'ServerQuota' counter of the statistics channel was
incorrectly increased. This has been fixed.

Closes #1793

Backport of MR !9493

Merge branch 'backport-1793-serverquota-counter-bug-with-forward-only-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9503
2024-09-18 08:59:28 +00:00
Aram Sargsyan
904940167c Update the resolver system test
The 'bin/tests/system/resolver.c' tool used in the resolver system
test uses the 'dns_client_setservers()' function, which sets up a
resolution in 'forward only' mode. Since a bug was just fixed in
'fctx_getaddresses()', two expected failures in the resolver system
test now fail with a different failure message, because
'fctx_getaddresses()' returns 'ISC_R_FAILURE' instead of
'res->quotaresp[dns_quotatype_server]', which is 'DNS_R_SERVFAIL'
by default. Change the expected failure message.
2024-09-18 01:25:01 +00:00
Aram Sargsyan
8f617d7971 Add a statistics channel check in the forward system test
Check that the fix in the previous commit works and that the
'ServerQuota' counter in the statistics channel is still unset
after a SERVFAIL result in a 'forward only' zone.

(cherry picked from commit 81b3c5d908)
2024-09-18 01:25:01 +00:00
Aram Sargsyan
ef344cbd5e Fix a 'serverquota' counter calculation bug
The 'all_spilled' local variable in resolver.c:fctx_getaddresses()
is 'true' by default, and only becomes false when there is at least
one successfully found NS address. However, when a 'forward only;'
configuration is used, the code jumps over the part where it looks
for NS addresses and doesn't reset the 'all_spilled' to false, which
results in incorretly increased 'serverquota' statistics variable,
and also in invalid return error code from the function. The result
code error didn't make any differences, because all codes other than
'ISC_R_SUCCESS' or 'DNS_R_WAIT' were treated in the same way, and
the result code was never logged anywhere.

Set the default value of 'all_spilled' to 'false', and only make it
'true' before actually starting to look up NS addresses.

(cherry picked from commit e430ce7039)
2024-09-18 01:25:01 +00:00
Ondřej Surý
6c1fc4ae54 [9.18] 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.18' into 'bind-9.18'

See merge request isc-projects/bind9!9512
2024-09-17 15:07:38 +00:00
Ondřej Surý
3012a97d58 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.  As those are not going to be
delivered anyway (as we argued when we stopped enlarging the operating
system send and receive buffers), try to send the UDP messages directly
using `uv_udp_try_send()` and if that fails, drop the outgoing UDP
message.

(cherry picked from commit b576c4c977)
2024-09-17 16:20:00 +02:00
Mark Andrews
5c51e044c4 [9.18] chg: dev: Remove statslock from dnssec-signzone
Silence Coverity CID 468757 and 468767 (DATA RACE read not locked) by converting dnssec-signzone to use atomics for statistics counters rather than using a lock.

Closes #4939

Backport of MR !9496

Merge branch 'backport-4939-remove-stats-lock-from-dnssec-signzone-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9501
2024-09-16 03:59:36 +00:00
Mark Andrews
4d23018660 Remove 'statslock' from dnssec-signzone
Silence Coverity CID 468757 and 468767 (DATA RACE read not locked)
by converting dnssec-signzone to use atomics for statistics counters
rather than using a lock.  This should be marginally faster than
using the lock as well when statistics are requested.

(cherry picked from commit 473cbd4e87)
2024-09-16 13:25:07 +10:00
Michal Nowak
2f4c418729 [9.18] chg: test: Replace dns.resolver module in system tests
Closes #4634

Backport of MR !9150

Merge branch 'backport-4634-drop-dns.resolver-module-from-system-tests-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9492
2024-09-12 18:58:00 +00:00
Michal Nowak
6addaef7fc Extract dns.rcode compatibility code to isctest.compat
(cherry picked from commit 8b55d0709d)
2024-09-12 19:48:31 +02:00
Michal Nowak
aa302dfe24 Turn off deadline for wildcard tests
Tests that query BIND need much longer deadline to account for retries,
the default 200ms won't work.

(cherry picked from commit d2e0043ec3)
2024-09-12 19:48:31 +02:00
Michal Nowak
4e3cc58eba Extract "custom" named instances support to isctest.run module
(cherry picked from commit 2cec1de43b)
2024-09-12 19:48:31 +02:00
Michal Nowak
1220435e27 Rework query functions to retry by default
(cherry picked from commit 5929ba0f54)
2024-09-12 18:35:59 +02:00
Michal Nowak
00295ef591 Deprecate dns.resolver module in BIND 9 system tests
(cherry picked from commit cb3ffac9a7)
2024-09-12 18:35:59 +02:00
Michal Nowak
f082e6800b Replace dns.resolver module in system tests
(cherry picked from commit bfe338b965)
2024-09-12 18:35:59 +02:00
Mark Andrews
e8c2c9c9dc [9.18] fix: usr: Don't allow statistics-channel if libxml2 and libjson-c are unsupported
When the libxml2 and libjson-c libraries are not supported, the statistics channel can't return anything useful, so it is now disabled. Use of `statistics-channel` in `named.conf` is a fatal error.

Closes #4895

Backport of MR !9423

Merge branch 'backport-4895-link-style-sheet-to-libxml2-support-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9487
2024-09-12 04:10:38 +00:00
Mark Andrews
6023162ac5 Fix named-checkconf and statistics-channels
If neither libxml2 nor libjson_c are available have named-checkconf
fail if a statistics-channels block is specified.

(cherry picked from commit b9246418e8)
2024-09-12 13:39:38 +10:00
Mark Andrews
047fa205d7 Only configure statistics-channels if supported
(cherry picked from commit d0c8c6d7ef)
2024-09-12 13:39:36 +10:00
Mark Andrews
e5ff972167 Don't create the HTTP server if libxml and libjson-c are unavailable
(cherry picked from commit 31650d9440)
2024-09-12 03:27:43 +00:00
Mark Andrews
350a15e702 Don't return the style sheet unless libxml2 is supported
If not statistics are available we don't want the style sheet
returned.

(cherry picked from commit ed81b3ae93)
2024-09-12 03:27:43 +00:00
Mark Andrews
b5aa3696c5 [9.18] fix: test: The statschannel tests fails if one of libxml2 or json-c is configured
The `statschannel` system test failed if only one of `libxml2` or `json-c` is
available / configured as checks were being run against the non available
statistics page.

Closes #4919

Backport of MR !9454

Merge branch 'backport-4919-fix-statschannel-system-test-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9484
2024-09-11 23:51:01 +00:00
Mark Andrews
3333f9c94d Properly detect when libxml2 or json-c is not available
(cherry picked from commit 7de939609b)
2024-09-12 09:18:38 +10:00
Nicki Křížek
f6cc09779a chg: doc: Review BIND ARM (9.18 updates)
Closes #4832

Merge branch '4832-bind-arm-review-from-2022-through-9-18' into 'bind-9.18'

See merge request isc-projects/bind9!9375
2024-09-11 13:55:49 +00:00