Commit Graph

35517 Commits

Author SHA1 Message Date
Ondřej Surý
b735182ae0 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).
2022-02-17 09:06:58 +01:00
Ondřej Surý
408b362169 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.
2022-02-17 09:06:58 +01:00
Ondřej Surý
cd3b58622c 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.
2022-02-17 09:06:58 +01:00
Ondřej Surý
45a73c113f 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.
2022-02-17 09:06:58 +01:00
Evan Hunt
92338f2e29 Merge branch '3157-blackhole-request' into 'main'
negative match on the 'blackhole' ACL could be treated as positive

Closes #3157

See merge request isc-projects/bind9!5853
2022-02-17 06:19:51 +00:00
Evan Hunt
04361b0ad5 CHANGES and release note for [GL #3157] 2022-02-16 19:05:56 -08:00
Evan Hunt
4444b168db 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.
2022-02-16 19:05:06 -08:00
Michał Kępień
5fbbc312a7 Merge branch '3139-log-the-result-of-each-resolver-priming-attempt' into 'main'
Log the result of each resolver priming attempt

Closes #3139

See merge request isc-projects/bind9!5812
2022-02-16 12:27:18 +00:00
Michał Kępień
39df399d9f Add CHANGES entry for [GL #3139] 2022-02-16 13:26:12 +01:00
Michał Kępień
f286c845b0 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.
2022-02-16 13:26:12 +01:00
Ondřej Surý
1e7d666bf5 Merge branch 'ondrej/add-UV_RUNTIME_CHECK-macro' into 'main'
Add UV_RUNTIME_CHECK() macro to print uv_strerror()

See merge request isc-projects/bind9!5838
2022-02-16 10:45:32 +00:00
Ondřej Surý
62bd5cb08c 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.
2022-02-16 11:16:57 +01:00
Ondřej Surý
8715be1e4b 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.
2022-02-16 11:16:57 +01:00
Ondřej Surý
62e15bb06d 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.
2022-02-16 11:16:57 +01:00
Ondřej Surý
f4ae230d41 Merge branch 'ondrej/remove-dns_timer-API' into 'main'
Remove unused dns_timer API

See merge request isc-projects/bind9!5818
2022-02-16 09:51:36 +00:00
Ondřej Surý
cdce681cf7 Remove unused dns_timer API
The dns_timer API was unused, and this commit just removes it.
2022-02-16 10:49:48 +01:00
Matthijs Mekking
39004d3b33 Merge branch 'matthijs-document-dnssec-policy-keys-algorithm-match' into 'main'
Update documentation wrt key algorithms

See merge request isc-projects/bind9!5823
2022-02-16 09:40:08 +00:00
Matthijs Mekking
7365400610 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.
2022-02-16 10:21:42 +01:00
Michal Nowak
5fa60c1ce9 Merge branch 'mnowak/make-cocci-parallel' into 'main'
Run spatch jobs in parallel

See merge request isc-projects/bind9!4741
2022-02-14 18:47:39 +00:00
Michal Nowak
48c44fe6d4 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.
2022-02-14 19:38:17 +01:00
Michal Nowak
fcc9ac7bd8 Merge branch 'mnowak/coverity-scan-2021.12' into 'main'
Update Coverity Scan CI job to 2021.12

See merge request isc-projects/bind9!5811
2022-02-14 16:37:07 +00:00
Michal Nowak
f0edf07fbc Update Coverity Scan CI job to 2021.12.1 2022-02-14 12:43:09 +01:00
Petr Špaček
6914a4cda3 Merge branch 'pspacek/rfc-nits' into 'main'
Update and deduplicate list of RFCs in documentation

Closes #1918

See merge request isc-projects/bind9!5813
2022-02-14 11:10:21 +00:00
Artem Boldariev
8058d64dda Mention DoT/DoH related RFCs in the ARM
Mention RFC 7858 (DoT), 8484 (DoH), and 8945 (XoT).
2022-02-14 11:54:39 +01:00
Petr Špaček
63989e98ac Remove rfc-compliance list in plaintext - ARM deduplication
The plaintext version is now fully replaced by the doc/arm/general.rst.
2022-02-14 11:54:39 +01:00
Petr Špaček
7fd61f9403 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.
2022-02-14 11:54:39 +01:00
Petr Špaček
4dbad65bfd Replace obsolete RFC2845 reference with RFC8945 (TSIG) 2022-02-14 11:54:39 +01:00
Petr Špaček
2774b497a6 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
2022-02-14 11:54:39 +01:00
Petr Špaček
3c83a9d503 Replace obsolete RFC6944 reference with RFC8624 (DNSSEC algorithm status) 2022-02-14 11:54:39 +01:00
Petr Špaček
bd3b310eae Replace obsolete RFC5966 reference with RFC7766 (TCP) 2022-02-14 11:54:39 +01:00
Petr Špaček
f8cb0ac141 Replace obsolete RFC4408 reference with RFC7208 (SPF) 2022-02-14 11:54:39 +01:00
Petr Špaček
16dec1ff58 Replace obsolete RFC2915 reference with RFC3403 (NAPTR) 2022-02-14 11:54:39 +01:00
Petr Špaček
f7225db822 Add link to RFC8749 (DLV is historic) 2022-02-14 11:54:39 +01:00
Petr Špaček
09d6cf89df Add newer version of IDNA RFC to docs 2022-02-14 11:54:39 +01:00
Petr Špaček
9437ea08e1 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.
2022-02-14 11:54:39 +01:00
Petr Špaček
2b5b777c07 Replace obsolete RFC6488 reference with RFC8659 (CAA) 2022-02-14 11:54:39 +01:00
Petr Špaček
b686b5c161 Remove obsolete book reference from ARM 2022-02-14 11:54:39 +01:00
Petr Špaček
f713984886 Use Sphinx footnotes for DNS Reference Information
It limits risk of errors while doing updates, which are next in the
pipeline.
2022-02-14 11:54:34 +01:00
Ondřej Surý
98961e86b8 Merge branch '3151-bump-minimal-automake-version-to-1.14' into 'main'
Bump the required automake version to 1.14

Closes #3151

See merge request isc-projects/bind9!5825
2022-02-14 08:45:57 +00:00
Ondřej Surý
4abd58aa8f 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.
2022-02-14 09:17:41 +01:00
Ondřej Surý
f57585a599 Merge branch 'ondrej/change-bug-reporting-address' into 'main'
Change the bug reporting address from email to gitlab URI

See merge request isc-projects/bind9!5817
2022-02-11 07:52:19 +00:00
Ondřej Surý
bb60622250 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.
2022-02-11 08:50:57 +01:00
Ondřej Surý
62cf6a77cf Merge branch '3137-create-new-log-messages-when-entering-and-exiting-exlusive-task-mode' into 'main'
Log when entering and exiting task exclusive mode

Closes #3137

See merge request isc-projects/bind9!5814
2022-02-10 20:21:18 +00:00
Ondřej Surý
44aa8ef997 Add CHANGES and release note for [GL #3137] 2022-02-10 21:09:46 +01:00
Ondřej Surý
b9cb29076f 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.
2022-02-10 21:09:06 +01:00
Ondřej Surý
47b6e5d038 Merge branch '1087-rrset-strict-stats' into 'main'
In developer mode assert if statistics counter underflows

Closes #1087

See merge request isc-projects/bind9!2453
2022-02-10 17:21:16 +00:00
Ondřej Surý
0893b5fb79 Assert if statistics counter underflows in the developer mode
There are reported occurences where the statitic counters underflows and
starts reporting non-sense.

Add a check for the underflow, when ``named`` is compiled in the
developer mode.
2022-02-10 17:18:09 +01:00
Ondřej Surý
89935864e9 Merge branch '2717-fix-sysconfdir-in-manpages' into 'main'
Use compile-time paths in the manual pages

Closes #2717

See merge request isc-projects/bind9!5749
2022-02-10 16:07:43 +00:00
Ondřej Surý
9e70c6887a Add CHANGES note for [GL #2717] 2022-02-10 16:50:46 +01:00
Ondřej Surý
b42681c4e9 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.
2022-02-10 16:50:22 +01:00