2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

36356 Commits

Author SHA1 Message Date
Evan Hunt
3f478a3bed Add CHANGES note for [GL #3327] 2022-05-13 21:47:32 -07:00
Evan Hunt
8834c44683 Add lower bound checks to fetchlimit test
Check that the recursing client count is above a reasonable
minimum, as well as below a maximum, so that we can detect
bugs that cause recursion to fail too early or too often.
2022-05-13 21:47:32 -07:00
Evan Hunt
0201eab655 Cleanup: always count ns_statscounter_recursclients
The ns_statscounter_recursclients counter was previously only
incremented or decremented if client->recursionquota was non-NULL.
This was harmless, because that value should always be non-NULL if
recursion is enabled, but it made the code slightly confusing.
2022-05-13 21:47:27 -07:00
Evan Hunt
81deb24deb Disable EDNS for the fetchlimit test server
The fetchlimit test depends on a resolver continuing to try UDP
and timing out while the client waits for resolution to succeed.
but since commit bb990030 (flag day 2020), a fetch will always
switch to TCP after two timeouts, unless EDNS was disabled for
the query.

This commit adds "edns no;" to server statements in the fetchlimit
resolver, to restore the behavior expected by the test.
2022-05-13 21:47:27 -07:00
Evan Hunt
694bc50273 Fix the fetches-per-server quota calculation
Since commit bad5a523c2e, when the fetches-per-server quota
was increased or decreased, instead of the value being set to
the newly calculated quota, it was set to the *minimum* of
the new quota or 1 - which effectively meant it was always set to 1.
it should instead have been the maximum, to prevent the value from
ever dropping to zero.
2022-05-13 21:47:27 -07:00
Evan Hunt
e73728d2cb Merge branch '3351-checkconf-overflow' into 'main'
prevent a possible buffer overflow in configuration check

Closes #3351

See merge request isc-projects/bind9!6303
2022-05-14 03:28:48 +00:00
Evan Hunt
921043b541 prevent a possible buffer overflow in configuration check
corrected code that could have allowed a buffer overfow while
parsing named.conf.
2022-05-13 19:59:58 -07:00
Evan Hunt
891c50af48 Merge branch 'each-view-cleanup' into 'main'
clean up view and related object shutdown processes

See merge request isc-projects/bind9!6278
2022-05-13 21:23:40 +00:00
Evan Hunt
578297936c CHANGES 2022-05-13 13:39:55 -07:00
Evan Hunt
3b13edc5bd attach the resolver to the ADB
the ADB depends on the resolver, but previously only accessed it
via the view. as view->resolver may now be detached before the ADB
finishes, a shutdown race was possible. attaching to the resolver
directly prevents this.
2022-05-13 13:39:55 -07:00
Evan Hunt
d7ffd897ef remove requestmgr whenshutdown events
the request manager has no direct dependency on the
view, so there's no need for a weak reference. remove the
dns_requestmgr_whenshutdown() mechanism since it is no longer
used.
2022-05-13 13:39:52 -07:00
Evan Hunt
51cd295c4b remove resolver whenshutdown events
weakly attaching and detaching when creating and destroying the
resolver obviates the need to have a callback event to do the weak
detach. remove the dns_resolver_whenshutdown() mechanism, as it is
now unused.
2022-05-13 13:36:10 -07:00
Evan Hunt
a2d491279a remove ADB whenshutdown events
weakly attaching and detaching the view when creating or destroying
the ADB obviates the need for a whenshutdown callback event to do
the detaching.  remove the dns_adb_whenshutdown() mechanism, since
it is no longer needed.
2022-05-13 13:36:10 -07:00
Evan Hunt
3027f59f6f move ADB and resolver stats out of the view object
for better object separation, ADB and resolver statistics counters
are now stored in the ADB and resolver objects themsevles, rather than
in the associated view.
2022-05-13 13:36:10 -07:00
Evan Hunt
e5e2d7814e remove view->attributes field
it's not necessary to use view attributes to determine whether
the ADB, resolver and requestmgr need to be shut down; checking
whether they're NULL is sufficient.
2022-05-13 13:36:10 -07:00
Evan Hunt
435e29c3e0 the validator can attach to the view normally
dns_view_weakattach() and _weakdetach() are used by objects that
are created by the view and need it to persist until they are
destroyed, but don't need to prevent it from being shut down. the
validator can use normal view references instead of weak references.
2022-05-13 13:36:10 -07:00
Evan Hunt
e8ab719bc2 fixed a possible reference leak in dns_resolver_create()
If an error occurred while creating the resolver, the mctx could
remain attached.
2022-05-13 13:36:10 -07:00
Evan Hunt
fe1fa8dc88 minor view refactoring
- eliminate dns_view_flushanddetach(), which was only called from
  one place; instead, we now call a function dns_view_flushonshutdown()
  which sets the view up to flush zones when it is detached normally
  with dns_view_detach().
- cleaned up code in dns_view_create().
2022-05-13 13:36:10 -07:00
Evan Hunt
f7fa139fe7 maybe_cancel_validators() is always called locked
there's no longer any need for a parameter to specify whether the
function is called while holding the bucket lock, because all
unlocked uses have been removed.
2022-05-13 13:36:10 -07:00
Matthijs Mekking
e6baff35ac Merge branch '3302-keymgr-updates-key-files-each-run' into 'main'
Fix "keymgr updates key files each run"

Closes #3302

See merge request isc-projects/bind9!6250
2022-05-13 12:50:16 +00:00
Matthijs Mekking
0f89f0b134 Add changes and release notes for #3302
Add a comment to make danger happy.
2022-05-13 13:31:17 +02:00
Matthijs Mekking
1da91b3ab4 Check if key metadata is modified before writing
Add a new parameter to the dst_key structure, mark a key modified if
dst_key_(un)set[bool,num,state,time] is called. Only write out key
files during a keymgr run if the metadata has changed.
2022-05-13 13:31:17 +02:00
Matthijs Mekking
7249bad706 Add kasp test for #3302
Add a test case that triggers a keymgr run that will not trigger any
metadata changes. Ensure that the last status change of the key files
is unmodified.
2022-05-13 13:28:38 +02:00
Ondřej Surý
688d81242a Merge branch 'ondrej-fix-trampoline-locking' into 'main'
Lock the trampoline when attaching

See merge request isc-projects/bind9!6257
2022-05-13 10:16:16 +00:00
Ondřej Surý
933162ae14 Lock the trampoline when attaching
When attaching to the trampoline, the isc__trampoline_max was access
unlocked.  This would not manifest under normal circumstances because we
initialize 65 trampolines by default and that's enough for most
commodity hardware, but there are ARM machines with 128+ cores where
this would be reported by ThreadSanitizer.

Add locking around the code in isc__trampoline_attach().  This also
requires the lock to leak on exit (along with memory that we already)
because a new thread might be attaching to the trampoline while we are
running the library destructor at the same time.
2022-05-13 10:07:20 +02:00
Ondřej Surý
01f3c51894 Merge branch 'ondrej-remove-isc_task-on-shutdown' into 'main'
Remove isc_task_onshutdown()

See merge request isc-projects/bind9!6275
2022-05-13 08:04:49 +00:00
Ondřej Surý
a6cd5e2550 Add CHANGES note for [GL !6275] 2022-05-12 14:55:49 +02:00
Ondřej Surý
0582478c96 Remove isc_task_destroy() and isc_task_shutdown()
After removing the isc_task_onshutdown(), the isc_task_shutdown() and
isc_task_destroy() became obsolete.

Remove calls to isc_task_shutdown() and replace the calls to
isc_task_destroy() with isc_task_detach().

Simplify the internal logic to destroy the task when the last reference
is removed.
2022-05-12 14:55:49 +02:00
Ondřej Surý
2235edabcf Remove isc_task_onshutdown()
The isc_task_onshutdown() was used to post event that should be run when
the task is being shutdown.  This could happen explicitly in the
isc_test_shutdown() call or implicitly when we detach the last reference
to the task and there are no more events posted on the task.

This whole task onshutdown mechanism just makes things more complicated,
and it's easier to post the "shutdown" events when we are shutting down
explicitly and the existing code already always knows when it should
shutdown the task that's being used to execute the onshutdown events.

Replace the isc_task_onshutdown() calls with explicit calls to execute
the shutdown tasks.
2022-05-12 13:45:34 +02:00
Michał Kępień
8fbb75e457 Merge branch 'michal/drop-post-merge-pipelines' into 'main'
Drop post-merge pipelines

See merge request isc-projects/bind9!6292
2022-05-11 13:03:17 +00:00
Michał Kępień
7b8c9e04fc Drop post-merge pipelines
Commit 24961f606882939b62f461f843933da9c2d44ea8 introduced the concept
of post-merge pipelines.  These were used to build documentation after
each merge to any of the maintained branches, to allow up-to-date
documentation to be subsequently published on the bind.isc.org
microsite.  As the latter no longer downloads documentation from GitLab,
instead linking to Read the Docs for all currently maintained branches,
post-merge pipelines have become redundant since running the
"autoreconf" and "docs" jobs after each merge is not necessary any more.
Drop the "release_branch_triggering_rules" YAML anchor and revert to
default triggering rules for the "autoconf" and "docs" jobs, effectively
preventing pipelines from being created after each merge to any of the
maintained branches.
2022-05-11 14:59:47 +02:00
Michał Kępień
07fd247aac Merge branch '565-do-not-trigger-gitlab-pages-pipelines-any-more' into 'main'
Do not trigger GitLab Pages pipelines any more

See merge request isc-projects/bind9!6285
2022-05-11 12:10:48 +00:00
Michał Kępień
59c8321ac9 Do not set up ccache in CI jobs building docs
Building documentation for Automake-based BIND 9 versions does not
require running "make all" beforehand.  Drop ccache setup code from the
definitions of GitLab CI jobs building documentation as it is redundant.
2022-05-11 14:10:17 +02:00
Michał Kępień
a7fccaee82 Do not trigger GitLab Pages pipelines any more
The bind.isc.org microsite no longer downloads documentation from
GitLab, instead linking to Read the Docs for all currently maintained
branches.  This makes it redundant to trigger GitLab Pages pipelines
after each merge to any of the maintained branches.  Revert changes
introduced by commit 31bde118db8cae4a0f5a9484e3beead66fcc24d0: remove
the "push:docs" job along with the "push" stage it is associated with
and revert artifact expiry time for the "docs" job to the default value.
2022-05-11 14:10:17 +02:00
Matthijs Mekking
df29698807 Merge branch '3335-confusing-parental-source-documentation' into 'main'
Remove confusing parental-source line

Closes #3335

See merge request isc-projects/bind9!6272
2022-05-11 11:17:54 +00:00
Matthijs Mekking
313f606692 Remove confusing parental-source line
Remove the line "This address must appear in the secondary server’s
parental-agents zone clause". This line is a copy paste error from
notify-source.

Rewrap.
2022-05-11 12:36:16 +02:00
Petr Špaček
dd3d5af48c Merge branch 'pspacek/arm-remove-solaris251' into 'main'
Remove ARM notes about Solaris 2.5.1

See merge request isc-projects/bind9!6269
2022-05-11 09:02:29 +00:00
Petr Špaček
4388656f60
Remove ARM notes about Solaris 2.5.1
It was released in May 1996 and hopefully is not used to run BIND
anymore.
2022-05-11 11:01:59 +02:00
Petr Špaček
7037253e12 Merge branch '3169-arm-restructuring' into 'main'
Restructure ARM

Closes #1223

See merge request isc-projects/bind9!6156
2022-05-11 09:01:01 +00:00
Suzanne Goldlust
8a3c4cbcdd
Add RPZ section to the ARM
Closes: #1223
2022-05-11 10:51:26 +02:00
Ron Aitchison
5d432d40a1
Rewrite Configurations and Zone Files section in the ARM 2022-05-11 10:51:26 +02:00
Ron Aitchison
178fc50b42
Tweak zones.inc.rst now separated from Reference section 2022-05-11 10:51:26 +02:00
Ron Aitchison
d505090965
Move zone file material from Reference to new subsection of chapter 3 2022-05-11 10:51:26 +02:00
Ron Aitchison
4ac383e9ae
Minor DNSSEC guide tweaks 2022-05-11 10:51:26 +02:00
Ron Aitchison
7842a0ca8f
Restructure includes for chapter 9 Troubleshooting 2022-05-11 10:51:26 +02:00
Ron Aitchison
25eb91d23c
Split chapter Advanced DNS Features in the ARM into chapters 5, 6, 7 2022-05-11 10:51:26 +02:00
Ron Aitchison
cd1c230ff6
Split Configuration chapter in the ARM into chapters 3 and 4 2022-05-11 10:51:26 +02:00
Ron Aitchison
63e12b511f
Add new ARM section Installing BIND 9 2022-05-11 10:51:26 +02:00
Ron Aitchison
0951922028
Rewrite Introduction chapters of the ARM 2022-05-11 10:51:26 +02:00
Petr Špaček
647318c9b7
License PNG and DIA images in the ARM under MPL-2.0 as usual 2022-05-11 10:51:26 +02:00