Commit Graph

35504 Commits

Author SHA1 Message Date
Ondřej Surý
b5265eedfb 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 09:47:43 +01:00
Ondřej Surý
e262aff29b 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:47:43 +01:00
Ondřej Surý
a532533aab 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:47:43 +01:00
Ondřej Surý
091284936b Merge branch '3157-blackhole-request-v9_18' into 'v9_18'
negative match on the 'blackhole' ACL could be treated as positive

See merge request isc-projects/bind9!5854
2022-02-17 08:46:56 +00:00
Evan Hunt
839a17186e CHANGES and release note for [GL #3157]
(cherry picked from commit 04361b0ad5)
2022-02-16 22:20:25 -08:00
Evan Hunt
da029f10ba negative 'blackhole' ACL match could be treated as positive
There was a bug in the checking of the "blackhole" ACL in
dns_request_create*(), causing an address to be treated as included
in the ACL if it was explicitly *excluded*. Thus, leaving "blackhole"
unset had no effect, but setting it to "none" would cause any
destination addresses to be rejected for dns_request purposes. This
would cause zone transfer requests and SOA queries to fail, among
other things.

The bug has been fixed, and "blackhole { none; };" was added to the
xfer system test as a regression test.

(cherry picked from commit 4444b168db)
2022-02-16 22:20:25 -08:00
Michał Kępień
01529bf791 Merge branch '3139-log-the-result-of-each-resolver-priming-attempt-v9_18' into 'v9_18'
[v9_18] Log the result of each resolver priming attempt

See merge request isc-projects/bind9!5847
2022-02-16 12:54:03 +00:00
Michał Kępień
899e5a7e3f Add CHANGES entry for [GL #3139]
(cherry picked from commit 39df399d9f)
2022-02-16 13:28:00 +01:00
Michał Kępień
a74e60a325 Log the result of each resolver priming attempt
When a resolver priming attempt completes, the following message is
currently logged:

    resolver priming query complete

This message is identical for both successful and failed priming
attempts.  Consider the following log excerpts:

  - successful priming attempt:

        10-Feb-2022 11:33:11.272 all zones loaded
        10-Feb-2022 11:33:11.272 running
        10-Feb-2022 11:33:19.722 resolver priming query complete

  - failed priming attempt:

        10-Feb-2022 11:33:29.978 all zones loaded
        10-Feb-2022 11:33:29.978 running
        10-Feb-2022 11:33:38.432 timed out resolving '_.org/A/IN': 2001:500:9f::42#53
        10-Feb-2022 11:33:38.522 timed out resolving './NS/IN': 2001:500:9f::42#53
        10-Feb-2022 11:33:42.132 timed out resolving '_.org/A/IN': 2001:500:12::d0d#53
        10-Feb-2022 11:33:42.285 timed out resolving './NS/IN': 2001:500:12::d0d#53
        10-Feb-2022 11:33:44.685 resolver priming query complete

Include the result of each priming attempt in the relevant log message
to give the administrator better insight into named's resolver priming
process.

(cherry picked from commit f286c845b0)
2022-02-16 13:28:00 +01:00
Ondřej Surý
5f77292475 Merge branch 'ondrej/add-UV_RUNTIME_CHECK-macro-v9_18' into 'v9_18'
Add UV_RUNTIME_CHECK() macro to print uv_strerror()

See merge request isc-projects/bind9!5845
2022-02-16 11:19:55 +00:00
Ondřej Surý
c30735707c 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:46:00 +01:00
Ondřej Surý
f641507022 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:46:00 +01:00
Ondřej Surý
b8be8048b5 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:00 +01:00
Ondřej Surý
33b5f979ba Merge branch 'ondrej/remove-dns_timer-API-v9_18' into 'v9_18'
Remove unused dns_timer API

See merge request isc-projects/bind9!5844
2022-02-16 10:10:01 +00:00
Ondřej Surý
aed1a0497d Remove unused dns_timer API
The dns_timer API was unused, and this commit just removes it.

(cherry picked from commit cdce681cf7)
2022-02-16 11:07:04 +01:00
Matthijs Mekking
d360a273af Merge branch 'matthijs-document-dnssec-policy-keys-algorithm-match-v9_18' into 'v9_18'
Update documentation wrt key algorithms

See merge request isc-projects/bind9!5842
2022-02-16 10:00:36 +00:00
Matthijs Mekking
3060ffb7d0 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:22:40 +01:00
Michal Nowak
588c60208e Merge branch 'mnowak/make-cocci-parallel-v9_18' into 'v9_18'
[v9_18] Run spatch jobs in parallel

See merge request isc-projects/bind9!5832
2022-02-14 19:01:12 +00:00
Michal Nowak
35ce85fa0b 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 19:50:41 +01:00
Michal Nowak
2093ca16aa Merge branch 'mnowak/coverity-scan-2021.12-v9_18' into 'v9_18'
[v9_18] Update Coverity Scan CI job to 2021.12.1

See merge request isc-projects/bind9!5829
2022-02-14 17:45:09 +00:00
Michal Nowak
d63da7431d Update Coverity Scan CI job to 2021.12.1
(cherry picked from commit f0edf07fbc)
2022-02-14 17:38:08 +01:00
Petr Špaček
1aecd7b093 Merge branch 'pspacek/rfc-nits-v9_18' into 'v9_18'
Update and deduplicate list of RFCs in documentation [v9_18]

See merge request isc-projects/bind9!5827
2022-02-14 11:15:37 +00:00
Artem Boldariev
02aa76a2ad Mention DoT/DoH related RFCs in the ARM
Mention RFC 7858 (DoT), 8484 (DoH), and 8945 (XoT).

(cherry picked from commit 8058d64dda)
2022-02-14 12:11:24 +01:00
Petr Špaček
9703df2058 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:11:24 +01:00
Petr Špaček
5f10218e6f 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:11:24 +01:00
Petr Špaček
0aacacbb38 Replace obsolete RFC2845 reference with RFC8945 (TSIG)
(cherry picked from commit 4dbad65bfd)
2022-02-14 12:11:23 +01:00
Petr Špaček
8582c49ea5 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:11:23 +01:00
Petr Špaček
6191cf8abf Replace obsolete RFC6944 reference with RFC8624 (DNSSEC algorithm status)
(cherry picked from commit 3c83a9d503)
2022-02-14 12:11:23 +01:00
Petr Špaček
841ac7dd03 Replace obsolete RFC5966 reference with RFC7766 (TCP)
(cherry picked from commit bd3b310eae)
2022-02-14 12:11:23 +01:00
Petr Špaček
d01ff38e58 Replace obsolete RFC4408 reference with RFC7208 (SPF)
(cherry picked from commit f8cb0ac141)
2022-02-14 12:11:23 +01:00
Petr Špaček
d5c4c2d4b5 Replace obsolete RFC2915 reference with RFC3403 (NAPTR)
(cherry picked from commit 16dec1ff58)
2022-02-14 12:11:23 +01:00
Petr Špaček
69271cae55 Add link to RFC8749 (DLV is historic)
(cherry picked from commit f7225db822)
2022-02-14 12:11:23 +01:00
Petr Špaček
7c07656dc4 Add newer version of IDNA RFC to docs
(cherry picked from commit 09d6cf89df)
2022-02-14 12:11:23 +01:00
Petr Špaček
4141a7dfd7 Remove obsolete RFCs from documentation
There is little point of listing all of the obsolete RFCs. I think it is
more likely confuse people than to do anything useful.

(cherry picked from commit 9437ea08e1)
2022-02-14 12:11:23 +01:00
Petr Špaček
7a7c90e72e Replace obsolete RFC6488 reference with RFC8659 (CAA)
(cherry picked from commit 2b5b777c07)
2022-02-14 12:11:23 +01:00
Petr Špaček
3cafc168b8 Remove obsolete book reference from ARM
(cherry picked from commit b686b5c161)
2022-02-14 12:11:23 +01:00
Petr Špaček
6d56ef50ba Use Sphinx footnotes for DNS Reference Information
It limits risk of errors while doing updates, which are next in the
pipeline.

(cherry picked from commit f713984886)
2022-02-14 12:11:18 +01:00
Ondřej Surý
953a31cdf4 Merge branch '3151-bump-minimal-automake-version-to-1.14-v9_18' into 'v9_18'
Bump the required automake version to 1.14

See merge request isc-projects/bind9!5826
2022-02-14 09:04:55 +00:00
Ondřej Surý
a8718a782a Bump the required automake version to 1.14
After the build system refactoring, we no longer call AM_PROG_CC_C_O
because it is obsolescent macro.  According to the automake manual the
`AC_PROG_CC` has been rewritten in automake 1.14 to not required the
call, thus we need to require at least automake version 1.14.

(cherry picked from commit 4abd58aa8f)
2022-02-14 09:46:35 +01:00
Ondřej Surý
bdefa08a8d Merge branch 'ondrej/change-bug-reporting-address-v9_18' into 'v9_18'
Change the bug reporting address from email to gitlab URI

See merge request isc-projects/bind9!5821
2022-02-11 08:19:53 +00:00
Ondřej Surý
8f5a1f3f22 Change the bug reporting address from email to gitlab URI
In autoconf, the AC_INIT() accepts bugreport address for reporting
issues (f.e. when the test suite fails).  Instead of providing generic
emails address, change this to the address where to report with the
default Bug template applied.

(cherry picked from commit bb60622250)
2022-02-11 08:53:26 +01:00
Ondřej Surý
38da361408 Merge branch '3137-create-new-log-messages-when-entering-and-exiting-exlusive-task-mode-v9_18' into 'v9_18'
Log when starting and ending task exclusive mode

See merge request isc-projects/bind9!5819
2022-02-10 20:42:29 +00:00
Ondřej Surý
5d48602479 Add CHANGES and release note for [GL #3137]
(cherry picked from commit 44aa8ef997)
2022-02-10 21:22:35 +01:00
Ondřej Surý
1591d78559 Log when starting and ending task exclusive mode
The task exclusive mode stops all processing (tasks and networking IO)
except the designated exclusive task events.  This has impact on the
operation of the server.  Add log messages indicating when we start the
exclusive mode, and when we end exclusive task mode.

(cherry picked from commit b9cb29076f)
2022-02-10 21:22:35 +01:00
Ondřej Surý
5d7a6c0bf8 Merge branch '2717-fix-sysconfdir-in-manpages-v9_18' into 'v9_18'
Use compile-time paths in the manual pages

See merge request isc-projects/bind9!5815
2022-02-10 16:33:28 +00:00
Ondřej Surý
74b1c37f2c Add CHANGES note for [GL #2717]
(cherry picked from commit 9e70c6887a)
2022-02-10 17:08:24 +01:00
Ondřej Surý
3f78c60539 Use compile-time paths in the manual pages
Replace the hard-coded paths for various BIND 9 files (configuration,
pid, etc.) in the man pages and ARM with compile-time values using the
sphinx-build replace system.

This is more complicated, because the restructured text specification
doesn't allow |substitions| inside ``code-blocks``, so for each specific
file we had to create own substition which is sub-optimal, but it is
only way how to do this without adding Sphinx extension.

(cherry picked from commit b42681c4e9)
2022-02-10 17:08:24 +01:00
Ondřej Surý
faf395ce98 Merge branch '3130-cleanup-pthread-api-usage-v9_18' into 'v9_18'
Remove unused functions from isc_thread API

See merge request isc-projects/bind9!5808
2022-02-09 17:02:22 +00:00
Ondřej Surý
67af3c7a3b Remove unused functions from isc_thread API
The isc_thread_setaffinity call was removed in !5265 and we are not
going to restore it because it was proven that the performance is better
without it.  Additionally, remove the already disabled cpu system test.

The isc_thread_setconcurrency function is unused and also calling
pthread_setconcurrency() on Linux has no meaning, formerly it was
added because of Solaris in 2001 and it was removed when taskmgr was
refactored to run on top of netmgr in !4918.

(cherry picked from commit 0500345513)
2022-02-09 17:41:34 +01:00
Michal Nowak
d69b3b3ec1 Merge branch '2599-run-less-stable-unit-tests-in-aws-v9_18' into 'v9_18'
[v9_18] Run unstable unit tests in CI

See merge request isc-projects/bind9!5806
2022-02-09 12:01:17 +00:00