]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoDocument that reloading happens asynchronously
Mark Andrews [Wed, 20 Sep 2023 05:49:59 +0000 (15:49 +1000)] 
Document that reloading happens asynchronously

2 years agoWait for the test zone to finish re-loading
Mark Andrews [Tue, 19 Sep 2023 04:06:15 +0000 (14:06 +1000)] 
Wait for the test zone to finish re-loading

'rndc thaw' initiates asynchrous loading of all the zones
similar to 'rndc load'.  Wait for the test zone's load to
complete before testing that it is updatable again.

2 years agoMerge branch 'marka-placeholder' into 'main'
Mark Andrews [Tue, 26 Sep 2023 00:48:33 +0000 (00:48 +0000)] 
Merge branch 'marka-placeholder' into 'main'

Add placeholder entry for [GL #4336]

See merge request isc-projects/bind9!8335

2 years agoAdd placeholder entry for [GL #4336]
Mark Andrews [Tue, 26 Sep 2023 00:21:46 +0000 (10:21 +1000)] 
Add placeholder entry for [GL #4336]

2 years agoMerge branch '4325-reduce-isc_mempool-contention' into 'main'
Ondřej Surý [Mon, 25 Sep 2023 05:41:53 +0000 (05:41 +0000)] 
Merge branch '4325-reduce-isc_mempool-contention' into 'main'

Change dns_message_create() function to accept memory pools

Closes #4325

See merge request isc-projects/bind9!8330

2 years agoAdd CHANGES note for [GL #4325]
Ondřej Surý [Wed, 20 Sep 2023 07:46:02 +0000 (09:46 +0200)] 
Add CHANGES note for [GL #4325]

2 years agoChange dns_message_create() function to accept memory pools
Ondřej Surý [Fri, 22 Sep 2023 13:00:40 +0000 (15:00 +0200)] 
Change dns_message_create() function to accept memory pools

Instead of creating new memory pools for each new dns_message, change
dns_message_create() method to optionally accept externally created
dns_fixedname_t and dns_rdataset_t memory pools.  This allows us to
preallocate the memory pools in ns_client and dns_resolver units for the
lifetime of dns_resolver_t and ns_clientmgr_t.

2 years agoConvert dns_message reference counting to ISC_REFCOUNT macros
Ondřej Surý [Fri, 22 Sep 2023 11:59:10 +0000 (13:59 +0200)] 
Convert dns_message reference counting to ISC_REFCOUNT macros

Unify the dns_message reference counting to use ISC_REFCOUNT_{IMPL,DECL}
macros to reduce the code duplicity and add reference count tracing.

2 years agoImprove isc_refcount with initializer and implicit destroy
Ondřej Surý [Fri, 22 Sep 2023 11:57:26 +0000 (13:57 +0200)] 
Improve isc_refcount with initializer and implicit destroy

Add ISC_REFCOUNT_INITIALIZER(x) macro and implicitly call
isc_refcount_destroy() in the ISC_REFCOUNT_IMPL() macros
to reduce code duplicities.

2 years agoMerge branch 'aram/statschannel-expose-precursory-soa-request-state' into 'main'
Arаm Sаrgsyаn [Fri, 22 Sep 2023 12:40:53 +0000 (12:40 +0000)] 
Merge branch 'aram/statschannel-expose-precursory-soa-request-state' into 'main'

Add the "Refresh SOA" state for the incoming zone transfers and improve the "Duration" field

See merge request isc-projects/bind9!8305

2 years agoAdd a CHANGES note for [GL !8305]
Aram Sargsyan [Fri, 15 Sep 2023 11:02:09 +0000 (11:02 +0000)] 
Add a CHANGES note for [GL !8305]

2 years agoFix the incoming transfers' "Needs Refresh" state in stats channel
Aram Sargsyan [Tue, 19 Sep 2023 09:38:35 +0000 (09:38 +0000)] 
Fix the incoming transfers' "Needs Refresh" state in stats channel

The "Needs Refresh" flag is exposed in two places in the statistics
channel: first - there is a state called "Needs Refresh", when the
process hasn't started yet, but the zone needs a refresh, and second
- there there is a field called "Additional Refresh Queued", when the
process is ongoing, but another refresh is queued for the same zone.

The DNS_ZONEFLG_NEEDREFRESH flag, however, is set only when there is
an ongoing zone transfer and a new notify is received. That is, the
flag is not set for the first case above.

In order to fix the issue, use the DNS_ZONEFLG_NEEDREFRESH flag only
when the zone transfer is running, otherwise, decide whether a zone
needs a refresh using its refresh and expire times.

2 years agoxfrin: rename XFRST_INITIALSOA to XFRST_ZONEXFRREQUEST
Aram Sargsyan [Tue, 19 Sep 2023 09:35:20 +0000 (09:35 +0000)] 
xfrin: rename XFRST_INITIALSOA to XFRST_ZONEXFRREQUEST

The XFRST_INITIALSOA state in the xfrin module is named like that,
because the first RR in a zone transfer must be SOA. However, the
name of the state is a bit confusing (especially when exposed to
the users with statistics channel), because it can be mistaken with
the refresh SOA request step, which takes place before the zone
transfer starts.

Rename the state to XFRST_ZONEXFRREQUEST (i.e. Zone Transfer Request).
During that step the state machine performs several operations -
establishing a connection, sending a request, and receiving/parsing
the first RR in the answer.

2 years agoShow the local and remote addresses for the "Refresh SOA" query
Aram Sargsyan [Fri, 15 Sep 2023 10:47:17 +0000 (10:47 +0000)] 
Show the local and remote addresses for the "Refresh SOA" query

Currently in the statsistics channel's incoming zone transfers list
the local and remote addresses are shown only when the zone transfer
is already running. Since we have now introduced the "Refresh SOA"
state, which shows the state of the SOA query before the zone transfer
is started, this commit implements a feature to show the local and
remote addresses for the SOA query, when the state is "Refresh SOA".

2 years agoImprove the "Duration (s)" field of the incoming xfers in stats channel
Aram Sargsyan [Fri, 15 Sep 2023 10:03:29 +0000 (10:03 +0000)] 
Improve the "Duration (s)" field of the incoming xfers in stats channel

Improve the "Duration (s)" field, so that it can show the duration of
all the major states of an incoming zone transfer process, while they
are taking place. In particular, it will now show the duration of the
"Pending", "Refresh SOA" and "Deferred" states too, before the actual
zone transfer starts.

2 years agoAdd the "Refresh SOA" state for the incoming zone transfers
Aram Sargsyan [Fri, 15 Sep 2023 08:57:21 +0000 (08:57 +0000)] 
Add the "Refresh SOA" state for the incoming zone transfers

With adding this state to the statistics channel, it can now show
the zone transfer in this state instead of as "Pending" when the
zone.c module is performing a refresh SOA request, before actually
starting the transfer process. This will help to understand
whether the process is waiting because of the rate limiter (i.e.
"Pending"), or the rate limiter is passed and it is now waiting for
the refresh SOA query to complete or time out.

2 years agoMerge branch 'aram/statschannel-expose-xfrin-soa-transport' into 'main'
Arаm Sаrgsyаn [Fri, 22 Sep 2023 10:59:30 +0000 (10:59 +0000)] 
Merge branch 'aram/statschannel-expose-xfrin-soa-transport' into 'main'

Expose the SOA query transport type used before/during XFR

See merge request isc-projects/bind9!8240

2 years agoCheck zone transfer transports in the statistics channel
Aram Sargsyan [Wed, 13 Sep 2023 13:17:38 +0000 (13:17 +0000)] 
Check zone transfer transports in the statistics channel

Add two more secondary zones to ns3 to be transferred from ns1,
using its IPv6 address for which the 'tcp-only' is set to 'yes'.
Check the statistics channel's incoming zone transfers information
to confirm that the expected transports were used for each of the
SOA query cases (UDP, TCP, TLS), and also for zone transfers (TCP,
TLS).

2 years agoAdd a CHANGES note for [GL !8240]
Aram Sargsyan [Wed, 23 Aug 2023 11:42:57 +0000 (11:42 +0000)] 
Add a CHANGES note for [GL !8240]

2 years agoExpose the SOA query transport type used before/during XFR
Aram Sargsyan [Wed, 23 Aug 2023 10:46:44 +0000 (10:46 +0000)] 
Expose the SOA query transport type used before/during XFR

Add a new field in the incoming zone transfers section of the
statistics channel to show the transport used for the SOA request.

When the transfer is started beginning from the XFRST_SOAQUERY state,
it means that the SOA query will be performed by xfrin itself, using
the same transport. Otherwise, it means that the SOA query was already
performed by other means (e.g. by zone.c:soa_query()), and, in that
case, we use the SOA query transport type information passed by the
'soa_transport_type' argument, when the xfrin object was created.

2 years agoMerge branch '3883-expose-data-about-transfers-in-progress' into 'main'
Arаm Sаrgsyаn [Fri, 22 Sep 2023 09:40:23 +0000 (09:40 +0000)] 
Merge branch '3883-expose-data-about-transfers-in-progress' into 'main'

Draft: Implement exposing data about zone transfers in progress

Closes #3883

See merge request isc-projects/bind9!7984

2 years agoWait for slow zone transfer to complete before ending test
Mark Andrews [Fri, 11 Aug 2023 03:28:05 +0000 (13:28 +1000)] 
Wait for slow zone transfer to complete before ending test

This allows the statistics channel to be viewed in a browser while
the transfer is in progress.  Also set the transfer format to
one-answer to extend the amount of time the re-transfer takes.

When running the statschannel test on its own, use
<http://10.53.0.3:5304/xml/v3/xfrins> to see the output.

Note: the port is subject to future change.

2 years agoProvide thread safe access to dns_xfrin_t state
Mark Andrews [Thu, 6 Jul 2023 04:00:48 +0000 (14:00 +1000)] 
Provide thread safe access to dns_xfrin_t state

dns_xfrin_t state may be accessed from different threads when
when reporting transfer state.  Ensure access is thread safe by
using atomics and locks where appropriate.

2 years agoAdd CHANGES and release notes for [GL #3883]
Aram Sargsyan [Tue, 30 May 2023 15:11:24 +0000 (15:11 +0000)] 
Add CHANGES and release notes for [GL #3883]

2 years agoDocument zone transfers in statschannel
Aram Sargsyan [Mon, 3 Jul 2023 14:04:54 +0000 (14:04 +0000)] 
Document zone transfers in statschannel

List the JSON and XML URLs in ARM for retrieving the incoming zone
transfers information from the statistics channel.

2 years agoAdd a test case for checking zone transfers in statschannel
Aram Sargsyan [Tue, 30 May 2023 15:00:33 +0000 (15:00 +0000)] 
Add a test case for checking zone transfers in statschannel

Use the named -T transferslowly test options to slow down a zone
transfer from the primary server, and test that it's correctly
exposed in the statistics channel of the secondary server, while
it's in-progress.

2 years agoImplement exposing data about zone transfers in progress
Aram Sargsyan [Tue, 30 May 2023 14:58:29 +0000 (14:58 +0000)] 
Implement exposing data about zone transfers in progress

The data about currently in-progress zone transfers is exposed
using the statistics channel in both XML and JSON formats.

2 years agoImplement various dns_xfrin_get*() functions
Aram Sargsyan [Tue, 30 May 2023 14:56:32 +0000 (14:56 +0000)] 
Implement various dns_xfrin_get*() functions

The information provided by those function will be needed and
used by the statistics channel in a follow-up commit.

2 years agoImplement dns_zone_getxfr()
Aram Sargsyan [Tue, 30 May 2023 14:39:02 +0000 (14:39 +0000)] 
Implement dns_zone_getxfr()

The function is needed to get an attached xfrin and its current
state in statschannel.c for providing xfrin information in the
statistics channel.

2 years agodns_transport: use const arguments in getters when possible
Aram Sargsyan [Tue, 30 May 2023 14:32:02 +0000 (14:32 +0000)] 
dns_transport: use const arguments in getters when possible

In some dns_transport getter functions it's possible to use a
const dns_transport_t as the first argument instead of just
dns_transport_t. Convert the function prototypes to use const.

2 years agoMerge branch '4327-minor-warning-about-ctype-h-function' into 'main'
Ondřej Surý [Fri, 22 Sep 2023 06:30:06 +0000 (06:30 +0000)] 
Merge branch '4327-minor-warning-about-ctype-h-function' into 'main'

Add semantic patch to explicitly cast chars to unsigned for ctype.h

Closes #4327

See merge request isc-projects/bind9!8325

2 years agoAdd CHANGES note for [GL #4327]
Ondřej Surý [Wed, 20 Sep 2023 15:42:28 +0000 (17:42 +0200)] 
Add CHANGES note for [GL #4327]

2 years agoExplicitly cast chars to unsigned chars for <ctype.h> functions
Ondřej Surý [Wed, 20 Sep 2023 15:23:28 +0000 (17:23 +0200)] 
Explicitly cast chars to unsigned chars for <ctype.h> functions

Apply the semantic patch to catch all the places where we pass 'char' to
the <ctype.h> family of functions (isalpha() and friends, toupper(),
tolower()).

2 years agoAdd semantic patch to explicitly cast chars to unsigned for ctype.h
Ondřej Surý [Wed, 20 Sep 2023 15:23:28 +0000 (17:23 +0200)] 
Add semantic patch to explicitly cast chars to unsigned for ctype.h

Add a semantic patch to catch all the places where we pass 'char' to the
<ctype.h> family of functions (isalpha() and friends, toupper(),
tolower()).  While it generally works because the way how these
functions are constructed in the libc, it's safer to do the explicit
cast.

2 years agoMerge branch 'mnowak/add-cve-ref-role' into 'main'
Michał Kępień [Thu, 21 Sep 2023 12:22:49 +0000 (12:22 +0000)] 
Merge branch 'mnowak/add-cve-ref-role' into 'main'

Add a Sphinx role for linking CVEs to the ISC Knowledgebase

See merge request isc-projects/bind9!8260

2 years agoAdd a Sphinx role for linking CVEs to the ISC Knowledgebase
Michal Nowak [Thu, 31 Aug 2023 16:55:36 +0000 (18:55 +0200)] 
Add a Sphinx role for linking CVEs to the ISC Knowledgebase

The new :cve: Sphinx role takes a CVE number as an argument and creates
a hyperlink to the relevant ISC Knowledgebase document that might have
more up-to-date or verbose information than the relevant release note.
This makes reaching ISC Knowledgebase pages directly from the release
notes easier.

Make all CVE references in the release notes use the new Sphinx role.

2 years agoMerge branch 'michal/update-sphinx-and-sphinx_rtd_theme' into 'main'
Michał Kępień [Wed, 20 Sep 2023 15:20:25 +0000 (15:20 +0000)] 
Merge branch 'michal/update-sphinx-and-sphinx_rtd_theme' into 'main'

Update Sphinx and sphinx_rtd_theme

See merge request isc-projects/bind9!8322

2 years agoUpdate Sphinx and sphinx_rtd_theme
Michał Kępień [Wed, 20 Sep 2023 15:18:24 +0000 (17:18 +0200)] 
Update Sphinx and sphinx_rtd_theme

Update Sphinx-related Python packages to their current versions pulled
in by "pip install sphinx-rtd-theme" run in a fresh virtual environment.

2 years agoMerge tag 'v9.19.17'
Michał Kępień [Wed, 20 Sep 2023 14:45:47 +0000 (16:45 +0200)] 
Merge tag 'v9.19.17'

2 years agoMerge branch 'ondrej/remove-isc_hash_function' into 'main'
Ondřej Surý [Tue, 19 Sep 2023 18:48:56 +0000 (18:48 +0000)] 
Merge branch 'ondrej/remove-isc_hash_function' into 'main'

Use incremental hashing in the isc_sockaddr_hash() function

See merge request isc-projects/bind9!8298

2 years agoUse the new isc_sockaddr_hash_ex() to fix QID table hashing
Ondřej Surý [Mon, 18 Sep 2023 08:02:37 +0000 (10:02 +0200)] 
Use the new isc_sockaddr_hash_ex() to fix QID table hashing

The QID table hashing used a custom merging of the sockaddr, port and id
into a single hashvalue.  Normalize the QID table hashing function to
use isc_hash32 API for all the values.

2 years agoAdd isc_sockaddr_hash_ex that can be used in incremental hashing
Ondřej Surý [Mon, 18 Sep 2023 07:59:10 +0000 (09:59 +0200)] 
Add isc_sockaddr_hash_ex that can be used in incremental hashing

Add a sockaddr hashing function that can be used as part of incremental
hashing.

2 years agoRemove isc_hash_function macro
Ondřej Surý [Tue, 12 Sep 2023 14:37:50 +0000 (16:37 +0200)] 
Remove isc_hash_function macro

The last two users of 64-bit isc_hash_function() macro were removed in
the previous commits, remove the macro as well.

2 years agoUse 32-bit hashing in isc memory debugging
Ondřej Surý [Tue, 12 Sep 2023 14:35:29 +0000 (16:35 +0200)] 
Use 32-bit hashing in isc memory debugging

Switch from 64-bit isc_hash_function() to 32-bit isc_hash32() as we were
using the 32-bit value only anyway.

2 years agoUse incremental hashing in the isc_sockaddr_hash() function
Ondřej Surý [Tue, 12 Sep 2023 14:33:19 +0000 (16:33 +0200)] 
Use incremental hashing in the isc_sockaddr_hash() function

Instead of copying address back and forth when hashing addr+port, we can
use incremental hashing.  Additionally, switch from 64-bit
isc_hash_function to 32-bit isc_hash32() as the resulting value is
32-bit.

2 years agoMerge branch '4311-remove-sockaddr_unix' into 'main'
Ondřej Surý [Tue, 19 Sep 2023 17:29:53 +0000 (17:29 +0000)] 
Merge branch '4311-remove-sockaddr_unix' into 'main'

Completely remove the Unix Domain Socket support from BIND 9

Closes #4311

See merge request isc-projects/bind9!8292

2 years agoAdd CHANGES and release note for [GL #4311]
Ondřej Surý [Tue, 12 Sep 2023 06:59:01 +0000 (08:59 +0200)] 
Add CHANGES and release note for [GL #4311]

2 years agoRemove Raw and FDWatch type of socket statistics
Ondřej Surý [Tue, 12 Sep 2023 07:41:56 +0000 (09:41 +0200)] 
Remove Raw and FDWatch type of socket statistics

The isc_sockstatscounter_raw* and isc_sockstatscounter_fdwatch was just
a dead code and those counters were not used anywhere.  Remove them.

2 years agoCompletely remove the Unix Domain Socket support from BIND 9
Ondřej Surý [Tue, 12 Sep 2023 06:39:12 +0000 (08:39 +0200)] 
Completely remove the Unix Domain Socket support from BIND 9

The Unix Domain Sockets support in BIND 9 has been completely disabled
since BIND 9.18 and it has been a fatal error since then.  Cleanup the
code and the documentation that suggest that Unix Domain Sockets are
supported.

2 years agoMerge branch '4312-pytest-symlink-name-collision' into 'main'
Tom Krizek [Tue, 19 Sep 2023 15:59:03 +0000 (15:59 +0000)] 
Merge branch '4312-pytest-symlink-name-collision' into 'main'

Rename convenience symlink to pytest artifacts

Closes #4312

See merge request isc-projects/bind9!8306

2 years agoRename convenience symlink to pytest artifacts
Tom Krizek [Tue, 19 Sep 2023 15:20:32 +0000 (17:20 +0200)] 
Rename convenience symlink to pytest artifacts

The previous symlink name convention was prone to name collisions If a
system test contained both a shell test and a pytest module of the same
name (e.g. dnstap test has both tests.sh and tests_dnstap.py), then
these would have the same convenience symlink, which could cause test
setup issues as well as confusion when examining test artifacts.

Update the naming convention to include the full pytest module name.
This results in a slightly more verbose names for shell tests (e.g.
dnstap_sh_dnstap instead of the previous dnstap_dnstap), but it removes
the chance of a collision.

2 years agoMerge branch '4250-remove-legacy-runner-support-for-python-tests' into 'main'
Tom Krizek [Tue, 19 Sep 2023 15:09:08 +0000 (15:09 +0000)] 
Merge branch '4250-remove-legacy-runner-support-for-python-tests' into 'main'

remove support for running python system tests with legacy test runner

Closes #4250

See merge request isc-projects/bind9!8202

2 years agoUpdate system test runner doc with pytest glue files
Tom Krizek [Tue, 15 Aug 2023 13:32:45 +0000 (15:32 +0200)] 
Update system test runner doc with pytest glue files

Document that pytest requires a glue file for each shell tests in order
to detect it.

2 years agoAdd CHANGES note for [GL #4250]
Tom Krizek [Tue, 15 Aug 2023 13:01:43 +0000 (15:01 +0200)] 
Add CHANGES note for [GL #4250]

2 years agoUse integers for ports fixtures in pytest
Tom Krizek [Tue, 15 Aug 2023 11:55:56 +0000 (13:55 +0200)] 
Use integers for ports fixtures in pytest

Reorganize individual port fixtures and re-use the ports fixture to
obtain their number. Store it as integer and only cast it to string when
setting it as environment variable.

2 years agoReformat conftest.py with black
Tom Krizek [Thu, 7 Sep 2023 13:22:23 +0000 (15:22 +0200)] 
Reformat conftest.py with black

2 years agoRemove legacy runner support from conftest.py
Tom Krizek [Thu, 7 Sep 2023 13:21:54 +0000 (15:21 +0200)] 
Remove legacy runner support from conftest.py

Remove code fork for legacy runner, reorganize imports and move a
pylint-silencing snippet to the top of the file. The rest of the code
was just unindented.

2 years agoRemove pytest invocation from legacy runner
Tom Krizek [Tue, 15 Aug 2023 11:40:13 +0000 (13:40 +0200)] 
Remove pytest invocation from legacy runner

In order to python system tests, pytest (runner) has to be used
directly. This makes it possible to simplify the pytest runner and make
its behavior simpler and easier to extend.

The legacy runner can still be used to run shell system tests.

2 years agoMerge branch '4262-make-check-pytest' into 'main'
Tom Krizek [Tue, 19 Sep 2023 13:41:16 +0000 (13:41 +0000)] 
Merge branch '4262-make-check-pytest' into 'main'

Use pytest runner for make check

Closes #4262

See merge request isc-projects/bind9!8286

2 years agoRemove make check invocation from legacy.run.sh
Tom Krizek [Fri, 8 Sep 2023 10:44:08 +0000 (12:44 +0200)] 
Remove make check invocation from legacy.run.sh

The legacy runner no longer uses make check. Ensure the legacy runner
script doesn't interact with that automake target in any way. The legacy
runner script remains available to execute the legacy runner, but there
is no out-of-the box support for running tests in parallel. Other tools
such as xargs can be utilized for that.

2 years agoci: switch OpenBSD job to use make check
Tom Krizek [Wed, 6 Sep 2023 11:43:18 +0000 (13:43 +0200)] 
ci: switch OpenBSD job to use make check

Invoking pytest directly provides a better formatted output and more
flexibility. However, it's prudent to verify that `make check` keeps
working as expected. Use it in the OpenBSD job which isn't executed as
frequently and its output is of least concern.

2 years agoModify custom-test-driver to interpret JUnit results
Tom Krizek [Tue, 5 Sep 2023 08:29:13 +0000 (10:29 +0200)] 
Modify custom-test-driver to interpret JUnit results

Pytest provides JUnit output and uses different exit codes from
Automake. Use the conversion script to interpret the JUnit test results
from python rather than relying on the status code.

2 years agoConvert JUnit XML from pytest into Automake .trs files
Tom Krizek [Tue, 5 Sep 2023 14:16:20 +0000 (16:16 +0200)] 
Convert JUnit XML from pytest into Automake .trs files

It's important to parse the JUnit result file rather than relying on the
exit code from pytest, which has a different meaning. Include a .trs test
result for each test case and set an exit code which is most appropriate
as the aggregate result (e.g. it will be set to 77 (SKIP) if there's at
least one test case that was skipped).

2 years agoPrioritize long-running system tests for legacy runner
Tom Krizek [Mon, 4 Sep 2023 14:08:06 +0000 (16:08 +0200)] 
Prioritize long-running system tests for legacy runner

Synchronize the test priority with the pytest runner (which handles the
prioritization in conftest.py).

2 years agoUse prereq.sh for rpzrecurse system test
Tom Krizek [Mon, 4 Sep 2023 14:03:05 +0000 (16:03 +0200)] 
Use prereq.sh for rpzrecurse system test

2 years agoUse prereq.sh for serve-stale system test
Tom Krizek [Mon, 4 Sep 2023 13:56:14 +0000 (15:56 +0200)] 
Use prereq.sh for serve-stale system test

2 years agoUse prereq.sh for chain system test
Tom Krizek [Mon, 4 Sep 2023 14:05:10 +0000 (16:05 +0200)] 
Use prereq.sh for chain system test

2 years agoUse prereq.sh for digdelv, dnssec, forward system tests
Tom Krizek [Mon, 4 Sep 2023 13:38:25 +0000 (15:38 +0200)] 
Use prereq.sh for digdelv, dnssec, forward system tests

2 years agoUse prereq.sh for qmin, cookie system tests
Tom Krizek [Mon, 4 Sep 2023 13:34:05 +0000 (15:34 +0200)] 
Use prereq.sh for qmin, cookie system tests

2 years agoUse prereq.sh for reclimit system test
Tom Krizek [Mon, 4 Sep 2023 13:15:34 +0000 (15:15 +0200)] 
Use prereq.sh for reclimit system test

2 years agoUse prereq.sh for xfer system test
Tom Krizek [Mon, 4 Sep 2023 13:00:12 +0000 (15:00 +0200)] 
Use prereq.sh for xfer system test

2 years agoUse prereq.sh for statschannel system test
Tom Krizek [Mon, 4 Sep 2023 12:32:06 +0000 (14:32 +0200)] 
Use prereq.sh for statschannel system test

2 years agoAdd prereq.sh scripts for system tests requiring perl mod DNS
Tom Krizek [Mon, 4 Sep 2023 11:56:28 +0000 (13:56 +0200)] 
Add prereq.sh scripts for system tests requiring perl mod DNS

prereq.sh mechanism for dependency detection is preferred since it works
for both legacy and pytest runner.

2 years agoUse proper perl interpreter in xfer system test
Tom Krizek [Mon, 4 Sep 2023 11:49:18 +0000 (13:49 +0200)] 
Use proper perl interpreter in xfer system test

2 years agoRemove redundant dependency checks for system tests
Tom Krizek [Mon, 4 Sep 2023 11:41:09 +0000 (13:41 +0200)] 
Remove redundant dependency checks for system tests

Dependencies for these tests are already checked in prereq.sh - if the
dependencies are missing, these tests will be skipped. The extra
dependency check in Makefile.am is extraneous and only applied for the
legacy test runner.

2 years agoFix pytest module detection for run.sh
Tom Krizek [Thu, 31 Aug 2023 11:18:17 +0000 (13:18 +0200)] 
Fix pytest module detection for run.sh

To allow concurrent invocations of pytest, it is necessary to assign
ports properly to avoid conflicts. In order to do that, pytest needs to
know a complete list of all test modules.

When pytest is invoked from run.sh, the current working directory is the
system test directory. To properly detect other tests, the conftest.py
has to look in the bin/tests/system directory, rather than the current
working directory.

2 years agoUse pytest runner for make check
Tom Krizek [Thu, 31 Aug 2023 11:15:24 +0000 (13:15 +0200)] 
Use pytest runner for make check

Make python & pytest required dependencies to run system tests and
invoke the pytest runner from the makefile.

2 years agoMerge branch 'tkrizek/pytest-check-system-test-files-with-danger' into 'main'
Tom Krizek [Tue, 19 Sep 2023 12:46:54 +0000 (12:46 +0000)] 
Merge branch 'tkrizek/pytest-check-system-test-files-with-danger' into 'main'

enforce system test file and name conventions with danger CI

See merge request isc-projects/bind9!8254

2 years agodanger: check system test convetions for pytest runner
Tom Krizek [Wed, 30 Aug 2023 11:51:05 +0000 (13:51 +0200)] 
danger: check system test convetions for pytest runner

When adding a new system test, it might easy to forget to add the
required files for the pytest runner or break a naming convention. Add
danger checks to cover these cases.

2 years agoAdd missing pytest glue for for host system test
Tom Krizek [Wed, 30 Aug 2023 11:40:19 +0000 (13:40 +0200)] 
Add missing pytest glue for for host system test

Without this glue file, the test isn't picked up by the pytest runner
and therefore not executed.

2 years agoRename allow-query pytest glue file
Tom Krizek [Wed, 30 Aug 2023 11:37:09 +0000 (13:37 +0200)] 
Rename allow-query pytest glue file

To conform with the expected naming convention, the pytest glue file for
the `allow-query` test should use underscore as the word separator in
the python file name: allow-query/tests_sh_allow_query.py

2 years agoTreat bin/tests/system/_common as non-temp directory
Tom Krizek [Mon, 18 Sep 2023 15:20:01 +0000 (17:20 +0200)] 
Treat bin/tests/system/_common as non-temp directory

The _common directory is a special case directory which contains shared
files for other system test directories. Make sure it's tracked in git
and not deleted during temporary directory cleanup.

2 years agoRename system test directory with common files to _common
Tom Krizek [Mon, 18 Sep 2023 15:25:17 +0000 (17:25 +0200)] 
Rename system test directory with common files to _common

The old name "common" clashes with the convention of system test
directory naming. It appears as a system test directory, but it only
contains helper files.

To reduce confusion and to allow automatic detection of issues with
possibly missing test files, rename the helper directory to "_common".
The leading underscore indicates the directory is different and the its
name can no longer be confused with regular system test directories.

2 years agoMerge branch '4322-hashmap-iterator-can-iterate-twice-the-same-item-if-deleting-items...
Ondřej Surý [Tue, 19 Sep 2023 09:51:24 +0000 (09:51 +0000)] 
Merge branch '4322-hashmap-iterator-can-iterate-twice-the-same-item-if-deleting-items-via-delcurrent_next' into 'main'

Resolve "hashmap iterator can iterate twice the same item if deleting items via delcurrent_next"

Closes #4322

See merge request isc-projects/bind9!8309

2 years agoAdd CHANGES note for [GL #3422]
Mark Andrews [Tue, 19 Sep 2023 01:49:47 +0000 (11:49 +1000)] 
Add CHANGES note for [GL #3422]

2 years agoAdd assertion failure when adding to hashmap when iterating
Ondřej Surý [Sat, 16 Sep 2023 06:32:54 +0000 (08:32 +0200)] 
Add assertion failure when adding to hashmap when iterating

When iterating the table, we can't add new nodes to the hashmap because
we can't assure that we are not adding the new node before the iterator.

This also applies to rehashing - which might be triggered by both
isc_hashmap_add() and isc_hashmap_delete(), but not
isc_hashmap_iter_delcurrent_next().

2 years agoFix hashmap iteration
Mark Andrews [Tue, 19 Sep 2023 01:42:03 +0000 (11:42 +1000)] 
Fix hashmap iteration

When isc_hashmap_iter_delcurrent_next calls hashmap_delete_node
nodes from the front of the table could be added to the end of
the table resulting in them being returned twice.  Detect when
this is happening and prevent those nodes being returned twice
buy reducing the effective size of the table by one each time
it happens.

2 years agoMerge branch '4314-dns_ncache_current-fails-to-set-covered-correctly' into 'main'
Mark Andrews [Mon, 18 Sep 2023 05:42:05 +0000 (05:42 +0000)] 
Merge branch '4314-dns_ncache_current-fails-to-set-covered-correctly' into 'main'

Resolve "dns_ncache_current fails to set covered correctly"

Closes #4314

See merge request isc-projects/bind9!8300

2 years agoAdd a CHANGES note for [GL #4314]
Mark Andrews [Wed, 13 Sep 2023 01:22:30 +0000 (11:22 +1000)] 
Add a CHANGES note for [GL #4314]

2 years agoCheck RRSIG covered type in negative cache entry
Mark Andrews [Fri, 15 Sep 2023 04:27:31 +0000 (14:27 +1000)] 
Check RRSIG covered type in negative cache entry

The covered type previously displayed as TYPE0 when it should
have reflected the records that was actually covered.

2 years agoCorrectly set the value of covered in dns_ncache_current
Mark Andrews [Wed, 13 Sep 2023 00:59:39 +0000 (10:59 +1000)] 
Correctly set the value of covered in dns_ncache_current

Fix the type and rdclass being passed to dns_rdata_tostruct so
that rrsig.covered is correctly set.

2 years agoMerge branch 'ondrej/use-cds_lfht-for-dns_dispatch' into 'main'
Ondřej Surý [Sat, 16 Sep 2023 06:35:49 +0000 (06:35 +0000)] 
Merge branch 'ondrej/use-cds_lfht-for-dns_dispatch' into 'main'

Rewrite the QID lookup table to cds_lfht

See merge request isc-projects/bind9!8304

2 years agoAdd CHANGES note for [GL !8304]
Ondřej Surý [Fri, 15 Sep 2023 15:26:35 +0000 (17:26 +0200)] 
Add CHANGES note for [GL !8304]

2 years agoCleanup unused .localport member of dns_dispatch_t and some macros
Ondřej Surý [Fri, 15 Sep 2023 13:59:28 +0000 (15:59 +0200)] 
Cleanup unused .localport member of dns_dispatch_t and some macros

The .localport member of dns_dispatch_t structure was unused, clean it
up.  Cleanup unused and/or redundant macros.

2 years agoReplace the linked list of TCP dispatches with hash table
Ondřej Surý [Fri, 15 Sep 2023 12:38:02 +0000 (14:38 +0200)] 
Replace the linked list of TCP dispatches with hash table

Reusing TCP connections with dns_dispatch_gettcp() used linear linked
list to lookup existing outgoing TCP connections that could be reused.
Replace the linked list with per-loop cds_lfht hashtable to speedup the
lookups.  We use cds_lfht because it allows non-unique node insertion
that we need to check for dispatches in different connection states.

2 years agoMake dns_dispatch bound to threads
Ondřej Surý [Fri, 15 Sep 2023 09:36:28 +0000 (11:36 +0200)] 
Make dns_dispatch bound to threads

Instead of high number of dispatches (4 * named_g_udpdisp)[1], make the
dispatches bound to threads and make dns_dispatchset_t create a dispatch
for each thread (event loop).

This required couple of other changes:

1. The dns_dispatch_createudp() must be called on loop, so the isc_tid()
   is already initialized - changes to nsupdate and mdig were required.

2. The dns_requestmgr had only a single dispatch per v4 and v6.  Instead
   of using single dispatch, use dns_dispatchset_t for each protocol -
   this is same as dns_resolver.

2 years agoRewrite the QID lookup table to cds_lfht
Ondřej Surý [Thu, 14 Sep 2023 16:01:39 +0000 (18:01 +0200)] 
Rewrite the QID lookup table to cds_lfht

Looking up unique message ID in the dns_dispatch has been using custom
hash tables.  Rewrite the custom hashtable to use cds_lfht API, removing
one extra lock in the cold-cache resolver hot path.

2 years agoMerge branch 'ondrej-improve-isc_hashmap' into 'main'
Ondřej Surý [Sat, 16 Sep 2023 05:25:54 +0000 (05:25 +0000)] 
Merge branch 'ondrej-improve-isc_hashmap' into 'main'

Refactor isc_hashmap to accept custom match function

See merge request isc-projects/bind9!8289

2 years agoRefactor isc_hashmap to accept custom match function
Ondřej Surý [Mon, 28 Aug 2023 08:08:59 +0000 (10:08 +0200)] 
Refactor isc_hashmap to accept custom match function

Refactor isc_hashmap to allow custom matching functions.  This allows us
to have better tailored keys that don't require fixed uint8_t arrays,
but can be composed of more fields from the stored data structure.

2 years agoMerge branch 'aram/danger-ignore-length-warn-for-fixups' into 'main'
Arаm Sаrgsyаn [Thu, 14 Sep 2023 10:37:51 +0000 (10:37 +0000)] 
Merge branch 'aram/danger-ignore-length-warn-for-fixups' into 'main'

Don't warn about subject line length for the fixup commits (CI)

See merge request isc-projects/bind9!8282