]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
2 years agoMerge branch '4096-uv-now' into 'main'
Ondřej Surý [Wed, 19 Jul 2023 13:32:47 +0000 (13:32 +0000)] 
Merge branch '4096-uv-now' into 'main'

add isc_loop_now() to get consistent time

Closes #4096

See merge request isc-projects/bind9!7989

2 years agouse isc_loop_now() for dispentry timeouts
Evan Hunt [Sun, 28 May 2023 02:20:47 +0000 (19:20 -0700)] 
use isc_loop_now() for dispentry timeouts

store a pointer to the running loop when creating a dispatch entry
with dns_dispatch_add(), and use isc_loop_now() to get the timestamp for
the current event loop tick when we initialize the dispentry start time
and check for timeouts.

2 years agoadd isc_loop_now() to get consistent time
Evan Hunt [Sat, 27 May 2023 08:42:46 +0000 (01:42 -0700)] 
add isc_loop_now() to get consistent time

isc_loop_now() is a front-end to uv_now(), returning the start
time of the current event loop tick.

2 years agoMerge branch 'aram/tests-statschannel-fetch.pl-typo' into 'main'
Arаm Sаrgsyаn [Wed, 19 Jul 2023 13:24:31 +0000 (13:24 +0000)] 
Merge branch 'aram/tests-statschannel-fetch.pl-typo' into 'main'

Fix a bug in an utility script for the statschannel system test

See merge request isc-projects/bind9!8108

2 years agoFix a bug in an utility script for the statschannel system test
Aram Sargsyan [Tue, 30 May 2023 15:13:22 +0000 (15:13 +0000)] 
Fix a bug in an utility script for the statschannel system test

Because of a typo, the fetch.pl script tries to extract the server
address from the input parameter 'a' instead of 's'. Fix the typo.

2 years agoMerge tag 'v9.19.15'
Tom Krizek [Wed, 19 Jul 2023 12:16:32 +0000 (14:16 +0200)] 
Merge tag 'v9.19.15'

2 years agoMerge branch 'ondrej/add-missing-headers-to-dns_rdataslab-header' into 'main'
Ondřej Surý [Wed, 19 Jul 2023 07:40:59 +0000 (07:40 +0000)] 
Merge branch 'ondrej/add-missing-headers-to-dns_rdataslab-header' into 'main'

Add missing headers to <dns/rdataslab.h>

See merge request isc-projects/bind9!8115

2 years agoAdd missing headers to <dns/rdataslab.h>
Ondřej Surý [Wed, 19 Jul 2023 06:50:17 +0000 (08:50 +0200)] 
Add missing headers to <dns/rdataslab.h>

The new header was not self-contained and required extra headers to be
included before including <dns/rdataslah.h>; rectify that.

2 years agoMerge branch 'mnowak/remove-windows-support-remnants' into 'main'
Michal Nowak [Tue, 18 Jul 2023 14:40:24 +0000 (14:40 +0000)] 
Merge branch 'mnowak/remove-windows-support-remnants' into 'main'

Remove remnants of Windows support in system test

See merge request isc-projects/bind9!8105

2 years agoRemove remnants of Windows support in system test
Michal Nowak [Mon, 17 Jul 2023 16:33:50 +0000 (18:33 +0200)] 
Remove remnants of Windows support in system test

The "uname -o" command is harmful on OpenBSD because this platform does
not know about the "-o" option. It is a permanent failure since system
tests are started with "set -e".

2 years agoMerge branch 'matthijs-dont-add-signing-records-on-dnskey-update' into 'main'
Matthijs Mekking [Tue, 18 Jul 2023 14:37:07 +0000 (14:37 +0000)] 
Merge branch 'matthijs-dont-add-signing-records-on-dnskey-update' into 'main'

Don't add signing records for DNSKEY added with dynamic update

See merge request isc-projects/bind9!8070

2 years agoAdd CHANGES entry
Matthijs Mekking [Mon, 17 Jul 2023 08:08:11 +0000 (10:08 +0200)] 
Add CHANGES entry

2 years agoDon't add signing records for dyn update DNSKEY
Matthijs Mekking [Thu, 29 Jun 2023 08:43:40 +0000 (10:43 +0200)] 
Don't add signing records for dyn update DNSKEY

We removed DNSSEC management via dynamic update (see issue #3686),
this means we also should no longer add signing records (of private
type) for DNSKEY records added via dynamic update.

2 years agoMerge branch 'tkrizek/readthedocs-config' into 'main'
Tom Krizek [Tue, 18 Jul 2023 13:32:14 +0000 (13:32 +0000)] 
Merge branch 'tkrizek/readthedocs-config' into 'main'

Add configuration for readthedocs.org

See merge request isc-projects/bind9!8101

2 years agoAdd configuration for readthedocs.org
Tom Krizek [Fri, 14 Jul 2023 11:14:49 +0000 (13:14 +0200)] 
Add configuration for readthedocs.org

readthedocs.org is switching to in-repo configuration file in favor of
the deprecated web interface as it allows more flexibility.

This also fixes our recent doc build issues, as we're switching to a
newer Python which is required by Sphinx.

See https://blog.readthedocs.com/migrate-configuration-v2/

2 years agoMerge branch '4185-reduce-the-recursion-in-query_lookup' into 'main'
Ondřej Surý [Tue, 18 Jul 2023 11:41:25 +0000 (11:41 +0000)] 
Merge branch '4185-reduce-the-recursion-in-query_lookup' into 'main'

Make the recursive query_lookup() call from query_gotanswer() async

Closes #4185

See merge request isc-projects/bind9!8073

2 years agoAdd CHANGES and release note for [GL #4185]
Ondřej Surý [Thu, 29 Jun 2023 12:51:51 +0000 (14:51 +0200)] 
Add CHANGES and release note for [GL #4185]

2 years agoMake query chain processing asynchronous
Evan Hunt [Thu, 29 Jun 2023 21:58:56 +0000 (14:58 -0700)] 
Make query chain processing asynchronous

Under some circumstances when processing a query response - for example,
when it contains a CNAME or DNAME - a query will have to be restarted
from the beginning to look up a new target.

This was previously handled by recursively calling the ns__query_start()
function directly from ns_query_done(). However, performance test data
indicated that chains of CNAMEs could consume quite a bit of time inside
the worker thread, increasing latency for other waiting queries.  This
has now been changed so that restarted queries are run asynchronously.

2 years agoMerge branch '4203-run-gdb-not-found' into 'main'
Mark Andrews [Tue, 18 Jul 2023 00:34:05 +0000 (00:34 +0000)] 
Merge branch '4203-run-gdb-not-found' into 'main'

Resolve "run.gdb not found"

Closes #4203

See merge request isc-projects/bind9!8091

2 years agoUse absolute path to locate run.gdb
Mark Andrews [Mon, 10 Jul 2023 03:02:22 +0000 (13:02 +1000)] 
Use absolute path to locate run.gdb

3 years agoMerge branch 'tkrizek/doth-test-curl-set-e' into 'main'
Tom Krizek [Mon, 17 Jul 2023 15:52:58 +0000 (15:52 +0000)] 
Merge branch 'tkrizek/doth-test-curl-set-e' into 'main'

Handle curl without HTTP/2 support in doth test

See merge request isc-projects/bind9!8104

3 years agoHandle curl without HTTP/2 support in doth test
Tom Krizek [Mon, 17 Jul 2023 14:28:49 +0000 (16:28 +0200)] 
Handle curl without HTTP/2 support in doth test

3 years agoMerge branch 'each-split-rbtdb' into 'main'
Ondřej Surý [Mon, 17 Jul 2023 12:50:50 +0000 (12:50 +0000)] 
Merge branch 'each-split-rbtdb' into 'main'

Split up rbtdb.c

See merge request isc-projects/bind9!7873

3 years agosplit out cache-specific functions
Evan Hunt [Sat, 13 May 2023 06:01:01 +0000 (23:01 -0700)] 
split out cache-specific functions

move cache-specific functions from rbtdb.c to rbt-cachedb.c.

3 years agosplit out zone-specific functions
Evan Hunt [Wed, 10 May 2023 06:07:50 +0000 (23:07 -0700)] 
split out zone-specific functions

move zone-specific functions from rbtdb.c to rbt-zonedb.c.

3 years agomove slab rdataset implementation to rdataslab.c
Evan Hunt [Wed, 10 May 2023 06:07:50 +0000 (23:07 -0700)] 
move slab rdataset implementation to rdataslab.c

ultimately we want the slab implementation of dns_rdataset to
be usable by more database implementaions than just rbtdb. this
commit moves rdataset_methods to rdataslab.c, renamed
dns_rdataslab_rdatasetmethods.

new database methods have been added: locknode, unlocknode,
addglue, expiredata, and deletedata, allowing external functions to
perform functions that previously required internal access to the
database implementation.

database and heap pointers are now stored in the dns_slabheader object
so that header is the only thing that needs to be passed to some
functions; this will simplify moving functions that process slabheaders
out of rbtdb.c so they can be used by other database implementations.

3 years agomove prototypes for common functions to rbtdb_p.h
Evan Hunt [Tue, 9 May 2023 00:44:12 +0000 (17:44 -0700)] 
move prototypes for common functions to rbtdb_p.h

rename the existing rbtdb.h to rbtdb_p.h, and start putting
macros and declarations of dns__rbtdb functions into it.

3 years agoclean up unused dns_db methods
Evan Hunt [Mon, 8 May 2023 18:47:18 +0000 (11:47 -0700)] 
clean up unused dns_db methods

to reduce the amount of common code that will need to be shared
between the separated cache and zone database implementations,
clean up unused portions of dns_db.

the methods dns_db_dump(), dns_db_isdnssec(), dns_db_printnode(),
dns_db_resigned(), dns_db_expirenode() and dns_db_overmem() were
either never called or were only implemented as nonoperational stub
functions: they have now been removed.

dns_db_nodefullname() was only used in one place, which turned out
to be unnecessary, so it has also been removed.

dns_db_ispersistent() and dns_db_transfernode() are used, but only
the default implementation in db.c was ever actually called. since
they were never overridden by database methods, there's no need to
retain methods for them.

in rbtdb.c, beginload() and endload() methods are no longer defined for
the cache database, because that was never used (except in a few unit
tests which can easily be modified to use the zone implementation
instead).  issecure() is also no longer defined for the cache database,
as the cache is always insecure and the default implementation of
dns_db_issecure() returns false.

for similar reasons, hashsize() is no longer defined for zone databases.

implementation functions that are shared between zone and cache are now
prepended with 'dns__rbtdb_' so they can become nonstatic.

serve_stale_ttl is now a common member of dns_db.

3 years agoclean up rbtdb.c
Evan Hunt [Thu, 11 May 2023 16:38:26 +0000 (09:38 -0700)] 
clean up rbtdb.c

in preparation for splitting up rbtdb.c, rename some types so they
can be defined in dns/types.h instead of only locally. these include:

- struct noqname, which is used to hold no-qname and closest-encloser
  proofs, and is now named dns_proof_t;
- rbtdb_rdatatype_t, which is used to hold a pair of rdatatypes and
  is now called dns_typepair_t and defined in rdatatype.h;
- rbtdb_serial_t, which is now just a uint32_t;
- rdatasetheader_t and rdatasetheaderlist_t, now called
  dns_slabheader_t and dns_slabheaderlist_t;
- rbtdb_version_t, now called dns_rbtdb_version_t.

the helper functions header_from_raw() and raw_from_header() are
renamed dns_slabheader_fromrdataset() and dns_slabheader_raw().

also made further style changes:
- fixing uninitialized pointer variables throughout rbtdb.c;
- switching some initializations to struct literals;
- renaming some functions and struct members more descriptively;
- replacing dns_db_secure_t with a simple bool since it no longer needs
  to be tri-valued.

3 years agoremove unused DNS_DBFIND options
Evan Hunt [Wed, 3 May 2023 03:56:25 +0000 (20:56 -0700)] 
remove unused DNS_DBFIND options

the DNS_DBFIND_VALIDATEGLUE and DNS_DBFIND_FORCENSEC options
were never set, so the code implementing them (which in the case
of _VALIDATEGLUE appears to have been quite outdated anyway) was
never reached. they have now been removed.

3 years agoGive the rdataset->privateN fields more helpful names
Tony Finch [Fri, 28 Apr 2023 00:12:39 +0000 (01:12 +0100)] 
Give the rdataset->privateN fields more helpful names

BIND's rdataset structure is a view of some DNS records. It is
polymorphic, so the details of how the records are stored can vary.
For instance, the records can be held in an rdatalist, or in an
rdataslab in the rbtdb.

The dns_rdataset structure previously had a number of fields called
`private1` up to `private7`, which were used by the various rdataset
implementations. It was not at all clear what these fields were for,
without reading the code and working it out from context.

This change makes the rdataset inheritance hierarchy more clear. The
polymorphic part of a `struct dns_rdataset` is now a union of structs,
each of which is named for the class of implementation using it. The
fields of these structs replace the old `privateN` fields. (Note: the
term "inheritance hierarchy" refers to the fact that the builtin and
SDLZ implementations are based on and inherit from the rdatalist
implementation, which in turn inherits from the generic rdataset.

Most of this change is mechanical, but there are a few extras.

In keynode.c there were a number of REQUIRE()ments that were not
necessary: they had already been checked by the rdataset method
dispatch code. On the other hand, In ncache.c there was a public
function which needed to REQUIRE() that an rdataset was valid.

I have removed lots of "reset iterator state" comments, because it
should now be clear from `target->iter = NULL` where before
`target->private5 = NULL` could have been doing anything.

Initialization is a bit neater in a few places, using C structure
literals where appropriate.

The pointer arithmetic for translating between an rdataslab header and
its raw contents is now fractionally safer.

3 years agorefactor the slab rdataset implementation
Evan Hunt [Tue, 25 Apr 2023 16:26:47 +0000 (17:26 +0100)] 
refactor the slab rdataset implementation

- use externally accessible functions for attachnode/detachnode
  so these functions can be moved outside rbtdb.c
- simplify and tidy up some other functions
- use struct initializers when appropriate
- remove the flag RDATASET_ATTR_RETAIN; it was never being set
- renamed the rdataset attributes to
- remove the 'slab_methods' rdataset implementation. this was
  a reduced set of slab rdataset methods, omitting 'setownercase()'
  and 'getownercase()'. we can get the identical result by using
  an DNS_RDATASETATTR_KEEPCASE attribute in rdatasets that
  shouldn't have their case modified, and then we only need one
  set of rdataset methods.

3 years agoMerge branch 'tkrizek/tkey-cleanup' into 'main'
Tom Krizek [Mon, 17 Jul 2023 09:07:28 +0000 (09:07 +0000)] 
Merge branch 'tkrizek/tkey-cleanup' into 'main'

Remove tkey test remnants

See merge request isc-projects/bind9!8102

3 years agoRemove tkey test remnants
Tom Krizek [Mon, 17 Jul 2023 08:36:09 +0000 (10:36 +0200)] 
Remove tkey test remnants

The tkey test was removed in bd4576b3cef88bcb78ae0dd7619019be4fdfb2ea
and the prereq.sh bit was accidentally added in
175d0c6d85f501c959d1371ab1017b95e27c528c

3 years agoMerge branch 'tkrizek/run-tests-with-set-e' into 'main'
Tom Krizek [Mon, 17 Jul 2023 08:19:01 +0000 (08:19 +0000)] 
Merge branch 'tkrizek/run-tests-with-set-e' into 'main'

Run system tests with set -e

See merge request isc-projects/bind9!8052

3 years agoCheck return codes from commands in inline test
Tom Krizek [Fri, 14 Jul 2023 15:10:58 +0000 (17:10 +0200)] 
Check return codes from commands in inline test

To improve the compatibility of the inline test with the `set -e`
option, ensure all commands which are expected to pass are explicitly
checked for return code and non-zero return codes are handled.

3 years agoIgnore test cleanup commits in git blame
Tom Krizek [Mon, 26 Jun 2023 16:42:29 +0000 (18:42 +0200)] 
Ignore test cleanup commits in git blame

3 years agoUse $(...) notation for subshells in system tests
Tom Krizek [Mon, 26 Jun 2023 16:35:04 +0000 (18:35 +0200)] 
Use $(...) notation for subshells in system tests

The changes were mostly done with sed:

find . -name '*.sh' | xargs sed -i 's/`\([^`]*\)`/$(\1)/g'

There have been a few manual changes where the regex wasn't sufficient
(e.g. backslashes inside the `...`) or wrong (`...` referring to docs or
in comments).

3 years agoHandle non-zero return codes in rootkeysentinel tests
Tom Krizek [Wed, 28 Jun 2023 09:12:13 +0000 (11:12 +0200)] 
Handle non-zero return codes in rootkeysentinel tests

3 years agoHandle non-zero return codes in resolver test
Tom Krizek [Tue, 27 Jun 2023 15:03:23 +0000 (17:03 +0200)] 
Handle non-zero return codes in resolver test

3 years agoHandle non-zero return codes in statschannel test
Tom Krizek [Thu, 22 Jun 2023 16:49:55 +0000 (18:49 +0200)] 
Handle non-zero return codes in statschannel test

3 years agoHandle non-zero return codes in checkconf test
Tom Krizek [Thu, 22 Jun 2023 15:34:44 +0000 (17:34 +0200)] 
Handle non-zero return codes in checkconf test

3 years agoHandle non-zero return codes in dnstap test
Tom Krizek [Thu, 22 Jun 2023 16:08:03 +0000 (18:08 +0200)] 
Handle non-zero return codes in dnstap test

3 years agoHandle non-zero return codes in kasp test
Tom Krizek [Thu, 22 Jun 2023 15:57:10 +0000 (17:57 +0200)] 
Handle non-zero return codes in kasp test

3 years agoHandle non-zero return codes in serve-stale test
Tom Krizek [Mon, 19 Jun 2023 15:45:40 +0000 (17:45 +0200)] 
Handle non-zero return codes in serve-stale test

3 years agoHandle non-zero return codes in doth test
Tom Krizek [Mon, 19 Jun 2023 15:25:29 +0000 (17:25 +0200)] 
Handle non-zero return codes in doth test

3 years agoHandle non-zero return codes in acl test
Tom Krizek [Mon, 19 Jun 2023 15:09:04 +0000 (17:09 +0200)] 
Handle non-zero return codes in acl test

3 years agoHandle non-zero return codes in statistics test
Tom Krizek [Mon, 19 Jun 2023 15:05:17 +0000 (17:05 +0200)] 
Handle non-zero return codes in statistics test

3 years agoHandle non-zero return codes in rrsetorder test
Tom Krizek [Mon, 19 Jun 2023 15:02:29 +0000 (17:02 +0200)] 
Handle non-zero return codes in rrsetorder test

3 years agoHandle non-zero return codes in redirect test
Tom Krizek [Mon, 19 Jun 2023 14:42:51 +0000 (16:42 +0200)] 
Handle non-zero return codes in redirect test

3 years agoHandle non-zero return codes in rndc test
Tom Krizek [Mon, 19 Jun 2023 14:36:05 +0000 (16:36 +0200)] 
Handle non-zero return codes in rndc test

3 years agoHandle non-zero return codes in inline test
Tom Krizek [Mon, 19 Jun 2023 14:30:46 +0000 (16:30 +0200)] 
Handle non-zero return codes in inline test

3 years agoHandle non-zero return codes unknown test
Tom Krizek [Mon, 19 Jun 2023 14:24:49 +0000 (16:24 +0200)] 
Handle non-zero return codes unknown test

3 years agoHandle non-zero return codes in nsupdate test
Tom Krizek [Mon, 19 Jun 2023 14:11:16 +0000 (16:11 +0200)] 
Handle non-zero return codes in nsupdate test

3 years agoHandle non-zero return codes in zonechecks test
Tom Krizek [Mon, 19 Jun 2023 12:08:27 +0000 (14:08 +0200)] 
Handle non-zero return codes in zonechecks test

3 years agoHandle non-zero return codes in wildcard test
Tom Krizek [Mon, 19 Jun 2023 11:58:01 +0000 (13:58 +0200)] 
Handle non-zero return codes in wildcard test

3 years agoHandle non-zero return codes in zero test
Tom Krizek [Mon, 19 Jun 2023 11:53:26 +0000 (13:53 +0200)] 
Handle non-zero return codes in zero test

3 years agoHandle non-zero return codes in legacy test
Tom Krizek [Mon, 19 Jun 2023 09:03:51 +0000 (11:03 +0200)] 
Handle non-zero return codes in legacy test

3 years agoHandle non-zero return codes in forward test
Tom Krizek [Fri, 16 Jun 2023 08:26:55 +0000 (10:26 +0200)] 
Handle non-zero return codes in forward test

3 years agoHandle non-zero return codes in upforwd test
Tom Krizek [Thu, 15 Jun 2023 13:22:59 +0000 (15:22 +0200)] 
Handle non-zero return codes in upforwd test

3 years agoHandle non-zero return codes in addzone test
Tom Krizek [Thu, 15 Jun 2023 13:20:20 +0000 (15:20 +0200)] 
Handle non-zero return codes in addzone test

3 years agoHandle non-zero return codes in rpzrecurse test
Tom Krizek [Thu, 15 Jun 2023 13:08:26 +0000 (15:08 +0200)] 
Handle non-zero return codes in rpzrecurse test

3 years agoHandle non-zero return codes in rpz test
Tom Krizek [Thu, 15 Jun 2023 12:57:27 +0000 (14:57 +0200)] 
Handle non-zero return codes in rpz test

3 years agoMake $? compatible with set -e in system tests
Tom Krizek [Fri, 9 Jun 2023 08:57:34 +0000 (10:57 +0200)] 
Make $? compatible with set -e in system tests

Ensure handling of return code from previous command doesn't cause the
script to halt if that code is non-zero when running with `set -e`.

3 years agoUse arithmetic expansion in system tests (followup)
Tom Krizek [Thu, 22 Jun 2023 12:09:22 +0000 (14:09 +0200)] 
Use arithmetic expansion in system tests (followup)

These are manual edits in addition of the automated changes from the
previous commit.

3 years agoUse arithmetic expansion in system tests
Tom Krizek [Thu, 8 Jun 2023 13:34:30 +0000 (15:34 +0200)] 
Use arithmetic expansion in system tests

Change the way arithmetic operations are performed in system test shell
scripts from using `expr` to `$(())`. This ensures that updating the
variable won't end up with a non-zero exit code, which would case the
script to exit prematurely when `set -e` is in effect.

The following replacements were performed using sed in all text files
(git grep -Il '' | xargs sed -i):

s/status=`expr $status + $ret`/status=$((status + ret))/g
s/n=`expr $n + 1`/n=$((n + 1))/g
s/t=`expr $t + 1`/t=$((t + 1))/g
s/status=`expr $status + 1`/status=$((status + 1))/g
s/try=`expr $try + 1`/try=$((try + 1))/g

3 years agoRun system tests with set -e
Tom Krizek [Wed, 7 Jun 2023 13:35:57 +0000 (15:35 +0200)] 
Run system tests with set -e

Ensure all shell system tests are executed with the errexit option set.
This prevents unchecked return codes from commands in the test from
interfering with the tests, since any failures need to be handled
explicitly.

3 years agoMerge branch 'mnowak/detect-core-dumps-after-server-failed-to-stop' into 'main'
Michal Nowak [Thu, 13 Jul 2023 13:12:37 +0000 (13:12 +0000)] 
Merge branch 'mnowak/detect-core-dumps-after-server-failed-to-stop' into 'main'

Detect core dumps after BIND failed to stop cleanly

See merge request isc-projects/bind9!8096

3 years agoDetect core dumps after BIND failed to stop cleanly
Michal Nowak [Tue, 11 Jul 2023 12:04:12 +0000 (14:04 +0200)] 
Detect core dumps after BIND failed to stop cleanly

With the pytest runner, when BIND crashed during test runtime, the
get_core_dumps.sh script hasn't been run, and core dumps were not
detected.

3 years agoMerge branch '4194-extend-dns-cookie-support' into 'main'
Mark Andrews [Thu, 13 Jul 2023 02:31:02 +0000 (02:31 +0000)] 
Merge branch '4194-extend-dns-cookie-support' into 'main'

Resolve "Extend DNS COOKIE support"

Closes #4194

See merge request isc-projects/bind9!8086

3 years agoAdd release note for [GL #4194]
Mark Andrews [Thu, 6 Jul 2023 07:19:52 +0000 (17:19 +1000)] 
Add release note for [GL #4194]

3 years agoAdd CHANGES note for [GL #4194]
Mark Andrews [Thu, 6 Jul 2023 07:13:40 +0000 (17:13 +1000)] 
Add CHANGES note for [GL #4194]

3 years agoCheck that BADCOOKIE is returned for a bad server COOKIE
Mark Andrews [Thu, 6 Jul 2023 07:09:02 +0000 (17:09 +1000)] 
Check that BADCOOKIE is returned for a bad server COOKIE

Send a well formed, all zeros, DNS COOKIE option to a named instance
running with default cookie settings and check that BADCOOKIE is
returned.

3 years agoReturn BADCOOKIE on validly formed bad SERVER COOKIES
Mark Andrews [Thu, 6 Jul 2023 06:58:53 +0000 (16:58 +1000)] 
Return BADCOOKIE on validly formed bad SERVER COOKIES

The server was previously tolerant of out-of-date or otherwise bad
DNS SERVER COOKIES that where well formed unless require-cookie was
set.  BADCOOKIE is now return for these conditions.

3 years agoMerge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.16' into 'main'
Tom Krizek [Mon, 10 Jul 2023 13:45:09 +0000 (13:45 +0000)] 
Merge branch 'tkrizek/set-up-version-and-release-notes-for-bind-9.19.16' into 'main'

Set up version and release notes for BIND 9.19.16

See merge request isc-projects/bind9!8092

3 years agoSet up release notes for BIND 9.19.16
Tom Krizek [Mon, 10 Jul 2023 13:08:50 +0000 (15:08 +0200)] 
Set up release notes for BIND 9.19.16

3 years agoUpdate BIND version to 9.19.16-dev
Tom Krizek [Mon, 10 Jul 2023 13:08:50 +0000 (15:08 +0200)] 
Update BIND version to 9.19.16-dev

3 years agoUpdate BIND version for release v9.19.15
Michał Kępień [Thu, 6 Jul 2023 13:58:14 +0000 (15:58 +0200)] 
Update BIND version for release

3 years agoAdd a CHANGES marker
Michał Kępień [Thu, 6 Jul 2023 13:58:14 +0000 (15:58 +0200)] 
Add a CHANGES marker

3 years agoMerge branch 'michal/prepare-documentation-for-bind-9.19.15' into 'v9.19.15-release'
Michał Kępień [Thu, 6 Jul 2023 13:54:10 +0000 (13:54 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.19.15' into 'v9.19.15-release'

Prepare documentation for BIND 9.19.15

See merge request isc-private/bind9!550

3 years agoAdd release note for GL #4132, GL #4136, GL #4171
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Add release note for GL #4132, GL #4136, GL #4171

3 years agoTweak and reword release notes
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Tweak and reword release notes

3 years agoPrepare release notes for BIND 9.19.15
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Prepare release notes for BIND 9.19.15

3 years agoUpdate sample query log excerpt in the ARM
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Update sample query log excerpt in the ARM

3 years agoFix typo in tests_shutdown.py
Michał Kępień [Thu, 6 Jul 2023 13:38:48 +0000 (15:38 +0200)] 
Fix typo in tests_shutdown.py

3 years agoMerge branch 'michal/add-changes-entry-for-tsig-tkey-refactoring' into 'main'
Michał Kępień [Thu, 6 Jul 2023 13:06:51 +0000 (13:06 +0000)] 
Merge branch 'michal/add-changes-entry-for-tsig-tkey-refactoring' into 'main'

Add CHANGES entry for !7828

See merge request isc-projects/bind9!8090

3 years agoAdd CHANGES entry for !7828
Michał Kępień [Thu, 6 Jul 2023 13:02:10 +0000 (15:02 +0200)] 
Add CHANGES entry for !7828

3 years agoMerge branch '4171-add-shutdown-check-in-dns_catz_dbupdate_callback' into 'main'
Arаm Sаrgsyаn [Thu, 6 Jul 2023 11:26:31 +0000 (11:26 +0000)] 
Merge branch '4171-add-shutdown-check-in-dns_catz_dbupdate_callback' into 'main'

Add shutdown checks in dns_catz_dbupdate_callback()

Closes #4171

See merge request isc-projects/bind9!8081

3 years agoAdd a CHANGES note for [GL #4171]
Aram Sargsyan [Tue, 4 Jul 2023 08:42:11 +0000 (08:42 +0000)] 
Add a CHANGES note for [GL #4171]

3 years agoAdd shutdown checks in dns_catz_dbupdate_callback()
Aram Sargsyan [Tue, 4 Jul 2023 08:38:39 +0000 (08:38 +0000)] 
Add shutdown checks in dns_catz_dbupdate_callback()

When a zone database update callback is called, the 'catzs' object,
extracted from the callback argument, might be already shutting down,
in which case the 'catzs->zones' can be NULL and cause an assertion
failure when calling isc_ht_find().

Add an early return from the callback if 'catzs->shuttingdown' is true.

Also check the validity of 'catzs->zones' after locking 'catzs' in
case there is a race with dns_catz_shutdown_catzs() running in another
thread.

3 years agoMerge branch '2471-test-three-is-a-crowd' into 'main'
Matthijs Mekking [Thu, 6 Jul 2023 08:03:34 +0000 (08:03 +0000)] 
Merge branch '2471-test-three-is-a-crowd' into 'main'

Add "three is a crowd" test case

Closes #2471

See merge request isc-projects/bind9!8065

3 years agoAdd test for "three is a crowd" bug (GL #2375)
Matthijs Mekking [Tue, 27 Jun 2023 14:29:50 +0000 (16:29 +0200)] 
Add test for "three is a crowd" bug (GL #2375)

Add this test scenario for a bug fixed a while ago. When a third key is
introduced while the previous rollover hasn't finished yet, the keymgr
could decide to remove the first two keys, because it was not checking
for an indirect dependency on the keys.

In other words, the previous bug behavior was that the first two keys
were removed from the zone too soon.

This test case checks that all three keys stay in the zone, and no keys
are removed premature after another new key has been introduced.

3 years agoCheck all keys despite early failure
Matthijs Mekking [Tue, 27 Jun 2023 14:27:35 +0000 (16:27 +0200)] 
Check all keys despite early failure

In the kasp script, if one expected key is not found, continue checking
the other key ids, even if there is no match for the first one.  This
provides a bit more information which keys mismatch and makes for
easier debugging test failures.

3 years agoMerge branch 'each-refactor-fetchopt' into 'main'
Evan Hunt [Tue, 4 Jul 2023 18:36:09 +0000 (18:36 +0000)] 
Merge branch 'each-refactor-fetchopt' into 'main'

clean up numbering of FETCHOPT and ADDRINFO flags

See merge request isc-projects/bind9!8079

3 years agoclean up numbering of FETCHOPT and ADDRINFO flags
Evan Hunt [Mon, 3 Jul 2023 19:43:17 +0000 (12:43 -0700)] 
clean up numbering of FETCHOPT and ADDRINFO flags

in the past there was overlap between the fields used
as resolver fetch options and ADB addrinfo flags. this has
mostly been eliminated; now we can clean up the rest of
it and remove some confusing comments.

3 years agoMerge branch 'tkrizek-shutdown-rndc-hang' into 'main'
Tom Krizek [Tue, 4 Jul 2023 11:34:00 +0000 (11:34 +0000)] 
Merge branch 'tkrizek-shutdown-rndc-hang' into 'main'

Split shutdown test into separate test cases

See merge request isc-projects/bind9!8058

3 years agoMark the test_named_shutdown[rndc] test as xfail
Tom Krizek [Mon, 26 Jun 2023 13:22:32 +0000 (15:22 +0200)] 
Mark the test_named_shutdown[rndc] test as xfail

It is currently affected by #4060, making the unstable as it
occassionally fails.

3 years agoUse timeout for rndc status in shutdown test
Tom Krizek [Mon, 26 Jun 2023 13:19:35 +0000 (15:19 +0200)] 
Use timeout for rndc status in shutdown test

Pass 5 second timeout to the rndc status command(s) to avoid hitting the
hard 10 second timeout from subprocess.call, which would result in an
unwanted exception that would only mask the real issue: if the rndc
status times out in this test, it is likely due to the server not
stopping as it should.

3 years agoSplit shutdown test into separate test cases
Tom Krizek [Mon, 26 Jun 2023 13:18:45 +0000 (15:18 +0200)] 
Split shutdown test into separate test cases

The shutdown test attempts to shut down the server using two different
methods - rndc and sigterm. Use pytest.mark.parametrize to run these as
separate test cases for easier identification of failures.

3 years agoMerge branch 'each-lock-counter' into 'main'
Evan Hunt [Fri, 30 Jun 2023 06:52:18 +0000 (06:52 +0000)] 
Merge branch 'each-lock-counter' into 'main'

fix a TSAN bug in "rndc fetchlimit"

See merge request isc-projects/bind9!8067