Commit graph

37363 commits

Author SHA1 Message Date
Mark Andrews
4a7c78b290 Report the key name that failed in retry_keyfetch
When there are multiple managed trust anchors we need to know the
name of the trust anchor that is failing.  Extend the error message
to include the trust anchor name.

(cherry picked from commit fb7b7ac495)
2023-02-14 10:44:39 +11:00
Tony Finch
a0405b3511 Merge branch 'fanf-named-compilezone-stray-backtick-v9_18' into 'v9_18'
[9.18] Fix the reference to RFC 1035 in named-compilezone(1)

See merge request isc-projects/bind9!7527
2023-02-13 18:26:25 +00:00
Tony Finch
6c19848836 Fix the reference to RFC 1035 in named-compilezone(1)
There was a stray backquote

(cherry picked from commit ef1170b3fc)
2023-02-13 16:33:38 +00:00
Tom Krizek
4596017ae6 Merge branch '3848-increase-wait-time-runtime-test-v9_18' into 'v9_18'
[9.18] Increase named startup wait time for runtime test

See merge request isc-projects/bind9!7524
2023-02-13 15:33:54 +00:00
Tom Krizek
b4d01b0175
Increase named startup wait time for runtime test
Occasionally, the allotted 10 seconds for the "running" line to appear
in log after named is started proved insufficient in CI, especially
during increased load. Give named up to 60 seconds to start up to
mitigate this issue.

(cherry picked from commit b8bb4233e8)
2023-02-13 16:08:56 +01:00
Michal Nowak
3dc6296e2e Merge branch 'mnowak/pairwise-test-auth-recursive-servers-v9_18' into 'v9_18'
[9.18] Start named as auth and recursive server in pairwise

See merge request isc-projects/bind9!7523
2023-02-13 15:00:05 +00:00
Michal Nowak
e6f5b69784
Start named as auth and recursive server in pairwise
The script will start the named process configured as both an
authoritative and recursive server for each pairwise ./configure
configuration. The test is considered successful if the named process
runs until the 5-second timeout is triggered, and there is no named.lock
file present, indicating that named did not crash on shutdown.

(cherry picked from commit a708c2f93d)
2023-02-13 13:40:47 +01:00
Arаm Sаrgsyаn
28b33b72e3 Merge branch '3190-offload-rpz-updates-2nd-round-v9_18' into 'v9_18'
[9.18] Run the RPZ update as offloaded work (2-nd round)

See merge request isc-projects/bind9!7512
2023-02-13 12:31:24 +00:00
Ondřej Surý
c9028b4976 Add CHANGES and release note for [GL #3190]
(cherry picked from commit 23a4559b34)
2023-02-13 11:41:52 +00:00
Ondřej Surý
6873cc1c79 Run the RPZ update as offloaded work
Previously, the RPZ updates ran quantized on the main nm_worker loops.
As the quantum was set to 1024, this might lead to service
interruptions when large RPZ update was processed.

Change the RPZ update process to run as the offloaded work.  The update
and cleanup loops were refactored to do as little locking of the
maintenance lock as possible for the shortest periods of time and the db
iterator is being paused for every iteration, so we don't hold the rbtdb
tree lock for prolonged periods of time.

(cherry picked from commit f106d0ed2b)
2023-02-13 11:41:52 +00:00
Ondřej Surý
bb6029db64 Refactor the dns_rpz_add/delete to use local rpz copy
Previously dns_rpz_add() were passed dns_rpz_zones_t and index to .zones
array.  Because we actually attach to dns_rpz_zone_t, we should be using
the local pointer instead of passing the index and "finding" the
dns_rpz_zone_t again.

Additionally, dns_rpz_add() and dns_rpz_delete() were used only inside
rpz.c, so make them static.

(cherry picked from commit b6e885c97f)
2023-02-13 11:41:52 +00:00
Ondřej Surý
74bd205177 General cleanup of dns_rpz implementation
Do a general cleanup of lib/dns/rpz.c style:

 * Removed deprecated and unused functions
 * Unified dns_rpz_zone_t naming to rpz
 * Unified dns_rpz_zones_t naming to rpzs
 * Add and use rpz_attach() and rpz_attach_rpzs() functions
 * Shuffled variables to be more local (cppcheck cleanup)

(cherry picked from commit 840179a247)
2023-02-13 11:41:52 +00:00
Ondřej Surý
d726d3eeaf Merge branch 'pspacek/make-manin-on-dist-v9_18' into 'v9_18'
[9.18] Remove pregenerated manpages from the repo

See merge request isc-projects/bind9!7517
2023-02-10 11:36:43 +00:00
Ondřej Surý
aa996e48b5
Test the pre-generated man pages in GitLab CI
Add an extra job for a build from tarball, but without sphinx-build and
enable RUN_MAKE_INSTALL to check that man pages were generated and
installed.

Disable the RUN_MAKE_INSTALL on the systems without sphinx-build (sid).

(cherry picked from commit 8f2e1e15cc)
2023-02-10 12:05:52 +01:00
Petr Špaček
596c6f4cf7
Remove pregenerated manpages from the repo
We don't need them in the repo, it's sufficient if we pregenerate them
while preparing the tarball.  That way we don't have overhead while
modifying them but they are still available for installations without
Sphinx.

I assume that this will make rebases and cherry-picks across branches
easier, with less trial and error churn required in the CI.

It's implemented in the way that we build the manpages only when we
either have pregenerated pages available at the configure time or
sphinx-build is installed and working.

(cherry picked from commit 9110465194)
2023-02-10 12:03:56 +01:00
Michał Kępień
44c3f4e249 Merge branch '3840-avoid-libuv-with-broken-recvmmsg-v9_18' into 'v9_18'
[9.18] Avoid libuv 1.35 and 1.36 that have broken recvmmsg implementation

See merge request isc-projects/bind9!7482
2023-02-09 21:38:47 +00:00
Ondřej Surý
ac7d195859 Add CHANGES and release note for [GL #3840]
(cherry picked from commit 6fa48c963e)
2023-02-09 22:10:46 +01:00
Ondřej Surý
8d103f7bbc Enforce version drift limits for libuv
libuv support for receiving multiple UDP messages in a single system
call (recvmmsg()) has been tweaked several times between libuv versions
1.35.0 and 1.40.0.  Mixing and matching libuv versions within that span
may lead to assertion failures and is therefore considered harmful, so
try to limit potential damage be preventing users from mixing libuv
versions with distinct sets of recvmmsg()-related flags.

(cherry picked from commit 735d09bffe)
2023-02-09 22:10:46 +01:00
Ondřej Surý
3368e5f231 Avoid libuv 1.35 and 1.36 that have broken recvmmsg implementation
The implementation of UDP recvmmsg in libuv 1.35 and 1.36 is
incomplete and could cause assertion failure under certain
circumstances.

Modify the configure and runtime checks to report a fatal error when
trying to compile or run with the affected versions.

(cherry picked from commit 251f411fc3)
2023-02-09 22:10:46 +01:00
Evan Hunt
f560541efe Merge branch 'each-remove-bind9-refvar-v9_18' into 'v9_18'
[9.18] Merge branch 'each-remove-bind9-refvar' into 'main'

See merge request isc-projects/bind9!7513
2023-02-09 18:34:13 +00:00
Evan Hunt
342286ecdb remove isc_bind9 variable
isc_bind9 was a global bool used to indicate whether the library
was being used internally by BIND or by an external caller. external
use is no longer supported, but the variable was retained for use
by dyndb, which needed it only when being built without libtool.
building without libtool is *also* no longer supported, so the variable
can go away.

(cherry picked from commit 935879ed11)
2023-02-09 10:07:39 -08:00
Mark Andrews
e67adfb479 Merge branch '3857-notify-source-port-test-is-not-reliable-v9_18' into 'v9_18'
[9.18] Resolve "Notify source port test is not reliable"

See merge request isc-projects/bind9!7510
2023-02-09 09:36:47 +00:00
Mark Andrews
7ca00e674f Make notify source port test reliable
Send the test message from ns3 to ns2 instead of ns2 to ns3 as ns2
is started first and therefore the test doesn't have to wait on the
resend of the the NOTIFY message to be successful.

(cherry picked from commit e7e1f59a3a)
2023-02-09 19:40:19 +11:00
Mark Andrews
c843811609 Merge branch '3831-dnssec-cds-failed-to-cleanup-properly-on-some-non-error-paths-v9_18' into 'v9_18'
[9.18] Resolve "dnssec-cds failed to cleanup properly on some non error paths"

See merge request isc-projects/bind9!7507
2023-02-09 00:36:14 +00:00
Mark Andrews
ef2c69bf71 Add CHANGES note for [GL #3831]
(cherry picked from commit ae26fcb8f5)
2023-02-09 09:00:52 +11:00
Mark Andrews
66a3802507 dnssec-checkds: cleanup memory on error paths
Move and give unique names to the dns_db_t, dns_dbnode_t and
dns_dbversion_t pointers, so they have global scope and therefore
are visible to cleanup.  Unique names are not strictly necessary,
as none of the functions involved call each other.

Change free_db to handle NULL pointers and also an optional
(dns_dbversion_t **).

In match_keyset_dsset and free_keytable, ki to be handled
differently to prevent a false positive NULL pointer dereference
warning from scan.

In formatset moved dns_master_styledestroy earlier and freed
buf before calling check_result to prevent memory leak.

In append_new_ds_set freed ds on the default path before
calling check_result to prevent memory leak.

(cherry picked from commit 13f9d29954)
2023-02-09 09:00:28 +11:00
Mark Andrews
af051282bc dnssec-cds failed to cleanup on non error paths
dnssec-cds failed to cleanup on non error paths which meant that
the OpenSSL libraries could not cleanup properly.

(cherry picked from commit 81bde388e4)
2023-02-09 08:58:15 +11:00
Mark Andrews
4fd22a2228 Define DNS_RDATASET_INIT for static initialisation
(cherry picked from commit ddc4d1fca4)
2023-02-09 08:58:15 +11:00
Evan Hunt
a3bcab9105 Merge branch '3113-clientinfo-refactor-v9_18' into 'v9_18'
[9.18] Merge branch '3113-clientinfo-refactor' into 'main'

See merge request isc-projects/bind9!7504
2023-02-08 08:49:29 +00:00
Evan Hunt
9f1c6d9744 refactor dns_clientinfo_init(); use separate function to set ECS
Instead of using an extra rarely-used paramater to dns_clientinfo_init()
to set ECS information for a client, this commit adds a function
dns_clientinfo_setecs() which can be called only when ECS is needed.

(cherry picked from commit ff3fdaa424)
2023-02-08 00:13:12 -08:00
Evan Hunt
32623be328 Merge branch '3846-nsupdate-test-fix-v9_18' into 'v9_18'
[9.18] Merge branch '3846-nsupdate-test-fix' into 'main'

See merge request isc-projects/bind9!7503
2023-02-08 07:47:15 +00:00
Evan Hunt
1d6721c5fa increase simultaneous updates for quota test
the nsupdate system test was intermittently failing due to the update
quota not being exceeded when it should have been.  this is most likely
a timing issue: the client is sending updates too slowly, or the server
is processing them too quickly, for the quota to fill. this commit
attempts to make that the failure less likely by increasing the number
of update transactions from 10 to 20.

(cherry picked from commit 06b1faf068)
2023-02-07 23:41:24 -08:00
Evan Hunt
52d9ce038b Merge branch '854-spurious-keytype-warning-v9_18' into 'v9_18'
[9.18] Merge branch '854-spurious-keytype-warning' into 'main'

See merge request isc-projects/bind9!7502
2023-02-08 07:34:56 +00:00
Evan Hunt
bc3be6dc29 silence a spurious warning during key generation
when generating a key, if a DH key already existed for the same
name, a spurious warning message was generated saying "bad key
type". this is fixed.

(cherry picked from commit 82503bec99)
2023-02-07 23:30:24 -08:00
Mark Andrews
34009f3d78 Merge branch '3852-follow-up-from-9-18-merge-branch-3790-use-configured-udp-port-into-main-v9_18' into 'v9_18'
[9.18] Allow some time to the root trust anchor to appear

See merge request isc-projects/bind9!7498
2023-02-07 22:24:05 +00:00
Mark Andrews
11065c810a Allow some time to the root trust anchor to appear
Following deleting the root trust anchor and reconfiguring the
server it takes some time to for trust anchor to appear in 'rndc
managed-keys status' output.  Retry several times.

(cherry picked from commit 71dbd09796)
2023-02-08 00:42:15 +11:00
Michal Nowak
ed2f4c3a7c Merge branch 'mnowak/set-up-version-and-release-notes-for-bind-9.18.13' into 'v9_18'
Set up release notes for BIND 9.18.13

See merge request isc-projects/bind9!7496
2023-02-07 10:26:25 +00:00
Michal Nowak
f8d168ecf3
Set up release notes for BIND 9.18.13 2023-02-07 11:16:28 +01:00
Michal Nowak
226e35887f
Update BIND version to 9.18.13-dev 2023-02-07 11:12:21 +01:00
Evan Hunt
84801fe25f Merge branch '3790-use-configured-udp-port-v9_18' into 'v9_18'
[9.18] Merge branch '3790-use-configured-udp-port' into 'main'

See merge request isc-projects/bind9!7491
2023-02-07 01:19:30 +00:00
Evan Hunt
282f44d329 CHANGES for [GL #3790]
(cherry picked from commit 4f50854e7a)
2023-02-06 17:02:02 -08:00
Evan Hunt
29ccc052dd add source port configuration tests
check in the log files of receiving servers that the originating
ports for notify and SOA query messages were set correctly from
configured notify-source and transfer-source options.

(cherry picked from commit 9cffd5c431)
2023-02-06 17:02:02 -08:00
Evan Hunt
5508e25376 use configured source ports for UDP requests
the optional 'port' option, when used with notify-source,
transfer-source, etc, is used to set up UDP dispatches with a
particular source port, but when the actual UDP connection was
established the port would be overridden with a random one. this
has been fixed.

(configuring source ports is deprecated in 9.20 and slated for
removal in 9.22, but should still work correctly until then.)

(cherry picked from commit 4d50c912ba)
2023-02-06 17:02:02 -08:00
Mark Andrews
797c665c25 Merge branch '3838-named-rrchecker-should-cleanup-when-it-detects-an-error-v9_18' into 'v9_18'
[9.18] named-rrchecker: have fatal cleanup

See merge request isc-projects/bind9!7492
2023-02-07 00:59:26 +00:00
Mark Andrews
c705467d30 named-rrchecker: have fatal cleanup
It is trivial to fully cleanup memory on all the error paths in
named-rrchecker, many of which are triggered by bad user input.
This involves freeing lex and mctx if they exist when fatal is
called.

(cherry picked from commit dbe82813e6)
2023-02-07 11:15:21 +11:00
Evan Hunt
ab6c0a7d7a Merge branch '3673-delay-trust-anchor-management-v9_18' into 'v9_18'
[9.18] delay trust anchor management until zones are loaded

See merge request isc-projects/bind9!7489
2023-02-06 22:30:34 +00:00
Evan Hunt
ac150939d5 delay trust anchor management until zones are loaded
it was possible for a managed trust anchor needing to send a key
refresh query to be unable to do so because an authoritative zone
was not yet loaded. this has been corrected by delaying the
synchronization of managed-keys zones until after all zones are
loaded.

(cherry-picked from commit bafbbd2465)
2023-02-06 14:27:16 -08:00
Michał Kępień
60124f85bd Merge branch '3781-deprecate-source-port-v9_18' into 'v9_18'
[9.18] mark "port" as deprecated for source address options

See merge request isc-projects/bind9!7478
2023-02-02 11:58:57 +00:00
Evan Hunt
4cb762a10d CHANGES and release note for [GL #3781]
(cherry picked from commit 22d1951aa6)
2023-02-02 12:21:08 +01:00
Matthijs Mekking
64f5e83ef4 Test deprecate source port configuration
Add 'port' token to deprecated.conf. Also add options
'use-v4-udp-ports', 'use-v6-udp-ports', 'avoid-v4-udp-ports',
and 'avoid-v6-udp-ports'.

All of these should trigger warnings (except when deprecation warnings
are being ignored).

(cherry picked from commit 531914e660)
2023-02-02 12:21:08 +01:00