Commit graph

34077 commits

Author SHA1 Message Date
Michał Kępień
ae2fa12d2d Add CHANGES entry for GL #3147
(cherry picked from commit 600f9010d2)
2022-02-23 14:45:06 +01:00
Michał Kępień
2344201385 Add release note for GL #3147
(cherry picked from commit 1c462a63ec)
2022-02-23 14:45:06 +01:00
Michał Kępień
60e82835ec Fix more ns_statscounter_recursclients underflows
Commit aab691d512 did not fix all possible
scenarios in which the ns_statscounter_recursclients counter underflows.
The solution implemented therein can be ineffective e.g. when CNAME
chaining happens with prefetching enabled.

Here is an example recursive resolution scenario in which the
ns_statscounter_recursclients counter can underflow with the current
logic in effect:

 1. Query processing starts, the answer is not found in the cache, so
    recursion is started.  The NS_CLIENTATTR_RECURSING attribute is set.
    ns_statscounter_recursclients is incremented (Δ = +1).

 2. Recursion completes, returning a CNAME.  client->recursionquota is
    non-NULL, so the NS_CLIENTATTR_RECURSING attribute remains set.
    ns_statscounter_recursclients is decremented (Δ = 0).

 3. Query processing restarts.

 4. The current QNAME (the target of the CNAME from step 2) is found in
    the cache, with a TTL low enough to trigger a prefetch.

 5. query_prefetch() attaches to client->recursionquota.
    ns_statscounter_recursclients is not incremented because
    query_prefetch() does not do that (Δ = 0).

 6. Query processing restarts.

 7. The current QNAME (the target of the CNAME from step 4) is not found
    in the cache, so recursion is started.  client->recursionquota is
    already attached to (since step 5) and the NS_CLIENTATTR_RECURSING
    attribute is set (since step 1), so ns_statscounter_recursclients is
    not incremented (Δ = 0).

 8. The prefetch from step 5 completes.  client->recursionquota is
    detached from in prefetch_done().  ns_statscounter_recursclients is
    not decremented because prefetch_done() does not do that (Δ = 0).

 9. Recursion for the current QNAME completes.  client->recursionquota
    is already detached from, i.e. set to NULL (since step 8), and the
    NS_CLIENTATTR_RECURSING attribute is set (since step 1), so
    ns_statscounter_recursclients is decremented (Δ = -1).

Another possible scenario is that after step 7, recursion for the target
of the CNAME from step 4 completes before the prefetch for the CNAME
itself.  fetch_callback() then notices that client->recursionquota is
non-NULL and decrements ns_statscounter_recursclients, even though
client->recursionquota was attached to by query_prefetch() and therefore
not accompanied by an incrementation of ns_statscounter_recursclients.
The net result is also an underflow.

Instead of trying to properly handle all possible orderings of events
set into motion by normal recursion and prefetch-triggered recursion,
adjust ns_statscounter_recursclients whenever the recursive clients
quota is successfully attached to or detached from.  Remove the
NS_CLIENTATTR_RECURSING attribute altogether as its only purpose is made
obsolete by this change.

(cherry picked from commit f7482b68b9)
2022-02-23 14:45:06 +01:00
Matthijs Mekking
2debaaddbe Merge branch '3164-fix-parental-agents-documentation-v9_16' into 'v9_16'
Fix typo in DNSSEC guide parental-agents example

See merge request isc-projects/bind9!5874
2022-02-22 13:45:34 +00:00
Matthijs Mekking
ff61d74310 Fix typo in DNSSEC guide parental-agents example
The example will not load because of the typo, the comma should be a
semicolon.

(cherry picked from commit fd5e39cc76)
2022-02-22 14:07:30 +01:00
Petr Špaček
3e17e79484 Merge branch '3132-add-send-timeout-python2-fix-v9_16' into 'v9_16'
Fix timeouts system test compatibility with python2

See merge request isc-projects/bind9!5869
2022-02-18 10:54:45 +00:00
Petr Špaček
17ff0227f8
Fix timeouts system test compatibility with python2
v9_16 branch still supports Python 2.7.
Fixup for 260b4c02cf.

Related: !5856
2022-02-18 11:26:58 +01:00
Petr Špaček
a30dac540e Merge branch 'v9_16_26-release' into 'v9_16'
Merge 9.16.26 release branch

See merge request isc-projects/bind9!5866
2022-02-18 09:12:00 +00:00
Petr Špaček
bcd07e71d6
Prepare release notes for BIND 9.16.27 2022-02-18 10:07:48 +01:00
Petr Špaček
faf800893f
Merge branch 'prep-release' into v9_16_26-release 2022-02-18 10:03:25 +01:00
Petr Špaček
0229a688a9
Merge branch 'pspacek/prepare-documentation-for-bind-9.16.26' into v9_16_26-release
Prepare documentation for BIND 9.16.26

See merge request isc-private/bind9!352
2022-02-18 10:03:25 +01:00
Petr Špaček
7394e09b50
prep 9.16.26 2022-02-18 10:03:25 +01:00
Petr Špaček
69989b1320
Prepare release notes for BIND 9.16.26 2022-02-18 10:03:20 +01:00
Petr Špaček
4ba9be8005
Tweak and reword release notes 2022-02-18 09:36:16 +01:00
Ondřej Surý
5cdc832c10 Merge branch '1897-fix-max-transfer-timeouts-v9_16' into 'v9_16'
Reimplement the max-transfer-time-out and max-transfer-idle-out (v9.16)

See merge request isc-projects/bind9!5863
2022-02-17 22:38:53 +00:00
Ondřej Surý
e9ad424cec Add CHANGES and release note for [GL #1897]
(cherry picked from commit 987ad32fac)
2022-02-17 22:59:24 +01:00
Ondřej Surý
b3efa9f7ed Add XFR max-transfer-time-out and max-tranfer-idle-out system tests
Extend the timeouts system test to ensure that the maximum outgoing
transfer time (max-transfer-time-out) and maximum outgoing transfer idle
time (max-transfer-idle-out) works as expected.  This is done by
lowering the limits to 5/1 minutes and testing that the connection has
been dropped while sleeping between the individual XFR messages.

(cherry picked from commit 8fed1b6461)
2022-02-17 22:59:24 +01:00
Ondřej Surý
cbf2bed95e Reimplement the max-transfer-time-out and max-transfer-idle-out
While refactoring the libns to use the new network manager, the
max-transfer-*-out options were not implemented and they were turned
non-operational.

Reimplement the max-transfer-idle-out functionality using the write
timer and max-transfer-time-out using the new isc_nm_timer API.

(cherry picked from commit 8643bbab84)
2022-02-17 22:59:24 +01:00
Ondřej Surý
6de1b12f59 Remove unused client->shutdown and client->shutdown_arg
While refactoring the lib/ns/xfrout.c, it was discovered that .shutdown
and .shutdown_arg members of ns_client_t structure are unused.

Remove the unused members and associated code that was using in it in
the ns_xfrout.

(cherry picked from commit 037549c405)
2022-02-17 22:59:24 +01:00
Ondřej Surý
914a7e14e2 Add network manager based timer API
This commits adds API that allows to create arbitrary timers associated
with the network manager handles.

(cherry picked from commit 3c7b04d015)
2022-02-17 22:59:24 +01:00
Evan Hunt
3ec9c711d8 Merge branch '3157-test-blackhole-v9_16' into 'v9_16'
backport regression test from GL #3157

See merge request isc-projects/bind9!5859
2022-02-17 18:15:24 +00:00
Evan Hunt
d822a87804 backport regression test from GL #3157
add "blackhole { none; };" to a secondary server in the xfer system
test to ensure that the error in GL #3157 is not present in 9.16.
2022-02-17 09:38:26 -08:00
Ondřej Surý
421a1dfa82 Merge branch '3132-add-send-timeout-v9_16' into 'v9_16'
Add TCP, TCPDNS and TLSDNS write timer

See merge request isc-projects/bind9!5856
2022-02-17 11:08:19 +00:00
Ondřej Surý
132bed0014 Add CHANGES and release note for [GL #3132]
(cherry picked from commit 0c35bda762)
2022-02-17 11:26:16 +01:00
Ondřej Surý
3f24bd2bce Update writetimeout to be T_IDLE in netmgr_test.c
Use the isc_nmhandle_setwritetimeout() function in the netmgr unit test
to allow more time for writing and reading the responses because some of
the intervals that are used in the unit tests are really small leaving a
little room for any delays.

(cherry picked from commit ee359d6ffa)
2022-02-17 11:26:16 +01:00
Ondřej Surý
1d0f2eb2c4 Add isc_nmhandle_setwritetimeout() function
In some situations (unit test and forthcoming XFR timeouts MR), we need
to modify the write timeout independently of the read timeout.  Add a
isc_nmhandle_setwritetimeout() function that could be called before
isc_nm_send() to specify a custom write timeout interval.

(cherry picked from commit a89d9e0fa6)
2022-02-17 11:26:16 +01:00
Ondřej Surý
260b4c02cf Add TCP write timeout system test
Extend the timeouts system test that bursts the queries for large TXT
record and never read any responses back filling up the server TCP write
buffer.  The test should work with the default wmem_max value on
Linux (208k).

(cherry picked from commit b735182ae0)
2022-02-17 10:05:24 +01:00
Ondřej Surý
6a88131d03 Add TCP, TCPDNS and TLSDNS write timer
When the outgoing TCP write buffers are full because the other party is
not reading the data, the uv_write() could wait indefinitely on the
uv_loop and never calling the callback.  Add a new write timer that uses
the `tcp-idle-timeout` value to interrupt the TCP connection when we are
not able to send data for defined period of time.

(cherry picked from commit 408b362169)
2022-02-17 10:05:24 +01:00
Ondřej Surý
11ae4399d9 Add uv_tcp_close_reset compat
The uv_tcp_close_reset() function was added in libuv 1.32.0 and since we
support older libuv releases, we have to add a shim uv_tcp_close_reset()
implementation loosely based on libuv.

(cherry picked from commit cd3b58622c)
2022-02-17 09:50:10 +01:00
Ondřej Surý
eb2463115f Rename sock->timer to sock->read_timer
Before adding the write timer, we have to remove the generic sock->timer
to sock->read_timer.  We don't touch the function names to limit the
impact of the refactoring.

(cherry picked from commit 45a73c113f)
2022-02-17 09:50:07 +01:00
Ondřej Surý
9b7a0cb778 Merge branch 'ondrej/add-UV_RUNTIME_CHECK-macro-v9_16' into 'v9_16'
Add UV_RUNTIME_CHECK() macro to print uv_strerror()

See merge request isc-projects/bind9!5846
2022-02-16 11:30:07 +00:00
Ondřej Surý
cdd725f1db Add semantic patch to keep UV_RUNTIME_CHECK in sync
The UV_RUNTIME_CHECK() macro requires to keep the function name in sync
like this:

    r = func(...);
    UV_RUNTIME_CHECK(func, r);

Add semantic patch to keep the function name and return variable in sync
with the previous line.

(cherry picked from commit 62bd5cb08c)
2022-02-16 11:48:33 +01:00
Ondřej Surý
1c564b808f Use UV_RUNTIME_CHECK() as appropriate
Replace the RUNTIME_CHECK() calls for libuv API calls with
UV_RUNTIME_CHECK() to get more detailed error message when
something fails and should not.

(cherry picked from commit 8715be1e4b)
2022-02-16 11:48:30 +01:00
Ondřej Surý
88751da114 Add UV_RUNTIME_CHECK() macro to print uv_strerror()
When libuv functions fail, they return correct return value that could
be useful for more detailed debugging.  Currently, we usually just check
whether the return value is 0 and invoke assertion error if it doesn't
throwing away the details why the call has failed.  Unfortunately, this
often happen on more exotic platforms.

Add a UV_RUNTIME_CHECK() macro that can be used to print more detailed
error message (via uv_strerror() before ending the execution of the
program abruptly with the assertion.

(cherry picked from commit 62e15bb06d)
2022-02-16 11:46:10 +01:00
Matthijs Mekking
cff0d3fbd0 Merge branch 'matthijs-document-dnssec-policy-keys-algorithm-match-v9_16' into 'v9_16'
Update documentation wrt key algorithms (9.16)

See merge request isc-projects/bind9!5843
2022-02-16 10:11:21 +00:00
Matthijs Mekking
483beec0fd Update documentation wrt key algorithms
Add a note to the DNSSEC guide and to the ARM reference that A ZSK/KSK
pair used for signing your zone should have the same algorithm.

This commit also updates the 'dnssec-policy/keys' example to use the
slightly more modern 'rsasha256' algorithm.

(cherry picked from commit 7365400610)
2022-02-16 10:25:30 +01:00
Michal Nowak
6917b32d6c Merge branch 'mnowak/make-cocci-parallel-v9_16' into 'v9_16'
[v9_16] Run spatch jobs in parallel

See merge request isc-projects/bind9!5833
2022-02-14 19:10:57 +00:00
Michal Nowak
2823885e1b
Run spatch jobs in parallel
Also make the script more verbose to identify which patch is being
processed and check for failures in spatch standard error output.

(cherry picked from commit 48c44fe6d4)
2022-02-14 20:01:43 +01:00
Michal Nowak
fb0aaa3c10 Merge branch 'mnowak/coverity-scan-2021.12-v9_16' into 'v9_16'
[v9_16] Update Coverity Scan CI job to 2021.12.1

See merge request isc-projects/bind9!5830
2022-02-14 17:59:01 +00:00
Michal Nowak
d73143af51
Update Coverity Scan CI job to 2021.12.1
(cherry picked from commit f0edf07fbc)
2022-02-14 18:46:08 +01:00
Petr Špaček
b1c7a94dc9 Merge branch 'pspacek/rfc-nits-v9_16' into 'v9_16'
Update and deduplicate list of RFCs in documentation [v9_16]

See merge request isc-projects/bind9!5828
2022-02-14 11:48:57 +00:00
Petr Špaček
3637ce9c7c
Remove rfc-compliance list in plaintext - ARM deduplication
The plaintext version is now fully replaced by the doc/arm/general.rst.

(cherry picked from commit 63989e98ac)
2022-02-14 12:23:39 +01:00
Petr Špaček
a2ebd90f30
Reorder list of supported RFCs in more user-oriented manner
For users it's not really important if a RFC is Internet Standard,
Proposed Standard, or Experimental. RFCs are now regrouped by
"Protocol", Best Current Practice, and "catch all" category FYI.

(cherry picked from commit 7fd61f9403)
2022-02-14 12:23:31 +01:00
Petr Špaček
636ea2d5bc
Replace obsolete RFC2845 reference with RFC8945 (TSIG)
(cherry picked from commit 4dbad65bfd)
2022-02-14 12:21:27 +01:00
Petr Špaček
f0d5e029bd
Remove special chapter about IPv6 address formats from ARM
In 2022, IPv6 is not anything unusual, and it was really odd
to have it in a separate section next to a huge list of RFCs.

Fixes: #1918
(cherry picked from commit 2774b497a6)
2022-02-14 12:21:15 +01:00
Petr Špaček
519660c84a
Replace obsolete RFC6944 reference with RFC8624 (DNSSEC algorithm status)
(cherry picked from commit 3c83a9d503)
2022-02-14 12:21:15 +01:00
Petr Špaček
ee5d716ca7
Replace obsolete RFC5966 reference with RFC7766 (TCP)
(cherry picked from commit bd3b310eae)
2022-02-14 12:21:15 +01:00
Petr Špaček
717d218935
Replace obsolete RFC4408 reference with RFC7208 (SPF)
(cherry picked from commit f8cb0ac141)
2022-02-14 12:21:13 +01:00
Petr Špaček
bc41ef8687
Replace obsolete RFC2915 reference with RFC3403 (NAPTR)
(cherry picked from commit 16dec1ff58)
2022-02-14 12:20:41 +01:00
Petr Špaček
09f562eb0d
Add link to RFC8749 (DLV is historic)
(cherry picked from commit f7225db822)
2022-02-14 12:20:39 +01:00