2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

42258 Commits

Author SHA1 Message Date
alessio
bc63758d70 Null clausedefs for ancient options
This commit nulls all type fields for the clausedef lists that are
declared ancient, and removes the corresponding cfg_type_t and parsing
functions when they are found to be unused after the change.
2024-10-01 10:17:04 +02:00
Matthijs Mekking
516b098220 fix: doc: Restore text about sig validity and SOA expire
When `sig-validity-interval` was obsoleted, the text that the signature validity interval should be multiples of the SOA expire interval was removed. Restore this text to the description of the `signatures-validity` option.

Closes #4951

Merge branch '4951-document-signatures-validity-soa-expire' into 'main'

See merge request isc-projects/bind9!9566
2024-10-01 06:32:48 +00:00
Matthijs Mekking
8aa94931c3 Update example.com zone SOA expire value
The example.com zone file given in the "Configurations and Zone Files"
chapter has an SOA expire of 3 weeks, which is not a multiple of
the default signatures-validity value. Adjust the SOA expire so that
it is much lower than the signatures-validity default.
2024-10-01 06:32:28 +00:00
Matthijs Mekking
b09230004b Restore text about sig validity and SOA expire
When `sig-validity-interval` was obsoleted, the text that the signature
validity interval should be multiples of the SOA expire interval was
removed. Restore this text to the description of the
`signatures-validity` option.
2024-10-01 06:32:28 +00:00
Mark Andrews
3304e1dc76 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

Merge branch '4850-add-an-additional-class-of-names-to-adb' into 'main'

See merge request isc-projects/bind9!9314
2024-10-01 01:26:56 +00:00
Mark Andrews
b3a2c790f3 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.
2024-10-01 00:19:13 +00:00
Petr Špaček
4d759a251b rem: dev: Remove unused function dns_zonemgr_resumexfrs()
Merge branch 'pspacek/zone-xfr-cleanup' into 'main'

See merge request isc-projects/bind9!9565
2024-09-30 12:42:22 +00:00
Petr Špaček
a0f3b0c5de Remove unused function dns_zonemgr_resumexfrs() 2024-09-30 12:42:08 +00:00
Ondřej Surý
b1be0145a5 chg: dev: Use release memory ordering when incrementing reference counter
As the relaxed memory ordering doesn't ensure any memory
synchronization, it is possible that the increment will succeed even
in the case when it should not - there is a race between
atomic_fetch_sub(..., acq_rel) and atomic_fetch_add(..., relaxed).
Only the result is consistent, but the previous value for both calls
could be same when both calls are executed at the same time.

Merge branch 'ondrej/use-release-memory-ordering-for-reference-counting' into 'main'

See merge request isc-projects/bind9!9460
2024-09-30 12:22:05 +00:00
Ondřej Surý
88227ea665
Use release memory ordering when incrementing reference counter
As the relaxed memory ordering doesn't ensure any memory
synchronization, it is possible that the increment will succeed even
in the case when it should not - there is a race between
atomic_fetch_sub(..., acq_rel) and atomic_fetch_add(..., relaxed).
Only the result is consistent, but the previous value for both calls
could be same when both calls are executed at the same time.
2024-09-30 11:03:01 +02:00
Arаm Sаrgsyаn
d7d1804f16 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.

Merge branch 'aram/add-missing-rcu_read_unlock-in-dns_dispatch_add' into 'main'

See merge request isc-projects/bind9!9561
2024-09-27 13:50:54 +00:00
Aram Sargsyan
4123d59fbc 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.
2024-09-27 13:48:33 +00:00
Ondřej Surý
62c49db973 dev: Add full Alessio's name to .mailmap to fix some of the older commits
Merge branch 'ondrej/add-alessio-to-.mailmap' into 'main'

See merge request isc-projects/bind9!9557
2024-09-26 11:48:16 +00:00
Ondřej Surý
1bc9eb0fc8 Add full Alessio's name to .mailmap to fix some of the older commits 2024-09-26 11:48:02 +00:00
Ondřej Surý
f48b86871f chg: usr: Honour the Control Group memory contraints on Linux
On Linux, the system administrator can use Control Group ``cgroup``
mechanism to limit the amount of available memory to the process.  This
limit will be honoured when calculating the percentage-based values.

Merge branch 'ondrej/use-uv_get_available_memory-doc' into 'main'

See merge request isc-projects/bind9!9556
2024-09-26 11:20:14 +00:00
Ondřej Surý
37552ce9ae
Document that we now honour the cgroup memory limit
On Linux, the system administrator can use Control Group ``cgroup``
mechanism to limit the amount of available memory to the process.  This
limit will be honoured when calculating the percentage-based values.
2024-09-26 12:55:11 +02:00
Mark Andrews
d0d4c6dae7 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

Merge branch '4947-add-wallet-type-to-named' into 'main'

See merge request isc-projects/bind9!9521
2024-09-25 12:03:45 +00:00
Mark Andrews
9b358e6e8b Add examples of WALLET records 2024-09-25 10:32:38 +00:00
Mark Andrews
b919b9b4f3 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.
2024-09-25 10:32:38 +00:00
Arаm Sаrgsyаn
4498c0216f 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

Merge branch '4944-rndc-dumpdb-do-not-ignore-errors' into 'main'

See merge request isc-projects/bind9!9547
2024-09-25 09:07:46 +00:00
Aram Sargsyan
63bddd7192 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.
2024-09-25 08:02:17 +00:00
Aram Sargsyan
8b866ba8a0 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
eb8713ed947fdf22a41dad673d561896dd6fe4a2, 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.
2024-09-25 08:02:17 +00:00
Nicki Křížek
812f0031bf 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 !9528

Closes #4946

Merge branch 'nicki/reorganize-changelog-docfiles-9.21' into 'main'

See merge request isc-projects/bind9!9549
2024-09-24 14:12:29 +00:00
Nicki Křížek
3d49a10d78 Fix changelog entry for [GL #4759] 2024-09-24 16:11:08 +02:00
Nicki Křížek
49128fc173 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:11:08 +02:00
Nicki Křížek
f85a3e41aa 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:11:08 +02:00
Ondřej Surý
aed7f552d5 chg: dev: Use libuv functions to get memory available to BIND 9
This change uses uv_get_available_memory() if available with fallback
to uv_get_constrained_memory() with fallback to uv_get_total_memory().

Merge branch 'ondrej/use-uv_get_available_memory' into 'main'

See merge request isc-projects/bind9!9527
2024-09-24 13:51:55 +00:00
Ondřej Surý
06e5ada4be
Use libuv functions to get memory available to BIND 9
This change uses uv_get_total_memory() to get the memory available to
BIND 9 with possible modification by uv_get_constrained_memory() if the
libuv version is recent enough to honour constraints created by
f.e. cgroups.
2024-09-24 15:51:14 +02:00
Nicki Křížek
0d0d61ce3c 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.

Merge branch 'nicki/increase-tcp-dot-shotgun-load' into 'main'

See merge request isc-projects/bind9!9494
2024-09-24 11:15:12 +00:00
Nicki Křížek
e89afd3349 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.
2024-09-24 09:27:14 +02:00
Mark Andrews
467f9bf5c5 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

Merge branch '4301-check-read-value-in-ans4' into 'main'

See merge request isc-projects/bind9!9537
2024-09-24 07:26:27 +00:00
Mark Andrews
21baad0a8f 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.
2024-09-24 05:33:06 +00:00
Michal Nowak
30b6ac4192 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.

Merge branch 'mnowak/shutdown-downgrade-timeout-and-attempts-arguments' into 'main'

See merge request isc-projects/bind9!9507
2024-09-23 15:39:16 +00:00
Michal Nowak
1c637e96d1 Print correct udp/tcp function name in generic_query() 2024-09-23 13:06:42 +00:00
Michal Nowak
463ab2f3f5 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.
2024-09-23 13:06:42 +00:00
Michal Nowak
59cce28320 chg: ci: Exclude some RPZ files from long stress test artifacts
This fixes 6f868853049769cd4c327acf32a8c1a7320daa06, 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/)

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

See merge request isc-projects/bind9!9522
2024-09-23 11:20:10 +00:00
Michal Nowak
871eeed519 Exclude some RPZ files from long stress test artifacts
This fixes 6f868853049769cd4c327acf32a8c1a7320daa06, that excluded files
only from short stress tests.
2024-09-23 11:19:35 +00:00
Ondřej Surý
59e85a022d chg: dev: Use uv_available_parallelism() if available
Instead of cooking up our own code for getting the number of available
CPUs for named to use, make use of uv_available_parallelism() from
libuv >= 1.44.0.

Merge branch 'ondrej/use-uv_available_parallelism-if-available' into 'main'

See merge request isc-projects/bind9!9524
2024-09-21 11:31:26 +00:00
Ondřej Surý
31458d405a
Add support to read number of online CPUs on OpenBSD
The OpenBSD doesn't have sysctlbyname(), but sysctl() can be used to
read the number of online/available CPUs by reading following MIB(s):
[CTL_HW, HW_NCPUONLINE] with fallback to [CTL_HW, HW_NCPU].
2024-09-21 12:38:33 +02:00
Ondřej Surý
3a91c0a4e3
Cleanup the sysctlbyname and friends configure checks and ifdefs
Cleanup various checks and cleanups that are available on the all
platforms like sysctlbyname() and various related <sys/*.h> headers
that are either defined in POSIX or available on Linux and all BSDs.
2024-09-21 12:38:33 +02:00
Ondřej Surý
26e7358b16
Use uv_available_parallelism() if available
Instead of cooking up our own code for getting the number of available
CPUs for named to use, make use of uv_available_parallelism() from
libuv >= 1.44.0.
2024-09-21 12:38:33 +02:00
Ondřej Surý
f0accc8f61 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

Merge branch '4949-fix-ignored-and-invalid-dispatch-timeout-in-dns_xfrin' into 'main'

See merge request isc-projects/bind9!9531
2024-09-21 08:52:38 +00:00
Ondřej Surý
96ef98558c
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().
2024-09-21 10:15:47 +02:00
Ondřej Surý
0f810b3144
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.
2024-09-21 10:15:37 +02:00
Ondřej Surý
1dd4310082 chg: ci: Update code formatting
Merge branch 'nicki/update-code-format' into 'main'

See merge request isc-projects/bind9!9533
2024-09-21 07:16:00 +00:00
Nicki Křížek
28d4e866c7
Ignore clang-format reformatting commit 2024-09-21 08:39:43 +02:00
Nicki Křížek
833ea7926c Fix arguments-renamed pylint issue in iscconf.py
The argument name was different in the base class.
2024-09-20 17:26:33 +02:00
Nicki Křížek
ebb5bd9c0f Update code formatting
clang 19 was updated in the base image.
2024-09-20 17:26:33 +02:00
Nicki Křížek
28badd8ed4 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

Merge branch '4898-remove-workaround-and-note' into 'main'

See merge request isc-projects/bind9!9530
2024-09-20 14:47:24 +00:00
Nicki Křížek
9fc773ce4c Remove fixed known issue [GL #4898] 2024-09-20 14:31:57 +02:00