]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoadd CHANGES and note in README.md
Mark Andrews [Mon, 25 Nov 2019 22:53:19 +0000 (09:53 +1100)] 
add CHANGES and note in README.md

6 years agocheck for 'distutils.core setup'
Mark Andrews [Mon, 25 Nov 2019 07:05:22 +0000 (18:05 +1100)] 
check for 'distutils.core setup'

6 years agoMerge branch 'each-notes' into 'master'
Evan Hunt [Mon, 25 Nov 2019 21:18:51 +0000 (21:18 +0000)] 
Merge branch 'each-notes' into 'master'

cleanup release notes text

See merge request isc-projects/bind9!2622

6 years agocleanup release notes text
Evan Hunt [Mon, 25 Nov 2019 21:17:35 +0000 (13:17 -0800)] 
cleanup release notes text

6 years agoMerge branch 'ondrej/add-missing-header-guards' into 'master'
Ondřej Surý [Mon, 25 Nov 2019 08:13:31 +0000 (08:13 +0000)] 
Merge branch 'ondrej/add-missing-header-guards' into 'master'

Add missing header guard to new header files

See merge request isc-projects/bind9!2621

6 years agoAdd missing header guard to new header files
Ondřej Surý [Mon, 25 Nov 2019 08:10:29 +0000 (09:10 +0100)] 
Add missing header guard to new header files

6 years agoMerge branch '1373-threadsanitizer-data-race-rbtdb-c-5193-in-detachnode' into 'master'
Mark Andrews [Mon, 25 Nov 2019 05:46:55 +0000 (05:46 +0000)] 
Merge branch '1373-threadsanitizer-data-race-rbtdb-c-5193-in-detachnode' into 'master'

Resolve "ThreadSanitizer: data race rbtdb.c:5193 in detachnode"

Closes #1373

See merge request isc-projects/bind9!2598

6 years agoremove DNS_RBT_REFLENGTH as it is no longer needed
Mark Andrews [Mon, 25 Nov 2019 00:03:10 +0000 (11:03 +1100)] 
remove DNS_RBT_REFLENGTH as it is no longer needed

6 years agoSplit access to wild and dirty from locknum to silence TSAN warnings.
Mark Andrews [Wed, 20 Nov 2019 07:04:01 +0000 (18:04 +1100)] 
Split access to wild and dirty from locknum to silence TSAN warnings.

6 years agoMerge branch '1312-netmgr-tcp-fixes' into 'master'
Evan Hunt [Sat, 23 Nov 2019 01:47:18 +0000 (01:47 +0000)] 
Merge branch '1312-netmgr-tcp-fixes' into 'master'

Resolve "netmgr hangs on shutdown when TCP connections are still active"

Closes #1312

See merge request isc-projects/bind9!2617

6 years agoCHANGES
Evan Hunt [Fri, 22 Nov 2019 20:26:42 +0000 (12:26 -0800)] 
CHANGES

6 years agoimprove system tests
Evan Hunt [Fri, 22 Nov 2019 20:27:23 +0000 (12:27 -0800)] 
improve system tests

- increase prefetch test timing tolerance.
- remove five-second pause and explicit connection closing in tcp test
  as they are no longer necessary.

6 years agonetmgr: add shutdown function
Evan Hunt [Fri, 22 Nov 2019 23:57:42 +0000 (15:57 -0800)] 
netmgr: add shutdown function

- new function isc_nm_shutdown() shuts down all active TCP connections,
  but does not destroy the netmgr.

6 years agonetmgr: actively close all sockets when shutting down server
Witold Kręcicki [Fri, 22 Nov 2019 13:13:19 +0000 (14:13 +0100)] 
netmgr: actively close all sockets when shutting down server

without this change, named could sometimes lag for a while on shutdown
while it waited for open TCP connections to time out.

6 years agonetmgr: fix TCP backlog and client quota count
Witold Kręcicki [Fri, 22 Nov 2019 12:19:45 +0000 (13:19 +0100)] 
netmgr: fix TCP backlog and client quota count

 - add support for TCP backlog, using the value provided by config.
 - don't attach to TCP client quota for listening sockets, only
   connected sockets.

6 years agonetmgr: log TCP connection errors
Evan Hunt [Fri, 22 Nov 2019 02:38:04 +0000 (18:38 -0800)] 
netmgr: log TCP connection errors

6 years agonetmgr: performance improvement
Evan Hunt [Fri, 22 Nov 2019 01:08:06 +0000 (17:08 -0800)] 
netmgr: performance improvement

- use memory pools for ievent and uvreq objects.

6 years agonetmgr: make TCP timeouts configurable
Evan Hunt [Wed, 20 Nov 2019 21:33:35 +0000 (22:33 +0100)] 
netmgr: make TCP timeouts configurable

- restore support for tcp-initial-timeout, tcp-idle-timeout,
  tcp-keepalive-timeout and tcp-advertised-timeout configuration
  options, which were ineffective previously.

6 years agonetmgr: TCP improvements
Witold Kręcicki [Tue, 19 Nov 2019 10:56:00 +0000 (11:56 +0100)] 
netmgr: TCP improvements

- add timeout support for TCP and TCPDNS connections to protect against
  slowloris style attacks. currently, all timeouts are hard-coded.
- rework and simplify the TCPDNS state machine.

6 years agoMerge branch '1334-threadsanitizer-data-race-dispatch-c-1339-in-tcp_recv' into 'master'
Mark Andrews [Fri, 22 Nov 2019 21:23:10 +0000 (21:23 +0000)] 
Merge branch '1334-threadsanitizer-data-race-dispatch-c-1339-in-tcp_recv' into 'master'

Resolve "ThreadSanitizer: data race dispatch.c:1339 in tcp_recv"

Closes #1334

See merge request isc-projects/bind9!2612

6 years agolock dispatch before reporting state
Mark Andrews [Thu, 21 Nov 2019 23:49:40 +0000 (10:49 +1100)] 
lock dispatch before reporting state

6 years agoMerge branch '1394-incoming-zone-transfer-messages-logged-to-wrong-category' into...
Mark Andrews [Fri, 22 Nov 2019 19:37:51 +0000 (19:37 +0000)] 
Merge branch '1394-incoming-zone-transfer-messages-logged-to-wrong-category' into 'master'

Resolve "Incoming zone transfer messages logged to wrong category"

Closes #1394

See merge request isc-projects/bind9!2611

6 years agoadd CHANGES
Mark Andrews [Thu, 21 Nov 2019 23:30:43 +0000 (10:30 +1100)] 
add CHANGES

6 years agochange log category of some messages to DNS_LOGCATEGORY_XFER_IN
Mark Andrews [Thu, 21 Nov 2019 23:25:44 +0000 (10:25 +1100)] 
change log category of some messages to DNS_LOGCATEGORY_XFER_IN

6 years agoMerge branch '1315-yaml-is-not-listed-in-the-man-page-or-the-h-listing-for-either...
Mark Andrews [Fri, 22 Nov 2019 13:13:05 +0000 (13:13 +0000)] 
Merge branch '1315-yaml-is-not-listed-in-the-man-page-or-the-h-listing-for-either-dig-or-delv' into 'master'

Resolve "+yaml is not listed in the man page or the -h listing for either dig or delv"

Closes #1315

See merge request isc-projects/bind9!2560

6 years agoadd +[no]yaml to usage()
Mark Andrews [Mon, 11 Nov 2019 23:04:33 +0000 (10:04 +1100)] 
add +[no]yaml to usage()

6 years agoMerge branch '1317-alphabetise-delv-s-usage' into 'master'
Mark Andrews [Fri, 22 Nov 2019 13:00:14 +0000 (13:00 +0000)] 
Merge branch '1317-alphabetise-delv-s-usage' into 'master'

Resolve "alphabetise delv's usage."

Closes #1317

See merge request isc-projects/bind9!2561

6 years agoalphabetise delv's usage.
Mark Andrews [Mon, 11 Nov 2019 23:14:50 +0000 (10:14 +1100)] 
alphabetise delv's usage.

6 years agoMerge branch 'wpk/fix-mkeys-bug' into 'master'
Witold Krecicki [Thu, 21 Nov 2019 19:13:55 +0000 (19:13 +0000)] 
Merge branch 'wpk/fix-mkeys-bug' into 'master'

Fix a bug in trust anchors verification.

See merge request isc-projects/bind9!2609

6 years agoCHANGES note
Witold Kręcicki [Thu, 21 Nov 2019 17:43:47 +0000 (18:43 +0100)] 
CHANGES note

6 years agoFix a bug in trust anchors verification.
Witold Kręcicki [Thu, 21 Nov 2019 17:18:56 +0000 (18:18 +0100)] 
Fix a bug in trust anchors verification.

We were not reseting the keynode value when iterating over DNSKEYs in
RRSET, so we weren't checking all DNSKEYs against all trust anchors. This
commit fixes the issue by resetting keynode with every loop.

6 years agoMerge branch 'merge-v9_15_6' into 'master'
Evan Hunt [Wed, 20 Nov 2019 21:37:26 +0000 (21:37 +0000)] 
Merge branch 'merge-v9_15_6' into 'master'

merge 9.15.6 into master branch

See merge request isc-projects/bind9!2604

6 years agoMerge tag 'v9_15_6' into merge-v9_15_6
Evan Hunt [Wed, 20 Nov 2019 21:34:25 +0000 (13:34 -0800)] 
Merge tag 'v9_15_6' into merge-v9_15_6

6 years agoMerge branch 'ondrej/get-the-backtraces-out-of-system-test-coredumps' into 'master'
Ondřej Surý [Wed, 20 Nov 2019 19:04:02 +0000 (19:04 +0000)] 
Merge branch 'ondrej/get-the-backtraces-out-of-system-test-coredumps' into 'master'

Get the backtraces out of system test coredumps

See merge request isc-projects/bind9!2602

6 years agoGet better stack traces
Ondřej Surý [Mon, 18 Nov 2019 18:29:12 +0000 (02:29 +0800)] 
Get better stack traces

6 years agoDump the backtrace to stdout when core is found in systest directory
Ondřej Surý [Mon, 18 Nov 2019 15:17:37 +0000 (23:17 +0800)] 
Dump the backtrace to stdout when core is found in systest directory

6 years agoMerge branch 'mnowak/537_Add_CI_step_to_test_named_-u' into 'master'
Michal Nowak [Wed, 20 Nov 2019 10:37:24 +0000 (10:37 +0000)] 
Merge branch 'mnowak/537_Add_CI_step_to_test_named_-u' into 'master'

Verifying that named switches UID

Closes #537

See merge request isc-projects/bind9!2374

6 years agoVerifying that named switches UID
Michal Nowak [Thu, 17 Oct 2019 10:11:43 +0000 (12:11 +0200)] 
Verifying that named switches UID

This test runs only under root, which is required for the user-switch
`-u` option to work.

Closes #537.

6 years agoMerge branch 'marka-placeholder' into 'master'
Mark Andrews [Wed, 20 Nov 2019 01:03:37 +0000 (01:03 +0000)] 
Merge branch 'marka-placeholder' into 'master'

placeholder

See merge request isc-projects/bind9!2597

6 years agoplaceholder
Mark Andrews [Wed, 20 Nov 2019 00:57:54 +0000 (11:57 +1100)] 
placeholder

6 years agoMerge branch '1341-threadsanitizer-data-race-rbtdb-c-5756-in-add32' into 'master'
Ondřej Surý [Tue, 19 Nov 2019 16:54:50 +0000 (16:54 +0000)] 
Merge branch '1341-threadsanitizer-data-race-rbtdb-c-5756-in-add32' into 'master'

Resolve "ThreadSanitizer: data race rbtdb.c:5756 in add32"

Closes #1341

See merge request isc-projects/bind9!2577

6 years agoadd CHANGES
Mark Andrews [Tue, 19 Nov 2019 08:28:17 +0000 (19:28 +1100)] 
add CHANGES

6 years agouse update_recordsandbytes in rbt_datafixer
Mark Andrews [Tue, 19 Nov 2019 03:46:08 +0000 (14:46 +1100)] 
use update_recordsandbytes in rbt_datafixer

6 years agoalways obtain write lock when updating version->{records,bytes}
Mark Andrews [Mon, 18 Nov 2019 03:07:18 +0000 (14:07 +1100)] 
always obtain write lock when updating version->{records,bytes}

6 years agoMerge branch '1308-fail-the-tcp-system-test-when-ans6-fails' into 'master'
Michał Kępień [Tue, 19 Nov 2019 14:51:01 +0000 (14:51 +0000)] 
Merge branch '1308-fail-the-tcp-system-test-when-ans6-fails' into 'master'

Fail the "tcp" system test when ans6 fails

Closes #1308

See merge request isc-projects/bind9!2566

6 years agoFail the "tcp" system test when ans6 fails
Michał Kępień [Tue, 19 Nov 2019 14:26:56 +0000 (15:26 +0100)] 
Fail the "tcp" system test when ans6 fails

Make the "tcp" system test fail if the Python tool used for establishing
TCP connections (ans6) logs a result different than "OK" after
processing a command sent to it (as that means the tool was unable to
successfully perform the requested action), with the exception of
cleanup errors at the end of the test which can be safely ignored.  Note
that the tool not returning any result at all in 10 seconds is still a
fatal error in all cases.

6 years agoMerge branch '1377-threadsanitizer-data-race-astack-c-64-in-isc_astack_pop' into...
Ondřej Surý [Tue, 19 Nov 2019 10:03:09 +0000 (10:03 +0000)] 
Merge branch '1377-threadsanitizer-data-race-astack-c-64-in-isc_astack_pop' into 'master'

Fix missing lock around pos and destroy mutex in isc_astack_destroy

Closes #1377

See merge request isc-projects/bind9!2588

6 years agoMerge branch '1299-parse-commandline-code-should-be-done-in-alphabetical-order' into...
Mark Andrews [Tue, 19 Nov 2019 09:31:52 +0000 (09:31 +0000)] 
Merge branch '1299-parse-commandline-code-should-be-done-in-alphabetical-order' into 'master'

Resolve "Parse commandline code should be done in alphabetical order"

Closes #1299

See merge request isc-projects/bind9!2559

6 years agoFix missing lock around pos and destroy mutex in isc_astack_destroy
Ondřej Surý [Tue, 19 Nov 2019 06:10:07 +0000 (14:10 +0800)] 
Fix missing lock around pos and destroy mutex in isc_astack_destroy

6 years agoalphabetize command line switch
Mark Andrews [Mon, 11 Nov 2019 04:58:23 +0000 (15:58 +1100)] 
alphabetize command line switch

6 years agoMerge branch '1344-threadsanitizer-data-race-rbtdb-c-2987-in-bind_rdataset' into...
Mark Andrews [Tue, 19 Nov 2019 08:20:08 +0000 (08:20 +0000)] 
Merge branch '1344-threadsanitizer-data-race-rbtdb-c-2987-in-bind_rdataset' into 'master'

Resolve "ThreadSanitizer: data race rbtdb.c:2987 in bind_rdataset"

Closes #1344

See merge request isc-projects/bind9!2587

6 years agoadd CHANGES
Mark Andrews [Tue, 19 Nov 2019 06:33:05 +0000 (17:33 +1100)] 
add CHANGES

6 years agomake header->count atomic
Mark Andrews [Tue, 19 Nov 2019 05:53:36 +0000 (16:53 +1100)] 
make header->count atomic

6 years agoMerge branch 'ondrej/dont-call-dns_adb_endupdfetch-for-TCP-queries' into 'master'
Ondřej Surý [Mon, 18 Nov 2019 19:47:53 +0000 (19:47 +0000)] 
Merge branch 'ondrej/dont-call-dns_adb_endupdfetch-for-TCP-queries' into 'master'

lib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries

See merge request isc-projects/bind9!2580

6 years agolib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries
Ondřej Surý [Sun, 13 Oct 2019 14:33:22 +0000 (16:33 +0200)] 
lib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries

The dns_adb_beginudpfetch() is called only for UDP queries, but
the dns_adb_endudpfetch() is called for all queries, including
TCP.  This messages the quota counting in adb.c.

6 years agoMerge branch 'ondrej/switch-coccinelle-job-to-buster' into 'master'
Ondřej Surý [Mon, 18 Nov 2019 17:58:54 +0000 (17:58 +0000)] 
Merge branch 'ondrej/switch-coccinelle-job-to-buster' into 'master'

Switch coccinelle job to buster

See merge request isc-projects/bind9!2582

6 years agoInstalling coccinelle on Debian sid is broken, switch to Debian buster
Ondřej Surý [Mon, 18 Nov 2019 17:07:01 +0000 (01:07 +0800)] 
Installing coccinelle on Debian sid is broken, switch to Debian buster

6 years agoMerge branch '1368-threadsanitizer-can-t-handle-more-than-64-mutexes' into 'master'
Ondřej Surý [Mon, 18 Nov 2019 07:30:35 +0000 (07:30 +0000)] 
Merge branch '1368-threadsanitizer-can-t-handle-more-than-64-mutexes' into 'master'

lib/dns/adb.c:

Closes #1368

See merge request isc-projects/bind9!2579

6 years agolib/dns/adb.c: don't use more than 64 lock simultaneously when run under TSAN
Witold Kręcicki [Tue, 22 Jan 2019 09:47:18 +0000 (10:47 +0100)] 
lib/dns/adb.c: don't use more than 64 lock simultaneously when run under TSAN

 - TSAN can't handle more than 64 locks in one thread, lock ADB bucket-by-bucket
   in TSAN mode. This means that the dump won't be consistent but it's good
   enough for testing

 - Use proper order when unlocking adb->namelocks and adb->entrylocks when
   dumping ADB.

6 years agoMerge branch 'prep-release' into security-master v9.15.6
Tinderbox User [Sun, 17 Nov 2019 07:59:22 +0000 (07:59 +0000)] 
Merge branch 'prep-release' into security-master

6 years agoMerge branch 'security-client-connection-limit' into security-master
Evan Hunt [Fri, 15 Nov 2019 23:33:19 +0000 (15:33 -0800)] 
Merge branch 'security-client-connection-limit' into security-master

6 years agoprep 9.15.6
Tinderbox User [Sun, 17 Nov 2019 07:25:57 +0000 (07:25 +0000)] 
prep 9.15.6

6 years agoCHANGES, release note.
Evan Hunt [Fri, 8 Nov 2019 02:38:00 +0000 (18:38 -0800)] 
CHANGES, release note.

6 years agoclean up comments
Evan Hunt [Fri, 15 Nov 2019 21:22:13 +0000 (13:22 -0800)] 
clean up comments

6 years agofix a problem with the mem_test unit test
Witold Kręcicki [Fri, 15 Nov 2019 12:30:04 +0000 (13:30 +0100)] 
fix a problem with the mem_test unit test

isc_mem_traceflag_test messes with stdout/stderr, which can cause
problems with subsequent tests (no output, libuv problems).  Moving that
test case to the end ensures there are no side effects.

6 years agonetmgr: close uv_loop properly
Witold Kręcicki [Fri, 15 Nov 2019 11:15:03 +0000 (12:15 +0100)] 
netmgr: close uv_loop properly

close the uv_handle for the worker async channel, and call
uv_loop_close() on shutdown to ensure that the event loop's
internal resources are properly freed.

6 years agoensure isc_queue_t is aligned to double-cacheline size
Witold Kręcicki [Fri, 15 Nov 2019 09:47:08 +0000 (10:47 +0100)] 
ensure isc_queue_t is aligned to double-cacheline size

6 years agoplace a limit on pipelined queries that can be processed simultaneously
Evan Hunt [Fri, 8 Nov 2019 18:52:49 +0000 (10:52 -0800)] 
place a limit on pipelined queries that can be processed simultaneously

when the TCPDNS_CLIENTS_PER_CONN limit has been exceeded for a TCP
DNS connection, switch to sequential mode to ensure that memory cannot
be exhausted by too many simultaneous queries.

6 years agoMerge branch 'each-ds-anchor-mirror-zones' into 'master'
Evan Hunt [Mon, 18 Nov 2019 02:59:08 +0000 (02:59 +0000)] 
Merge branch 'each-ds-anchor-mirror-zones' into 'master'

add support for DS trust anchors in mirror zone verification

See merge request isc-projects/bind9!2576

6 years agoadd support for DS trust anchors in mirror zone verification
Evan Hunt [Sun, 17 Nov 2019 20:14:40 +0000 (12:14 -0800)] 
add support for DS trust anchors in mirror zone verification

6 years agoMerge branch '1119-make-lib/ns-thread-sanitizer-clean' into 'master'
Evan Hunt [Mon, 18 Nov 2019 01:43:06 +0000 (01:43 +0000)] 
Merge branch '1119-make-lib/ns-thread-sanitizer-clean' into 'master'

Make lib/ns Thread Sanitizer clean

See merge request isc-projects/bind9!2366

6 years agoMake lib/ns Thread Sanitizer clean
Ondřej Surý [Thu, 4 Jul 2019 13:45:06 +0000 (15:45 +0200)] 
Make lib/ns Thread Sanitizer clean

6 years agoMerge branch '1119-tsan-lib/dns/tests/zt_test.c' into 'master'
Evan Hunt [Mon, 18 Nov 2019 01:40:59 +0000 (01:40 +0000)] 
Merge branch '1119-tsan-lib/dns/tests/zt_test.c' into 'master'

Use atomic_bool for variables shared among threads to make zt_test.c thread-safe

See merge request isc-projects/bind9!2361

6 years agoUse atomic_bool for variables shared among threads to make zt_test.c thread-safe
Ondřej Surý [Thu, 4 Jul 2019 09:04:52 +0000 (11:04 +0200)] 
Use atomic_bool for variables shared among threads to make zt_test.c thread-safe

6 years agoMerge branch '1119-tsan-lib/isc/tests/socket_test.c' into 'master'
Ondřej Surý [Sun, 17 Nov 2019 14:55:24 +0000 (14:55 +0000)] 
Merge branch '1119-tsan-lib/isc/tests/socket_test.c' into 'master'

Change the shared completion->done variable to atomic_bool in socket_test.c

See merge request isc-projects/bind9!2362

6 years agoChange the shared completion->done variable to atomic_bool in socket_test.c
Ondřej Surý [Thu, 4 Jul 2019 11:51:47 +0000 (13:51 +0200)] 
Change the shared completion->done variable to atomic_bool in socket_test.c

6 years agoMerge branch '1313-master-failing-to-build-on-macos-high-sierra' into 'master'
Ondřej Surý [Sat, 16 Nov 2019 05:22:05 +0000 (05:22 +0000)] 
Merge branch '1313-master-failing-to-build-on-macos-high-sierra' into 'master'

Resolve "master failing to build on MacOS High Sierra"

Closes #1313

See merge request isc-projects/bind9!2562

6 years agoconditionally test based on USE_LIBTOOL or LD_WRAP
Mark Andrews [Wed, 13 Nov 2019 23:00:36 +0000 (10:00 +1100)] 
conditionally test based on USE_LIBTOOL or LD_WRAP

6 years agospecify the install name when building libwrap
Mark Andrews [Wed, 13 Nov 2019 02:15:48 +0000 (13:15 +1100)] 
specify the install name when building libwrap

6 years agoMacOS portability
Mark Andrews [Tue, 12 Nov 2019 05:24:49 +0000 (16:24 +1100)] 
MacOS portability

-Wl,-z,interpose is not supported.
-Wl,rpath=<path> is not supported use -Wl,rpath,<path> instead.
Use @SO@ for loadable extension.
Use -L <path> -l libwrap instead of libwrap.sa.

6 years agoMerge branch '622-ds-anchor' into 'master'
Evan Hunt [Sat, 16 Nov 2019 02:32:12 +0000 (02:32 +0000)] 
Merge branch '622-ds-anchor' into 'master'

support "initial-ds" in managed-keys

Closes #622

See merge request isc-projects/bind9!1762

6 years agoCHANGES, release notes
Evan Hunt [Thu, 19 Sep 2019 22:02:42 +0000 (15:02 -0700)] 
CHANGES, release notes

6 years agoDocument initial-ds and static-ds keywords
Evan Hunt [Thu, 19 Sep 2019 21:52:49 +0000 (14:52 -0700)] 
Document initial-ds and static-ds keywords

6 years agouse DS style trust anchors in all system tests
Evan Hunt [Thu, 19 Sep 2019 02:41:40 +0000 (19:41 -0700)] 
use DS style trust anchors in all system tests

this adds functions in conf.sh.common to create DS-style trust anchor
files. those functions are then used to create nearly all of the trust
anchors in the system tests.

there are a few exceptions:
 - some tests in dnssec and mkeys rely on detection of unsupported
   algorithms, which only works with key-style trust anchors, so those
   are used for those tests in particular.
 - the mirror test had a problem with the use of a CSK without a
   SEP bit, which still needs addressing

in the future, some of these tests should be changed back to using
traditional trust anchors, so that both types will be exercised going
forward.

6 years agoadd support for DS trust anchors in delv
Evan Hunt [Thu, 19 Sep 2019 02:45:20 +0000 (19:45 -0700)] 
add support for DS trust anchors in delv

6 years agofix root key sentinel code to send the correct key ID for DS trust anchors
Evan Hunt [Wed, 18 Sep 2019 20:04:07 +0000 (13:04 -0700)] 
fix root key sentinel code to send the correct key ID for DS trust anchors

6 years agoadd validator support for static DS-style trust anchors
Evan Hunt [Wed, 18 Sep 2019 17:03:19 +0000 (10:03 -0700)] 
add validator support for static DS-style trust anchors

6 years agorefactor create_keydata
Evan Hunt [Wed, 18 Sep 2019 03:19:59 +0000 (20:19 -0700)] 
refactor create_keydata

use empty placeholder KEYDATA records for all trust anchors, not just
DS-style trust anchors.

this revealed a pre-existing bug: keyfetch_done() skips keys without
the SEP bit when populating the managed-keys zone. consequently, if a
zone only has a single ZSK which is configured as trust anchor and no
KSKs, then no KEYDATA record is ever written to the managed-keys zone
when keys are refreshed.

that was how the root server in the dnssec system test was configured.
however, previously, the KEYDATA was created when the key was
initialized; this prevented us from noticing the bug until now.

configuring a ZSK as an RFC 5011 trust anchor is not forbidden by the
spec, but it is highly unusual and not well defined.  so for the time
being, I have modified the system test to generate both a KSK and ZSK
for the root zone, enabling the test to pass.

we should consider adding code to detect this condition and allow keys
without the SEP bit to be used as trust anchors if no key with the SEP
bit is available, or at minimum, log a warning.

6 years agouse DS-style trust anchor to verify 5011 key refresh query
Evan Hunt [Tue, 17 Sep 2019 16:09:41 +0000 (09:09 -0700)] 
use DS-style trust anchor to verify 5011 key refresh query

note: this also needs further refactoring.

- when initializing RFC 5011 for a name, we populate the managed-keys
  zone with KEYDATA records derived from the initial-key trust anchors.

  however, with initial-ds trust anchors, there is no key. but the
  managed-keys zone still must have a KEYDATA record for the name,
  otherwise zone_refreshkeys() won't refresh that key. so, for
  initial-ds trust anchors, we now add an empty KEYDATA record and set
  the key refresh timer so that the real keys will be looked up as soon
  as possible.

- when a key refresh query is done, we verify it against the
  trust anchor; this is done in two ways, one with the DS RRset
  set up during configuration if present, or with the keys linked
  from each keynode in the list if not.  because there are two different
  verification methods, the loop structure is overly complex and should
  be simplified.

- the keyfetch_done() and sync_keyzone() functions are both too long
  and should be broken into smaller functions.

6 years agoallow DS trust anchors to be set in keytable
Evan Hunt [Tue, 17 Sep 2019 04:06:23 +0000 (21:06 -0700)] 
allow DS trust anchors to be set in keytable

note: this is a frankensteinian kluge which needs further refactoring.

the keytable started as an RBT where the node->data points to a list of
dns_keynode structures, each of which points to a single dst_key.
later it was modified so that the list could instead point to a single
"null" keynode structure, which does not reference a key; this means
a trust anchor has been configured but the RFC 5011 refresh failed.

in this branch it is further updated to allow the first keynode in
the list to point to an rdatalist of DS-style trust anchors.  these will
be used by the validator to populate 'val->dsset' when validating a zone
key.

a DS style trust anchor can be updated as a result of RFC 5011
processing to contain DST keys instead; this results in the DS list
being freed.  the reverse is not possible; attempting to add a DS-style
trust anchor if a key-style trust anchor is already in place results
in an error.

later, this should be refactored to use rdatalists for both DS-style
and key-style trust anchors, but we're keeping the existing code for
old-style trust anchors for now.

6 years agodisallow use of DS- and key-style trust anchors for the same name
Evan Hunt [Mon, 16 Sep 2019 20:56:31 +0000 (13:56 -0700)] 
disallow use of DS- and key-style trust anchors for the same name

6 years agoread DS trust anchors in named.conf
Evan Hunt [Mon, 16 Sep 2019 06:14:51 +0000 (23:14 -0700)] 
read DS trust anchors in named.conf

(but they aren't used for anything yet)

6 years agoadd "static-ds" and "initial-ds" keywords to config parser
Evan Hunt [Mon, 16 Sep 2019 05:15:29 +0000 (22:15 -0700)] 
add "static-ds" and "initial-ds" keywords to config parser

6 years agoadd a global function to match a DS rdata to a DNSKEY
Evan Hunt [Tue, 17 Sep 2019 14:19:32 +0000 (07:19 -0700)] 
add a global function to match a DS rdata to a DNSKEY

6 years agoMerge branch '622-validator-refactoring' into 'master'
Evan Hunt [Fri, 15 Nov 2019 23:46:36 +0000 (23:46 +0000)] 
Merge branch '622-validator-refactoring' into 'master'

preliminary validator refactoring

See merge request isc-projects/bind9!2346

6 years agoCHANGES, release note
Evan Hunt [Thu, 7 Nov 2019 05:23:07 +0000 (21:23 -0800)] 
CHANGES, release note

6 years agoremove unneeded members from dns_validator
Evan Hunt [Sun, 15 Sep 2019 23:36:16 +0000 (16:36 -0700)] 
remove unneeded members from dns_validator

- val->keynode and val->seensig were set but never used.
- val->nearest, val->soaset, val->soaname, val->nsecset and val->nsec3set
  were never used at all.

6 years agosimplify validate_dnskey and seek_ds
Evan Hunt [Tue, 10 Sep 2019 23:53:28 +0000 (16:53 -0700)] 
simplify validate_dnskey and seek_ds

- pull out the code that checks whether a key was signed by a trust
  anchor into a separate function, anchor_signed().
- pull out the code that looks up a DS while validating a zone key
  into a separate function, get_dsset().
- check in create_validator() whether the sigrdataset is bound, so that
  we can always pass in &val->fsigrdataset during an insecurity proof;
  this will allow a reduction of code duplication.

6 years agocontinue renaming functions for clarity
Evan Hunt [Fri, 16 Aug 2019 23:28:18 +0000 (16:28 -0700)] 
continue renaming functions for clarity

- also simplified some calls: don't pass siginfo where val->siginfo
  is sufficient, don't INSIST where returning false is sufficient.
- also added header comments to several local functions.

6 years agoconvert if to switch in get_key
Evan Hunt [Fri, 16 Aug 2019 23:27:50 +0000 (16:27 -0700)] 
convert if to switch in get_key