Commit graph

39868 commits

Author SHA1 Message Date
Tom Krizek
d4502206a1
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.
2023-09-19 14:47:47 +02:00
Tom Krizek
56c1087304
Use pytest runner for make check
Make python & pytest required dependencies to run system tests and
invoke the pytest runner from the makefile.
2023-09-19 14:47:45 +02:00
Tom Krizek
9a1a10e84f 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
2023-09-19 12:46:54 +00:00
Tom Krizek
d1371267c6
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.
2023-09-19 13:29:30 +02:00
Tom Krizek
546212b78b
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.
2023-09-19 13:29:30 +02:00
Tom Krizek
c026a00696
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
2023-09-19 13:29:29 +02:00
Tom Krizek
9e13c3dbcb
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.
2023-09-19 13:29:29 +02:00
Tom Krizek
168dba163c
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.
2023-09-19 13:29:27 +02:00
Ondřej Surý
7f91925dad 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
2023-09-19 09:51:24 +00:00
Mark Andrews
f467dbc182
Add CHANGES note for [GL #3422] 2023-09-19 11:18:04 +02:00
Ondřej Surý
45fb84076d
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().
2023-09-19 11:18:04 +02:00
Mark Andrews
92a0d65a51
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.
2023-09-19 11:18:03 +02:00
Mark Andrews
c2b6f4357d 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
2023-09-18 05:42:05 +00:00
Mark Andrews
80298ade33 Add a CHANGES note for [GL #4314] 2023-09-18 13:39:17 +10:00
Mark Andrews
8ce359652a 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.
2023-09-18 13:38:27 +10:00
Mark Andrews
779980710c 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.
2023-09-18 13:38:27 +10:00
Ondřej Surý
b0b0aac505 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
2023-09-16 06:35:49 +00:00
Ondřej Surý
405860022f
Add CHANGES note for [GL !8304] 2023-09-16 07:32:18 +02:00
Ondřej Surý
aa0971027c
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.
2023-09-16 07:32:18 +02:00
Ondřej Surý
c9b4b45943
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.
2023-09-16 07:32:18 +02:00
Ondřej Surý
6fd06c461b
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.
2023-09-16 07:32:17 +02:00
Ondřej Surý
282c4709b8
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.
2023-09-16 07:32:17 +02:00
Ondřej Surý
7be52f1bad Merge branch 'ondrej-improve-isc_hashmap' into 'main'
Refactor isc_hashmap to accept custom match function

See merge request isc-projects/bind9!8289
2023-09-16 05:25:54 +00:00
Ondřej Surý
e270266627
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.
2023-09-16 07:20:48 +02:00
Arаm Sаrgsyаn
492a4fb671 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
2023-09-14 10:37:51 +00:00
Aram Sargsyan
3db2beef9f Don't warn about subject line length for the fixup commits
The fixup commits' subject line has a prefix which has its own
length, so warning about the exceeding length is not accurate.
Given that the fixup commits can not be merged, because they
cause a danger failure, it's safe to ignore the length check
for them.
2023-09-14 09:31:32 +00:00
Mark Andrews
faeffce4eb Merge branch '608-add-option-to-apply-dns64-rules-to-address-being-used-for-lookups' into 'main'
Resolve "Add option to apply dns64 rules to address being used for lookups."

Closes #608

See merge request isc-projects/bind9!2166
2023-09-13 05:31:34 +00:00
Mark Andrews
18b7db2d3a Add CHANGES for [GL #608] 2023-09-13 14:33:05 +10:00
Mark Andrews
5a0cea31c4 Document resolver-use-dns64 2023-09-13 14:33:05 +10:00
Mark Andrews
d1983adc22 IO::Socket::INET6 has been replaced by IO::Socket::IP
IO::Socket::INET6 is no longer being maintained and its functionality
has been replaced by IO::Socket::IP.
2023-09-13 14:31:43 +10:00
Mark Andrews
3a87ff3dfe Test resolver-use-dns64
Test resolver-use-dns64 by simulating a connection to an IPv4-only
server through a NAT64.

This test uses EXTRAPORT1 rather than PORT for DNS traffic exchanged
between ns3 and ns4. Both servers also listen on PORT on their IPv4
addresses to support server startup testing in start.pl.
2023-09-13 14:31:43 +10:00
Mark Andrews
01b11c24ec Configure 'mapped' IPv4 address
Add a mapped IPv4 address, fd92:7065:b8e:fffe::10.53.0.4, to
ifconfig.sh for dns64 testing.
2023-09-13 14:31:43 +10:00
Mark Andrews
9f779c3996 Add the ability to use DNS64 internally
Add a configuration option, resolver-use-dns64, which when true
will cause named to map IPv4 address to IPv6 addresses using the
view's DNS64 mapping rules when making iterative queries.
2023-09-13 14:31:43 +10:00
Ondřej Surý
8805d989ec Merge branch '4306-add-incremental-isc_siphash' into 'main'
Implement incremental version of SipHash 2-4 and HalfSipHash 2-4

Closes #4306

See merge request isc-projects/bind9!8288
2023-09-12 14:21:40 +00:00
Ondřej Surý
9df9296b7a Merge branch 'ondrej/make-dns_name-mostly-header-only' into 'main'
Cleanup the dns_name macros

See merge request isc-projects/bind9!8297
2023-09-12 14:20:25 +00:00
Ondřej Surý
0f3155e0ef
Add CHANGES note for [GL #4306] 2023-09-12 16:17:06 +02:00
Ondřej Surý
6ac286d4a3
Implement incremental version of isc_hash32 and isc_hash64
Add support for incremental hashing to the isc_hash unit, both 32-bit
and 64-bit incremental hashing is now supported.

This is commit second in series adding incremental hashing to libisc.
2023-09-12 16:17:06 +02:00
Ondřej Surý
4dd49ac528
Implement incremental version of SipHash 2-4 and HalfSipHash 2-4
When inserting items into hashtables (hashmaps), we might have a
fragmented key (as an example we might want to hash DNS name + class +
type).  We either need to construct continuous key in the memory and
then hash it en bloc, or incremental hashing is required.

This incremental version of SipHash 2-4 algorithm is the first building
block.

As SipHash 2-4 is often used in the hot paths, I've turned the
implementation into header-only version in the process.
2023-09-12 16:17:06 +02:00
Ondřej Surý
fd25be31f0
Cleanup the dns_name macros
1. Replace the "high-performance" macros that were only used if
   DNS_NAME_USEINLINE was defined before including <dns/name.h> with
   inline header functions with assertion checks and thus use them
   everywhere.

2. Replace the old struct initializers with C99 designated initializers
   for better understanding what is happening in these macros.
2023-09-12 16:14:10 +02:00
Tom Krizek
a83a4cae36 Merge branch 'tkrizek/ci-test-binaries-compilation' into 'main'
ci: omit explicit command to compile test binaries

See merge request isc-projects/bind9!8287
2023-09-12 08:22:50 +00:00
Tom Krizek
26f20b81ec
ci: omit explicit command to compile test binaries
The command to compile test binaries is no longer needed, as these are
now compiled as part of the default make target.

Related !8189
2023-09-12 09:52:05 +02:00
Michal Nowak
d78a3774e2 Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.19.18' into 'main'
Set up version and release notes for BIND 9.19.18

See merge request isc-projects/bind9!8291
2023-09-12 07:35:00 +00:00
Michal Nowak
03505812f0 Set up release notes for BIND 9.19.18 2023-09-12 08:11:52 +02:00
Michal Nowak
ee46748eea Update BIND version to 9.19.18-dev 2023-09-12 08:11:52 +02:00
Michal Nowak
6bda72d26f Merge branch '4242-placeholder' into 'main'
Add CHANGES placeholder for [GL #4242]

Closes #4242

See merge request isc-projects/bind9!8284
2023-09-07 08:21:45 +00:00
Michal Nowak
a8cba9b672
Add CHANGES placeholder for [GL #4242] 2023-09-07 10:18:56 +02:00
Michal Nowak
b237414ae2 Merge branch '4152-placeholder' into 'main'
Add CHANGES placeholder for [GL #4152]

See merge request isc-projects/bind9!8283
2023-09-07 08:18:01 +00:00
Michal Nowak
b4ec7c79bb
Add CHANGES placeholder for [GL #4152] 2023-09-06 16:03:42 +02:00
Mark Andrews
b6e5960b09 Merge branch '4290-raise-log-level-to-isc_log_error-on-formerr-in-xfrin-c' into 'main'
Resolve "raise log level to ISC_LOG_NOTICE on FORMERR in xfrin.c"

Closes #4290

See merge request isc-projects/bind9!8262
2023-09-06 09:13:23 +00:00
Mark Andrews
b867244305 Add a CHANGES note for [GL #4290] 2023-09-06 02:24:53 +00:00