Commit Graph
33422 Commits
Author SHA1 Message Date
Matthijs Mekking 2dfd09fa3a Add missing VERIFY export
This makes the 'dnssec-verify' tool visible to the test environment.

(cherry picked from commit 4c337a8e72)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 8ca6571ee9 Slightly improved dnssec tools fatal message
Return the offending key state identifier.

(cherry picked from commit 71d5932a14)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 850aed0219 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.

(cherry picked from commit 40331a20c4)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 9c0e252e2b 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.

(manually picked from commit 2872d6a12e)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 884750b66d 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'.

(cherry picked from commit c9b7f62767)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 63582dc778 Parse "parental-agents" configuration
Parse the new "parental-agents" configuration and store it in the zone
structure.

(cherry picked from commit 6f92d4b9a5)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 72d97df483 Make "primaries" config parsing generic
Make the code to parse "primaries" configuration more generic so
it can be reused for "parental-agents".

(cherry picked from commit 6040c71478)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 6369dec812 Remove stray "setup zone" in kasp system setup
(cherry picked from commit 8327cb7839)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 7d877cea14 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).

(manually picked from commit 56262db9cd)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 514eccf730 Move checkds system test to checkdstool
There is a checkds system test in v9_16 that does not exist in the
main branch. This existing checkds system test checks the behaviour of
the dnssec-checkds tool. Before backporting the new checkds system
test, that tests the feature where BIND checks periodically the
parental agents if the DS for a given KSK has been published, move the
existing checkds system test to checkdstool.
2021-07-01 14:48:23 +02:00
Matthijs Mekking ab26fc2d66 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).

(cherry picked from commit 1e763e582b)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 90ef2b9c81 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.

(manually picked from commit 0311705d4b)
2021-07-01 14:48:23 +02:00
Matthijs Mekking 42da0e7790 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).

(manually picked from commit 39a961112f)
2021-07-01 14:48:21 +02:00
Mark Andrews d9426f1308 Merge branch '2769-journal-rollforward-failed-journal-out-of-sync-with-zone-v9_16' into 'v9_16'
Handle placeholder KEYDATA record

See merge request isc-projects/bind9!5238
2021-07-01 05:20:48 +00:00
Mark Andrews 39028cf9dd Add CHANGES note for [GL #2769]
(cherry picked from commit 4b2b6fc42c)
2021-07-01 15:01:31 +10:00
Mark Andrews 8be9a67aec Handle placeholder KEYDATA record
A placeholder keydata record can appear in a zone file.  Allow them
to be read back in.

(cherry picked from commit c6fa8a1d45)
2021-07-01 15:01:05 +10:00
Ondřej Surý ef0f010474 Merge branch 'ondrej/fix-some-spelling-v9_16' into 'v9_16'
Fix various typos in the documentation

See merge request isc-projects/bind9!5237
2021-06-29 18:45:02 +00:00
Ondřej Surý 8ea95021ba Fix various typos in the documentation
Generally, the issues fixed here are missing articles, wrong articles
and double articles.  We especially like "the the".

(cherry picked from commit 4ab9bb63ee)
2021-06-29 20:39:21 +02:00
Matthijs Mekking 8089445676 Merge branch '2791-busy-wait-setnsec3param-shutdown-hang-v9_16' into 'v9_16'
Fix setnsec3param shutdown hang (9.16)

See merge request isc-projects/bind9!5236
2021-06-28 09:48:18 +00:00
Matthijs Mekking 964199602b Add changes for [#2791]
(cherry picked from commit 2f270428fc)
2021-06-28 11:07:47 +02:00
Matthijs Mekking 37db953d9d 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.

(cherry picked from commit 10055d44e3)
2021-06-28 11:07:31 +02:00
Matthijs Mekking 2fe799f637 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.

(cherry picked from commit 3631a23c7f)
2021-06-28 11:02:55 +02:00
Matthijs Mekking 5ffc60cba0 Merge branch '2780-checkconf-dnssec-policy-inheritance-v9_16' into 'v9_16'
Fix checkconf dnssec-policy inheritance bug (9.16)

See merge request isc-projects/bind9!5230
2021-06-24 10:44:29 +00:00
Matthijs Mekking 622fdbc2fb Add change and release note for [#2780]
(cherry picked from commit d0668bd4cc)
2021-06-24 10:42:17 +02:00
Matthijs Mekking 068a978ae9 Fix checkconf dnssec-policy inheritance bug
Similar to #2778, the check for 'dnssec-policy' failed to account for
it being inheritable.

(cherry picked from commit 75ec7d1d9f)
2021-06-24 10:41:28 +02:00
Ondřej Surý a55bdea67a Merge branch '2758-nsupdate-refused-v9_16' into 'v9_16'
nsupdate: try next server on REFUSED

See merge request isc-projects/bind9!5227
2021-06-23 19:50:18 +00:00
Evan HuntandOndřej Surý e26db7cb9d CHANGES
(cherry picked from commit 693eb67af9)
2021-06-23 21:36:53 +02:00
Evan HuntandOndřej Surý fd683b01ce 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.

(cherry picked from commit 2100331307)
2021-06-23 21:36:37 +02:00
Ondřej Surý a3983a796e Merge branch '2183-enable-DF-on-old-socket-code-v9_16' into 'v9_16'
Disable the PMTUD also on the old socket UDP code

See merge request isc-projects/bind9!5229
2021-06-23 19:25:29 +00:00
Ondřej SurýandOndřej Surý 51cf9e2672 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 21:06:05 +02:00
Ondřej Surý d115a9ae2a Disable the PMTUD also on the old socket UDP code
Instead of just disabling the PMTUD mechanism on the UDP sockets, we
now set IP_DONTFRAG (IPV6_DONTFRAG) flag.  That means that the UDP
packets won't get ever fragmented.  If the ICMP packets are lost the
UDP will just timeout and eventually be retried over TCP.
2021-06-23 21:06:05 +02:00
Ondřej Surý 2e09ec0099 Merge branch '2790-properly-handle-oversized-messages-in-isc_nm_send-v9_16' into 'v9_16'
Handle `UV_EMSGSIZE` in the uv_udp_send() callback (v9.16)

See merge request isc-projects/bind9!5226
2021-06-23 16:27:35 +00:00
Ondřej SurýandOndřej Surý ae21e00eed Add CHANGES and release note for [GL #2790]
(cherry picked from commit 5d9c0a3721)
2021-06-23 17:59:04 +02:00
Ondřej SurýandOndřej Surý 66a058838c 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.

(cherry picked from commit b941411072)
2021-06-23 17:58:27 +02:00
Evan HuntandOndřej Surý 82a81287f9 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.

(cherry picked from commit a3ba95116e)
2021-06-23 17:58:27 +02:00
Matthijs Mekking affd505d4a Merge branch '2765-servestale-intermittent-test-failure-144-v9_16' into 'v9_16'
Resolve intermittent serve-stale test failure (144) (9.16)

See merge request isc-projects/bind9!5222
2021-06-23 15:44:55 +00:00
Matthijs Mekking 1a9293dc71 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.

(cherry picked from commit 05e73a24f0)
2021-06-23 15:44:14 +00:00
Ondřej Surý 3a44d0554d Merge branch '2788-add-rbtdb-ownercase-unittest-v9_16' into 'v9_16'
Add rbtdb setownercase/getownercase unit test (v9.16)

See merge request isc-projects/bind9!5225
2021-06-23 15:43:56 +00:00
Ondřej SurýandOndřej Surý a12938e183 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.

(cherry picked from commit c7a11bd5b4)
2021-06-23 17:31:13 +02:00
Matthijs Mekking c8b2245314 Merge branch 'matthijs-2778-more-tests-v9_16' into 'v9_16'
Add more test cases for #2778 (9.16)

See merge request isc-projects/bind9!5224
2021-06-23 15:10:04 +00:00
Matthijs Mekking 6f75c74a37 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.

(cherry picked from commit 84cfd95e95722191195cd4b09ce6f19960868597)
2021-06-23 15:31:30 +02:00
Petr Špaček 31e2cc4b5c Merge branch 'v9_16_18-release' into 'v9_16'
Merge 9.16.18 release branch

See merge request isc-projects/bind9!5221
2021-06-23 12:42:26 +00:00
Petr Špaček 73ca01b564 Set up release notes for BIND 9.16.19 2021-06-23 14:08:31 +02:00
Michał KępieńandPetr Špaček 1960d70759 prep 9.16.18 2021-06-23 13:46:14 +02:00
Michał KępieńandPetr Špaček cd3a1536e2 Merge branch 'michal/prepare-documentation-for-bind-9.16.18' into 'v9_16_18-release'
Prepare documentation for BIND 9.16.18

See merge request isc-private/bind9!305
2021-06-23 13:43:53 +02:00
Michał KępieńandPetr Špaček 9021863afe Prepare release notes for BIND 9.16.18 2021-06-23 13:43:48 +02:00
Michał KępieńandPetr Špaček fb3474f967 Tweak and reword release notes 2021-06-23 13:37:52 +02:00
Michał KępieńandPetr Špaček b012902e7e Tweak and reword recent CHANGES entries 2021-06-23 13:36:52 +02:00
Ondřej Surý 64f34dddf5 Merge branch '2788-use-tolower-toupper-isupper-from-ctype-h-v9_16' into 'v9_16'
Use tolower(), toupper() and isupper() from ctype.h (v9.16)

See merge request isc-projects/bind9!5218
2021-06-23 11:08:18 +00:00
Ondřej Surý 0167c4a898 Use POSIX tolower(), toupper() and isupper() functions
In the code that rdataset_setownercase() and rdataset_getownercase() we
now use tolower()/toupper()/isupper() functions appropriately instead of
rolling our own code.

(cherry picked from commit 7ccbe52060)
2021-06-23 11:50:11 +02:00