Commit Graph

39848 Commits

Author SHA1 Message Date
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
Mark Andrews
6c3414739d Adjust level of log messages when transferring in a zone
This raises the log level of messages treated as FORMERR to NOTICE
when transfering in a zone.  This also adds a missing log message
for TYPE0 and meta types received during a zone transfer.
2023-09-06 02:24:53 +00:00
Mark Andrews
fafa7f397b Merge branch '4291-check-dig-exit-status' into 'main'
Resolve "RNDC system test failed to run to completion"

Closes #4291

See merge request isc-projects/bind9!8264
2023-09-06 01:32:21 +00:00
Mark Andrews
701ad350f8 Check dig's exist status 2023-09-06 01:03:11 +00:00
Mark Andrews
49f6bf862f Merge branch '4292-uncleared-libcrypto-error-crypto-evp-evp_fetch-c-373-inner_evp_generic_fetch' into 'main'
Resolve "Uncleared libcrypto error: crypto/evp/evp_fetch.c:373 inner_evp_generic_fetch"

Closes #4292

See merge request isc-projects/bind9!8274
2023-09-06 01:02:52 +00:00
Mark Andrews
28adcf1831 Call ERR_clear_error on EVP_MD_fetch or EVP_##alg error 2023-09-06 00:28:56 +00:00
Mark Andrews
028154d416 Merge branch '4214-uaf-in-validator-logging' into 'main'
Resolve "UAF in validator logging"

Closes #4214

See merge request isc-projects/bind9!8269
2023-09-05 23:51:25 +00:00
Mark Andrews
1fed5c8171 Add CHANGES for [GL #4214] 2023-09-06 09:23:00 +10:00
Mark Andrews
cf63cb1136 Restore dns_validator_destroy and fetchctx_detach call order
7a78a85b moved the destruction of the validator from near the start
validated to the end.  This reversed the order of dns_validator_destroy
and fetchctx_detach.  Restore the order so that val->name remains
valid for the lifetime of the validator.
2023-09-06 09:23:00 +10:00
Ondřej Surý
5173849d72 Merge branch 'mnowak/statschannel-system-test-is-too-verbose' into 'main'
Disable command tracing in statschannel system test

See merge request isc-projects/bind9!8277
2023-09-05 17:05:29 +00:00
Michal Nowak
f0c37d861c Disable command tracing in statschannel system test
Command tracing was added recently via
26e10e8fb5 and makes the system test too
verbose.
2023-09-05 19:01:27 +02:00
Ondřej Surý
fb233b3fc5 Merge branch '4296-ignore-jemalloc-versions-before-4.0.0' into 'main'
Ignore jemalloc versions before 4.0.0

Closes #4296

See merge request isc-projects/bind9!8273
2023-09-05 16:54:55 +00:00
Ondřej Surý
7423557e42 Add CHANGES and release note for [GL #4296] 2023-09-05 18:47:29 +02:00
Aram Sargsyan
2084986462 Synchronize used library versions reporting functions
There are libraries which are reported in printversion(), but not
reported in setup(). Synchronize the functions, so that the log
file could have the same information as reported by the 'named -V'
command execution.
2023-09-05 18:47:29 +02:00
Ondřej Surý
2e99dcefa8 Print the used jemalloc version in autoconf and named -V output
The autoconf and named -V now prints used version of jemalloc.  This
doesn't work with system supplied jemalloc, so in it prints `system`
instead in the autoconf and nothing in named -V output.
2023-09-05 18:47:21 +02:00
Ondřej Surý
d862f4bc64 Ignore jemalloc versions before 4.0.0
We now depend on explicitly creating memory arenas and disabling tcache
on those, and these features are not available with jemalloc < 4.
Instead of working around these issues, make the jemalloc >= 4.0.0 hard
requirement by looking for sdallocx() symbol that's only available from
that version.

The jemalloc < 4 was only used by RHEL 7 which is not supported since
BIND 9.19+.
2023-09-05 18:46:57 +02:00
Michal Nowak
be33cfa3f6 Merge branch '4255-placeholder' into 'main'
Add CHANGES placeholder for [GL #4255]

See merge request isc-projects/bind9!8275
2023-09-05 16:08:07 +00:00
Michal Nowak
e70a937b3f Add CHANGES placeholder for [GL #4255] 2023-09-05 17:57:18 +02:00
Ondřej Surý
dd658c454e Merge branch '4038-specialised-arena-per-worker' into 'main'
Make it possible to create memory contexts backed by jemalloc arenas

Closes #4038

See merge request isc-projects/bind9!8270
2023-09-05 08:23:42 +00:00
Artem Boldariev
60d52a49b0 Add CHANGES and release note for [GL #4038]
Mention that send buffer allocations/deallocations are now routed
through dedicated memory arenas.
2023-09-05 09:39:41 +02:00
Artem Boldariev
01cc7edcca Allocate DNS send buffers using dedicated per-worker memory arenas
This commit ensures that memory allocations related to DNS send
buffers are routed through dedicated per-worker memory arenas in order
to decrease memory usage on high load caused by TCP-based DNS
transports.

We do that by following jemalloc developers suggestions:

https://github.com/jemalloc/jemalloc/issues/2483#issuecomment-1639019699
https://github.com/jemalloc/jemalloc/issues/2483#issuecomment-1698173849
2023-09-05 09:39:41 +02:00