2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00
Commit Graph

40440 Commits

Author SHA1 Message Date
Michał Kępień
bf92f33f94 Add helper Python classes for watching log files
Waiting for a specific log line to appear in a named.run file is a
common action in BIND 9 system tests.  Implement a set of Python classes
which intend to simplify and standardize this task in Python-based
system tests.

Co-authored-by: Štěpán Balážik <stepan@isc.org>
2023-12-21 18:10:15 +00:00
Michał Kępień
00003e497c Simplify use of RNDC in Python-based tests
The "addzone" and "shutdown" system tests currently invoke rndc using
test-specific helper code.  Rework the relevant bits of those tests so
that they use the helper classes from bin/tests/system/isctest.py.
2023-12-21 18:10:15 +00:00
Michał Kępień
c38c29e84d Implement Python helpers for using RNDC in tests
Controlling named instances using RNDC is a common action in BIND 9
system tests.  However, there is currently no standardized way of doing
that from Python-based system tests, which leads to code duplication.
Add a set of Python classes and pytest fixtures which intend to simplify
and standardize use of RNDC in Python-based system tests.

For now, RNDC commands are sent to servers by invoking the rndc binary.
However, a switch to a native Python module able to send RNDC commands
without executing external binaries is expected to happen soon.  Even
when that happens, though, having the capability to invoke the rndc
binary (in order to test it) will remain useful.  Define a common Python
interface that such "RNDC executors" should implement (RNDCExecutor), in
order to make switching between them convenient.

Co-authored-by: Štěpán Balážik <stepan@isc.org>
2023-12-21 18:10:15 +00:00
Evan Hunt
e997a738d6 Merge branch 'each-broken-qpiter' into 'main'
more fix_iterator() bugs

See merge request isc-projects/bind9!8606
2023-12-21 17:57:47 +00:00
Evan Hunt
ea9a8cb392 prevent an infinite loop in fix_iterator()
it was possible for fix_iterator() to get stuck in a loop while
trying to find the predecessor of a missing node. this has been
fixed and a regression test has been added.
2023-12-21 09:18:30 -08:00
Evan Hunt
84f79cd164 fix_iterator() could produce incoherent iterator stacks
the fix_iterator() function moves an iterator so that it points
to the predecessor of the searched-for name when that name doesn't
exist in the database. the tests only checked the correctness of
the top of the stack, however, and missed some cases where interior
branches in the stack could be missing or duplicated. in these
cases, the iterator would produce inconsistent results when walked.

the predecessors test case in qp_test has been updated to walk
each iterator to the end and ensure that the expected number of
nodes are found.
2023-12-21 09:18:30 -08:00
Mark Andrews
93cc89e4d3 Merge branch '4495-conversion-from-nsec3-to-nsec-removes-the-nsec3param-too-early' into 'main'
Resolve "Conversion from NSEC3 to NSEC removes the NSEC3PARAM too early"

Closes #4495 and #1794

See merge request isc-projects/bind9!8578
2023-12-21 10:00:15 +00:00
Mark Andrews
9b5ed853d0 Add CHANGES for [GL #1794] and [GL #4459] 2023-12-21 20:12:51 +11:00
Matthijs Mekking
1d6b892e04 Regression check for NSEC3 to NSEC3 conversion
When changing the NSEC3 chain, the new NSEC3 chain must be built before
the old NSEC3PARAM is removed.  Check each delta in the conversion to
ensure this ordering is met.
2023-12-21 20:12:09 +11:00
Mark Andrews
7d90c056b0 Regression check for NSEC3 to NSEC conversion
When transitioning from NSEC3 to NSEC the NSEC3 must be built before
the NSEC3PARAM is removed.  Check each delta in the conversion to
ensure this ordering is met.
2023-12-21 20:12:09 +11:00
Mark Andrews
0509351e92 Update the NSEC3PARAM TTL to match the SOA minimum
When building NSEC3 chains update the NSEC3PARAM TTL to match
the SOA minimum.  Delete all records using the old TTL then
re-add them using the new TTL.
2023-12-21 20:12:09 +11:00
Mark Andrews
f3ae88d84e Don't delete the NSEC3PARAM immediately
Wait until the new NSEC or NSEC3 chain is generated then it should
be deleted.
2023-12-21 20:12:09 +11:00
Evan Hunt
b248574f93 Merge branch '4364-compilezone-disable-checks' into 'main'
disable checks by default in named-compilezone

Closes #4364

See merge request isc-projects/bind9!8499
2023-12-21 04:26:07 +00:00
Evan Hunt
0c90d09604 CHANGES and release note for [GL #4364] 2023-12-20 16:57:49 -08:00
Evan Hunt
d9ab5b9ecc disable checks by default in named-compilezone
Zone content integrity checks can significantly slow the conversion
of zones from raw to text. As this is more properly a job for
named-checkzone anyway, we now disable all zone checks by
default in named-compilezone.

Users relying on named-compilezone for integrity checks as
well as format conversion can run named-checkzone separately,
or re-enable the checks in named-compilezone by using:
"named-compilezone -n fail -k fail -r warn -T warn -W warn".
2023-12-20 16:57:19 -08:00
Mark Andrews
ecd1f4a2b8 Merge branch '4488-memory-reference-leak-in-lib-dns-zone-c-zone_sign' into 'main'
Resolve "Memory/reference leak in lib/dns/zone.c:zone_sign"

Closes #4488

See merge request isc-projects/bind9!8570
2023-12-20 23:02:50 +00:00
Mark Andrews
4e4200ee2e Add CHANGES note for [GL #4488] 2023-12-21 09:19:22 +11:00
Mark Andrews
a3d0476d17 Don't look for KSK status here and squash memory leak
Just remove the key from  consideration as it is being removed.

The old code could leak a key reference as dst_free_key was not
called every time we continued. This simplification will address
this as well.
2023-12-21 09:18:45 +11:00
Mark Andrews
31560dce1a Merge branch '4310-require-when-changing-primaries-list' into 'main'
Resolve "REQUIRE when changing primaries list."

Closes #4310

See merge request isc-projects/bind9!8546
2023-12-20 21:50:26 +00:00
Mark Andrews
4714c65a90 Add CHANGES note for [GL #4310] 2023-12-21 08:12:43 +11:00
Mark Andrews
6ccb93884d dns_request_cancel needs to be callable from any thread
Check the tid and cancel the request immediately or pass it to the
appropriate loop for processing.  Call request->cb directly from
req_sendevent as it is now always called with the correct tid.
2023-12-21 08:11:59 +11:00
Tom Krizek
62284b4053 Merge branch 'tkrizek/update-sphinx_rtd_theme' into 'main'
Update sphinx_rtd_theme and docutils

See merge request isc-projects/bind9!8603
2023-12-20 17:01:45 +00:00
Tom Krizek
4156fa09d9 Update sphinx_rtd_theme and docutils 2023-12-20 18:00:58 +01:00
Michał Kępień
c04d87f13c Merge branch '4496-do-not-destroy-ixfr-journal-in-xfrin_end' into 'main'
Do not destroy IXFR journal in xfrin_end()

Closes #4496

See merge request isc-projects/bind9!8602
2023-12-20 16:32:04 +00:00
Michał Kępień
80695e9897 Add CHANGES entry for GL #4496 2023-12-20 17:21:14 +01:00
Michał Kępień
efcba4dd23 Do not destroy IXFR journal in xfrin_end()
The xfrin_end() function is run when a zone transfer is finished or
canceled.  One of the actions it takes for incremental transfers (IXFR)
is calling dns_journal_destroy() on the zone journal structure that is
stored in the relevant zone transfer context (xfr->ixfr.journal).  That
immediately invalidates that structure as it is not reference-counted.
However, since the changes present in the IXFR stream are applied to the
journal asynchronously (via isc_work_enqueue()), it is possible that
some zone changes may still be in the process of being written to the
journal by the time xfrin_end() destroys the relevant structure.  Such a
scenario leads to crashes.

Fix by not destroying the zone journal structure until the entire zone
transfer context is destroyed.  xfrin_destroy() already conditionally
calls dns_journal_destroy() and when the former is called, all
asynchronous work for a given zone transfer process is guaranteed to be
complete.
2023-12-20 17:21:14 +01:00
Tom Krizek
1349733fbc Merge tag 'v9.19.19' 2023-12-20 15:59:22 +01:00
Matthijs Mekking
f249418240 Merge branch '4423-revert' into 'main'
Revert "Remove kasp mutex lock"

See merge request isc-projects/bind9!8597
2023-12-20 08:32:00 +00:00
Matthijs Mekking
6722ae9103 Revert "Add release note and CHANGES for #4423"
This reverts commit 7af2ec7e4f.
2023-12-20 08:30:44 +00:00
Matthijs Mekking
16f2c811e3 Revert "Remove kasp mutex lock"
This reverts commit 634c80ea12.
2023-12-20 08:30:44 +00:00
Mark Andrews
3f35475ab6 Merge branch '4498-gl-4495-followup-regression-test-was-too-strict' into 'main'
Resolve "[GL #4494] followup: regression test was too strict"

Closes #4498

See merge request isc-projects/bind9!8590
2023-12-19 22:48:51 +00:00
Mark Andrews
80a4dff986 The NSEC3 -> NSEC private record may be added later
Check each delta for the NSEC3 -> NSEC private record addition
as it may be added in the second delta.
2023-12-19 22:05:59 +00:00
Mark Andrews
e1111c5681 Merge branch '4439-add-async-restart-handle' into 'main'
Resolve "segfault in resolver when serving UDP clients"

Closes #4439

See merge request isc-projects/bind9!8594
2023-12-19 16:34:53 +00:00
Mark Andrews
5c02089bcf Add CHANGES note for [GL #4439] 2023-12-20 02:51:54 +11:00
Mark Andrews
7ab4e1537a Obtain a client->handle reference when calling async_restart
otherwise client may be freed before async_restart is called.
2023-12-20 02:50:48 +11:00
Mark Andrews
6a2ebd4f10 Merge branch '4500-log-the-change-that-generated-not-exact-when-applying-a-diff' into 'main'
Resolve "Log the change that generated "not exact" when applying a diff."

Closes #4500

See merge request isc-projects/bind9!8591
2023-12-19 15:37:45 +00:00
Mark Andrews
71d67b6fdf Add CHANGES entry for [GL #4500] 2023-12-20 01:57:25 +11:00
Mark Andrews
c896e07277 Log what change generated a 'not exact' error 2023-12-20 01:56:38 +11:00
Matthijs Mekking
e05e3a3448 Merge branch '4423-kasp-rwlock' into 'main'
Remove kasp mutex lock

Closes #4423

See merge request isc-projects/bind9!8571
2023-12-19 14:54:21 +00:00
Matthijs Mekking
7af2ec7e4f Add release note and CHANGES for #4423 2023-12-19 14:53:51 +01:00
Matthijs Mekking
634c80ea12 Remove kasp mutex lock
Multiple zones should be able to read the same key and signing policy
at the same time. Since writing the kasp lock only happens during
reconfiguration, and the complete kasp list is being replaced, there
is actually no need for a lock. Reference counting ensures that a kasp
structure is not destroyed when still being attached to one or more
zones.

This significantly improves the load configuration time.
2023-12-19 14:53:51 +01:00
Matthijs Mekking
034990a978 Merge branch '4234-placeholder' into 'main'
Add CHANGES placeholder for [GL #4234]

See merge request isc-projects/bind9!8592
2023-12-19 08:38:00 +00:00
Matthijs Mekking
8788c72bc3 Add CHANGES placeholder for [GL #4234] 2023-12-19 09:34:56 +01:00
Mark Andrews
b1cd22c483 Merge branch '4494-add_sigs-was-using-the-wrong-time-in-kasp-mode' into 'main'
Resolve "add_sigs was using the wrong time in  kasp mode"

Closes #4494

See merge request isc-projects/bind9!8577
2023-12-19 01:02:07 +00:00
Mark Andrews
94b00f44ae Add CHANGES note for [GL #4494] 2023-12-19 11:22:17 +11:00
Mark Andrews
bdb42d3838 Regression check for missing RRSIGs
When transitioning from NSEC3 to NSEC the added records where not
being signed because the wrong time was being used to determine if
a key should be used or not.  Check that these records are actually
signed.
2023-12-19 11:21:46 +11:00
Mark Andrews
6066e41948 Use 'now' rather than 'inception' in 'add_sigs'
When kasp support was added 'inception' was used as a proxy for
'now' and resulted in signatures not being generated or the wrong
signatures being generated.  'inception' is the time to be set
in the signatures being generated and is usually in the past to
allow for clock skew.  'now' determines what keys are to be used
for signing.
2023-12-19 11:21:46 +11:00
Mark Andrews
5e2392aec2 Merge branch '4402-use-our-instance-of-bind-keys' into 'main'
Resolve "Change system tests to not use dnssec-validation auto"

Closes #4402

See merge request isc-projects/bind9!8511
2023-12-19 00:19:07 +00:00
Tom Krizek
66d6394057 Turn off dnssec validation in inline test
DNSSEC validation isn't required by the inline test and would send
queries to root name servers.
2023-12-18 23:46:03 +00:00
Mark Andrews
15a433cb9d Stop sending queries to the internet's root servers
Disable automatic dnssec validation.
2023-12-18 23:46:03 +00:00