Commit Graph

37784 Commits

Author SHA1 Message Date
Ondřej Surý
11df7f02fd Add CHANGES and release note for [GL #3739] 2022-12-15 16:15:39 +01:00
Ondřej Surý
0b661b6f95 Don't expire fresh ADB names and entries
The overmem cleaning in ADB could become overzealous and clean fresh ADB
names and entries.  Add a safety check to not clean any ADB names and
entries that are below ADB_CACHE_MINIMUM threshold.
2022-12-15 16:15:19 +01:00
Ondřej Surý
59dee0b078 Exclude the ADB hashmaps from ADB overmem accounting
The ADB overmem accounting would include the memory used by hashtables
thus vastly reducing the space that can be used for ADB names and
entries when the hashtables would grow.  Create own memory context for
the ADB names and entries hash tables.
2022-12-15 16:14:16 +01:00
Ondřej Surý
f74841fab7 Merge branch 'ondrej-fix-data-race-in-dns_adb' into 'main'
Lock the adbname and adbentry prior to unlocking hash locks

See merge request isc-projects/bind9!7216
2022-12-15 14:58:56 +00:00
Ondřej Surý
a27ea1bba0 Lock the adbname and adbentry prior to unlocking hash locks
There was a datarace that could expire a freshly created ADB names and
entries between the return from get_attached_{name,entry} and locking it
again.  Lock the ADB name and ADB entry inside the hash table lock, so
they won't get expired until the full initialization has been complete.
2022-12-15 15:19:22 +01:00
Arаm Sаrgsyаn
b8a915b0ac Merge branch '3742-catz-update-log-incorrect-soa-serial-representation' into 'main'
Fix an incorrect SOA serial representation in catz

Closes #3742

See merge request isc-projects/bind9!7229
2022-12-15 13:51:18 +00:00
Aram Sargsyan
ac7149aa88 Add a CHANGES note for [GL #3742] 2022-12-15 13:27:09 +00:00
Aram Sargsyan
72b1760ea6 Fix logging a uint32_t SOA serial value in dns_catz_update_from_db()
The dns_catz_update_from_db() function prints serial number as a signed
number (with "%d" in the format string), but the `vers` variable's type
is 'uint32_t'. This breaks serials bigger than 2^31.

Use PRIu32 instead of "d" in the format string.
2022-12-15 13:24:58 +00:00
Aram Sargsyan
de232ab446 Add big SOA serial logging check into the catz system test
Check that the SOA serial numbers printed when updating a catalog zone
is represented correctly for numbers bigger than 2^31.
2022-12-15 13:24:58 +00:00
Arаm Sаrgsyаn
3600e0f491 Merge branch 'aram/dns_adb_getcookie-cleanup' into 'main'
Clean up and refactor dns_adb_getcookie()

See merge request isc-projects/bind9!7211
2022-12-15 13:22:54 +00:00
Aram Sargsyan
03442d922b Clean up and refactor dns_adb_getcookie()
The dns_adb_getcookie() doesn't use the 'adb' parameter, remove it.

Refactor the dns_adb_getcookie() function to just return the size of
the cookie when the caller passes 'NULL' as the 'cookie' argument.
2022-12-15 12:34:26 +00:00
Ondřej Surý
5266444e35 Merge branch 'ondrej-use-isc_hashmap-for-zonemgr_keymgmt' into 'main'
Replace zonemgr_keymgmt own hash table with isc_hashmap

See merge request isc-projects/bind9!7191
2022-12-14 18:39:41 +00:00
Ondřej Surý
578de673b1 Replace zonemgr_keymgmt own hash table with isc_hashmap
Instead of maintaining own hashtable implementation for zonemgr_keymgmt,
use isc_hashmap that already can resize (grow and shrink).
2022-12-14 19:37:07 +01:00
Ondřej Surý
ea88da8692 Merge branch 'ondrej-add-more-logging-to-netmgr' into 'main'
Add internal logging functions to the netmgr

See merge request isc-projects/bind9!7233
2022-12-14 18:35:17 +00:00
Ondřej Surý
52307f8116 Add internal logging functions to the netmgr
Add internal logging functions isc__netmgr_log, isc__nmsocket_log(), and
isc__nmhandle_log() that can be used to add logging messages to the
netmgr, and change all direct use of isc_log_write() to use those
logging functions to properly prefix them with netmgr, nmsocket and
nmsocket+nmhandle.
2022-12-14 19:34:48 +01:00
Ondřej Surý
eeb545a2a9 Merge branch '3637-try-next-server-on-resolver-timeout' into 'main'
Try next server on resolver timeout

Closes #3637

See merge request isc-projects/bind9!7212
2022-12-14 17:52:32 +00:00
Ondřej Surý
d1f1db2f5a Add CHANGES and release notes for [GL #3637] 2022-12-14 18:49:54 +01:00
Ondřej Surý
b8c7dc2dc2 Expire names in shutdown_names() under the lock
Since there could be fetches running, we need to run expire_name() under
the lock when shutting down the names.
2022-12-14 18:49:18 +01:00
Ondřej Surý
32c2acf6fc Add comment why statistics/ns3 has misconfigure root.hints
To count pending queries in the statistics, we need the ns3 to be
misconfigured.  Document the fact in the statistics/ns3/root.hints.
2022-12-14 18:49:18 +01:00
Ondřej Surý
b679640950 Revert the statistics system test change after we fixed the resolver
When the resolver was refactored, the statistics system test had to be
adjusted in c6b4d82557.  Unfortunately,
this change had to be done because of an error in the resolver
refactoring where timeout would not retry next server, but keep trying
the same server.  As we have now fixed this bug, revert the change to
the test back to the previous state.
2022-12-14 18:49:18 +01:00
Ondřej Surý
5466a48fc9 Try next server on resolver timeout
Instead of resending to the same server on the (dispatch) timeout in the
resolver, try the next server.
2022-12-14 18:49:18 +01:00
Ondřej Surý
d0d4a7ede7 Merge branch 'ondrej-allow-zero-length-keys-in-isc_hashmap' into 'main'
Allow zero length keys in isc_hashmap

See merge request isc-projects/bind9!7198
2022-12-14 17:01:54 +00:00
Ondřej Surý
7cefcb6184 Allow zero length keys in isc_hashmap
In case, we are trying to hash the empty key into the hashmap, the key
is going to have zero length.  This might happen in the unit test.
Allow this and add a unit test to ensure the empty zero-length key
doesn't hash to slot 0 as SipHash 2-4 (our hash function of choice) has
no problem with zero-length inputs.
2022-12-14 17:59:07 +01:00
Artem Boldariev
8a35d52807 Merge branch '3725-mutual-tls-session-resumption-fix' into 'main'
Fix TLS session resumption via IDs when Mutual TLS is used

Closes #3725

See merge request isc-projects/bind9!7215
2022-12-14 16:36:53 +00:00
Artem Boldariev
67d74e228f Update Release notes [GL #3725]
Mention that TLS session resumption for Mutual TLS has been fixed.
2022-12-14 18:08:51 +02:00
Artem Boldariev
d8e04cdbc7 Update CHANGES [GL #3725]
Mention that TLS session resumption for Mutual TLS has been fixed.
2022-12-14 18:07:03 +02:00
Artem Boldariev
d5d31c6ba1 Extend the 'doth' system test with a Mutual TLS resumption check
This commit adds a simple check to the 'doth' system test which
ensures that session resumption when Mutual TLS is used works as
expected.
2022-12-14 18:06:20 +02:00
Artem Boldariev
837fef78b1 Fix TLS session resumption via IDs when Mutual TLS is used
This commit fixes TLS session resumption via session IDs when
client certificates are used. To do so it makes sure that session ID
contexts are set within server TLS contexts. See OpenSSL documentation
for 'SSL_CTX_set_session_id_context()', the "Warnings" section.
2022-12-14 18:06:20 +02:00
Tony Finch
39e57ab133 Merge branch 'fanf-dnssec-algorithm-loglevel' into 'main'
List supported DNSSEC algorithms at log level NOTICE

See merge request isc-projects/bind9!7217
2022-12-14 11:02:15 +00:00
Tony Finch
72f8d03cad List supported DNSSEC algorithms at log level NOTICE
NOTICE matches the other startup messages. WARNING weirdly
suggests the list is a problem.
2022-12-14 11:01:22 +00:00
Ondřej Surý
27376b9a8e Merge branch '3736-fix-intermittent-memory-leak-in-forward-system-test' into 'main'
Fix intermittent memory leak in dns_resolver unit

Closes #3736

See merge request isc-projects/bind9!7214
2022-12-14 09:48:37 +00:00
Ondřej Surý
7292ee6d92 Fix intermittent memory leak in dns_resolver unit
A rdataset could have been left unassociated on the error path in the
resume_dslookup() in the dns_resolver unit.  Clone the rdataset after
the error check, so it's not cloned before we check whether we can make
further progress chasing DS records.
2022-12-14 10:48:06 +01:00
Mark Andrews
282d4ea645 Merge branch '3737-fix-initialisation-of-local-in-isdotlocal-in-dig' into 'main'
Resolve "fix initialisation of local. in isdotlocal in dig"

Closes #3737

See merge request isc-projects/bind9!7213
2022-12-13 23:27:50 +00:00
Mark Andrews
8ce163bbc5 Properly initialise local_ndata in isdotlocal in dig
Remove the trailing '\0' so that the length field of the dns_name_t
structure is correct.  The old data just happens to work with
dns_name_issubdomain but would fail with dns_name_equal.
2022-12-13 23:05:30 +00:00
Tony Finch
5f6ec1fbe3 Merge branch 'fanf-rsasha236' into 'main'
Fix a typo RSASHA236 -> RSASHA256

See merge request isc-projects/bind9!7206
2022-12-13 16:58:59 +00:00
Tony Finch
c18a9a208d Fix a typo RSASHA236 -> RSASHA256
Use dns_secalg_format() to avoid error-prone repetition.
2022-12-13 16:58:02 +00:00
Tom Krizek
baf9c9f1ee Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.9' into 'main'
Set up version and release notes for bind  9.19.9

See merge request isc-projects/bind9!7218
2022-12-13 16:18:03 +00:00
Tom Krizek
0e16e9e8d1 Set up release notes for BIND 9.19.9 2022-12-13 16:45:13 +01:00
Tom Krizek
38a9338fe4 Update BIND version to 9.19.9-dev 2022-12-13 16:44:52 +01:00
Ondřej Surý
b432a2e6b9 Merge branch '3731-attach-keyfileio-to-zone' into 'main'
Implement proper reference counting for dns_keyfileio_t

Closes #3731

See merge request isc-projects/bind9!7203
2022-12-09 14:14:25 +00:00
Ondřej Surý
79115a0c3b Implement proper reference counting for dns_keyfileio_t
Instead of relying on hash table search when using the keys, implement a
proper reference counting in dns_keyfileio_t objects, and attach/detach
the objects to the zone.
2022-12-09 14:27:44 +01:00
Petr Špaček
9dea2b99ee Merge branch 'pspacek/configure-doh-help-fix' into 'main'
Fix configure --disable-doh help text

See merge request isc-projects/bind9!7118
2022-12-08 09:49:27 +00:00
Petr Špaček
5ec272007d Fix configure --disable-doh help text
This is technically fixup for 2bb454182b.

Related: !4926
2022-12-08 10:48:24 +01:00
Tom Krizek
91c9f1d087 Merge branch 'tkrizek/revert-3678-serve-stale-servfail' into 'main'
Revert "Merge branch '3678-serve-stale-servfailing-unexpectedly' into 'main'"

See merge request isc-projects/bind9!7183
2022-12-08 09:31:29 +00:00
Tom Krizek
ba1607747c Revert "Merge branch '3678-serve-stale-servfailing-unexpectedly' into 'main'"
This reverts commit 629f66ea8e, reversing
changes made to 84a7be327e.

It also removes release note 6038, since the fix is reverted.
2022-12-08 10:30:44 +01:00
Ondřej Surý
855498ee6b Merge branch '3727-fix-off-by-one-reference-counting-in-zonemgr_keymgmt_delete' into 'main'
Release unused key file IO lock objects

Closes #3727

See merge request isc-projects/bind9!7178
2022-12-08 09:24:10 +00:00
Ondřej Surý
56a997b0b5 Add CHANGES and release note for [GL #3727] 2022-12-08 08:32:59 +01:00
Ondřej Surý
fb1acd6736 Release unused key file IO lock objects
Due to off-by-one error in zonemgr_keymgmt_delete, unused key file IO
lock objects were never freed and they were kept until the server
shutdown.  Adjust the returned value by -1 to accomodate the fact that
the atomic_fetch_*() functions return the value before the operation and
not current value after the operation.
2022-12-08 08:30:30 +01:00
Mark Andrews
26cc205334 Merge branch '3613-redo-dumping-expired-rdatasets' into 'main'
Resolve "TTL issue with resolver's cached and expired results for qtype ANY queries"

Closes #3613

See merge request isc-projects/bind9!7085
2022-12-07 22:46:45 +00:00
Mark Andrews
485e968087 Add CHANGES note for [GL #3613] 2022-12-07 22:20:02 +00:00