]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
20 months agoAlways use requirements.txt from main
Michal Nowak [Wed, 9 Oct 2024 10:26:28 +0000 (12:26 +0200)] 
Always use requirements.txt from main

Instances of the requirements.txt file may be outdated in other
branches.

20 months agoDrop BIND 9.16 support
Michal Nowak [Wed, 9 Oct 2024 09:29:58 +0000 (11:29 +0200)] 
Drop BIND 9.16 support

20 months agochg: ci: Increase shotgun pipeline timeout
Nicki Křížek [Mon, 14 Oct 2024 11:02:06 +0000 (11:02 +0000)] 
chg: ci: Increase shotgun pipeline timeout

When running shotgun tests on tagged releases, the increased number of
jobs may cause the shotgun pipeline to take longer than 50 minutes to
finish.

Merge branch 'nicki/increase-shotgun-pipeline-timeout' into 'main'

See merge request isc-projects/bind9!9599

20 months agoIncrease shotgun pipeline timeout
Nicki Křížek [Tue, 8 Oct 2024 14:22:19 +0000 (16:22 +0200)] 
Increase shotgun pipeline timeout

When running shotgun tests on tagged releases, the increased number of
jobs may cause the shotgun pipeline to take longer than 50 minutes to
finish.

20 months agochg: usr: Harden key management when key files have become unavailabe
Matthijs Mekking [Mon, 14 Oct 2024 07:15:41 +0000 (07:15 +0000)] 
chg: usr: Harden key management when key files have become unavailabe

Prior to doing key management, BIND 9 will check if the key files on disk match the expected keys. If key files for previously observed keys have become unavailable, this will prevent the internal key manager from running.

Merge branch '4763-do-not-roll-if-key-files-are-missing' into 'main'

See merge request isc-projects/bind9!9337

20 months agoAdd new behavior to the ARM
Matthijs Mekking [Fri, 11 Oct 2024 12:38:55 +0000 (14:38 +0200)] 
Add new behavior to the ARM

Add text to the ARM that describes what we do in case key files have
become unavailable.

20 months agoTest removing DNSKEYs from other providers
Matthijs Mekking [Tue, 20 Aug 2024 12:38:24 +0000 (14:38 +0200)] 
Test removing DNSKEYs from other providers

In a multi-signer setup, removing DNSKEY records from the zone should
not be treated as a key that previously exists in the keyring, thus
blocking the keymgr. Add a test case to make sure.

20 months agoSmall keymgr improvement
Matthijs Mekking [Mon, 19 Aug 2024 07:49:21 +0000 (09:49 +0200)] 
Small keymgr improvement

When a key is to be purged, don't run the key state machinery for it.

20 months agoAdd additional test case with purged key
Matthijs Mekking [Mon, 19 Aug 2024 07:46:56 +0000 (09:46 +0200)] 
Add additional test case with purged key

Test that if a key to be purged is in the keyring, it does not
prevent the keymgr from running. Normally a key that is in the keyring
should be available again on the next run, but that is not true for
a key that can be purged.

In addition, fix some wait_for_log calls, by adding the missing
'|| ret=1' parts.

20 months agoFix some system test cases
Matthijs Mekking [Wed, 14 Aug 2024 12:38:22 +0000 (14:38 +0200)] 
Fix some system test cases

Some test cases were working but for the wrong reasons. These started
to fail when I implemented the first approach for #4763, where the
existence of a DNSKEY together with an empty keyring is suspicious and
would prevent the keymgr from running.

These are:

1. kasp: The multisigner-model2.kasp zone has ZSKs from other providers
   in the zone, but not yet its own keys. Pregenerate signing keys and
   add them to the unsigned zone as well.

2. kasp: The dynamic-signed-inline-signing.kasp zone has a key generated
   and added in the raw version of the zone. But the key file is stored
   outside the key-directory for the given zone. Add '-K keys' to the
   dnssec-keygen command.

20 months agoVerify new key files before running keymgr
Matthijs Mekking [Thu, 15 Aug 2024 08:36:15 +0000 (10:36 +0200)] 
Verify new key files before running keymgr

Prior to running the keymgr, first make sure that existing keys
are present in the new keylist. If not, treat this as an operational
error where the keys are made offline (temporarily), possibly unwanted.

20 months agoAdd test for missing key files, don't roll
Matthijs Mekking [Wed, 3 Jul 2024 09:32:11 +0000 (11:32 +0200)] 
Add test for missing key files, don't roll

In this specific case the key files are temporary unavailable, for
example because of an operator error, or a mount failure). In such
cases, BIND should not try to roll over these keys.

20 months agofix: dig - always set the default port when doing a UDP query
Artem Boldariev [Thu, 10 Oct 2024 19:05:54 +0000 (19:05 +0000)] 
fix: dig - always set the default port when doing a UDP query

This commit ensures that the port is set before attempting a UDP
query. Before that a situation could appear when previous query have
completed over a different transport (that uses a dedicated port) and
then a UDP query will be attempted over the port of the previous
transport.

Closes: #4984.
Merge branch 'artem-debian-bug-1059582' into 'main'

See merge request isc-projects/bind9!9618

20 months agodig: always set the default port when doing a UDP query
Artem Boldariev [Thu, 10 Oct 2024 10:18:05 +0000 (13:18 +0300)] 
dig: always set the default port when doing a UDP query

This commit ensures that the port is set before attempting a UDP
query. Before that a situation could appear when previous query have
completed over a different transport (that uses a dedicated port) and
then a UDP query will be attempted over the port of the previous
transport.

20 months agochg: doc: Add release note for #4460
Matthijs Mekking [Thu, 10 Oct 2024 10:22:57 +0000 (10:22 +0000)] 
chg: doc: Add release note for #4460

This release note was missing due to a malformed Merge Request title.

The text is not copied verbatim, but changed to something more release
note-like.

Merge branch '4460-add-missing-release-note' into 'main'

See merge request isc-projects/bind9!9598

20 months agoAdd release note for #4460
Matthijs Mekking [Tue, 8 Oct 2024 12:42:37 +0000 (14:42 +0200)] 
Add release note for #4460

This release note was missing due to a malformed Merge Request title.

The text is not copied verbatim, but changed to something more release
note-like.

20 months agofix: dev: Revert "Improve performance when looking for the closest encloser"
Matthijs Mekking [Thu, 10 Oct 2024 09:27:29 +0000 (09:27 +0000)] 
fix: dev: Revert "Improve performance when looking for the closest encloser"

Revert "fix: chg: Improve performance when looking for the closest encloser when returning NSEC3 proofs"

This reverts merge request !9436

Closes #4950

Merge branch 'revert-78d48f7a' into 'main'

See merge request isc-projects/bind9!9611

20 months agoRevert "fix: chg: Improve performance when looking for the closest encloser when...
Matthijs Mekking [Thu, 10 Oct 2024 06:59:28 +0000 (06:59 +0000)] 
Revert "fix: chg: Improve performance when looking for the closest encloser when returning NSEC3 proofs"

This reverts merge request !9436

20 months agofix: dev: Fix error path bugs in the manager's "recursing-clients" list management
Arаm Sаrgsyаn [Wed, 9 Oct 2024 11:38:35 +0000 (11:38 +0000)] 
fix: dev: Fix error path bugs in the manager's "recursing-clients" list management

In two places, after linking the client to the manager's
"recursing-clients" list using the check_recursionquota()
function, the query.c module fails to unlink it on error
paths. Fix the bugs by unlinking the client from the list.

Merge branch 'aram/unlink-recursing-clients-on-error-paths' into 'main'

See merge request isc-projects/bind9!9586

20 months agoRefactor the way check_recursionquota() is used
Aram Sargsyan [Wed, 2 Oct 2024 16:39:13 +0000 (16:39 +0000)] 
Refactor the way check_recursionquota() is used

Rename check_recursionquota() to acquire_recursionquota(), and
implement a new function called release_recursionquota() to
reverse the action. It helps with decreasing code duplication.

20 months agoFix error path bugs in the "recursing-clients" list management
Aram Sargsyan [Wed, 2 Oct 2024 16:22:38 +0000 (16:22 +0000)] 
Fix error path bugs in the "recursing-clients" list management

In two places, after linking the client to the manager's
"recursing-clients" list using the check_recursionquota()
function, the query.c module fails to unlink it on error
paths. Fix the bugs by unlinking the client from the list.

Also make sure that unlinking happens before detaching the
client's handle, as it is the logically correct order, e.g.
in case if it's the last handle and ns__client_reset_cb()
can be called because of the detachment.

20 months agofix: dev: Fix a data race in dns_zone_getxfrintime()
Arаm Sаrgsyаn [Wed, 9 Oct 2024 10:31:09 +0000 (10:31 +0000)] 
fix: dev: Fix a data race in dns_zone_getxfrintime()

The dns_zone_getxfrintime() function fails to lock the zone before
accessing its 'xfrintime' structure member, which can cause a data
race between soa_query() and the statistics channel. Add the missing
locking/unlocking pair, like it's done in numerous other similar
functions.

Closes #4976

Merge branch '4976-zone-xfrintime-data-race-fix' into 'main'

See merge request isc-projects/bind9!9591

20 months agoFix a data race in dns_zone_getxfrintime()
Aram Sargsyan [Mon, 7 Oct 2024 12:26:59 +0000 (12:26 +0000)] 
Fix a data race in dns_zone_getxfrintime()

The dns_zone_getxfrintime() function fails to lock the zone before
accessing its 'xfrintime' structure member, which can cause a data
race between soa_query() and the statistics channel. Add the missing
locking/unlocking pair, like it's done in numerous other similar
functions.

20 months agofix: dev: Clean up 'nodetach' in ns_client
Arаm Sаrgsyаn [Wed, 9 Oct 2024 09:12:45 +0000 (09:12 +0000)] 
fix: dev: Clean up 'nodetach' in ns_client

The 'nodetach' member is a leftover from the times when non-zero
'stale-answer-client-timeout' values were supported, and currently
is always 'false'. Clean up the member and its usage.

Merge branch 'aram/cleanup-ns-client-nodetach' into 'main'

See merge request isc-projects/bind9!9592

20 months agoClean up 'nodetach' in ns_client
Aram Sargsyan [Mon, 7 Oct 2024 15:29:14 +0000 (15:29 +0000)] 
Clean up 'nodetach' in ns_client

The 'nodetach' member is a leftover from the times when non-zero
'stale-answer-client-timeout' values were supported, and currently
is always 'false'. Clean up the member and its usage.

20 months agochg: doc: Set up version for BIND 9.21.3
Michal Nowak [Tue, 8 Oct 2024 08:40:41 +0000 (08:40 +0000)] 
chg: doc: Set up version for BIND 9.21.3

Merge branch 'mnowak/set-up-version-for-bind-9.21.3' into 'main'

See merge request isc-projects/bind9!9595

20 months agoUpdate BIND version to 9.21.3-dev
Michal Nowak [Tue, 8 Oct 2024 08:30:48 +0000 (10:30 +0200)] 
Update BIND version to 9.21.3-dev

20 months agoUpdate BIND version for release v9.21.2
Michal Nowak [Mon, 7 Oct 2024 14:07:08 +0000 (16:07 +0200)] 
Update BIND version for release

20 months agonew: doc: Prepare documentation for BIND 9.21.2
Michal Nowak [Mon, 7 Oct 2024 14:05:36 +0000 (14:05 +0000)] 
new: doc: Prepare documentation for BIND 9.21.2

Merge branch 'mnowak/prepare-documentation-for-bind-9.21.2' into 'v9.21.2-release'

See merge request isc-private/bind9!743

20 months agoTweak and reword release notes
Michal Nowak [Thu, 3 Oct 2024 16:27:30 +0000 (18:27 +0200)] 
Tweak and reword release notes

20 months agoPrepare release notes for BIND 9.21.2
Michal Nowak [Thu, 3 Oct 2024 12:16:36 +0000 (14:16 +0200)] 
Prepare release notes for BIND 9.21.2

20 months agoGenerate release notes
Michal Nowak [Thu, 3 Oct 2024 12:15:34 +0000 (14:15 +0200)] 
Generate release notes

20 months agoGenerate changelog
Michal Nowak [Thu, 3 Oct 2024 12:15:06 +0000 (14:15 +0200)] 
Generate changelog

20 months agofix: dev: Don't enable REUSEADDR on outgoing UDP sockets
Ondřej Surý [Wed, 2 Oct 2024 12:16:03 +0000 (12:16 +0000)] 
fix: dev: Don't enable REUSEADDR on outgoing UDP sockets

The outgoing UDP sockets enabled `SO_REUSEADDR` that allows sharing of the UDP sockets, but with one big caveat - the socket that was opened the last would get all traffic.  The dispatch code would ignore the invalid responses in the dns_dispatch, but this could lead to unexpected results.

Merge branch 'ondrej/fix-outgoing-UDP-port-selection' into 'main'

See merge request isc-projects/bind9!9569

20 months agoDon't enable SO_REUSEADDR on outgoing UDP sockets
Ondřej Surý [Mon, 30 Sep 2024 16:01:47 +0000 (18:01 +0200)] 
Don't enable SO_REUSEADDR on outgoing UDP sockets

Currently, the outgoing UDP sockets have enabled
SO_REUSEADDR (SO_REUSEPORT on BSDs) which allows multiple UDP sockets to
bind to the same address+port.  There's one caveat though - only a
single (the last one) socket is going to receive all the incoming
traffic.  This in turn could lead to incoming DNS message matching to
invalid dns_dispatch and getting dropped.

Disable setting the SO_REUSEADDR on the outgoing UDP sockets.  This
needs to be done explicitly because `uv_udp_open()` silently enables the
option on the socket.

20 months agofix: usr: Fix assertion failure when receiving DNS responses over TCP
Ondřej Surý [Wed, 2 Oct 2024 10:41:26 +0000 (10:41 +0000)] 
fix: usr: Fix assertion failure when receiving DNS responses over TCP

When matching the received Query ID in the TCP connection,
an invalid received Query ID can very rarely cause assertion
failure.

Closes #4952

Merge branch '4952-check-whether-QID-is-not-deleted' into 'main'

See merge request isc-projects/bind9!9580

20 months agoSkip TCP dispatch responses that are not ours
Ondřej Surý [Wed, 2 Oct 2024 06:37:48 +0000 (08:37 +0200)] 
Skip TCP dispatch responses that are not ours

When matching the TCP dispatch responses, we should skip the responses
that do not belong to our TCP connection.  This can happen with faulty
upstream server that sends invalid QID back to us.

20 months agofix: dev: Don't ignore the local port number in dns_dispatch_add() for TCP
Arаm Sаrgsyаn [Wed, 2 Oct 2024 09:51:40 +0000 (09:51 +0000)] 
fix: dev: Don't ignore the local port number in dns_dispatch_add() for TCP

The dns_dispatch_add() function registers the 'resp' entry in
'disp->mgr->qids' hash table with 'resp->port' being 0, but in
tcp_recv_success(), when looking up an entry in the hash table
after a successfully received data the port is used, so if the
local port was set (i.e. it was not 0) it fails to find the
entry and results in an unexpected error.

Set the 'resp->port' to the given local port value extracted from
'disp->local'.

Closes #4969

Merge branch '4969-dispatch-tcp-source-port-bug-fix' into 'main'

See merge request isc-projects/bind9!9576

20 months agoDon't ignore the local port number in dns_dispatch_add() for TCP
Aram Sargsyan [Tue, 1 Oct 2024 14:16:47 +0000 (14:16 +0000)] 
Don't ignore the local port number in dns_dispatch_add() for TCP

The dns_dispatch_add() function registers the 'resp' entry in
'disp->mgr->qids' hash table with 'resp->port' being 0, but in
tcp_recv_success(), when looking up an entry in the hash table
after a successfully received data the port is used, so if the
local port was set (i.e. it was not 0) it fails to find the
entry and results in an unexpected error.

Set the 'resp->port' to the given local port value extracted from
'disp->local'.

20 months agonew: usr: Support ISO timestamps with timezone information
Alessio Podda [Wed, 2 Oct 2024 08:16:17 +0000 (08:16 +0000)] 
new: usr: Support ISO timestamps with timezone information

The configuration option `print-time` can now be set to `iso8601-tzinfo` in order to use the ISO 8601 timestamp with timezone information when logging. This is used as a default for `named -g`.

Closes #4963

Merge branch '4963-provide-timezone-information-in-log-timestamps' into 'main'

See merge request isc-projects/bind9!9563

20 months agoSupport ISO timestamps with timezone information
Alessio Podda [Wed, 25 Sep 2024 14:46:16 +0000 (16:46 +0200)] 
Support ISO timestamps with timezone information

This commit adds support for timestamps in iso8601 format with timezone
when logging. This is exposed through the iso8601-tzinfo printtime
suboption.
It also makes the new logging format the default for -g output,
hopefully removing the need for custom timestamp parsing in scripts.

20 months agochg: test: Replace dns.query module with isctest.query
Michal Nowak [Tue, 1 Oct 2024 12:05:39 +0000 (12:05 +0000)] 
chg: test: Replace dns.query module with isctest.query

The `dns.query.udp` and `dns.query.tcp` methods are [prone to timeouts](https://gitlab.isc.org/isc-projects/bind9/-/jobs/4785053); their `isctest.query` equivalents should be used in system tests instead.

Merge branch 'mnowak/convert-dns-query-udp-and-tcp-to-isctest-query' into 'main'

See merge request isc-projects/bind9!9560

20 months agoReplace dns.query module with isctest.query
Michal Nowak [Fri, 27 Sep 2024 11:35:56 +0000 (13:35 +0200)] 
Replace dns.query module with isctest.query

20 months agoAdd isctest.check.notimp()
Michal Nowak [Fri, 27 Sep 2024 11:37:39 +0000 (13:37 +0200)] 
Add isctest.check.notimp()

20 months agoReport expected and last returned rcode on query timeout
Michal Nowak [Fri, 27 Sep 2024 11:38:00 +0000 (13:38 +0200)] 
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.

20 months agofix: dev: Null clausedefs for ancient options
Alessio Podda [Tue, 1 Oct 2024 10:33:56 +0000 (10:33 +0000)] 
fix: dev: 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.

Among others, it removes some leftovers from #1913.

Closes #4962

Merge branch '4962-null-clausedef-types-for-ancient-options' into 'main'

See merge request isc-projects/bind9!9552

20 months agoNull clausedefs for ancient options
alessio [Wed, 25 Sep 2024 06:19:02 +0000 (08:19 +0200)] 
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.

20 months agofix: doc: Restore text about sig validity and SOA expire
Matthijs Mekking [Tue, 1 Oct 2024 06:32:48 +0000 (06:32 +0000)] 
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

20 months agoUpdate example.com zone SOA expire value
Matthijs Mekking [Mon, 30 Sep 2024 09:49:07 +0000 (11:49 +0200)] 
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.

20 months agoRestore text about sig validity and SOA expire
Matthijs Mekking [Mon, 30 Sep 2024 09:39:57 +0000 (11:39 +0200)] 
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.

20 months agofix: usr: Fix a bug in the static-stub implementation
Mark Andrews [Tue, 1 Oct 2024 01:26:56 +0000 (01:26 +0000)] 
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

20 months agoStore static-stub addresses seperately in the adb
Mark Andrews [Wed, 14 Aug 2024 13:46:44 +0000 (23:46 +1000)] 
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.

20 months agorem: dev: Remove unused function dns_zonemgr_resumexfrs()
Petr Špaček [Mon, 30 Sep 2024 12:42:22 +0000 (12:42 +0000)] 
rem: dev: Remove unused function dns_zonemgr_resumexfrs()

Merge branch 'pspacek/zone-xfr-cleanup' into 'main'

See merge request isc-projects/bind9!9565

20 months agoRemove unused function dns_zonemgr_resumexfrs()
Petr Špaček [Fri, 27 Sep 2024 14:44:21 +0000 (16:44 +0200)] 
Remove unused function dns_zonemgr_resumexfrs()

20 months agochg: dev: Use release memory ordering when incrementing reference counter
Ondřej Surý [Mon, 30 Sep 2024 12:22:05 +0000 (12:22 +0000)] 
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

20 months agoUse release memory ordering when incrementing reference counter
Ondřej Surý [Mon, 9 Sep 2024 14:03:53 +0000 (16:03 +0200)] 
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.

20 months agofix: dev: Add a missing rcu_read_unlock() call on exit path
Arаm Sаrgsyаn [Fri, 27 Sep 2024 13:50:54 +0000 (13:50 +0000)] 
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

20 months agoAdd a missing rcu_read_unlock() call on exit path
Aram Sargsyan [Fri, 27 Sep 2024 12:48:22 +0000 (12:48 +0000)] 
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.

20 months agodev: Add full Alessio's name to .mailmap to fix some of the older commits
Ondřej Surý [Thu, 26 Sep 2024 11:48:16 +0000 (11:48 +0000)] 
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

20 months agoAdd full Alessio's name to .mailmap to fix some of the older commits
Ondřej Surý [Thu, 26 Sep 2024 11:45:38 +0000 (13:45 +0200)] 
Add full Alessio's name to .mailmap to fix some of the older commits

20 months agochg: usr: Honour the Control Group memory contraints on Linux
Ondřej Surý [Thu, 26 Sep 2024 11:20:14 +0000 (11:20 +0000)] 
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

20 months agoDocument that we now honour the cgroup memory limit
Ondřej Surý [Thu, 26 Sep 2024 10:49:52 +0000 (12:49 +0200)] 
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.

20 months agonew: usr: Added WALLET type
Mark Andrews [Wed, 25 Sep 2024 12:03:45 +0000 (12:03 +0000)] 
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

20 months agoAdd examples of WALLET records
Mark Andrews [Wed, 18 Sep 2024 22:45:50 +0000 (08:45 +1000)] 
Add examples of WALLET records

20 months agoAdd the new record type WALLET (262)
Mark Andrews [Wed, 18 Sep 2024 22:45:50 +0000 (08:45 +1000)] 
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.

20 months agofix: usr: Fix the 'rndc dumpdb' command's error reporting
Arаm Sаrgsyаn [Wed, 25 Sep 2024 09:07:46 +0000 (09:07 +0000)] 
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

20 months agoTest 'rndc dumpdb' with an unwritable dump-file
Aram Sargsyan [Tue, 24 Sep 2024 09:49:04 +0000 (09:49 +0000)] 
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.

20 months agoDo not ignore named_server_dumpdb() result code
Aram Sargsyan [Tue, 24 Sep 2024 08:53:47 +0000 (08:53 +0000)] 
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.

21 months agochg: doc: Track changes in separate files
Nicki Křížek [Tue, 24 Sep 2024 14:12:29 +0000 (14:12 +0000)] 
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

21 months agoFix changelog entry for [GL #4759]
Nicki Křížek [Tue, 24 Sep 2024 13:20:21 +0000 (15:20 +0200)] 
Fix changelog entry for [GL #4759]

21 months agoGenerate changelog to stdout
Nicki Křížek [Tue, 24 Sep 2024 12:04:16 +0000 (14:04 +0200)] 
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.

21 months agoTrack changes in separate files
Nicki Křížek [Tue, 24 Sep 2024 11:59:56 +0000 (13:59 +0200)] 
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.

21 months agochg: dev: Use libuv functions to get memory available to BIND 9
Ondřej Surý [Tue, 24 Sep 2024 13:51:55 +0000 (13:51 +0000)] 
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

21 months agoUse libuv functions to get memory available to BIND 9
Ondřej Surý [Fri, 20 Sep 2024 07:10:20 +0000 (09:10 +0200)] 
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.

21 months agochg: ci: Increase the load TCP/DoT shotgun perf tests
Nicki Křížek [Tue, 24 Sep 2024 11:15:12 +0000 (11:15 +0000)] 
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

21 months agoIncrease the load TCP/DoT shotgun perf tests
Nicki Křížek [Thu, 12 Sep 2024 13:11:31 +0000 (15:11 +0200)] 
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.

21 months agofix: test: Check read value in upforwd/ans4
Mark Andrews [Tue, 24 Sep 2024 07:26:27 +0000 (07:26 +0000)] 
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

21 months agoCheck read value in upforwd/ans4
Mark Andrews [Mon, 23 Sep 2024 04:56:54 +0000 (14:56 +1000)] 
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.

21 months agochg: test: Downgrade "timeout" and "attempts" arguments in shutdown
Michal Nowak [Mon, 23 Sep 2024 15:39:16 +0000 (15:39 +0000)] 
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

21 months agoPrint correct udp/tcp function name in generic_query()
Michal Nowak [Mon, 16 Sep 2024 12:43:22 +0000 (14:43 +0200)] 
Print correct udp/tcp function name in generic_query()

21 months agoDowngrade "timeout" and "attempts" arguments in shutdown
Michal Nowak [Mon, 16 Sep 2024 12:55:06 +0000 (14:55 +0200)] 
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.

21 months agochg: ci: Exclude some RPZ files from long stress test artifacts
Michal Nowak [Mon, 23 Sep 2024 11:20:10 +0000 (11:20 +0000)] 
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

21 months agoExclude some RPZ files from long stress test artifacts
Michal Nowak [Thu, 19 Sep 2024 09:26:53 +0000 (11:26 +0200)] 
Exclude some RPZ files from long stress test artifacts

This fixes 6f868853049769cd4c327acf32a8c1a7320daa06, that excluded files
only from short stress tests.

21 months agochg: dev: Use uv_available_parallelism() if available
Ondřej Surý [Sat, 21 Sep 2024 11:31:26 +0000 (11:31 +0000)] 
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

21 months agoAdd support to read number of online CPUs on OpenBSD
Ondřej Surý [Fri, 20 Sep 2024 06:53:01 +0000 (08:53 +0200)] 
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].

21 months agoCleanup the sysctlbyname and friends configure checks and ifdefs
Ondřej Surý [Fri, 20 Sep 2024 06:45:46 +0000 (08:45 +0200)] 
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.

21 months agoUse uv_available_parallelism() if available
Ondřej Surý [Thu, 19 Sep 2024 15:58:19 +0000 (17:58 +0200)] 
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.

21 months agofix: usr: Fix long-running incoming transfers
Ondřej Surý [Sat, 21 Sep 2024 08:52:38 +0000 (08:52 +0000)] 
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

21 months agoDon't enable timeouts in dns_dispatch for incoming transfers
Ondřej Surý [Fri, 20 Sep 2024 13:13:09 +0000 (15:13 +0200)] 
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().

21 months agoModify dns_dispatch API to accept zero timeout
Ondřej Surý [Fri, 20 Sep 2024 13:13:09 +0000 (15:13 +0200)] 
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.

21 months agochg: ci: Update code formatting
Ondřej Surý [Sat, 21 Sep 2024 07:16:00 +0000 (07:16 +0000)] 
chg: ci: Update code formatting

Merge branch 'nicki/update-code-format' into 'main'

See merge request isc-projects/bind9!9533

21 months agoIgnore clang-format reformatting commit
Nicki Křížek [Fri, 20 Sep 2024 14:52:21 +0000 (16:52 +0200)] 
Ignore clang-format reformatting commit

21 months agoFix arguments-renamed pylint issue in iscconf.py
Nicki Křížek [Fri, 20 Sep 2024 14:09:33 +0000 (16:09 +0200)] 
Fix arguments-renamed pylint issue in iscconf.py

The argument name was different in the base class.

21 months agoUpdate code formatting
Nicki Křížek [Fri, 20 Sep 2024 14:06:55 +0000 (16:06 +0200)] 
Update code formatting

clang 19 was updated in the base image.

21 months agochg: dev: Restore the number of threadpool threads back to original value
Nicki Křížek [Fri, 20 Sep 2024 14:47:24 +0000 (14:47 +0000)] 
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

21 months agoRemove fixed known issue [GL #4898]
Nicki Křížek [Fri, 20 Sep 2024 12:31:57 +0000 (14:31 +0200)] 
Remove fixed known issue [GL #4898]

21 months agoRevert "Double the number of threadpool threads"
Nicki Křížek [Fri, 20 Sep 2024 12:31:25 +0000 (14:31 +0200)] 
Revert "Double the number of threadpool threads"

This reverts commit 6857df20a40f4e05f465a7a3f5d24eeedce8fc6c.

21 months agochg: doc: Update sphinx to 7.4.7
Nicki Křížek [Fri, 20 Sep 2024 12:02:32 +0000 (12:02 +0000)] 
chg: doc: Update sphinx to 7.4.7

Merge branch 'nicki/update-sphinx' into 'main'

See merge request isc-projects/bind9!9529

21 months agoUpdate sphinx to 7.4.7
Nicki Křížek [Fri, 20 Sep 2024 12:01:03 +0000 (14:01 +0200)] 
Update sphinx to 7.4.7

21 months agonew: usr: Log query response status to the query log
Mark Andrews [Thu, 19 Sep 2024 23:09:07 +0000 (23:09 +0000)] 
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

Merge branch '459-log-query-response-status' into 'main'

See merge request isc-projects/bind9!9449