Commit Graph

34162 Commits

Author SHA1 Message Date
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
Michał Kępień
0a75cd47bb Merge branch 'michal/prepare-documentation-for-bind-9.17.15' into 'v9_17_15-release'
Prepare documentation for BIND 9.17.15

See merge request isc-private/bind9!304
2021-06-23 12:56:35 +02:00
Michał Kępień
7b7dea04a3 Prepare release notes for BIND 9.17.15 2021-06-23 12:56:35 +02:00
Michał Kępień
7bfedd8c73 Tweak and reword release notes 2021-06-23 12:56:35 +02:00
Michał Kępień
4e3a5c83fe Tweak and reword recent CHANGES entries 2021-06-23 12:56:35 +02:00
Ondřej Surý
b813ea196a Merge branch '2788-use-tolower-toupper-isupper-from-ctype-h' into 'main'
Use tolower(), toupper() and isupper() from ctype.h

Closes #2788

See merge request isc-projects/bind9!5209
2021-06-23 09:45:28 +00:00
Ondřej Surý
7ccbe52060 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.
2021-06-23 11:12:00 +02:00
Ondřej Surý
0d35b3f1a9 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.
2021-06-23 11:12:00 +02:00
Michał Kępień
7e9e0ae195 Merge branch '1802-improve-description-of-mirror-zone-validation' into 'main'
Improve description of mirror zone validation

Closes #1802

See merge request isc-projects/bind9!5207
2021-06-22 20:53:48 +00:00
Michał Kępień
d877aa9adf 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.
2021-06-22 22:49:36 +02:00
Michał Kępień
2fcd63cb35 Merge branch '2784-improve-descriptions-of-buffering-related-options' into 'main'
Improve descriptions of buffering-related options

Closes #2784

See merge request isc-projects/bind9!5215
2021-06-22 20:31:59 +00:00
Michał Kępień
a43cafe77d Tweak descriptions of buffering-related options
Apply minor stylistical and whitespace-related tweaks to the
descriptions of the "tcp-receive-buffer", "udp-receive-buffer",
"tcp-send-buffer", and "udp-send-buffer" options in the ARM.
2021-06-22 22:26:46 +02:00
Michał Kępień
3ee62883e3 Fix typos in buffering-related option names
The ARM contains typos in the names of the following two options:

  - "tcp-receive-buffer"
  - "udp-receive-buffer"

Fix the ARM so that it contains proper option names.
2021-06-22 22:26:46 +02:00
Michał Kępień
61bbfe208e Merge branch '2279-expand-description-of-the-max-cache-size-option' into 'main'
Expand description of the "max-cache-size" option

Closes #2279

See merge request isc-projects/bind9!5173
2021-06-22 19:37:59 +00:00
Petr Špaček
a67ceb8dda 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.
2021-06-22 21:33:08 +02:00
Artem Boldariev
4b813a80d6 Merge branch '2787-assertion-failure-handling-non-zero-opcodes-in-dot-and-doh' into 'main'
Replace netmgr per-protocol sequential function with a common one

Closes #2787

See merge request isc-projects/bind9!5208
2021-06-22 14:45:23 +00:00
Ondřej Surý
dd0e3b0213 Add CHANGES and release notes for [GL #2787] 2021-06-22 17:23:02 +03:00
Artem Boldariev
ef9f09252c System tests to check named behaviour for unexpected opcodes
This commit adds a set of tests to verify that BIND will not crash
when some opcodes are sent over DoT or DoH, leading to marking network
handle in question as sequential.
2021-06-22 17:21:44 +03:00
Ondřej Surý
ec86759401 Replace netmgr per-protocol sequential function with a common one
Previously, each protocol (TCPDNS, TLSDNS) has specified own function to
disable pipelining on the connection.  An oversight would lead to
assertion failure when opcode is not query over non-TCPDNS protocol
because the isc_nm_tcpdns_sequential() function would be called over
non-TCPDNS socket.  This commit removes the per-protocol functions and
refactors the code to have and use common isc_nm_sequential() function
that would either disable the pipelining on the socket or would handle
the request in per specific manner.  Currently it ignores the call for
HTTP sockets and causes assertion failure for protocols where it doesn't
make sense to call the function at all.
2021-06-22 17:21:44 +03:00
Michał Kępień
48256df57c Merge branch '2777-use-minimal-sized-caches-for-non-recursive-views' into 'main'
Use minimal-sized caches for non-recursive views

Closes #2777

See merge request isc-projects/bind9!5189
2021-06-22 13:31:03 +00:00
Michał Kępień
f9500f824d Add CHANGES entry 2021-06-22 15:28:31 +02:00
Michał Kępień
86698ded32 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.
2021-06-22 15:28:31 +02:00
Michał Kępień
86541b39d3 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.
2021-06-22 15:28:31 +02:00
Matthijs Mekking
a02710a476 Merge branch '2783-in-view-dnssec-policy-deadlock' into 'main'
Fix in-view /w dnssec-policy deadlock at startup

Closes #2783

See merge request isc-projects/bind9!5202
2021-06-22 07:23:59 +00:00
Matthijs Mekking
dae42dc9d4 Add changes and notes for [#2783] 2021-06-22 09:04:11 +02:00
Matthijs Mekking
42c601ae14 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.
2021-06-22 09:04:11 +02:00
Matthijs Mekking
acd83881ff Add test case for in-view with dnssec-policy
Add a test case for a zone that uses 'in-view' and 'dnssec-policy'.
BIND should not deadlock.
2021-06-21 16:03:35 +02:00
Mark Andrews
fb335e4b47 Merge branch '2778-unique-key-directories-reported-as-reused-in-9-16-17-regression-vs-9-16-16' into 'main'
Resolve "Unique key directories reported as reused in 9.16.17, regression vs 9.16.16"

Closes #2778

See merge request isc-projects/bind9!5195
2021-06-18 07:21:27 +00:00
Mark Andrews
85033788d3 Add release note for [GL #2778] 2021-06-18 16:46:02 +10:00
Mark Andrews
bd1419a9e8 Add CHANGES for [GL #2778] 2021-06-18 16:46:02 +10:00
Mark Andrews
d1e283ede1 Checking of key-directory and dnssec-policy was broken
the checks failed to account for key-directory being inheritable.
2021-06-18 16:46:02 +10:00
Mark Andrews
721237efb3 Merge branch '2779-name-in-answer-doesn-t-match-the-name-in-query' into 'main'
Resolve "name in answer doesn't match the name in query"

Closes #2779

See merge request isc-projects/bind9!5194
2021-06-18 06:27:22 +00:00
Mark Andrews
7372e9a60d Add release note for [GL #2779] 2021-06-18 15:51:37 +10:00
Mark Andrews
8c60debc18 Add CHANGES note for [GL #2779] 2021-06-18 15:51:37 +10:00