]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
3 years agoDeprecate auto-dnssec
Matthijs Mekking [Fri, 11 Nov 2022 13:39:07 +0000 (14:39 +0100)] 
Deprecate auto-dnssec

Deprecate auto-dnssec, add specific log warning to migrate to
dnssec-policy.

3 years agoMerge branch 'mnowak/fedora-37' into 'main'
Michal Nowak [Mon, 21 Nov 2022 12:46:52 +0000 (12:46 +0000)] 
Merge branch 'mnowak/fedora-37' into 'main'

Add Fedora 37

See merge request isc-projects/bind9!7062

3 years agoAdd Fedora 37
Michal Nowak [Tue, 8 Nov 2022 19:04:02 +0000 (20:04 +0100)] 
Add Fedora 37

3 years agoMerge branch 'matthijs-remove-key-operations-after-update' into 'main'
Matthijs Mekking [Fri, 18 Nov 2022 10:24:35 +0000 (10:24 +0000)] 
Merge branch 'matthijs-remove-key-operations-after-update' into 'main'

Remove dynamic update DNSSEC management

Closes #3686

See merge request isc-projects/bind9!7043

3 years agoAdd CHANGES and release note for removed feature
Matthijs Mekking [Mon, 7 Nov 2022 13:47:33 +0000 (14:47 +0100)] 
Add CHANGES and release note for removed feature

Also mention that 'dnssec-secure-to-insecure' is obsoleted.

3 years agoObsolete dnssec-secure-to-insecure option
Matthijs Mekking [Mon, 7 Nov 2022 13:40:28 +0000 (14:40 +0100)] 
Obsolete dnssec-secure-to-insecure option

Now that the key management operations using dynamic updates feature
has been removed, the 'dnssec-secure-to-insecure' option has become
obsoleted.

3 years agoRemove dynamic update key management documentation
Matthijs Mekking [Mon, 7 Nov 2022 12:40:41 +0000 (13:40 +0100)] 
Remove dynamic update key management documentation

Remove the text from the ARM and DNSSEC guide that describes how to do
key and denial of existence operations using dynamic update. Add a new
section about DNSSEC multi-signer models, but no longer suggest using
dynamic update and auto-dnssec allow.

3 years agoRemove dynamic update key management code
Matthijs Mekking [Mon, 7 Nov 2022 12:31:34 +0000 (13:31 +0100)] 
Remove dynamic update key management code

Remove code that triggers key and denial of existence management
operations. Dynamic update should no longer be used to do DNSSEC
maintenance (other than that of course signatures need to be
created for the new zone contents).

3 years agoRemove dynamic update key management tests
Matthijs Mekking [Mon, 7 Nov 2022 12:24:08 +0000 (13:24 +0100)] 
Remove dynamic update key management tests

Remove test cases that rely upon key and denial of existence
management operations triggered by dynamic updates.

The autosign system test needed a bit more care than just removing
because the test cases are dependent on each other, so there are some
additional tweaks such as setting the NSEC3PARAM via rndc signing,
and renaming zone input files. In the process, some additional
debug output files have been added, and a 'ret' fail case overwrite
was fixed.

3 years agoMerge branch '3655-decompress-faster' into 'main'
Tony Finch [Thu, 17 Nov 2022 09:06:12 +0000 (09:06 +0000)] 
Merge branch '3655-decompress-faster' into 'main'

Simplify and speed up DNS name decompression

Closes #3655

See merge request isc-projects/bind9!7045

3 years agoFuzzing and benchmarking for dns_name_fromwire()
Tony Finch [Mon, 7 Nov 2022 16:22:48 +0000 (16:22 +0000)] 
Fuzzing and benchmarking for dns_name_fromwire()

Since this is very sensitive code which has often had security
problems in many DNS implementations, it needs a decent amount of
validation. This fuzzer ensures that the new code has the same output
as the old code, and that it doesn't take longer than a second.

The benchmark uses the fuzzer's copy of the old dns_name_fromwire()
code to compare a number of scenarios: many compression pointers, many
labels, long labels, random data, with/without downcasing.

3 years agoSimplify and speed up DNS name decompression
Tony Finch [Mon, 7 Nov 2022 14:00:45 +0000 (14:00 +0000)] 
Simplify and speed up DNS name decompression

The aim is to do less work per byte:

  * Check the bounds for each label, instead of checking the
    bounds for each character.

  * Instead of copying one character at a time from the wire to
    the name, copy entire runs of sequential labels using memmove()
    to make the most of its fast loop.

  * To remember where the name ends, we only need to set the end
    marker when we see a compression pointer or when we reach the
    root label. There is no need to check if we jumped back and
    conditionally update the counter for every character.

  * To parse a compression pointer, we no longer take a diversion
    around the outer loop in between reading the upper byte of the
    pointer and the lower byte.

  * The parser state machine is now implicit in the instruction
    pointer, instead of being an explicit variable. Similarly,
    when we reach the root label we break directly out of the loop
    instead of setting a second state machine variable.

  * DNS_NAME_DOWNCASE is never used with dns_name_fromwire() so
    that option is no longer supported.

I have removed this comment which dated from January 1999 when
dns_name_fromwire() was first introduced:

   /*
    * Note:  The following code is not optimized for speed, but
    * rather for correctness.  Speed will be addressed in the future.
    */

No functional change, apart from removing support for the unused
DNS_NAME_DOWNCASE option. The new code is about 2x faster than the
old code: best case 11x faster, worst case 1.4x faster.

3 years agoClean up remnants of label types
Tony Finch [Wed, 9 Nov 2022 16:51:34 +0000 (16:51 +0000)] 
Clean up remnants of label types

There were a few comments referring obliquely to different kinds of
labels, which became obsolete a long time ago.

3 years agoAvoid unspecified behaviour in name_test
Tony Finch [Wed, 9 Nov 2022 17:32:05 +0000 (17:32 +0000)] 
Avoid unspecified behaviour in name_test

C does not make any guarantees about the value of padding in a
structure, so bytewise comparison of two semantically equal structures
with padding can be spuriously non-equal due to non-equal padding
bytes.

Compare each member of name.attributes individually to avoid this
problem.

3 years agoMerge branch '3607-apex-in-name_external-may-be-invalid-when-using-dual-stack-servers...
Mark Andrews [Thu, 17 Nov 2022 01:50:10 +0000 (01:50 +0000)] 
Merge branch '3607-apex-in-name_external-may-be-invalid-when-using-dual-stack-servers' into 'main'

Resolve "apex in name_external may be invalid when using dual stack servers"

Closes #3607

See merge request isc-projects/bind9!6924

3 years agoAdd CHANGES note for [GL #3607]
Mark Andrews [Mon, 17 Oct 2022 23:46:48 +0000 (10:46 +1100)] 
Add CHANGES note for [GL #3607]

3 years agoAdd system test for dual-stack-servers with possible DNAME response
Mark Andrews [Wed, 19 Oct 2022 05:53:11 +0000 (16:53 +1100)] 
Add system test for dual-stack-servers with possible DNAME response

Create a zone that triggers DNAME owner name checks in a zone that
is only reachable using a dual stack server.  The answer contains
a name that is higher in the tree than the query name.

e.g.
foo.v4only.net. CNAME v4only.net.
v4only.net. A 10.0.0.1

ns4 is serving the test zone (ipv4-only)
ns6 is the root server for this test (dual stacked)
ns7 is acting as the dual stack server (dual stacked)
ns9 is the server under test (ipv6-only)

3 years agoSupport starting and stopping IPv6 only servers
Mark Andrews [Tue, 18 Oct 2022 01:19:35 +0000 (12:19 +1100)] 
Support starting and stopping IPv6 only servers

Look for $testdir/$server/named.ipv6-only and use
fd92:7065:b8e:ffff::$n instead of 10.53.0.$n to
communicate with the server.

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.