]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoSelect the appropriate namespace when using a dual stack server
Mark Andrews [Mon, 17 Oct 2022 23:02:08 +0000 (10:02 +1100)] 
Select the appropriate namespace when using a dual stack server

When using dual-stack-servers the covering namespace to check whether
answers are in scope or not should be fctx->domain.  To do this we need
to be able to distingish forwarding due to forwarders clauses and
dual-stack-servers.  A new flag FCTX_ADDRINFO_DUALSTACK has been added
to signal this.

3 years agoMerge branch '1905-check-wildcard-in-checkconf-z' into 'main'
Mark Andrews [Wed, 16 Nov 2022 22:55:00 +0000 (22:55 +0000)] 
Merge branch '1905-check-wildcard-in-checkconf-z' into 'main'

Fix 'named-checkconf -z' was ignoring check-wildcard settings in named.conf

See merge request isc-projects/bind9!7063

3 years agoCheck 'named-checkconf -z' and check-wildcard
Mark Andrews [Wed, 9 Nov 2022 11:12:20 +0000 (11:12 +0000)] 
Check 'named-checkconf -z' and check-wildcard

Add tests to check the behavior of 'named-checkconf -z' and
check-wildcard setting in named.conf.

3 years agonamed-checkzone -z ignored the check-wildcard option
Mark Andrews [Wed, 9 Nov 2022 09:50:32 +0000 (09:50 +0000)] 
named-checkzone -z ignored the check-wildcard option

Lookup and set the wildcard option according to the configuration
settings.  The default is on as per bin/named/config.c.

3 years agoMerge tag 'v9_19_7'
Michal Nowak [Wed, 16 Nov 2022 14:10:51 +0000 (15:10 +0100)] 
Merge tag 'v9_19_7'

BIND 9.19.7

3 years agoMerge branch 'mnowak/openbsd-7.2' into 'main'
Michal Nowak [Tue, 15 Nov 2022 07:31:46 +0000 (07:31 +0000)] 
Merge branch 'mnowak/openbsd-7.2' into 'main'

Add OpenBSD 7.2

See merge request isc-projects/bind9!7034

3 years agoAdd OpenBSD 7.2
Michal Nowak [Fri, 4 Nov 2022 13:20:41 +0000 (14:20 +0100)] 
Add OpenBSD 7.2

3 years agoMerge branch '2265-fix-and-check-bashisms' into 'main'
Michal Nowak [Mon, 14 Nov 2022 19:59:19 +0000 (19:59 +0000)] 
Merge branch '2265-fix-and-check-bashisms' into 'main'

Fix and check bashisms in system test

Closes #2265

See merge request isc-projects/bind9!6630

3 years agoAdd checkbashisms CI job
Michal Nowak [Tue, 2 Aug 2022 14:56:48 +0000 (16:56 +0200)] 
Add checkbashisms CI job

3 years agoReplace "sha1sum" with "openssl sha1 -r"
Michal Nowak [Thu, 8 Sep 2022 17:31:58 +0000 (19:31 +0200)] 
Replace "sha1sum" with "openssl sha1 -r"

"sha1sum" is part of GNU Coreutils, neither BIND 9 dependency nor POSIX.
Replace it with "openssl sha1 -r" as OpenSSL is BIND 9 dependency.

3 years agoRename $HOSTNAME to $HOST_NAME to silence checkbashisms
Michal Nowak [Thu, 8 Sep 2022 15:12:46 +0000 (17:12 +0200)] 
Rename $HOSTNAME to $HOST_NAME to silence checkbashisms

checkbashisms warns about possible reliance on HOSTNAME environmental
variable which Bash sets to the name of the current host, and some
commands may leverage it:

    possible bashism in builtin/tests.sh line 199 ($HOST(TYPE|NAME)):
    grep "^\"$HOSTNAME\"$" dig.out.ns1.$n > /dev/null || ret=1
    possible bashism in builtin/tests.sh line 221 ($HOST(TYPE|NAME)):
    grep "^\"$HOSTNAME\"$" dig.out.ns2.$n > /dev/null || ret=1
    possible bashism in builtin/tests.sh line 228 ($HOST(TYPE|NAME)):
    grep "^; NSID: .* (\"$HOSTNAME\")$" dig.out.ns2.$n > /dev/null || ret=1

We don't use the variable this way but rename it to HOST_NAME to silence
the tool.

3 years agoRemove no-op assignment from kasp/tests.sh
Michal Nowak [Wed, 3 Aug 2022 09:03:05 +0000 (11:03 +0200)] 
Remove no-op assignment from kasp/tests.sh

"next_key_event_threshold" is assigned with
"next_key_event_threshold+i", but "i" is empty (never set, nor used
afterwards).

posh, the Policy-compliant Ordinary SHell, failed on this assignment
with:

    tests.sh:253: : unexpected `end of expression'

3 years agoRemove unused $@ array from cds/setup.sh
Michal Nowak [Wed, 3 Aug 2022 08:58:58 +0000 (10:58 +0200)] 
Remove unused $@ array from cds/setup.sh

posh, the Policy-compliant Ordinary SHell, failed with:

    setup.sh:57: @: parameter not set

3 years agoDrop interpolated string replacement
Michal Nowak [Tue, 2 Aug 2022 13:44:16 +0000 (15:44 +0200)] 
Drop interpolated string replacement

Interpolated string is Bashism:

    possible bashism in bin/tests/system/engine_pkcs11/setup.sh line 34 ($'...' should be "$(printf '...')"):
            pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-engine_pkcs11" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id 2> pkcs11-tool.err.$zone.$id || return 1
    possible bashism in bin/tests/system/engine_pkcs11/setup.sh line 34 (${parm/?/pat[/str]}):
            pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-engine_pkcs11" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id 2> pkcs11-tool.err.$zone.$id || return 1
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 27 ($'...' should be "$(printf '...')"):
            pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-keyfromlabel" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id || return 1
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 27 (${parm/?/pat[/str]}):
            pkcs11-tool --module $SOFTHSM2_MODULE --token-label "softhsm2-keyfromlabel" -l -k --key-type $type:$bits --label "${label}" --id "${p11id//$'\n'/}" --pin $(cat $PWD/pin) > pkcs11-tool.out.$zone.$id || return 1

The replacement is actually not needed as $p11id holds only one line.

Also see https://www.shellcheck.net/wiki/SC3003 and
https://www.shellcheck.net/wiki/SC3060.

3 years agoJoin two rndc lines not to confuse checkbashisms
Michal Nowak [Tue, 2 Aug 2022 13:36:26 +0000 (15:36 +0200)] 
Join two rndc lines not to confuse checkbashisms

checkbashisms gets confused by the rndc command being on two lines:

    possible bashism in bin/tests/system/nzd2nzf/tests.sh line 37 (type):
    rndccmd 10.53.0.1 addzone "added.example { type primary; file \"added.db\";

3 years agoReplace string comparisons with integer comparisons
Michal Nowak [Tue, 2 Aug 2022 13:07:49 +0000 (15:07 +0200)] 
Replace string comparisons with integer comparisons

checkbashisms reports Bash-style ("==") string comparisons inside test/[
command:

    possible bashism in bin/tests/system/checkconf/tests.sh line 105 (should be 'b = a'):
                    if [ $? == 0 ]; then echo_i "failed"; ret=1; fi
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 62 (should be 'b = a'):
                    test $ret == 0 || continue
    possible bashism in bin/tests/system/keyfromlabel/tests.sh line 79 (should be 'b = a'):
                    test $ret == 0 || continue

3 years agoAdd shell interpreter line where missing
Michal Nowak [Tue, 2 Aug 2022 13:01:01 +0000 (15:01 +0200)] 
Add shell interpreter line where missing

The checkbashisms script reports errors like this one:

    script util/check-line-length.sh does not appear to have a #! interpreter line;
    you may get strange results

3 years agoMerge branch '3676-deprecate-operating-system-resource-limits' into 'main'
Ondřej Surý [Mon, 14 Nov 2022 17:18:52 +0000 (17:18 +0000)] 
Merge branch '3676-deprecate-operating-system-resource-limits' into 'main'

Deprecate setting operating system limits from named.conf

Closes #3676

See merge request isc-projects/bind9!7078

3 years agoAdd CHANGES and release note [GL #3676]
Ondřej Surý [Sun, 13 Nov 2022 09:20:00 +0000 (10:20 +0100)] 
Add CHANGES and release note [GL #3676]

3 years agoDeprecate setting operating system limits from named.conf
Ondřej Surý [Sun, 13 Nov 2022 09:12:52 +0000 (10:12 +0100)] 
Deprecate setting operating system limits from named.conf

It was possible to set operating system limits (RLIMIT_DATA,
RLIMIT_STACK, RLIMIT_CORE and RLIMIT_NOFILE) from named.conf.  It's
better to leave these untouched as setting these is responsibility of
the operating system and/or supervisor.

Deprecate the configuration options and remove them in future BIND 9
release.

3 years agoMerge branch '3664-remote-with-tuning-large' into 'main'
Ondřej Surý [Mon, 14 Nov 2022 09:03:28 +0000 (09:03 +0000)] 
Merge branch '3664-remote-with-tuning-large' into 'main'

Remove the last remnants of --with-tuning=large

Closes #3664

See merge request isc-projects/bind9!7052

3 years agoAdd CHANGES and release note for [GL #3664]
Ondřej Surý [Tue, 8 Nov 2022 11:54:03 +0000 (12:54 +0100)] 
Add CHANGES and release note for [GL #3664]

3 years agoUpdate the build requirements in the ARM
Ondřej Surý [Fri, 11 Nov 2022 15:39:35 +0000 (16:39 +0100)] 
Update the build requirements in the ARM

The build requirements have been updated to state that libcap is now
required on Linux and removed mention of --with-tuning configure option.

3 years agoRemove the last remnants of --with-tuning=large
Ondřej Surý [Tue, 8 Nov 2022 11:46:50 +0000 (12:46 +0100)] 
Remove the last remnants of --with-tuning=large

The small/large tuning has been completely removed from the code with
last remnant of the dead code in ns_interfacemgr.  Remove the dead code
and the configure option.

3 years agoMerge branch '3468-statistics-xml-rendering-does-not-seem-to-protect-against-concurre...
Mark Andrews [Fri, 11 Nov 2022 15:56:04 +0000 (15:56 +0000)] 
Merge branch '3468-statistics-xml-rendering-does-not-seem-to-protect-against-concurrent-changes' into 'main'

Resolve "Statistics XML rendering does not seem to protect against concurrent changes"

Closes #3468

See merge request isc-projects/bind9!6695

3 years agoAdd CHANGES note for [GL #3468]
Mark Andrews [Wed, 24 Aug 2022 02:52:49 +0000 (12:52 +1000)] 
Add CHANGES note for [GL #3468]

3 years agoHave dns_zt_apply lock the zone table
Mark Andrews [Wed, 24 Aug 2022 02:21:50 +0000 (12:21 +1000)] 
Have dns_zt_apply lock the zone table

There were a number of places where the zone table should have been
locked, but wasn't, when dns_zt_apply was called.

Added a isc_rwlocktype_t type parameter to dns_zt_apply and adjusted
all calls to using it.  Removed locks in callers.

3 years agoMerge branch 'matthijs-tweak-kasp-test' into 'main'
Matthijs Mekking [Fri, 11 Nov 2022 14:03:46 +0000 (14:03 +0000)] 
Merge branch 'matthijs-tweak-kasp-test' into 'main'

Tweak kasp system test script

See merge request isc-projects/bind9!7064

3 years agoTweak kasp system test script
Matthijs Mekking [Wed, 9 Nov 2022 13:45:06 +0000 (14:45 +0100)] 
Tweak kasp system test script

The retry 3 times when checking signatures did not make sense because
at this point the input file does not change.

Raise the number of retries when checking the apex DNSKEY response to
reduce the number of intermittent failures due to unexpected delays.

3 years agoMerge branch 'mnowak/add-git-fsck' into 'main'
Michal Nowak [Fri, 11 Nov 2022 13:39:01 +0000 (13:39 +0000)] 
Merge branch 'mnowak/add-git-fsck' into 'main'

Verify Git repo validity

See merge request isc-projects/bind9!7048

3 years agoVerify Git repo validity
Michal Nowak [Mon, 7 Nov 2022 16:50:10 +0000 (17:50 +0100)] 
Verify Git repo validity

This check should help catching issues like [1] early.

[1] https://gitlab.isc.org/isc-projects/bind9/-/wikis/%22main%22-branch-partial-history-rewrite-in-August-2022

3 years agoMerge branch '3570-nsec3param-ttl-default-soa-minimum' into 'main'
Matthijs Mekking [Fri, 11 Nov 2022 11:07:15 +0000 (11:07 +0000)] 
Merge branch '3570-nsec3param-ttl-default-soa-minimum' into 'main'

Change default NSEC3PARAM TTL

Closes #3570

See merge request isc-projects/bind9!6897

3 years agoTest NSEC3PARAM TTL is not preserved
Matthijs Mekking [Fri, 14 Oct 2022 10:02:26 +0000 (12:02 +0200)] 
Test NSEC3PARAM TTL is not preserved

Now that we are setting the NSEC3PARAM TTL to SOA MINIMUM, we should
not preserve the TTL, otherwise a SOA MINIMUM change would not be
picked up.

3 years agoAdd change and release note for #3570
Matthijs Mekking [Wed, 12 Oct 2022 14:39:05 +0000 (16:39 +0200)] 
Add change and release note for #3570

Feature change.

3 years agoChange default TTL of NSEC3PARAM to SOA MINIMUM
Matthijs Mekking [Wed, 12 Oct 2022 14:24:13 +0000 (16:24 +0200)] 
Change default TTL of NSEC3PARAM to SOA MINIMUM

Despite the RFC says that the NSEC3PARAM is not something that is
intended for the resolver to be cached, and thus the TTL of 0 is most
logical, a zero TTL RRset can be abused by bad actors.

Change the default to SOA MINIMUM.

3 years agoAdd test that checks NSEC3PARAM TTL
Matthijs Mekking [Wed, 12 Oct 2022 14:23:11 +0000 (16:23 +0200)] 
Add test that checks NSEC3PARAM TTL

The TTL should be equal to the SOA MINIMUM by default.

3 years agoMerge branch 'ondrej-dns_view-resolver-can-be-NULL' into 'main'
Ondřej Surý [Fri, 11 Nov 2022 10:49:35 +0000 (10:49 +0000)] 
Merge branch 'ondrej-dns_view-resolver-can-be-NULL' into 'main'

Don't use view->resolver directly when priming in dns_view_find()

See merge request isc-projects/bind9!7065

3 years agoCheck view->adb in dns_view_flushcache()
Ondřej Surý [Thu, 10 Nov 2022 08:30:52 +0000 (09:30 +0100)] 
Check view->adb in dns_view_flushcache()

The call to dns_view_flushcache() is done under exclusive mode, but we
still need to check if view->adb is still attached before calling
dns_adb_flush() because the shutdown might have been already
initialized.  This most likely only a theoretical problem on shutdown
because there's either no way how to initiate cache flush when shutting
down or very slim window where the `rndc flush` would have to hit the
slim time during named shutdown.

3 years agoDon't use view->resolver directly when priming in dns_view_find()
Ondřej Surý [Wed, 9 Nov 2022 17:04:23 +0000 (18:04 +0100)] 
Don't use view->resolver directly when priming in dns_view_find()

When starting priming from dns_view_find(), the dns_view shutdown could
be initiated by different thread, detaching from the resolver.  Use
dns_view_getresolver() to attach to the resolver under view->lock, so we
don't try to call dns_resolver_prime() with NULL pointer.

There are more accesses to view->resolver, (and also view->adb and
view->requestmgr that suffer from the same problem) in the dns_view
module, but they are all done in exclusive mode or under a view->lock.

3 years agoMerge branch '3669-update-policy-external-synchronous-doc' into 'main'
Petr Špaček [Fri, 11 Nov 2022 09:37:40 +0000 (09:37 +0000)] 
Merge branch '3669-update-policy-external-synchronous-doc' into 'main'

Document that update-policy external is synchronous

See merge request isc-projects/bind9!7066

3 years agoDocument that update-policy external is synchronous
Petr Špaček [Thu, 10 Nov 2022 15:11:00 +0000 (16:11 +0100)] 
Document that update-policy external is synchronous

3 years agoMerge branch '3670-fix-http-headers-test' into 'main'
Ondřej Surý [Fri, 11 Nov 2022 09:23:43 +0000 (09:23 +0000)] 
Merge branch '3670-fix-http-headers-test' into 'main'

Update the HTTP headers test to check for 101 headers

Closes #3670

See merge request isc-projects/bind9!7070

3 years agoUpdate the HTTP headers test to check for 101 headers
Ondřej Surý [Fri, 11 Nov 2022 08:19:41 +0000 (09:19 +0100)] 
Update the HTTP headers test to check for 101 headers

When we bumped the number of allowed HTTP headers to 100, we forgot to
bump the number in the system test.  Bump the number in the system test
too.

3 years agoMerge branch '3670-bump-statschannel-headers' into 'main'
Ondřej Surý [Thu, 10 Nov 2022 18:27:44 +0000 (18:27 +0000)] 
Merge branch '3670-bump-statschannel-headers' into 'main'

Bump the allowed HTTP headers in statschannel to 100

Closes #3670

See merge request isc-projects/bind9!7068

3 years agoAdd CHANGES and release note for [GL #3670]
Ondřej Surý [Thu, 10 Nov 2022 15:41:25 +0000 (16:41 +0100)] 
Add CHANGES and release note for [GL #3670]

3 years agoBump the allowed HTTP headers in statschannel to 100
Ondřej Surý [Thu, 10 Nov 2022 15:34:26 +0000 (16:34 +0100)] 
Bump the allowed HTTP headers in statschannel to 100

Firefox 90+ apparently sends more than 10 headers, so we need to bump
the number to some higher number.  Bump it to 100 just to be on a save
side, this is for internal use only anyway.

3 years agoMerge branch 'ondrej-add-isc_hashmap' into 'main'
Ondřej Surý [Thu, 10 Nov 2022 14:08:30 +0000 (14:08 +0000)] 
Merge branch 'ondrej-add-isc_hashmap' into 'main'

Add isc_hashmap API that implements Robin Hood hashing

See merge request isc-projects/bind9!6790

3 years agoAdd CHANGES note for [GL !6790]
Ondřej Surý [Tue, 8 Nov 2022 08:53:23 +0000 (09:53 +0100)] 
Add CHANGES note for [GL !6790]

3 years agoUse isc_hashmap instead of isc_ht in the dns_resolver API
Ondřej Surý [Mon, 7 Nov 2022 14:37:30 +0000 (15:37 +0100)] 
Use isc_hashmap instead of isc_ht in the dns_resolver API

Replace the use of isc_ht API with isc_hashmap API in the dns_resolver
implementation.  This requires extending the fctxbucket_t structure to
include keysize and copy of the key because the isc_hashmap API needs
the raw key in case of resizing the hashmap table.

3 years agoUse isc_hashmap instead of isc_ht in the dns_adb API
Ondřej Surý [Mon, 27 Jun 2022 10:46:06 +0000 (12:46 +0200)] 
Use isc_hashmap instead of isc_ht in the dns_adb API

Replace the use of isc_ht API with isc_hashmap API in the dns_adb
database implementation.  This requires extending the
dns_adbnamebucket_t and dns_adbentrybucket_t structures to include
keysize and copy of the key because the isc_hashmap API needs the raw
key in case of resizing the hashmap table.

3 years agoAdd isc_hashmap API that implements Robin Hood hashing
Ondřej Surý [Fri, 24 Jun 2022 06:32:12 +0000 (08:32 +0200)] 
Add isc_hashmap API that implements Robin Hood hashing

Add new isc_hashmap API that differs from the current isc_ht API in
several aspects:

1. It implements Robin Hood Hashing which is open-addressing hash table
   algorithm (e.g. no linked-lists)

2. No memory allocations - the array to store the nodes is made of
   isc_hashmap_node_t structures instead of just pointers, so there's
   only allocation on resize.

3. The key is not copied into the hashmap node and must be also stored
   externally, either as part of the stored value or in any other
   location that's valid as long the value is stored in the hashmap.

This makes the isc_hashmap_t a little less universal because of the key
storage requirements, but the inserts and deletes are faster because
they don't require memory allocation on isc_hashmap_add() and memory
deallocation on isc_hashmap_delete().

3 years agoMerge branch '3630-nextpart-is-not-compatible-with-set-x' into 'main'
Mark Andrews [Tue, 8 Nov 2022 16:42:13 +0000 (16:42 +0000)] 
Merge branch '3630-nextpart-is-not-compatible-with-set-x' into 'main'

Resolve "'nextpart' is not compatible with 'set -x'"

Closes #3630

See merge request isc-projects/bind9!6995

3 years agoUse file descriptor 3 to save file.prev
Mark Andrews [Wed, 5 Oct 2022 06:12:16 +0000 (17:12 +1100)] 
Use file descriptor 3 to save file.prev

If 'set -x' is in effect file.prev gets populated with debugging output.
To prevent this open descriptor 3 and redirect stderr from the awk
command to descriptor 3. Debugging output will stay directed to stderr.

3 years agoMerge branch 'tkrizek/danger-approve' into 'main'
Tom Krizek [Tue, 8 Nov 2022 13:37:33 +0000 (13:37 +0000)] 
Merge branch 'tkrizek/danger-approve' into 'main'

ci: add danger checks - approve workflow & wip commits

Closes #3651

See merge request isc-projects/bind9!7041

3 years agoCheck for cherry pick message in backport commits in danger CI
Tom Krizek [Tue, 8 Nov 2022 09:53:09 +0000 (10:53 +0100)] 
Check for cherry pick message in backport commits in danger CI

Using the -x option for cherry pick makes it easy to link commits across
branches and it is recommended to use for all backport commits (with
exceptions -- thus a warning level rather than failure).

3 years agoDetect work-in-progress commits in danger CI
Tom Krizek [Mon, 7 Nov 2022 13:18:55 +0000 (14:18 +0100)] 
Detect work-in-progress commits in danger CI

To avoid accidentally merging unfinished work, detect prohibited
keywords at the start of the subject line. If the first word is any of
the following, fail the check:
WIP, wip, DROP, drop, TODO, todo

The only slightly controversial is the lowercase "drop" which might have
a legitimate use - seems like four commits in the history used it as a
start of a sentence. However, since people commonly use "drop" to
indicate a commit should be dropped before merging, let's prohibit it as
well. In case of false-positive, "Drop" with a capitalized first letter
can always be used.

3 years agoUse approve button workflow in danger CI
Tom Krizek [Fri, 4 Nov 2022 12:05:29 +0000 (13:05 +0100)] 
Use approve button workflow in danger CI

Since the LGTM label was deprecated in favor of using the Approve button
in gitlab, adjust the detection in danger bot.

Unfortunately, danger-python seems no longer maintained since 2020 and
MR approvals aren't available in its Python API (even though they're
supported in its Ruby/JS APIs). Going forward, let's use the more
comprehensive python-gitlab API.

It still makes sense to utilize the danger-python, since it handles the
integration with gitlab which doesn't need to be reimplemented as long
as it works - same with the other checks.

3 years agoMerge branch 'ondrej-name-loop-memory-contexts' into 'main'
Ondřej Surý [Tue, 8 Nov 2022 12:33:17 +0000 (12:33 +0000)] 
Merge branch 'ondrej-name-loop-memory-contexts' into 'main'

Properly name the loop->mctx

See merge request isc-projects/bind9!7046

3 years agoProperly name the loop->mctx
Ondřej Surý [Fri, 4 Nov 2022 14:03:22 +0000 (15:03 +0100)] 
Properly name the loop->mctx

The per loop memory context were unnamed, properly name them as
'loop<tid>'.

3 years agoMerge branch 'michal/set-up-version-and-release-notes-for-bind-9.19.8' into 'main'
Michał Kępień [Tue, 8 Nov 2022 12:30:09 +0000 (12:30 +0000)] 
Merge branch 'michal/set-up-version-and-release-notes-for-bind-9.19.8' into 'main'

Set up version and release notes for BIND 9.19.8

See merge request isc-projects/bind9!7053

3 years agoSet up release notes for BIND 9.19.8
Michał Kępień [Tue, 8 Nov 2022 12:21:29 +0000 (13:21 +0100)] 
Set up release notes for BIND 9.19.8

3 years agoUpdate BIND version to 9.19.8-dev
Michał Kępień [Tue, 8 Nov 2022 12:21:29 +0000 (13:21 +0100)] 
Update BIND version to 9.19.8-dev

3 years agoUpdate BIND version for release v9.19.7
Michał Kępień [Mon, 7 Nov 2022 21:17:02 +0000 (22:17 +0100)] 
Update BIND version for release

3 years agoAdd a CHANGES marker
Michał Kępień [Mon, 7 Nov 2022 21:17:02 +0000 (22:17 +0100)] 
Add a CHANGES marker

3 years agoMerge branch 'michal/prepare-documentation-for-bind-9.19.7' into 'v9_19_7-release'
Michał Kępień [Mon, 7 Nov 2022 21:14:43 +0000 (21:14 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.19.7' into 'v9_19_7-release'

Prepare documentation for BIND 9.19.7

See merge request isc-private/bind9!471

3 years agoAdd release note for GL #3661
Michał Kępień [Mon, 7 Nov 2022 21:07:08 +0000 (22:07 +0100)] 
Add release note for GL #3661

3 years agoAdd release note for GL #3603
Michał Kępień [Mon, 7 Nov 2022 21:07:08 +0000 (22:07 +0100)] 
Add release note for GL #3603

3 years agoAdd release note for GL #3247
Michał Kępień [Mon, 7 Nov 2022 21:07:08 +0000 (22:07 +0100)] 
Add release note for GL #3247

3 years agoReorder release notes
Michał Kępień [Mon, 7 Nov 2022 21:07:08 +0000 (22:07 +0100)] 
Reorder release notes

3 years agoTweak and reword release notes
Michał Kępień [Mon, 7 Nov 2022 21:07:08 +0000 (22:07 +0100)] 
Tweak and reword release notes

3 years agoPrepare release notes for BIND 9.19.7
Michał Kępień [Mon, 7 Nov 2022 21:07:08 +0000 (22:07 +0100)] 
Prepare release notes for BIND 9.19.7

3 years agoRemove CHANGES entry 6012
Michał Kępień [Mon, 7 Nov 2022 21:07:08 +0000 (22:07 +0100)] 
Remove CHANGES entry 6012

The code change that entry 6012 describes (introduced in commit
be204bf4c7712d0f31aac0a7725e54e3a7786507) was reverted shortly after (in
commit c429b52533e4e454905fb1507ddee8f87472e152).  Remove that entry
from CHANGES as it is misleading.

3 years agoMerge branch 'pspacek/doc-known-issues-reshuffle' into 'main'
Michał Kępień [Mon, 7 Nov 2022 13:42:13 +0000 (13:42 +0000)] 
Merge branch 'pspacek/doc-known-issues-reshuffle' into 'main'

Repeat Known Issues at the top of Release Notes page

See merge request isc-projects/bind9!7040

3 years agoRepeat Known Issues at the top of Release Notes page
Petr Špaček [Mon, 7 Nov 2022 13:03:15 +0000 (14:03 +0100)] 
Repeat Known Issues at the top of Release Notes page

From now on all per-version notes link to the global list
of Known Issues. If there is a new note it should be listed twice:
In the per-version list, and in the global list.

3 years agoMerge branch '3652-reference-manual-update-policies-unmatched-parenthesis' into ...
Michał Kępień [Mon, 7 Nov 2022 12:48:41 +0000 (12:48 +0000)] 
Merge branch '3652-reference-manual-update-policies-unmatched-parenthesis' into 'main'

Resolve "reference manual update-policies unmatched parenthesis"

Closes #3652

See merge request isc-projects/bind9!7030

3 years agoAdd missing closing ')' to update-policy documentation
Mark Andrews [Fri, 4 Nov 2022 06:03:44 +0000 (06:03 +0000)] 
Add missing closing ')' to update-policy documentation

The opening '(' before local was not being matched by a closing
')' after the closing '};'.

3 years agoMerge branch '3654-main-doesn-t-compile-on-macos' into 'main'
Mark Andrews [Fri, 4 Nov 2022 10:36:40 +0000 (10:36 +0000)] 
Merge branch '3654-main-doesn-t-compile-on-macos' into 'main'

Resolve "Main doesn't compile on MacOS"

Closes #3654

See merge request isc-projects/bind9!7031

3 years agoFix local getresuid and getresuid implementations
Mark Andrews [Fri, 4 Nov 2022 06:21:31 +0000 (06:21 +0000)] 
Fix local getresuid and getresuid implementations

3 years agoMerge branch '3645-dont-release-the-read-lock-when-iterating' into 'main'
Ondřej Surý [Thu, 3 Nov 2022 14:30:49 +0000 (14:30 +0000)] 
Merge branch '3645-dont-release-the-read-lock-when-iterating' into 'main'

Don't release the tree read lock in dereference_iter_node()

Closes #3645

See merge request isc-projects/bind9!7023

3 years agoDon't release the tree read lock in dereference_iter_node()
Ondřej Surý [Thu, 3 Nov 2022 12:28:33 +0000 (13:28 +0100)] 
Don't release the tree read lock in dereference_iter_node()

Previously, the tree read lock could be upgraded to a write lock in
decrement_reference() and then downgraded back to read lock in
dereference_iter_node().  When the use of isc_rwlock_downgrade() was
removed, the downgrade was changed to a simple unlock+lock. This allows
some delete operations to sneak in and delete nodes that the iterator
expects to be in place.

Expand decrement_reference() so the caller can indicate whether the
tree read lock should be upgraded, and disallow the upgrade when
calling from dereference_iter_node(), so there will be no need to
release the lock afterward.

3 years agoMerge branch '3643-dont-use-dns_zone_attach-in-zone_refreshkeys' into 'main'
Ondřej Surý [Thu, 3 Nov 2022 13:53:07 +0000 (13:53 +0000)] 
Merge branch '3643-dont-use-dns_zone_attach-in-zone_refreshkeys' into 'main'

Don't use dns_zone_attach() in zone_refreshkeys()

Closes #3643

See merge request isc-projects/bind9!7022

3 years agoDon't use dns_zone_attach() in zone_refreshkeys()
Ondřej Surý [Thu, 3 Nov 2022 11:08:35 +0000 (12:08 +0100)] 
Don't use dns_zone_attach() in zone_refreshkeys()

The zone_refreshkeys() could run before the zone_shutdown(), but after
the last .erefs has been "detached" causing assertion failure when doing
dns_zone_attach().  Remove the use of .erefs (dns_zone_attach/detach)
and replace it with using the .irefs and additional checks whether the
zone is exiting in the callbacks.

3 years agoMerge branch '3591-nsec3-crash-dynamic-to-inline-signing' into 'main'
Matthijs Mekking [Thu, 3 Nov 2022 10:41:32 +0000 (10:41 +0000)] 
Merge branch '3591-nsec3-crash-dynamic-to-inline-signing' into 'main'

Fix crash where dnssec-policy zone with NSEC3 crashes when inline-signing is turned on

Closes #3591

See merge request isc-projects/bind9!6905

3 years agoAdd release note and change for GL #3591
Matthijs Mekking [Tue, 11 Oct 2022 10:13:19 +0000 (12:13 +0200)] 
Add release note and change for GL #3591

Breaking news.

3 years agoIf a zone is not reusable, trigger full sign
Matthijs Mekking [Tue, 11 Oct 2022 09:07:43 +0000 (11:07 +0200)] 
If a zone is not reusable, trigger full sign

If after a reconfig a zone is not reusable because inline-signing
was turned on/off, trigger a full resign. This is necessary because
otherwise the zone maintenance may decide to only apply the changes
in the journal, leaving the zone in an inconsistent DNSSEC state.

3 years agoDon't allow DNSSEC records in the raw zone
Matthijs Mekking [Mon, 10 Oct 2022 12:14:43 +0000 (14:14 +0200)] 
Don't allow DNSSEC records in the raw zone

There was an exception for dnssec-policy that allowed DNSSEC in the
unsigned version of the zone. This however causes a crash if the
zone switches from dynamic to inline-signing in the case of NSEC3,
because we are now trying to add an NSEC3 record to a non-NSEC3 node.
This is because BIND expects none of the records in the unsigned
version of the zone to be NSEC3.

Remove the exception for dnssec-policy when copying non DNSSEC
records, but do allow for DNSKEY as this may be a published DNSKEY
from a different provider.

3 years agoRemove checks when going to dnssec-policy none
Matthijs Mekking [Tue, 11 Oct 2022 09:21:35 +0000 (11:21 +0200)] 
Remove checks when going to dnssec-policy none

The changes in the code have the side effect that the CDNSKEY and CDS
records in the secure version of the zone are not reusable and thus
are thrashed from the zone. Remove the apex checks for this use case.
We only care about that the zone is not immediately goes bogus, but
a user really should use the built-in "insecure" policy when unsigning
a zone.

3 years agoAdd nsec3 system test that transfers in NSEC3
Matthijs Mekking [Tue, 11 Oct 2022 13:17:53 +0000 (15:17 +0200)] 
Add nsec3 system test that transfers in NSEC3

Similar to an attempt to add NSEC through dynamic update, add a test
case that tries to add NSEC3 through zone transfer.

3 years agoAdd two more nsec3 system tests
Matthijs Mekking [Tue, 11 Oct 2022 09:15:34 +0000 (11:15 +0200)] 
Add two more nsec3 system tests

Add one more case that tests reconfiguring a zone to turn off
inline-signing. It should still be a valid DNSSEC zone and the NSEC3
parameters should not change.

Add another test to ensure that you cannot update the zone with a
NSEC3 record.

3 years agoUpdate kasp system test to work with .signed files
Matthijs Mekking [Tue, 11 Oct 2022 09:11:13 +0000 (11:11 +0200)] 
Update kasp system test to work with .signed files

We no longer accept copying DNSSEC records from the raw zone to
the secure zone, so update the kasp system test that relies on this
accordingly.

Also add more debugging and store the dnssec-verify results in a file.

3 years agoTest changing from dynamic to inline-signing
Matthijs Mekking [Mon, 10 Oct 2022 11:26:47 +0000 (13:26 +0200)] 
Test changing from dynamic to inline-signing

Add a kasp system test that reconfigures a dnssec-policy zone from
maintaining DNSSEC records directly to the zone to using inline-signing.

Add a similar test case to the nsec3 system test, testing the same
thing but now with NSEC3 in use.

3 years agoMerge branch '3646-use-after-free-triggers-a-crash-in-reactivate_node' into 'main'
Ondřej Surý [Thu, 3 Nov 2022 08:09:28 +0000 (08:09 +0000)] 
Merge branch '3646-use-after-free-triggers-a-crash-in-reactivate_node' into 'main'

Don't cleanup the dead nodes when pruning the tree

Closes #3646

See merge request isc-projects/bind9!7018

3 years agoDon't cleanup the dead nodes when pruning the tree
Ondřej Surý [Thu, 3 Nov 2022 08:06:08 +0000 (09:06 +0100)] 
Don't cleanup the dead nodes when pruning the tree

The dead nodes might get reactivated during the db iterator walks the
version of the tree, so we can't cleanup the dead nodes while the db
version is open.  Restore the previous behaviour that cleaned up the
dead nodes when we are closing the version.

3 years agoMerge branch '3641-cleanup-dead_nodes-from-prune_tree' into 'main'
Ondřej Surý [Wed, 2 Nov 2022 18:08:42 +0000 (18:08 +0000)] 
Merge branch '3641-cleanup-dead_nodes-from-prune_tree' into 'main'

Cleanup the dead nodes when pruning the tree

Closes #3641

See merge request isc-projects/bind9!7012

3 years agoAdd CHANGES for [GL #3641]
Ondřej Surý [Wed, 2 Nov 2022 12:10:42 +0000 (13:10 +0100)] 
Add CHANGES for [GL #3641]

3 years agoCleanup the dead nodes when pruning the tree
Ondřej Surý [Wed, 2 Nov 2022 12:04:56 +0000 (13:04 +0100)] 
Cleanup the dead nodes when pruning the tree

While sending the node to prune_tree(), we can also cleanup dead nodes
because we already hold the tree and node bucket write locks.

3 years agoMerge branch 'ondrej-rework-pthread-rwlock-3' into 'main'
Ondřej Surý [Wed, 2 Nov 2022 09:56:33 +0000 (09:56 +0000)] 
Merge branch 'ondrej-rework-pthread-rwlock-3' into 'main'

Make the pthread_rwlock implementation header-only macros [3/3]

See merge request isc-projects/bind9!6909

3 years agoMake the pthread_rwlock implementation header-only macros [2/2]
Ondřej Surý [Fri, 14 Oct 2022 10:54:57 +0000 (12:54 +0200)] 
Make the pthread_rwlock implementation header-only macros [2/2]

While using mutrace, the phtread-rwlock based isc_rwlock implementation
would be all tracked in the rwlock.c unit losing all useful information
as all rwlocks would be traced in a single place.  Rewrite the
pthread_rwlock based implementation to be header-only macros, so we can
use mutrace to properly track the rwlock contention without heavily
patching mutrace to understand the libisc synchronization primitives.

3 years agoRemove one level of indirection from isc_rwlock [1/2]
Ondřej Surý [Fri, 14 Oct 2022 10:03:02 +0000 (12:03 +0200)] 
Remove one level of indirection from isc_rwlock [1/2]

Instead of checking the PTHREAD_RUNTIME_CHECK from the header, move it
to the pthread_rwlock implementation functions.  The internal isc_rwlock
actually cannot fail, so the checks in the header was useless anyway.

3 years agoMerge branch 'ondrej-rework-pthread-rwlock-2' into 'main'
Ondřej Surý [Wed, 2 Nov 2022 08:52:27 +0000 (08:52 +0000)] 
Merge branch 'ondrej-rework-pthread-rwlock-2' into 'main'

Remove isc_rwlock_downgrade() from isc_rwlock [2/3]

See merge request isc-projects/bind9!6908