Commit Graph

37573 Commits

Author SHA1 Message Date
Mark Andrews
2001a0cdeb 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
2022-11-17 01:50:10 +00:00
Mark Andrews
8a2149f502 Add CHANGES note for [GL #3607] 2022-11-17 12:23:45 +11:00
Mark Andrews
f946133ec9 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)
2022-11-17 12:23:45 +11:00
Mark Andrews
a35c34e10f 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.
2022-11-17 12:23:45 +11:00
Mark Andrews
dfbffd77f9 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.
2022-11-17 12:23:45 +11:00
Mark Andrews
3921181e0d 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
2022-11-16 22:55:00 +00:00
Mark Andrews
708dadac59 Check 'named-checkconf -z' and check-wildcard
Add tests to check the behavior of 'named-checkconf -z' and
check-wildcard setting in named.conf.
2022-11-17 09:35:03 +11:00
Mark Andrews
dfc5c1e018 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.
2022-11-17 09:35:00 +11:00
Michal Nowak
0b5a58202e Merge tag 'v9_19_7'
BIND 9.19.7
2022-11-16 15:10:51 +01:00
Michal Nowak
736738a72c Merge branch 'mnowak/openbsd-7.2' into 'main'
Add OpenBSD 7.2

See merge request isc-projects/bind9!7034
2022-11-15 07:31:46 +00:00
Michal Nowak
b239e6870d Add OpenBSD 7.2 2022-11-15 08:06:37 +01:00
Michal Nowak
b1c273d73c 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
2022-11-14 19:59:19 +00:00
Michal Nowak
47a7c5123a Add checkbashisms CI job 2022-11-14 19:54:42 +00:00
Michal Nowak
d34c7ae227 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.
2022-11-14 19:54:42 +00:00
Michal Nowak
ae33a8ddea 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.
2022-11-14 19:54:42 +00:00
Michal Nowak
00c3b1e309 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'
2022-11-14 19:54:42 +00:00
Michal Nowak
02a4a95395 Remove unused $@ array from cds/setup.sh
posh, the Policy-compliant Ordinary SHell, failed with:

    setup.sh:57: @: parameter not set
2022-11-14 19:54:42 +00:00
Michal Nowak
ac3fcb612d 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.
2022-11-14 19:54:42 +00:00
Michal Nowak
9eb2f6b0e8 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\";
2022-11-14 19:54:42 +00:00
Michal Nowak
7640fc5b39 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
2022-11-14 19:54:42 +00:00
Michal Nowak
9e68997cbb 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
2022-11-14 19:54:42 +00:00
Ondřej Surý
845aa359a5 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
2022-11-14 17:18:52 +00:00
Ondřej Surý
65156afb8c Add CHANGES and release note [GL #3676] 2022-11-14 16:48:52 +01:00
Ondřej Surý
379929e052 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.
2022-11-14 16:48:52 +01:00
Ondřej Surý
9625426dd9 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
2022-11-14 09:03:28 +00:00
Ondřej Surý
24bda93dde Add CHANGES and release note for [GL #3664] 2022-11-14 10:01:36 +01:00
Ondřej Surý
76725718f4 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.
2022-11-14 10:01:20 +01:00
Ondřej Surý
0bf7014f85 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.
2022-11-14 10:01:20 +01:00
Mark Andrews
4613dca35b 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
2022-11-11 15:56:04 +00:00
Mark Andrews
a4383c906c Add CHANGES note for [GL #3468] 2022-11-11 15:26:46 +00:00
Mark Andrews
f053d5b414 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.
2022-11-11 15:26:11 +00:00
Matthijs Mekking
849785cc20 Merge branch 'matthijs-tweak-kasp-test' into 'main'
Tweak kasp system test script

See merge request isc-projects/bind9!7064
2022-11-11 14:03:46 +00:00
Matthijs Mekking
6ef0417274 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.
2022-11-11 15:02:44 +01:00
Michal Nowak
c6877fe053 Merge branch 'mnowak/add-git-fsck' into 'main'
Verify Git repo validity

See merge request isc-projects/bind9!7048
2022-11-11 13:39:01 +00:00
Michal Nowak
be83e203ce 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
2022-11-11 13:55:05 +01:00
Matthijs Mekking
9e6c449f7b Merge branch '3570-nsec3param-ttl-default-soa-minimum' into 'main'
Change default NSEC3PARAM TTL

Closes #3570

See merge request isc-projects/bind9!6897
2022-11-11 11:07:15 +00:00
Matthijs Mekking
16c827599f 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.
2022-11-11 12:06:33 +01:00
Matthijs Mekking
0f99020748 Add change and release note for #3570
Feature change.
2022-11-11 12:06:33 +01:00
Matthijs Mekking
53eab06083 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.
2022-11-11 12:06:33 +01:00
Matthijs Mekking
f51901eaca Add test that checks NSEC3PARAM TTL
The TTL should be equal to the SOA MINIMUM by default.
2022-11-11 12:06:33 +01:00
Ondřej Surý
9eaa7e7d37 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
2022-11-11 10:49:35 +00:00
Ondřej Surý
417097450a 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.
2022-11-11 11:47:44 +01:00
Ondřej Surý
a8ba240325 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.
2022-11-11 11:47:44 +01:00
Petr Špaček
54a425ab57 Merge branch '3669-update-policy-external-synchronous-doc' into 'main'
Document that update-policy external is synchronous

See merge request isc-projects/bind9!7066
2022-11-11 09:37:40 +00:00
Petr Špaček
7d352741a0 Document that update-policy external is synchronous 2022-11-11 10:32:14 +01:00
Ondřej Surý
ba5bd5f104 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
2022-11-11 09:23:43 +00:00
Ondřej Surý
9e5edb0b26 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.
2022-11-11 09:19:41 +01:00
Ondřej Surý
d1d0c93ac0 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
2022-11-10 18:27:44 +00:00
Ondřej Surý
c65666dc97 Add CHANGES and release note for [GL #3670] 2022-11-10 16:41:25 +01:00
Ondřej Surý
e4654d1a6a 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.
2022-11-10 16:34:26 +01:00