Commit Graph

34195 Commits

Author SHA1 Message Date
Matthijs Mekking
f7872dbd20 Add checkds code
Similar to notify, add code to send and keep track of checkds requests.

On every zone_rekey event, we will check the DS at parental agents
(but we will only actually query parental agents if theree is a DS
scheduled to be published/withdrawn).

On a zone_rekey event, we will first clear the ongoing checkds requests.
Reset the counter, to avoid continuing KSK rollover premature.

This has the risk that if zone_rekey events happen too soon after each
other, there are redundant DS queries to the parental agents. But
if TTLs and the configured durations in the dnssec-policy are sane (as
in not ridiculous short) the chance of this happening is low.
2021-06-30 17:28:49 +02:00
Matthijs Mekking
1a50554963 Add checkds log notice
When the checkds published/withdrawn is activated, log a notice. Can
be used for testing, but also operationally useful.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
6e2c24be7c Add key metadata for DS published/withdrawn
In order to keep track of how many parents have the DS for a given key
published or withdrawn, keep a counter.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
4c337a8e72 Add missing VERIFY export
This makes the 'dnssec-verify' tool visible to the test environment.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
71d5932a14 Slightly improved dnssec tools fatal message
Return the offending key state identifier.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
40331a20c4 Add helpful function 'dns_zone_getdnsseckeys'
This code gathers DNSSEC keys from key files and from the DNSKEY RRset.
It is used for the 'rndc dnssec -status' command, but will also be
needed for "checkds". Turn it into a function.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
2872d6a12e Add "parental-source[-v6]" config option
Similar to "notify-source" and "transfer-source", add options to
set the source address when querying parental agents for DS records.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
c9b7f62767 Add dst_key_role function
Change the static function 'get_ksk_zsk' to a library function that
can be used to determine the role of a dst_key. Add checks if the
boolean parameters to store the role are not NULL. Rename to
'dst_key_role'.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
6f92d4b9a5 Parse "parental-agents" configuration
Parse the new "parental-agents" configuration and store it in the zone
structure.
2021-06-30 17:28:48 +02:00
Matthijs Mekking
6040c71478 Make "primaries" config parsing generic
Make the code to parse "primaries" configuration more generic so
it can be reused for "parental-agents".
2021-06-30 17:28:48 +02:00
Matthijs Mekking
8327cb7839 Remove stray "setup zone" in kasp system setup 2021-06-30 17:28:48 +02:00
Matthijs Mekking
56262db9cd Add checkds system test
Add a Pytest based system test for the 'checkds' feature. There is
one nameserver (ns9, because it should be started the latest) that
has configured several zones with dnssec-policy. The zones are set
in such a state that they are waiting for DS publication or DS
withdrawal.

Then several other name servers act as parent servers that either have
the DS for these published, or not. Also one server in the mix is
to test a badly configured parental-agent.

There are tests for DS publication, DS publication error handling,
DS withdrawal and DS withdrawal error handling.

The tests ensures that the zone is DNSSEC valid, and that the
DSPublish/DSRemoved key metadata is set (or not in case of the error
handling).

It does not test if the rollover continues, this is already tested in
the kasp system test (that uses 'rndc -dnssec checkds' to set the
DSPublish/DSRemoved key metadata).
2021-06-30 17:28:48 +02:00
Matthijs Mekking
1e763e582b Check parental-agents config
Add checks for "parental-agents" configuration, checking for the option
being at wrong type of zone (only allowed for primaries and
secondaries), duplicate definitions, duplicate references, and
undefined parental clauses (the name referenced in the zone clause
does not have a matching "parental-agent" clause).
2021-06-30 17:28:48 +02:00
Matthijs Mekking
0311705d4b Add parental-agents configuration
Introduce a way to configure parental agents that can be used to
query DS records to be used in automatic key rollovers.
2021-06-30 17:28:47 +02:00
Matthijs Mekking
39a961112f Change primaries objects to remote-servers
Change the primaries configuration objects to the more generic
remote-servers, that we can reuse for other purposes (such as
parental-agents).
2021-06-30 17:21:11 +02:00
Petr Špaček
f4c4217eec Merge branch '2797-cfg-net-buf-sizes' into 'main'
fix tcp-send-buffer, udp-receive-buffer, udp-send-buffer limits

Closes #2797

See merge request isc-projects/bind9!5235
2021-06-28 10:15:12 +00:00
Petr Špaček
9290d9752d fix tcp-send-buffer, udp-receive-buffer, udp-send-buffer limits 2021-06-28 11:16:00 +02:00
Matthijs Mekking
6f84024cb5 Merge branch '2791-busy-wait-setnsec3param-shutdown-hang' into 'main'
Fix setnsec3param shutdown hang

Closes #2791

See merge request isc-projects/bind9!5219
2021-06-28 09:01:02 +00:00
Matthijs Mekking
2f270428fc Add changes for [#2791] 2021-06-28 10:38:31 +02:00
Matthijs Mekking
10055d44e3 Fix setnsec3param hang on shutdown
When performing the 'setnsec3param' task, zones that are not loaded will have
their task rescheduled. We should do this only if the zone load is still
pending, this prevents zones that failed to load get stuck in a busy wait and
causing a hang on shutdown.
2021-06-28 10:35:34 +02:00
Matthijs Mekking
3631a23c7f Add configuration that causes setnsec3param hang
Add a zone to the configuration file that uses NSEC3 with dnssec-policy
and fails to load. This will cause setnsec3param to go into a busy wait
and will cause a hang on shutdown.
2021-06-28 10:34:19 +02:00
Ondřej Surý
33394f11c3 Merge branch 'ondrej/fix-the-CFLAGS-order-in-tests' into 'main'
Move the include Makefile.tests to the bottom of Makefile.am(s)

See merge request isc-projects/bind9!4927
2021-06-24 13:49:03 +00:00
Ondřej Surý
e59a359929 Move the include Makefile.tests to the bottom of Makefile.am(s)
The Makefile.tests was modifying global AM_CFLAGS and LDADD and could
accidentally pull /usr/include to be listed before the internal
libraries, which is known to cause problems if the headers from the
previous version of BIND 9 has been installed on the build machine.
2021-06-24 15:33:52 +02:00
Ondřej Surý
5c82f7c71b Merge branch 'ondrej/remove-the-cvs-cruft' into 'main'
Remove unused or outdated utils, developer and design documentation

Closes #2745

See merge request isc-projects/bind9!5131
2021-06-24 09:45:48 +00:00
Matthijs Mekking
71c6d40942 Remove HISTORY file
We should drop the HISTORY file because it's confusing and the same
information is covered by the release notes for .0 releases (or at
least they should be).

Remove references to the HISTORY file, update the README to tell
people go look somewhere else.
2021-06-24 11:44:13 +02:00
Matthijs Mekking
717a39d5b9 Add steps to update copyrights
This was written down in the outdated doc/dev/release documentation.
Since the rest of that file can go, add these steps to a separate file
and update it to current standards (e.g. use git commands).
2021-06-24 11:14:27 +02:00
Ondřej Surý
df4d072c72 Remove unused or outdated utils, developer and design documentation
The util/, doc/design/, and doc/dev/ directories included couple of
tools or documents there were completely outdated because they either
refered the the VCS we no longer use (cvs) or described processes that
have been redesigned and they are documented elsewhere.
2021-06-24 11:14:27 +02:00
Matthijs Mekking
da8b5d7947 Merge branch '2780-checkconf-dnssec-policy-inheritance' into 'main'
Fix checkconf dnssec-policy inheritance bug

Closes #2780

See merge request isc-projects/bind9!5199
2021-06-24 08:40:52 +00:00
Matthijs Mekking
d0668bd4cc Add change and release note for [#2780] 2021-06-24 09:32:28 +02:00
Matthijs Mekking
75ec7d1d9f Fix checkconf dnssec-policy inheritance bug
Similar to #2778, the check for 'dnssec-policy' failed to account for
it being inheritable.
2021-06-24 09:31:59 +02:00
Ondřej Surý
30b23706d6 Merge branch '2183-tweak-the-safe-edns-udp-size-to-1432' into 'main'
Change the safe edns-udp-size from 1400 to 1432

Closes #2183

See merge request isc-projects/bind9!5228
2021-06-23 19:00:59 +00:00
Ondřej Surý
4266f6dd2b Change the safe edns-udp-size from 1400 to 1432
When backporting the Don't Fragment UDP socket option, it was noticed
that the edns-udp-size probing uses 1432 as one of the values to be
probed and the documentation would be recommending 1400 as the safe
value.  As the safe value can be from the 1400-1500 interval, the
documentation has been changed to match the probed value, so we do not
skip it.
2021-06-23 20:57:05 +02:00
Evan Hunt
cc39e4c8cf Merge branch '2758-nsupdate-refused' into 'main'
nsupdate: try next server on REFUSED

Closes #2758

See merge request isc-projects/bind9!5158
2021-06-23 16:01:55 +00:00
Evan Hunt
693eb67af9 CHANGES 2021-06-23 09:01:04 -07:00
Evan Hunt
d02210607d add test for server failover on REFUSED
- add an 'nsupdate -C' option to override resolv.conf file for nsupdate
- set resolv.conf to use two test servers, the first one of which will
  return REFUSED for a query for 'example'.
2021-06-23 09:00:29 -07:00
Evan Hunt
2100331307 nsupdate: try next server on REFUSED
when nsupdate sends an SOA query to a resolver, if it fails
with REFUSED, nsupdate will now try the next server rather than
aborting the update completely.
2021-06-23 09:00:29 -07:00
Ondřej Surý
f391a5edf9 Merge branch '2790-properly-handle-oversized-messages-in-isc_nm_send' into 'main'
Handle `UV_EMSGSIZE` in the uv_udp_send() callback

Closes #2790

See merge request isc-projects/bind9!5212
2021-06-23 15:55:52 +00:00
Ondřej Surý
5d9c0a3721 Add CHANGES and release note for [GL #2790] 2021-06-23 17:41:34 +02:00
Ondřej Surý
b941411072 Disable IP fragmentation on the UDP sockets
In DNS Flag Day 2020, we started setting the DF (Don't Fragment socket
option on the UDP sockets.  It turned out, that this code was incomplete
leading to dropping the outgoing UDP packets.

This has been now remedied, so it is possible to disable the
fragmentation on the UDP sockets again as the sending error is now
handled by sending back an empty response with TC (truncated) bit set.

This reverts commit 66eefac78c.
2021-06-23 17:41:34 +02:00
Evan Hunt
a3ba95116e Handle UDP send errors when sending DNS message larger than MTU
When the fragmentation is disabled on UDP sockets, the uv_udp_send()
call can fail with UV_EMSGSIZE for messages larger than path MTU.
Previously, this error would end with just discarding the response.  In
this commit, a proper handling of such case is added and on such error,
a new DNS response with truncated bit set is generated and sent to the
client.

This change allows us to disable the fragmentation on the UDP
sockets again.
2021-06-23 17:41:34 +02:00
Matthijs Mekking
e7e48414e0 Merge branch 'matthijs-2778-more-tests' into 'main'
Add more test cases for #2778

See merge request isc-projects/bind9!5198
2021-06-23 15:30:04 +00:00
Matthijs Mekking
9bd6c96b78 Add more test cases for #2778
Add three more test cases that detect a configuration error if the
key-directory is inherited but has the same value for a zone in a
different view with a deviating DNSSEC policy.
2021-06-23 17:28:06 +02:00
Ondřej Surý
38d42bb5be Merge branch '2788-add-rbtdb-ownercase-unittest' into 'main'
Add rbtdb setownercase/getownercase unit test

Closes #2788

See merge request isc-projects/bind9!5223
2021-06-23 15:13:09 +00:00
Ondřej Surý
c7a11bd5b4 Add rbtdb setownercase/getownercase unit test
This commit adds a unittest that tests private rdataset_getownercase()
and rdataset_setownercase() methods from rbtdb.c.  The test setups
minimal mock dns_rbtdb_t and dns_rbtdbnode_t data structures.

As the rbtdb methods are generally hidden behind layers and layers, we
include the "rbtdb.c" directly from rbtdb_test.c, and thus we can use
the private methods and data structures directly.  This also opens up
opportunity to add more unittest for the rbtdb private functions without
going through all the layers.
2021-06-23 16:38:46 +02:00
Matthijs Mekking
4db35fce0b Merge branch '2765-servestale-intermittent-test-failure-144' into 'main'
Resolve intermittent serve-stale test failure (144)

Closes #2765

See merge request isc-projects/bind9!5167
2021-06-23 13:10:28 +00:00
Matthijs Mekking
05e73a24f0 Bump wait time in servestale test with 1 second
This check intermittently failed:

I:serve-stale:check not in cache longttl.example times out...
I:serve-stale:failed

This corresponds to this query in the test:

$DIG -p ${PORT} +tries=1 +timeout=3  @10.53.0.3 longttl.example TXT

Looking at the dig output for a failed test, the query actually got a
response from the authoritative server (in one specific example the
query time was 2991 msec, close to 3 seconds).

After doing the query for the test, we enable the authoritative
server after a sleep of three seconds. If we bump this sleep to 4
seconds, the race will be more in favor of the query timing out,
making it unlikely that this test will fail intermittently.

Bump the subsequent wait_for_log checks also with one second.
2021-06-23 13:09:59 +00:00
Michał Kępień
3939385c13 Merge branch 'v9_17_15-release' into 'main'
Merge 9.17.15 release branch

See merge request isc-projects/bind9!5220
2021-06-23 11:02:05 +00:00
Michał Kępień
41de9ad84a Set up release notes for BIND 9.17.16 2021-06-23 12:56:35 +02:00
Michał Kępień
b16f9d5f0e Update BIND version to 9.17.15 2021-06-23 12:56:35 +02:00
Michał Kępień
eeb626d75c Add CHANGES annotations 2021-06-23 12:56:35 +02:00