Commit Graph

33410 Commits

Author SHA1 Message Date
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 Hunt
e26db7cb9d CHANGES
(cherry picked from commit 693eb67af9)
2021-06-23 21:36:53 +02:00
Evan Hunt
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ý
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ý
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ý
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 Hunt
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ý
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ń
1960d70759 prep 9.16.18 2021-06-23 13:46:14 +02:00
Michał Kępień
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ń
9021863afe Prepare release notes for BIND 9.16.18 2021-06-23 13:43:48 +02:00
Michał Kępień
fb3474f967 Tweak and reword release notes 2021-06-23 13:37:52 +02:00
Michał Kępień
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
Ondřej Surý
a5e837cfda Don't set locale globally, just use it when needed
Previously, we would set the locale on a global level and that could
possibly lead to different behaviour in underlying functions.  In this
commit, we change to code to use the system locale only when calling the
libidn2 functions and reset the locale back to "POSIX" when exiting the
libidn2 code.

(cherry picked from commit 0d35b3f1a9)
2021-06-23 11:50:09 +02:00
Michał Kępień
b96584ce14 Merge branch '1802-improve-description-of-mirror-zone-validation-v9_16' into 'v9_16'
[v9_16] Improve description of mirror zone validation

See merge request isc-projects/bind9!5216
2021-06-22 21:06:26 +00:00
Michał Kępień
6ae474ebf9 Improve description of mirror zone validation
Expand the description of mirror zones in the ARM by adding a brief
discussion of how the validation process works for AXFR and IXFR.  Move
the paragraph mentioning the "file" option higher up.  Apply minor
stylistic and whitespace-related tweaks to the relevant section of the
ARM.

(cherry picked from commit d877aa9adf)
2021-06-22 22:54:32 +02:00
Michał Kępień
6d2f540e5e Merge branch '2279-expand-description-of-the-max-cache-size-option-v9_16' into 'v9_16'
[v9_16] Rework description of the "max-cache-size" option

See merge request isc-projects/bind9!5214
2021-06-22 19:50:08 +00:00
Petr Špaček
9505dd0c4f Rework description of the "max-cache-size" option
Improve the description of the "max-cache-size" option in the ARM by
focusing on its meaning for multiple views and default values.
Add mention of a hash table preallocation.

(cherry picked from commit a67ceb8dda)
2021-06-22 21:38:52 +02:00
Michał Kępień
09dbebd964 Merge branch '2777-use-minimal-sized-caches-for-non-recursive-views-v9_16' into 'v9_16'
[v9_16] Use minimal-sized caches for non-recursive views

See merge request isc-projects/bind9!5211
2021-06-22 13:56:36 +00:00
Michał Kępień
87aa343424 Add CHANGES entry
(cherry picked from commit f9500f824d)
2021-06-22 15:32:27 +02:00
Michał Kępień
7427da27fa Hardcode "max-cache-size" for the "_bind" view
The built-in "_bind" view does not allow recursion and therefore does
not need a large cache database.  However, as "max-cache-size" is not
explicitly set for that view in the default configuration, it inherits
that setting from global options.  Set "max-cache-size" for the built-in
"_bind" view to a fixed value (2 MB, i.e. the smallest allowed value) to
prevent needlessly preallocating memory for its cache RBT hash table.

(cherry picked from commit 86698ded32)
2021-06-22 15:32:27 +02:00
Michał Kępień
126436cc96 Use minimal-sized caches for non-recursive views
Currently the implicit default for the "max-cache-size" option is "90%".
As this option is inherited by all configured views, using multiple
views can lead to memory exhaustion over time due to overcommitment.
The "max-cache-size 90%;" default also causes cache RBT hash tables to
be preallocated for every configured view, which does not really make
sense for views which do not allow recursion.

To limit this problem's potential for causing operational issues, use a
minimal-sized cache for views which do not allow recursion and do not
have "max-cache-size" explicitly set (either in global configuration or
in view configuration).

For configurations which include multiple views allowing recursion,
adjusting "max-cache-size" appropriately is still left to the operator.

(cherry picked from commit 86541b39d3)
2021-06-22 15:32:27 +02:00
Matthijs Mekking
ff089d73e8 Merge branch '2783-in-view-dnssec-policy-deadlock-v9_16' into 'v9_16'
Fix in-view /w dnssec-policy deadlock at startup (9.16)

See merge request isc-projects/bind9!5204
2021-06-22 08:13:14 +00:00
Matthijs Mekking
b2851b3c5f Add changes and notes for [#2783]
(cherry picked from commit dae42dc9d4)
2021-06-22 09:25:54 +02:00
Matthijs Mekking
bb1f0404ab Fix deadlock issue with key-directory and in-view
When locking key files for a zone, we iterate over all the views and
lock a mutex inside the zone structure. However, if we envounter an
in-view zone, we will try to lock the key files twice, one time for
the home view and one time for the in-view view. This will lead to
a deadlock because one thread is trying to get the same lock twice.

(cherry picked from commit 42c601ae14)
2021-06-22 09:25:46 +02:00