]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agorename fetch/validator callback functions for consistency and clarity
Evan Hunt [Fri, 16 Aug 2019 19:28:22 +0000 (12:28 -0700)] 
rename fetch/validator callback functions for consistency and clarity

6 years agoreorder switch in validatezonekey to similar order as seek_ds
Evan Hunt [Thu, 8 Aug 2019 15:35:21 +0000 (08:35 -0700)] 
reorder switch in validatezonekey to similar order as seek_ds

6 years agoconvert if statement to switch
Evan Hunt [Thu, 8 Aug 2019 00:49:59 +0000 (17:49 -0700)] 
convert if statement to switch

6 years agorefactor dsfetched/dsfetched2 into a common function
Evan Hunt [Thu, 8 Aug 2019 00:26:35 +0000 (17:26 -0700)] 
refactor dsfetched/dsfetched2 into a common function

6 years agorename some functions for better clarity
Evan Hunt [Wed, 7 Aug 2019 23:54:05 +0000 (16:54 -0700)] 
rename some functions for better clarity

6 years agomove some duplicate code into validate_neg_rrset()
Evan Hunt [Wed, 7 Aug 2019 06:08:36 +0000 (23:08 -0700)] 
move some duplicate code into validate_neg_rrset()

6 years agomove the 'mustbesecure' checks into markanswer()
Evan Hunt [Tue, 6 Aug 2019 23:36:28 +0000 (16:36 -0700)] 
move the 'mustbesecure' checks into markanswer()

6 years agosplit proveunsecure()
Evan Hunt [Tue, 6 Aug 2019 23:11:22 +0000 (16:11 -0700)] 
split proveunsecure()

6 years agoreduce redundant code
Evan Hunt [Tue, 6 Aug 2019 20:13:38 +0000 (13:13 -0700)] 
reduce redundant code

6 years agostyle, braces, whitespace
Evan Hunt [Tue, 6 Aug 2019 20:44:30 +0000 (13:44 -0700)] 
style, braces, whitespace

6 years agoMerge branch '1323-reenable-lib-ns-unittests' into 'master'
Mark Andrews [Fri, 15 Nov 2019 05:50:14 +0000 (05:50 +0000)] 
Merge branch '1323-reenable-lib-ns-unittests' into 'master'

Properly disable lib/ns tests when run under ASAN

Closes #1323

See merge request isc-projects/bind9!2568

6 years agoProperly disable lib/ns tests when run under ASAN
Ondřej Surý [Wed, 13 Nov 2019 08:29:04 +0000 (09:29 +0100)] 
Properly disable lib/ns tests when run under ASAN

6 years agoMerge branch '1327-update-solution-dependencies-host-and-nslookup-depend-on-libirs...
Mark Andrews [Fri, 15 Nov 2019 01:09:16 +0000 (01:09 +0000)] 
Merge branch '1327-update-solution-dependencies-host-and-nslookup-depend-on-libirs' into 'master'

Resolve "Update solution dependencies: 'dig', 'host' and 'nslookup' depend on libirs."

Closes #1327

See merge request isc-projects/bind9!2573

6 years agoAdd dependancy on libirs to dig, host, and nslookup.
Mark Andrews [Fri, 15 Nov 2019 00:16:07 +0000 (11:16 +1100)] 
Add dependancy on libirs to dig, host, and nslookup.

6 years agoMerge branch 'ondrej/fix-timer-test' into 'master'
Ondřej Surý [Wed, 13 Nov 2019 14:29:49 +0000 (14:29 +0000)] 
Merge branch 'ondrej/fix-timer-test' into 'master'

Fix the crash in the timer test

See merge request isc-projects/bind9!2557

6 years agofix netmgr setup/teardown issues; setup and teardown only once in timer_test
Evan Hunt [Wed, 13 Nov 2019 07:13:49 +0000 (23:13 -0800)] 
fix netmgr setup/teardown issues; setup and teardown only once in timer_test

- the netmgr was not correctly being specified when creating the task
  manager, and was cleaned up in the wrong order when shutting down.
- on freebsd, timer_test appears to be prone to failure if the
  netmgr is set up and torn down before and after ever test case, but
  less so if it's only set up once at the beginning and once at the
  end.

6 years agoRemove the assertions from subthreads and use global errcnt to record errors
Ondřej Surý [Tue, 12 Nov 2019 11:15:10 +0000 (12:15 +0100)] 
Remove the assertions from subthreads and use global errcnt to record errors

6 years agoLock the lasttime variable that's concurrently accessed between threads
Ondřej Surý [Tue, 12 Nov 2019 10:50:11 +0000 (11:50 +0100)] 
Lock the lasttime variable that's concurrently accessed between threads

6 years agoDirectly embed ../timer.c in timer_test.c for better assertion testing
Ondřej Surý [Sat, 9 Nov 2019 13:01:25 +0000 (14:01 +0100)] 
Directly embed ../timer.c in timer_test.c for better assertion testing

6 years agoRefactor the way we use memory context from isctest.c
Ondřej Surý [Sat, 9 Nov 2019 13:01:08 +0000 (14:01 +0100)] 
Refactor the way we use memory context from isctest.c

This commit renames isctest {mctx,lctx} to test_{mctx,lctx} and cleans
up their usage in the individual unit tests.  This allows embedding
library .c files directly into the unit tests.

6 years agoMerge branch 'wpk/fix-accidental-task-unpause' into 'master'
Witold Krecicki [Wed, 13 Nov 2019 13:45:09 +0000 (13:45 +0000)] 
Merge branch 'wpk/fix-accidental-task-unpause' into 'master'

Fix implicit task unpause when going from 'running' to 'idle'.

See merge request isc-projects/bind9!2571

6 years agoIf a task is running and we call isc_task_pause it can
Witold Kręcicki [Wed, 13 Nov 2019 10:26:34 +0000 (11:26 +0100)] 
If a task is running and we call isc_task_pause it can
be implicitly unpaused when we switch from 'running' to
'idle' state. Fix it by not switching to 'idle' when paused.

6 years agoMerge branch 'fix-url-in-readme' into 'master'
Michał Kępień [Wed, 13 Nov 2019 11:59:11 +0000 (11:59 +0000)] 
Merge branch 'fix-url-in-readme' into 'master'

updated a broken link for newer release notes.

See merge request isc-projects/bind9!2567

6 years agoUpdate broken release notes link
Vicky Risk [Tue, 12 Nov 2019 22:17:56 +0000 (22:17 +0000)] 
Update broken release notes link

6 years agoMerge branch 'michal/fix-libuv.dll-handling' into 'master'
Michał Kępień [Tue, 12 Nov 2019 11:24:41 +0000 (11:24 +0000)] 
Merge branch 'michal/fix-libuv.dll-handling' into 'master'

Fix libuv.dll handling

See merge request isc-projects/bind9!2556

6 years agoFix libuv.dll handling
Michał Kępień [Fri, 8 Nov 2019 13:25:37 +0000 (14:25 +0100)] 
Fix libuv.dll handling

Make sure libuv.dll gets copied to the proper directory in the Release
build configuration and that the BIND installer on Windows installs
libuv.dll.

6 years agoMerge branch 'ondrej/cleanup-PATH_MAX-and-NAME_MAX-ifdefs' into 'master'
Ondřej Surý [Tue, 12 Nov 2019 09:13:25 +0000 (09:13 +0000)] 
Merge branch 'ondrej/cleanup-PATH_MAX-and-NAME_MAX-ifdefs' into 'master'

Cleanup the {PATH,NAME}_MAX stray #ifdefs

See merge request isc-projects/bind9!2565

6 years agoCleanup the {PATH,NAME}_MAX stray #ifdefs
Ondřej Surý [Tue, 12 Nov 2019 08:36:08 +0000 (09:36 +0100)] 
Cleanup the {PATH,NAME}_MAX stray #ifdefs

6 years agoMerge branch 'hurd' into 'master'
Ondřej Surý [Tue, 12 Nov 2019 08:09:03 +0000 (08:09 +0000)] 
Merge branch 'hurd' into 'master'

hurd: Fix build

See merge request isc-projects/bind9!2558

6 years agohurd: Fix build
Samuel Thibault [Sun, 10 Nov 2019 20:14:17 +0000 (20:14 +0000)] 
hurd: Fix build

Move PATH_MAX, NAME_MAX, IOV_MAX default definitions to the common
<isc/platform.h>.

6 years agoMerge branch '1134-add-missing-dnssec-keygen-dependency-on-libisccfg' into 'master'
Michał Kępień [Fri, 8 Nov 2019 12:42:50 +0000 (12:42 +0000)] 
Merge branch '1134-add-missing-dnssec-keygen-dependency-on-libisccfg' into 'master'

Add missing dnssec-keygen dependency on libisccfg

Closes #1134

See merge request isc-projects/bind9!2555

6 years agoAdd missing dnssec-keygen dependency on libisccfg
Michał Kępień [Fri, 8 Nov 2019 11:52:10 +0000 (12:52 +0100)] 
Add missing dnssec-keygen dependency on libisccfg

Commit 09ac224c5c881824c7b6649905f16b7d3f1036f4 made dnssec-keygen
depend on libisccfg but the Visual Studio solution file was not updated
to reflect that change.  Make sure the dnssec-keygen Visual Studio
project depends on the libisccfg project to prevent compilation issues
during parallel builds.

6 years agoMerge branch 'michal/split-release-notes-into-per-version-sections' into 'master'
Michał Kępień [Fri, 8 Nov 2019 11:16:02 +0000 (11:16 +0000)] 
Merge branch 'michal/split-release-notes-into-per-version-sections' into 'master'

Split release notes into per-version sections

See merge request isc-projects/bind9!2524

6 years agoRebuild output files
Michał Kępień [Tue, 5 Nov 2019 11:33:40 +0000 (12:33 +0100)] 
Rebuild output files

6 years agoUpdate URLs used in release notes
Michał Kępień [Tue, 5 Nov 2019 11:33:40 +0000 (12:33 +0100)] 
Update URLs used in release notes

Some URLs used in release notes became outdated.  Make sure they point
to currently available resources.

6 years agoSplit release notes into per-version sections
Michał Kępień [Tue, 5 Nov 2019 11:33:40 +0000 (12:33 +0100)] 
Split release notes into per-version sections

Intertwining release notes from different BIND releases in a single XML
file has caused confusion in the past due to different (and often
arbitrary) approaches to keeping/removing release notes from older
releases on different BIND branches.  Divide doc/arm/notes.xml into
per-version sections to simplify determining the set of changes
introduced by a given release and to make adding/reviewing release notes
less error-prone.

6 years agoMerge branch '1256-fix-the-jitter-test-2' into 'master'
Ondřej Surý [Fri, 8 Nov 2019 07:43:50 +0000 (07:43 +0000)] 
Merge branch '1256-fix-the-jitter-test-2' into 'master'

Wait a little bit longer for autosign, bail out on not enough categories

See merge request isc-projects/bind9!2554

6 years agoWait a little bit longer for autosign, bail out on not enough categories
Ondřej Surý [Fri, 8 Nov 2019 06:43:33 +0000 (07:43 +0100)] 
Wait a little bit longer for autosign, bail out on not enough categories

6 years agoAdjust the jitter range to +-3*stddev
Ondřej Surý [Fri, 8 Nov 2019 06:05:02 +0000 (07:05 +0100)] 
Adjust the jitter range to +-3*stddev

6 years agoMerge branch '1256-fix-the-jitter-test' into 'master'
Ondřej Surý [Fri, 8 Nov 2019 06:01:47 +0000 (06:01 +0000)] 
Merge branch '1256-fix-the-jitter-test' into 'master'

Check if the RRSIG jitter falls <mean-2.5*stddev;mean+2.5*stddev>

Closes #1309

See merge request isc-projects/bind9!2553

6 years agoRevert "temporarily disable jitter tests in the 'autosign' system test"
Ondřej Surý [Thu, 7 Nov 2019 20:42:45 +0000 (21:42 +0100)] 
Revert "temporarily disable jitter tests in the 'autosign' system test"

This reverts commit e17b7ee05aebeedbbbf8fc581eb9ae472a63e88a.

6 years agoCheck if the RRSIG jitter falls into mean+-2.5*stddev range
Ondřej Surý [Thu, 7 Nov 2019 13:54:24 +0000 (14:54 +0100)] 
Check if the RRSIG jitter falls into mean+-2.5*stddev range

6 years agoMerge branch '29-libuv-network-manager' into 'master'
Witold Krecicki [Thu, 7 Nov 2019 21:32:28 +0000 (21:32 +0000)] 
Merge branch '29-libuv-network-manager' into 'master'

libuv-based network manager

Closes #29

See merge request isc-projects/bind9!2528

6 years agoCHANGES, README, release note
Evan Hunt [Wed, 6 Nov 2019 01:52:03 +0000 (17:52 -0800)] 
CHANGES, README, release note

6 years agoadjust system tests to deal with possible timing issues
Evan Hunt [Wed, 6 Nov 2019 00:14:06 +0000 (16:14 -0800)] 
adjust system tests to deal with possible timing issues

With the netmgr in use, named may start answering queries before zones
are loaded. This can cause transient failures in system tests after
servers are restarted or reconfigured. This commit adds retry loops
and sleep statements where needed to address this problem.

Also incidentally silenced a clang warning.

6 years agoremove ISC_QUEUE as it is no longer used
Evan Hunt [Wed, 6 Nov 2019 00:39:58 +0000 (16:39 -0800)] 
remove ISC_QUEUE as it is no longer used

6 years agoconvert ns_client and related objects to use netmgr
Evan Hunt [Tue, 5 Nov 2019 23:34:35 +0000 (15:34 -0800)] 
convert ns_client and related objects to use netmgr

- ns__client_request() is now called by netmgr with an isc_nmhandle_t
  parameter. The handle can then be permanently associated with an
  ns_client object.
- The task manager is paused so that isc_task events that may be
  triggred during client processing will not fire until after the netmgr is
  finished with it. Before any asynchronous event, the client MUST
  call isc_nmhandle_ref(client->handle), to prevent the client from
  being reset and reused while waiting for an event to process. When
  the asynchronous event is complete, isc_nmhandle_unref(client->handle)
  must be called to ensure the handle can be reused later.
- reference counting of client objects is now handled in the nmhandle
  object.  when the handle references drop to zero, the client's "reset"
  callback is used to free temporary resources and reiniialize it,
  whereupon the handle (and associated client) is placed in the
  "inactive handles" queue.  when the sysstem is shutdown and the
  handles are cleaned up, the client's "put" callback is called to free
  all remaining resources.
- because client allocation is no longer handled in the same way,
  the '-T clienttest' option has now been removed and is no longer
  used by any system tests.
- the unit tests require wrapping the isc_nmhandle_unref() function;
  when LD_WRAP is supported, that is used. otherwise we link a
  libwrap.so interposer library and use that.

6 years agouse clock_gettime() instead of gettimeofday() for isc_itme functions
Witold Kręcicki [Sat, 8 Dec 2018 23:41:21 +0000 (00:41 +0100)] 
use clock_gettime() instead of gettimeofday() for isc_itme functions

6 years agoadd atomic_exchange operations to mutexatomic.h and win32 stdatomic.h
Witold Kręcicki [Thu, 24 Oct 2019 08:55:54 +0000 (10:55 +0200)] 
add atomic_exchange operations to mutexatomic.h and win32 stdatomic.h

6 years agoadd isc_task_pause() and isc_task_unpause() functions
Evan Hunt [Tue, 5 Nov 2019 23:23:33 +0000 (15:23 -0800)] 
add isc_task_pause() and isc_task_unpause() functions

This allows a task to be temporary disabled so that objects won't be
processed simultaneously by libuv events and isc_task events. When a
task is paused, currently running events may complete, but no further
event will added to the run queue will be executed until the task is
unpaused.

6 years agooptionally associate a netmgr with a task manager when creating
Evan Hunt [Tue, 5 Nov 2019 23:23:33 +0000 (15:23 -0800)] 
optionally associate a netmgr with a task manager when creating

When a task manager is created, we can now specify an `isc_nm`
object to associate with it; thereafter when the task manager is
placed into exclusive mode, the network manager will be paused.

6 years agodisable leak detection in ASAN; libuv has some problems with that
Witold Kręcicki [Mon, 4 Nov 2019 14:32:31 +0000 (15:32 +0100)] 
disable leak detection in ASAN; libuv has some problems with that

6 years agouse netmgr in libisc unit tests
Evan Hunt [Wed, 6 Nov 2019 00:28:43 +0000 (16:28 -0800)] 
use netmgr in libisc unit tests

6 years agonetmgr: libuv-based network manager
Witold Kręcicki [Tue, 5 Nov 2019 21:55:54 +0000 (13:55 -0800)] 
netmgr: libuv-based network manager

This is a replacement for the existing isc_socket and isc_socketmgr
implementation. It uses libuv for asynchronous network communication;
"networker" objects will be distributed across worker threads reading
incoming packets and sending them for processing.

UDP listener sockets automatically create an array of "child" sockets
so each worker can listen separately.

TCP sockets are shared amongst worker threads.

A TCPDNS socket is a wrapper around a TCP socket, which handles the
the two-byte length field at the beginning of DNS messages over TCP.

(Other wrapper socket types can be implemented in the future to handle
DNS over TLS, DNS over HTTPS, etc.)

6 years agoimplement fixed-size array stack data structure
Evan Hunt [Tue, 5 Nov 2019 21:50:43 +0000 (13:50 -0800)] 
implement fixed-size array stack data structure

6 years agoimplement fetch-and-add array queue data structure
Witold Kręcicki [Tue, 5 Nov 2019 21:28:50 +0000 (13:28 -0800)] 
implement fetch-and-add array queue data structure

this is a lockless queue based on hazard pointers.

6 years agotemporarily move ISC_QUEUE to list.h
Evan Hunt [Tue, 5 Nov 2019 21:18:37 +0000 (13:18 -0800)] 
temporarily move ISC_QUEUE to list.h

The double-locked queue implementation is still currently in use
in ns_client, but will be replaced by a fetch-and-add array queue.
This commit moves it from queue.h to list.h so that queue.h can be
used for the new data structure, and clean up dependencies between
list.h and types.h. Later, when the ISC_QUEUE is no longer is use,
it will be removed completely.

6 years agoimplement hazard pointer data structure
Witold Kręcicki [Tue, 5 Nov 2019 18:52:20 +0000 (10:52 -0800)] 
implement hazard pointer data structure

this is a mechanism to allow safe lock-free data structures.

6 years agoPreliminary netmgr design documentation
Witold Kręcicki [Wed, 8 May 2019 08:43:12 +0000 (10:43 +0200)] 
Preliminary netmgr design documentation

6 years agoadd isc_sockaddr_fromsockaddr function
Witold Kręcicki [Tue, 15 Jan 2019 10:01:13 +0000 (11:01 +0100)] 
add isc_sockaddr_fromsockaddr function

This converts from struct sockaddr to isc_sockaddr_t

6 years agoMerge branch '1308-fix-tcp-system-test' into 'master'
Evan Hunt [Thu, 7 Nov 2019 19:55:04 +0000 (19:55 +0000)] 
Merge branch '1308-fix-tcp-system-test' into 'master'

Fix "tcp" system test

Closes #1308

See merge request isc-projects/bind9!2549

6 years agomake send_command wait for any result, rather than specifically result=OK
Evan Hunt [Thu, 7 Nov 2019 19:32:59 +0000 (11:32 -0800)] 
make send_command wait for any result, rather than specifically result=OK

6 years agoAddress ShellCheck warnings
Michał Kępień [Thu, 7 Nov 2019 11:25:39 +0000 (12:25 +0100)] 
Address ShellCheck warnings

Address all outstanding warnings that ShellCheck reports for
bin/tests/system/tcp/tests.sh.

6 years agoUse "set -e" in the "tcp" system test
Michał Kępień [Thu, 7 Nov 2019 11:25:39 +0000 (12:25 +0100)] 
Use "set -e" in the "tcp" system test

Ensure any unexpected failure in the "tcp" system test causes it to be
immediately interrupted with an error to make the aforementioned test
more reliable.  Since the exit code for "expr 0 + 0" is 1, the status
variable needs to be updated using arithmetic expansion.

6 years agoEnsure all "tcp" system test errors are caught
Michał Kępień [Thu, 7 Nov 2019 11:25:39 +0000 (12:25 +0100)] 
Ensure all "tcp" system test errors are caught

Ensure any "rndc stats" failure causes the "tcp" system test to fail.
Do not hide "rndc stats" output.

6 years agoMake all "tcp" system test checks numbered
Michał Kępień [Thu, 7 Nov 2019 11:25:39 +0000 (12:25 +0100)] 
Make all "tcp" system test checks numbered

Ensure all checks in the "tcp" system test are numbered, so that
forensic data is preserved in case of any failure.

6 years agoFix argument order in assert_int_equal()
Michał Kępień [Thu, 7 Nov 2019 11:25:39 +0000 (12:25 +0100)] 
Fix argument order in assert_int_equal()

assert_int_equal() calls in bin/tests/system/tcp/tests.sh pass the found
value as the first argument and the expected value as the second
argument, while the function interprets its arguments the other way
round.  Fix argument handling in assert_int_equal() to make sure the
error messages printed by that function are correct.

6 years agoAllow retries when checking TCP high-water stats
Michał Kępień [Thu, 7 Nov 2019 11:25:39 +0000 (12:25 +0100)] 
Allow retries when checking TCP high-water stats

In the TCP high-water checks, "rndc stats" is run after ans6 reports
that it opened the requested number of TCP connections.  However, we
fail to account for the fact that ns5 might not yet have called accept()
for these connections, in which case the counts output by "rndc stats"
will be off.  To prevent intermittent "tcp" system test failures, allow
the relevant connection count checks to be retried (just once, after one
second, as that should be enough for any system to accept() a dozen TCP
connections under any circumstances).

6 years agoMerge branch 'each-disable-jitter-test' into 'master'
Evan Hunt [Thu, 7 Nov 2019 18:25:36 +0000 (18:25 +0000)] 
Merge branch 'each-disable-jitter-test' into 'master'

temporarily disable jitter tests in the 'autosign' system test

See merge request isc-projects/bind9!2551

6 years agotemporarily disable jitter tests in the 'autosign' system test
Evan Hunt [Thu, 7 Nov 2019 17:09:28 +0000 (09:09 -0800)] 
temporarily disable jitter tests in the 'autosign' system test

the current method used for testing distribution of signatures
is failure-prone. we need to replace it with something both
effective and portable, but in the meantime we're commenting
out the jitter test.

6 years agoMerge branch '1134-fix-bashisms-in-kasp-test' into 'master'
Ondřej Surý [Thu, 7 Nov 2019 12:52:14 +0000 (12:52 +0000)] 
Merge branch '1134-fix-bashisms-in-kasp-test' into 'master'

Fix the bashisms in kasp/tests.sh and make the script shellcheck clean

See merge request isc-projects/bind9!2548

6 years agoUse better '\#' quoting in ns3/setup.sh
Ondřej Surý [Thu, 7 Nov 2019 11:04:38 +0000 (12:04 +0100)] 
Use better '\#' quoting in ns3/setup.sh

6 years agoRelax the requirement for check_next_key_event() to <-60;60>
Ondřej Surý [Thu, 7 Nov 2019 09:39:43 +0000 (10:39 +0100)] 
Relax the requirement for check_next_key_event() to <-60;60>

The original requirement for the check to pass was <-10;10> interval and
the first test was failing by 1 second.  As the minimum interval for
checking is 7200 seconds, the commit relaxes the requirement to <-60;60>
interval, which is still sane, but not that draconic.

6 years agoFix the get_keyids() usage as it could return multiple key ids
Ondřej Surý [Thu, 7 Nov 2019 09:26:04 +0000 (10:26 +0100)] 
Fix the get_keyids() usage as it could return multiple key ids

The get_keyids() function can return multiple keyids, when the
return value was not quoted, only the first keyid would be checked
with check_key() function.  This MR fixes both the error that came
with quoting the "$id" with value "12345 54321", and the code now
checks all returned keyids.

6 years agoClean the rest of the shellcheck errors
Ondřej Surý [Thu, 7 Nov 2019 09:07:14 +0000 (10:07 +0100)] 
Clean the rest of the shellcheck errors

6 years agoUse the shellcheck -f diff to autofix certain classes of sh errors
Ondřej Surý [Thu, 7 Nov 2019 08:52:16 +0000 (09:52 +0100)] 
Use the shellcheck -f diff to autofix certain classes of sh errors

6 years agoReplace bash array with concatenated evaluated shell variables
Ondřej Surý [Thu, 7 Nov 2019 08:35:34 +0000 (09:35 +0100)] 
Replace bash array with concatenated evaluated shell variables

6 years agoMerge branch 'each-kasp-relnotes' into 'master'
Evan Hunt [Thu, 7 Nov 2019 04:12:36 +0000 (04:12 +0000)] 
Merge branch 'each-kasp-relnotes' into 'master'

KASP release notes

See merge request isc-projects/bind9!2547

6 years agoCHANGES, REAMDE, release note
Evan Hunt [Thu, 7 Nov 2019 04:06:36 +0000 (20:06 -0800)] 
CHANGES, REAMDE, release note

6 years agoadd 'kasp' to test list
Evan Hunt [Thu, 7 Nov 2019 03:54:02 +0000 (19:54 -0800)] 
add 'kasp' to test list

6 years agoMerge branch '1134-dnssec-made-easy' into 'master'
Matthijs Mekking [Wed, 6 Nov 2019 22:40:53 +0000 (22:40 +0000)] 
Merge branch '1134-dnssec-made-easy' into 'master'

DNSSEC Made Easy

Closes #1134

See merge request isc-projects/bind9!2458

6 years agoFix checkconf test
Matthijs Mekking [Tue, 5 Nov 2019 16:49:46 +0000 (17:49 +0100)] 
Fix checkconf test

6 years agodnssec-policy inheritance from options/view
Matthijs Mekking [Tue, 5 Nov 2019 16:22:35 +0000 (17:22 +0100)] 
dnssec-policy inheritance from options/view

'dnssec-policy' can now also be set on the options and view level and
a zone that does not set 'dnssec-policy' explicitly will inherit it
from the view or options level.

This requires a new keyword to be introduced: 'none'.  If set to
'none' the zone will not be DNSSEC maintained, in other words it will
stay unsigned.  You can use this to break the inheritance.  Of course
you can also break the inheritance by referring to a different
policy.

The keywords 'default' and 'none' are not allowed when configuring
your own dnssec-policy statement.

Add appropriate tests for checking the configuration (checkconf)
and add tests to the kasp system test to verify the inheritance
works.

Edit the kasp system test such that it can deal with unsigned zones
and views (so setting a TSIG on the query).

6 years agomove appending kasp to the list until we can't fail; document why we don't detach
Mark Andrews [Tue, 5 Nov 2019 02:38:00 +0000 (13:38 +1100)] 
move appending kasp to the list until we can't fail; document why we don't detach

6 years agoInsist that kasp is not linked.
Mark Andrews [Tue, 5 Nov 2019 02:36:40 +0000 (13:36 +1100)] 
Insist that kasp is not linked.

6 years agoMake kasp opaque
Matthijs Mekking [Mon, 4 Nov 2019 15:26:39 +0000 (16:26 +0100)] 
Make kasp opaque

6 years agokasp.c: return parenthesis (style) and REQUIRE
Matthijs Mekking [Mon, 4 Nov 2019 11:04:52 +0000 (12:04 +0100)] 
kasp.c: return parenthesis (style) and REQUIRE

This code was missing a lot of return parenthesis (violating our
style guide) and a missing REQUIRE in 'dns_kasplist_find()'.

6 years agoAdd tests for CDS/CDNSKEY publication
Matthijs Mekking [Mon, 4 Nov 2019 10:20:00 +0000 (11:20 +0100)] 
Add tests for CDS/CDNSKEY publication

The kasp system tests are updated with 'check_cds' calls that will
verify that the correct CDS and CDNSKEY records are published during
a rollover and that they are signed with the correct KSK.

This requires a change in 'dnssec.c' to check the kasp key states
whether the CDS/CDNSKEY of a key should be published or not.  If no
kasp state exist, fall back to key timings.

6 years agosign_apex() should also consider CDS/CDNSKEY
Matthijs Mekking [Mon, 4 Nov 2019 10:16:08 +0000 (11:16 +0100)] 
sign_apex() should also consider CDS/CDNSKEY

The 'sign_apex()' function has special processing for signing the
DNSKEY RRset such that it will always be signed with the active
KSK.  Since CDS and CDNSKEY are also signed with the KSK, it
should have the same special processing.  The special processing is
moved into a new function 'tickle_apex_rrset()' and is applied to
all three RR types (DNSKEY, CDS, CDNSKEY).

In addition, when kasp is involved, update the DNSKEY TTL accordingly
to what is in the policy.

6 years agoAdd dst_key_copy_metadata function.
Matthijs Mekking [Mon, 4 Nov 2019 10:12:26 +0000 (11:12 +0100)] 
Add dst_key_copy_metadata function.

When updating DNSSEC keys we would like to be able to copy the
metadata from one key to another.

6 years agoKASP timings all uint32_t
Matthijs Mekking [Wed, 30 Oct 2019 16:40:08 +0000 (17:40 +0100)] 
KASP timings all uint32_t

Get rid of the warnings in the Windows build.

6 years agoTest CSK rollover
Matthijs Mekking [Wed, 30 Oct 2019 15:45:41 +0000 (16:45 +0100)] 
Test CSK rollover

Test two CSK rollover scenarios, one where the DS is swapped before the zone
signatures are all replaced, and one where the signatures are replaced sooner
than the DS is swapped.

6 years agoCode changes for CSK
Matthijs Mekking [Wed, 30 Oct 2019 13:38:28 +0000 (14:38 +0100)] 
Code changes for CSK

Update dns_dnssec_keyactive to differentiate between the roles ZSK
and KSK.  A key is active if it is signing but that differs per role.
A ZSK is signing if its ZRRSIG state is in RUMOURED or OMNIPRESENT,
a KSK is signing if its KRRSIG state is in RUMOURED or OMNIPRESENT.

This means that a key can be actively signing for one role but not
the other.  Add checks in inline signing (zone.c and update.c) to
cover the case where a CSK is active in its KSK role but not the ZSK
role.

6 years agoUse keywords in dnssec-policy keys configuration
Matthijs Mekking [Mon, 21 Oct 2019 11:26:30 +0000 (13:26 +0200)] 
Use keywords in dnssec-policy keys configuration

Add keywords 'lifetime' and 'algorithm' to make the key configuration
more clear.

6 years agoTest ZSK and KSK rollover
Matthijs Mekking [Thu, 17 Oct 2019 13:50:52 +0000 (15:50 +0200)] 
Test ZSK and KSK rollover

Add tests for ZSK Pre-Publication and KSK Double-KSK rollover.

Includes tests for next key event is scheduled at the right time.

6 years agoAdd kasp tests
Matthijs Mekking [Thu, 17 Oct 2019 13:27:06 +0000 (15:27 +0200)] 
Add kasp tests

Add more tests for kasp:

- Add tests for different algorithms.

- Add a test to ensure that an edit in an unsigned zone is
  picked up and properly signed.

- Add two tests that ensures that a zone gets signed when it is
  configured as so-called 'inline-signing'.  In other words, a
  secondary zone that is configured with a 'dnssec-policy'.  A zone
  that is transferred over AXFR or IXFR will get signed.

- Add a test to ensure signatures are reused if they are still
  fresh enough.

- Adds two more tests to verify that expired and unfresh signatures
  will be regenerated.

- Add tests for various cases with keys already available in the
  key-directory.

6 years agoRefactor kasp system test
Matthijs Mekking [Thu, 17 Oct 2019 12:22:38 +0000 (14:22 +0200)] 
Refactor kasp system test

A significant refactor of the kasp system test in an attempt to
make the test script somewhat brief.  When writing a test case,
you can/should use the functions 'zone_properties',
'key_properties', and 'key_timings' to set the expected values
when checking a key with 'check_key'. All these four functions
can be used to set environment variables that come in handy when
testing output.

6 years agoAdjust signing code to use kasp
Matthijs Mekking [Thu, 17 Oct 2019 09:57:20 +0000 (11:57 +0200)] 
Adjust signing code to use kasp

Update the signing code in lib/dns/zone.c and lib/dns/update.c to
use kasp logic if a dnssec-policy is enabled.

This means zones with dnssec-policy should no longer follow
'update-check-ksk' and 'dnssec-dnskey-kskonly' logic, instead the
KASP keys configured dictate which RRset gets signed with what key.

Also use the next rekey event from the key manager rather than
setting it to one hour.

Mark the zone dynamic, as otherwise a zone with dnssec-policy is
not eligble for automatic DNSSEC maintenance.

6 years agoDNSSEC hints use dst_key functions and key states
Matthijs Mekking [Thu, 17 Oct 2019 09:51:58 +0000 (11:51 +0200)] 
DNSSEC hints use dst_key functions and key states

Update dns_dnssec_get_hints and dns_dnssec_keyactive to use dst_key
functions and thus if dnssec-policy/KASP is used the key states are
being considered.

Add a new variable to 'struct dns_dnsseckey' to signal whether this
key is a zone-signing key (it is no longer true that ksk == !zsk).

Also introduce a hint for revoke.

Update 'dns_dnssec_findzonekeys' and 'dns_dnssec_findmatchingkeys'
to also read the key state file, if available.

Remove 'allzsk' from 'dns_dnssec_updatekeys' as this was only a
hint for logging.

Also make get_hints() (now dns_dnssec_get_hints()) public so that
we can use it in the key manager.

6 years agoUpdate zoneconf to use kasp config
Matthijs Mekking [Thu, 17 Oct 2019 09:38:56 +0000 (11:38 +0200)] 
Update zoneconf to use kasp config

If a zone has a dnssec-policy set, use signature validity,
dnskey signature validity, and signature refresh from
dnssec-policy.

Zones configured with 'dnssec-policy' will allow 'named' to create
DNSSEC keys (similar to dnssec-keymgr) if not available.