Commit Graph

37906 Commits

Author SHA1 Message Date
Arаm Sаrgsyаn
0c252fdfc5 Merge branch 'aram/dns_dispatch_createtcp-bugfix' into 'main'
Don't pass a NULL pointer to isc_sockaddr_format()

See merge request isc-projects/bind9!7277
2022-12-28 14:18:52 +00:00
Aram Sargsyan
41ca9d419e Don't pass a NULL pointer to isc_sockaddr_format()
The 'localaddr' pointer can be NULL, which causes an assertion failure.

Use '&disp->local' instead when printing a debug log message.
2022-12-28 12:10:09 +00:00
Matthijs Mekking
eb7275e933 Merge branch '3714-remove-alt-transfer-source' into 'main'
Remove setting alternate transfer source

Closes #3714

See merge request isc-projects/bind9!7163
2022-12-23 15:11:25 +00:00
Matthijs Mekking
e277f1f757 Add CHANGES and release notes for #3714
Update release notes, remove the deprecation entry and add a new
removed feature entry.
2022-12-23 15:32:12 +01:00
Matthijs Mekking
d8e98d4bba Remove unused dns_remote_t functions
Now that setting alternate transfer sources is removed, the functions
to check whether all addresses are considered good have become obsolete.
2022-12-23 15:17:54 +01:00
Matthijs Mekking
8640e70616 Remove setting alternate transfer source from doc
Remove any reference to 'alt-transfer-source', 'alt-transfer-source-v6',
and 'use-alt-transfer-source' from the documentation and manual pages.
2022-12-23 14:44:48 +01:00
Matthijs Mekking
5954ae6458 Remove setting alternate transfer source
Remove parsing the configuration options 'alt-transfer-source',
'alt-transfer-source-v6', and 'use-alt-transfer-source', and remove
the corresponding code that implements the feature.
2022-12-23 14:39:59 +01:00
Matthijs Mekking
2638a2a29c Merge branch 'matthijs-remote-server-refactor' into 'main'
Refactor remote servers (primaries, parental agents) in zone.c

See merge request isc-projects/bind9!7110
2022-12-23 13:37:14 +00:00
Matthijs Mekking
80178c2134 Add release notes
The refactor introduces a new way to configure source addresses for
primaries and parental-agents, a new thingy that we should make people
aware of.
2022-12-23 13:36:50 +00:00
Matthijs Mekking
34636576d0 Add CHANGES
Mention the refactor of zone.c
2022-12-23 13:36:50 +00:00
Matthijs Mekking
c4bffb3e64 Use 'source[-v6]' for transfer, notify, checkds
Use the configured 'source' and 'source-v6' when initiating a zone
transfer, sending a notify, or when checking for the DS. Remove the
special code for using alternate transfer sources.

Update some system tests to use the new configuration and make sure
the tests still work.
2022-12-23 13:36:50 +00:00
Matthijs Mekking
a92b9e40ce Small comment change in remote.h header file
The documentation for 'dns_remote_addr()' was incorrect (copy paste
error).
2022-12-23 13:36:50 +00:00
Matthijs Mekking
17e16c7a34 Parse and store new 'source[-v6]' option
Parse the new 'source' and 'source-v6' options and store them with
the corresponding remote servers (parental-agents, primaries, ...).
2022-12-23 13:36:50 +00:00
Matthijs Mekking
ad248f2261 Add new 'source[-v6]' option for remote servers
Add a new way to configure the preferred source address when talking to
remote servers such as primaries and parental-agents. This will
eventually deprecate options such as 'parental-source',
'parental-source-v6', 'transfer-source', etc.

Example of the new configuration:

    parental-agents "parents" port 5353 \
        source 10.10.10.10 port 5354 dscp 54 \
        source-v6 2001:db8::10 port 5355 dscp 55 {
	10.10.10.11;
	2001:db8::11;
    };
2022-12-23 13:36:50 +00:00
Matthijs Mekking
c444c6d806 Remove functions named_config_[get|put]iplist
They are unused.
2022-12-23 13:36:50 +00:00
Matthijs Mekking
bf1dd57242 Refactor zone.c, use dns_remote_t structure
Use the new dns_remote_t structure for remote server communication to
primaries, parental agents, etc.
2022-12-23 13:36:50 +00:00
Matthijs Mekking
0300295944 Add new files for remote server communication
The dns_remote_t structure is intended to replace the variables in
the structure that deals with remote server communication to primaries,
parental agents, forwarders, etc.
2022-12-23 13:36:50 +00:00
Tom Krizek
8c35815513 Merge branch 'tkrizek/gitignore-fixes' into 'main'
Don't track gitignored files in the repo

See merge request isc-projects/bind9!7264
2022-12-23 13:29:12 +00:00
Michał Kępień
5b28da7ea0 Detect "ignored yet tracked" files in GitLab CI
Ensure that no .gitignore file in the tree contains patterns matching
files tracked by Git by adding a simple script that detects such
situations and running that script as part of the "misc" job in the
"precheck" stage of every GitLab CI pipeline.
2022-12-23 13:44:18 +01:00
Tom Krizek
a02da6cf21 Remove obsolete gitignore file in mysqldyn
The Makefile used to be autogenerated prior to
67f76b1269 which is the reason why the
.gitignore existed in the first place. Since then, a static Makefile is
used and is supposed to be tracked in the git repo.
2022-12-23 13:44:18 +01:00
Tom Krizek
e03daf22ec Make gitignore matching in rpzrecurse more precise
The pre-defined test cases use named.$TESTCASE.conf naming convention,
where TESTCASE is a human readable name contaning actual word(s). The
autogenerated test cases' names always start with a number from 1 to 6.
2022-12-23 13:44:18 +01:00
Tom Krizek
b8616e457f Remove ans.pl system test files from gitignore
The ans*.pl scripts are part of system tests and should be part of the
repository. The gitignore entires for these files have been removed.
2022-12-23 13:44:18 +01:00
Tom Krizek
c5708044e7 Rename dig reference files in the rrsetorder test
bin/tests/system/rrsetorder/dig.out* files match a gitignore expression
present in bin/tests/system/.gitignore.  Since these are meant to be
reference files that are compared to the files generated when the
"rrsetorder" system test is run, rename them to avoid listing tracked
files in .gitignore files.
2022-12-23 13:44:18 +01:00
Arаm Sаrgsyаn
14957c95b0 Merge branch '3752-resolver-adb-quota-bug' into 'main'
Fix an ADB quota management bug in the resolver

Closes #3752

See merge request isc-projects/bind9!7266
2022-12-23 10:23:29 +00:00
Aram Sargsyan
a4def095f3 Add CHANGES and release notes for [GL #3752] 2022-12-23 09:45:20 +00:00
Aram Sargsyan
53afe1f978 Fix an ADB quota management error in the resolver
Normally, when a 'resquery_t' object is created in fctx_query(),
we call dns_adb_beginudpfetch() (which increases the ADB quota)
only if it's a UDP query. Then, in fctx_cancelquery(), we call
dns_adb_endudpfetch() to decreases back the ADB quota, again only
if it's a UDP query.

The problem is that a UDP query can become a TCP query, preventing
the quota from adjusting back in fctx_cancelquery() later.

Call dns_adb_beginudpfetch() also when switching the query type
from UDP to TCP.
2022-12-23 09:45:20 +00:00
Aram Sargsyan
c7ba26c3d6 INSIST that active quota is 0 in destroy_adbentry()
This should catch ADB quota management errors in the resolver.
2022-12-23 09:45:20 +00:00
Artem Boldariev
c4097ec5d5 Merge branch '3748-rename-tls-caches-creation-functions' into 'main'
Rename isc_tlsctx_cache_new() to isc_tlsctx_cache_create(), tlsctx_client_session_cache_new() to tlsctx_client_session_create()

Closes #3748

See merge request isc-projects/bind9!7269
2022-12-23 09:13:56 +00:00
Artem Boldariev
7962e7f575 tlsctx_client_session_cache_new() -> tlsctx_client_session_create()
Additionally to renaming, it changes the function definition so that
it accepts a pointer to pointer instead of returning a pointer to the
new object.

It is mostly done to make it in line with other functions in the
module.
2022-12-23 11:10:11 +02:00
Artem Boldariev
f102df96b8 Rename isc_tlsctx_cache_new() -> isc_tlsctx_cache_create()
Additionally to renaming, it changes the function definition so that
it accepts a pointer to pointer instead of returning a pointer to the
new object.

It is mostly done to make it in line with other functions in the
module.
2022-12-23 11:10:11 +02:00
Tom Krizek
6dede665c7 Merge branch 'tkrizek/dangerfile-backport-tweaks' into 'main'
danger CI: tweak backport check and add Affects label check

See merge request isc-projects/bind9!7253
2022-12-23 08:50:10 +00:00
Tom Krizek
64d71a1f5f danger: check the Affects labels are set
Unless the MR is a backport, the Affects labels should be used to
indicate which versions are affected by the issue that prompted the MR.
2022-12-23 09:44:56 +01:00
Tom Krizek
d1172e011c danger: check version in MR title
Enforce the version indicator to be at the start of the MR title.
2022-12-23 09:44:56 +01:00
Tom Krizek
a3fcfe3d71 Merge tag 'v9_19_8'
BIND 9.19.8
2022-12-22 10:13:38 +01:00
Arаm Sаrgsyаn
df0584b547 Merge branch '3750-legacy-system-test-dig-timed-out-fix' into 'main'
Fix DiG "timed out" message check in "legacy" system test

Closes #3750

See merge request isc-projects/bind9!7259
2022-12-21 14:40:43 +00:00
Aram Sargsyan
35988748f3 Fix DiG "timed out" message check in "legacy" system test
The test expects a "connection timed out" message from DiG when it
experiences a timeout, while the current version of DiG prints just
a "timed out" message, like below:

    ;; communications error to 10.53.0.1#11314: timed out
    ;; communications error to 10.53.0.1#11314: timed out
    ;; communications error to 10.53.0.1#11314: timed out

    ; <<>> DiG 9.19.9-dev <<>> -p 11314 +tries +time +tcp +tries +time @10.53.0.1 dropedns. TXT
    ; (1 server found)
    ;; global options: +cmd
    ;; no servers could be reached

Change the expected string to match the current DiG output.

Use the '-F' switch for "grep" for matching a fixed string.
2022-12-21 13:52:22 +00:00
Tom Krizek
91b8d20f29 Merge branch 'tkrizek/system-tests-conventions' into 'main'
Unify system tests naming conventions

See merge request isc-projects/bind9!7150
2022-12-21 12:42:27 +00:00
Tom Krizek
4145068bfa Update tests gitignore file
The .mypy_cache was added to the system test dir gitignore, since it
should be ignored.
2022-12-21 13:40:10 +01:00
Tom Krizek
62eea511db Rename engine_pkcs11 system test
In order to have a common naming convention for system tests, rename the
only outlier "engine_pkcs11" to "enginepkcs11", which was the only
system test using an underscore in its name.

The only allowed word separators for system test names are either dash
or no separator.
2022-12-21 13:40:10 +01:00
Tom Krizek
f6409ee6ac Use common name convention for pytest files
It is better to use consistent file names to avoid issue with sorting
etc.

Using underscore in filenames as opposed to dash was chosen because it
seems more common in pytest/python to use underscore for filenames.

Also rename the bin/tests/system/timeouts/tests-tcp.py file to
bin/tests/system/timeouts/tests_tcp_timeouts.py to avoid pytest name
collision (there can't be two files named tests_tcp.py).
2022-12-21 13:40:09 +01:00
Artem Boldariev
5d92e99cfa Merge branch 'artem-add-missing-dnsstream-test-header-to-the-makefile-am' into 'main'
Add missing "dnsstream_utils_test_data.h" to the Makefile.am

See merge request isc-projects/bind9!7256
2022-12-21 12:18:36 +00:00
Artem Boldariev
5a4861aff6 Add missing "dnsstream_utils_test_data.h" to the Makefile.am
This commit ensures that "dnsstream_utils_test_data.h" is referenced
by Makefile.am and, thus, is not missing from a created tarball.
2022-12-21 14:18:04 +02:00
Ondřej Surý
333f24ee56 Merge branch '3178-dispatch-race-fix' into 'main'
Fix more issues in the dns_dispatch unit

Closes #3178

See merge request isc-projects/bind9!7252
2022-12-21 11:49:09 +00:00
Ondřej Surý
9dd8deaf01 Call the connected dns_dispatch callback asynchronously
The dns_request code is very sensitive about calling the connected and
deadlocks when the timing is "right" in several places.  Move the call
to the connected callback to the (udp|tcp)_connected() functions, so
they are called asynchronously instead of directly from
the (udp|tcp)_dispentry_cancel() functions.
2022-12-21 12:13:35 +01:00
Ondřej Surý
3fac4ca57e Ignore TCP dispatches that have zero references
The TCP dispatches are removed from the dispatchmgr->list in the
dispatch_destroy() and there's a brief period of time where
dns_dispatch_gettcp() can find a dispatch in connected state that's
being destroyed.

Set the dispatch state to DNS_DISPATCHSTATE_NONE in the TCP connection
callback if there are no responses waiting, and ignore TCP dispatches
with zero references in dns_dispatch_gettcp().
2022-12-21 12:13:35 +01:00
Ondřej Surý
90cd14f620 Fix assignment vs comparison typo in tcp_connected()
In tcp_connected() a typo has turned a DbC check into an assignment
breaking the state machine and making the dns_dispatch_gettcp() try to
attach to dispatch in process of destruction.
2022-12-21 12:13:20 +01:00
Ondřej Surý
7310e2b424 Don't remove dispatches in CANCELED state from the list
In dns_dispatch_gettcp(), we can't remove canceled dispatches from the
mgr->list because ISC_LIST_NEXT() would fail in the next iteration.
2022-12-21 12:13:20 +01:00
Ondřej Surý
6d22d03208 Ignore TCP dispatches in DNS_DISPATCHSTATE_NONE state
The TCP dispatches in DNS_DISPATCHSTATE_NONE could be either very
fresh or those could be dispatches that failed connecting to the
destination.  Ignore them when trying to connect to an existing
TCP dispatch via dns_dispatch_gettcp().
2022-12-21 12:13:20 +01:00
Tom Krizek
ad587f473e Merge branch 'tkrizek/default-alg-fixups' into 'main'
Fix minor issues with DEFAULT_ALGORITHM selection in system tests

Closes #3747

See merge request isc-projects/bind9!7059
2022-12-21 09:39:56 +00:00
Tom Krizek
56416ebd65 Make Python interpreter required for system tests
This introduces a Python dependency for running system tests. It is
needed in order to:
  - write new test control scripts in Python
  - gradually rewrite old Perl scripts into Python if needed
  - eventually introduce pytest as the new test runner framework

This commit is not intended to be backported to 9.16.
2022-12-21 10:09:49 +01:00