Commit Graph

40836 Commits

Author SHA1 Message Date
Matthijs Mekking
8fcfa36660 Replace rbt_deletenode with qp_deletename
Replace dns_rbt_deletenode calls with dns_qp_deletename. For removing
the name from the nsec tree, we no longer first have to find it: we can
just remove the key (retrieved by name).
2024-03-06 09:57:24 +01:00
Matthijs Mekking
c53b95e134 Replace rbt_addnode with qp_insert
Replace dns_rbt_addnode calls with dns_qp_insert. With QP, it sometimes
makes more sense to first lookup the name and see if there is an
existing node (rather than create new data, insert, find out a node
already exists, and destroy the data again). This is done with
dns_qp_getname(), which is more lightweight than dns_qp_lookup(),
and we are only interested in if there is already a leaf node for this
name or not.
2024-03-06 09:57:24 +01:00
Evan Hunt
bb4464181a switch database defaults from "rbt" to "qp"
replace the string "rbt" throughout BIND with "qp" so that
qpdb databases will be used by default instead of rbtdb.
rbtdb databases can still be used by specifying "database rbt;"
in a zone statement.
2024-03-06 09:57:24 +01:00
Evan Hunt
845f832308 rename dns_rbtdb to dns_qpdb
this commit renames all variables and macros with the string "rbtdb"
or "RBDTB" to "qpdb" or "QPDB".
2024-03-06 09:57:24 +01:00
Matthijs Mekking
2edf73dc05 Begin replacement of rbt with qp in rbtdb
- Copy rbtdb.c, rbt-zonedb.c and rbt-cachedb.c to qp-*.
- Added qpmethods.
- Added a new structure dns_qpdata that will replace dns_rbtnode.
- Replaced normal, nsec, and nsec3 dns_rbt trees with dns_qp tries.
- Replaced dns_rbt_create() calls with dns_qp_create().
- Replaced the dns_rbt_destroy() call with dns_qp_destroy().
- Create a dns_qpdata struct and create/destroy methods.

This commit will not build.
2024-03-06 09:57:24 +01:00
Mark Andrews
522b6eced0 Merge branch '4612-resolver-crashes-on-10-0-0-38-abcdefghijklmnopqrstuvwxyz012345-plex-direct-ds-query' into 'main'
Resolve "resolver crashes on 10-0-0-38.abcdefghijklmnopqrstuvwxyz012345.plex.direct DS query"

Closes #4612

See merge request isc-projects/bind9!8794
2024-03-06 00:16:13 +00:00
Mark Andrews
f4f7f23d9d Add CHANGES note for [GL #4612] 2024-03-06 10:09:05 +11:00
Mark Andrews
3fedbb1a66 test: DS query against broken NODATA responses
This is a regresssion test for GL #4621 where the NODATA responses
are SOA records that match the QNAME rather than the zone name. In
particular for NS queries.
2024-03-06 10:09:05 +11:00
Mark Andrews
5ff55e13e8 Restore the disassociate call to before the fetch
[GL #3709] reordered the dns_rdataset_disassociate call to after
the dns_resolver_createfetch call resulting in qctx->nsrrset still
being associated when dns_resolver_createfetch is called in
resume_dslookup (7e4e125e).  Revert that part of the change and add
comments as to why the multiple dns_rdataset_disassociate calls are
where they are.
2024-03-06 10:08:30 +11:00
Ondřej Surý
470bfcaa19 Merge branch '4600-call-dispatch-connect-callbacks-asynchronously' into 'main'
Pin the xfr to a specific loop

Closes #4600

See merge request isc-projects/bind9!8821
2024-03-04 15:34:51 +00:00
Ondřej Surý
e74c7dcf51 Always call the TCP dispatch connected callbacks asynchronously
The TCP dispatch connected callbacks could be called synchronously which
in turn could destroy xfrin before we return from dns_xfrin_create().

Delay the calling the callback called from tcp_dispatch_connect() by
calling it always asynchronously.
2024-03-04 16:34:14 +01:00
Ondřej Surý
98d59bdf62 Pin the xfr to a specific loop
Instead of getting the loop from the zone every time, attach the xfrin
directly to the loop.  This also allows to remove the extra safety tid
checks from the dns_xfrin unit.
2024-03-04 16:34:14 +01:00
Petr Špaček
42e7f6b003 Merge branch 'pspacek/cve-bug-report-template' into 'main'
Fix typos in Security bug issue template

See merge request isc-projects/bind9!8822
2024-03-04 14:18:13 +00:00
Petr Špaček
feab0d638a Fix typos in Security bug issue template 2024-03-04 15:16:10 +01:00
Petr Špaček
a6da5e9faa Merge branch 'pspacek/cve-bug-report-template' into 'main'
Security bug issue template improvements

See merge request isc-projects/bind9!8820
2024-03-04 13:13:36 +00:00
Petr Špaček
eb93c915d3 Adjust line breaks in CVE report template 2024-03-04 13:13:30 +00:00
Petr Špaček
30d57b93a7 Add questions about multiple implementations into CVE report template 2024-03-04 13:13:30 +00:00
Evan Hunt
b62a9fd900 Merge branch 'each-move-rrl-broken-config-test-case-to-checkconf' into 'main'
Move RRL broken-config check to checkconf

See merge request isc-projects/bind9!8795
2024-03-01 23:34:05 +00:00
Evan Hunt
05398c1488 move RRL broken-config check to checkconf
the RRL test included a test case that tried to start named with
a broken configuration.  the same error could be found with
named-checkconf, so it should have been tested in the checkconf
system test.
2024-03-01 14:29:30 -08:00
Ondřej Surý
7111ea3669 Merge branch '4591-improve-ttl-based-cleaning' into 'main'
Remove expired rdataset headers from the heap

Closes #4591

See merge request isc-projects/bind9!8754
2024-02-29 12:33:58 +00:00
Ondřej Surý
db69cc7891 Add CHANGES note for [GL #4591] 2024-02-29 12:57:06 +01:00
Ondřej Surý
d8220ca4ca Make the TTL-based cleaning more aggressive
It was discovered that the TTL-based cleaning could build up
a significant backlog of the rdataset headers during the periods where
the top of the TTL heap isn't expired yet.  Make the TTL-based cleaning
more aggressive by cleaning more headers from the heap when we are
adding new header into the RBTDB.
2024-02-29 12:57:06 +01:00
Ondřej Surý
a9383e4b95 Remove expired rdataset headers from the heap
It was discovered that an expired header could sit on top of the heap
a little longer than desireable.  Remove expired headers (headers with
rdh_ttl set to 0) from the heap completely, so they don't block the next
TTL-based cleaning.
2024-02-29 12:56:36 +01:00
Ondřej Surý
96171e9879 Merge branch '4596-regression-in-cache-cleaning' into 'main'
Reduce lock contention during RBTDB tree pruning

Closes #4596

See merge request isc-projects/bind9!8765
2024-02-29 11:33:05 +00:00
Ondřej Surý
f447557667 Add CHANGES and release note for [GL #4596] 2024-02-29 11:23:04 +01:00
Ondřej Surý
0b32d323e0 Simplify the parent cleaning in the prune_tree() mechanism
Instead of juggling with node locks in a cycle, cleanup the node we are
just pruning and send any the parent that's also subject to the pruning
to the prune tree via normal way (e.g. enqueue pruning on the parent).

This simplifies the code and also spreads the pruning load across more
event loop ticks which is better for lock contention as less things run
in a tight loop.
2024-02-29 11:23:03 +01:00
Ondřej Surý
eed17611d8 Reduce lock contention during RBTDB tree pruning
The log message for commit 24381cc36d
explained:

    In some older BIND 9 branches, the extra queuing overhead eliminated by
    this change could be remotely exploited to cause excessive memory use.
    Due to architectural shift, this branch is not vulnerable to that issue,
    but applying the fix to the latter is nevertheless deemed prudent for
    consistency and to make the code future-proof.

However, it turned out that having a single queue for the nodes to be
pruned increased lock contention to a level where cleaning up nodes from
the RBTDB took too long, causing the amount of memory used by the cache
to grow indefinitely over time.

This commit reverts the change to the pruning mechanism introduced by
commit 24381cc36d as BIND branches newer
than 9.16 were not affected by the excessive event queueing overhead
issue mentioned in the log message for the above commit.
2024-02-29 11:23:03 +01:00
Artem Boldariev
264a3a92b2 Merge branch '4156-docs-ephemeral-tls-recreation' into 'main'
Improve documentation on ephemeral TLS configuration

Closes #4156

See merge request isc-projects/bind9!8771
2024-02-28 19:40:35 +00:00
Artem Boldariev
1ab0f6d918 Improve documentation on ephemeral TLS configuration
This commit improves the documentation on the ephemeral TLS
configuration and describes in more detail what is happening with TLS
configurations on reconfiguration in general.
2024-02-28 20:30:38 +02:00
Mark Andrews
5b23c964e2 Merge branch '4604-fix-initial-tests-in-masterfile-system-test' into 'main'
Resolve "Fix initial tests in masterfile system test"

Closes #4604

See merge request isc-projects/bind9!8787
2024-02-28 00:16:39 +00:00
Mark Andrews
e02b73c7a4 Split the first masterfile test into 3
Additionally read the correct zone for BIND 8 ttl checks
2024-02-27 15:42:06 +11:00
Michal Nowak
b2c573843a Merge branch 'mnowak/dialup-watch-log-from-start' into 'main'
Watch logs from start in dialup system test

See merge request isc-projects/bind9!8782
2024-02-26 11:10:22 +00:00
Michal Nowak
283a7ab17d Watch logs from start in dialup system test
When the first parametrized test takes a bit longer than usual, the zone
transfer in ns3 may succeed before the second parametrized test is even
started, and then watch_log_from_here() won't find the "Transfer status:
success" message in the named log. Using watch_log_from_start() instead
makes sure the test is more stable.
2024-02-26 11:22:40 +01:00
Mark Andrews
078d514764 Merge branch '4413-add-resinfo-261-type-to-named' into 'main'
Resolve "Add RESINFO (261) type to named"

Closes #4413

See merge request isc-projects/bind9!8464
2024-02-26 02:16:42 +00:00
Mark Andrews
1bf03a2e9a Add CHANGES entry for [GL #4413] 2024-02-26 12:02:40 +11:00
Mark Andrews
0651063658 Add RESINFO record type
This is a TXT clone using code point 261.
2024-02-26 12:02:40 +11:00
Michal Nowak
ef965acd34 Merge branch 'mnowak/pytest_rewrite_dsdigest' into 'main'
Rewrite dsdigest system test to pytest

See merge request isc-projects/bind9!8770
2024-02-23 13:18:42 +00:00
Michal Nowak
cfb68bda79 Rewrite dsdigest system test to pytest 2024-02-23 13:41:04 +01:00
Michal Nowak
5830ac831f Add isctest.check.servfail() 2024-02-23 12:02:32 +01:00
Ondřej Surý
0498d0d1e0 Merge branch '4595-fix-expire-lru-headers-race' into 'main'
Do not use header_prev in expire_lru_headers

Closes #4595

See merge request isc-projects/bind9!8773
2024-02-23 11:00:56 +00:00
Mark Andrews
4f8539ac23 Add CHANGES and release note for [GL #4495] 2024-02-23 12:00:12 +01:00
Mark Andrews
7ce2e86024 Do not use header_prev in expire_lru_headers
dns__cacherbt_expireheader can unlink / free header_prev underneath
it.  Use ISC_LIST_TAIL after calling dns__cacherbt_expireheader
instead to get the next pointer to be processed.
2024-02-23 12:00:12 +01:00
Michal Nowak
edf70d5f6c Merge branch 'mnowak/pytest_rewrite_xferquota' into 'main'
Rewrite xferquota system test to pytest

See merge request isc-projects/bind9!8676
2024-02-23 10:48:38 +00:00
Michal Nowak
69bf4432cc Rewrite xferquota system test to pytest 2024-02-23 11:04:51 +01:00
Michal Nowak
1e52a11343 Add isctest.check.rrsets_equal function 2024-02-23 11:04:51 +01:00
Michal Nowak
5694c52f52 Add retry_with_timeout() utility function 2024-02-23 11:04:51 +01:00
Michal Nowak
6dd1b3ab38 Add RegEx support to wait_for_line() and wait_for_lines() 2024-02-23 11:04:51 +01:00
Ondřej Surý
c4dbf410b7 Merge branch '4597-placeholder' into 'main'
Add CHANGES placeholder for [GL #4597]

See merge request isc-projects/bind9!8772
2024-02-23 07:49:48 +00:00
Ondřej Surý
e7e268c362 Add CHANGES placeholder for [GL #4597] 2024-02-23 08:40:42 +01:00
Michal Nowak
e5a98f14bf Merge branch 'mnowak/pytest_rewrite_sortlist' into 'main'
Rewrite sortlist system test to pytest

See merge request isc-projects/bind9!8684
2024-02-22 17:39:02 +00:00