2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

33814 Commits

Author SHA1 Message Date
Matthijs Mekking
9a256347ab Add changes for filter-a plugin 2021-03-19 08:06:55 +01:00
treysis
6b2ea00621 Add filter-a plugin for IPv6-dominant environments
(cherry picked from commit 78f6cd57e1cc166823415438fe2d19a324cf7a67)
2021-03-19 08:06:55 +01:00
Ondřej Surý
6ae0a90583 Merge branch '2581-oldsize-assertion' into 'main'
Fix memory accounting bug in TLSDNS

Closes #2581

See merge request isc-projects/bind9!4809
2021-03-18 22:03:25 +00:00
Ondřej Surý
e4b0730387 Call the isc__nm_failed_connect_cb() early when shutting down
When shutting down, calling the isc__nm_failed_connect_cb() was delayed
until the connect callback would be called.  It turned out that the
connect callback might not get called at all when the socket is being
shut down.  Call the failed_connect_cb() directly in the
tlsdns_shutdown() instead of waiting for the connect callback to call it.
2021-03-18 14:31:15 -07:00
Ondřej Surý
73c574e553 Fix typo in processbuffer() - tcpdns vs tlsdns
The processbuffer() would call isc__nm_tcpdns_processbuffer() instead of
isc__nm_tlsdns_processbuffer() for the isc_nm_tlsdnssocket type of
socket.
2021-03-18 21:35:13 +01:00
Ondřej Surý
1d64d4cde8 Fix memory accounting bug in TLSDNS
After a partial write the tls.senddata buffer would be rearranged to
contain only the data tha wasn't sent and the len part would be made
shorter, which would lead to attempt to free only part of a socket's
tls.senddata buffer.
2021-03-18 18:14:38 +01:00
Ondřej Surý
15f676f111 Merge branch 'ondrej/fix-dangling-uvreq-in-tlsdns' into 'main'
Fix dangling uvreq when data is sent from tlsdns_cycle()

See merge request isc-projects/bind9!4820
2021-03-18 17:02:18 +00:00
Ondřej Surý
5cc406a920 Fix dangling uvreq when data is sent from tlsdns_cycle()
The tlsdns_cycle() might call uv_write() to write data to the socket,
when this happens and the socket is shutdown before the callback
completes, the uvreq structure was not freed because the callback would
be called with non-zero status code.
2021-03-18 17:58:56 +01:00
Ondřej Surý
06913d3d74 Merge branch '2573-dont-timeout-when-sending-data' into 'main'
Resolve "Fix TCPDNS and TLSDNS timers"

Closes #2583 and #2573

See merge request isc-projects/bind9!4807
2021-03-18 16:01:01 +00:00
Michal Nowak
2edba8777f Merge branch 'v9_17_11-release' into 'main'
Merge 9.17.11 release branch

See merge request isc-projects/bind9!4818
2021-03-18 15:38:54 +00:00
Ondřej Surý
98f7495426 Add CHANGES and release note for GL #2573 2021-03-18 16:37:57 +01:00
Ondřej Surý
36ddefacb4 Change the isc_nm_(get|set)timeouts() to work with milliseconds
The RFC7828 specifies the keepalive interval to be 16-bit, specified in
units of 100 milliseconds and the configuration options tcp-*-timeouts
are following the suit.  The units of 100 milliseconds are very
unintuitive and while we can't change the configuration and presentation
format, we should not follow this weird unit in the API.

This commit changes the isc_nm_(get|set)timeouts() functions to work
with milliseconds and convert the values to milliseconds before passing
them to the function, not just internally.
2021-03-18 16:37:57 +01:00
Ondřej Surý
1ef232f93d Merge the common parts between udp, tcpdns and tlsdns protocol
The udp, tcpdns and tlsdns contained lot of cut&paste code or code that
was very similar making the stack harder to maintain as any change to
one would have to be copied to the the other protocols.

In this commit, we merge the common parts into the common functions
under isc__nm_<foo> namespace and just keep the little differences based
on the socket type.
2021-03-18 16:37:57 +01:00
Ondřej Surý
caa5b6548a Fix TCPDNS and TLSDNS timers
After the TCPDNS refactoring the initial and idle timers were broken and
only the tcp-initial-timeout was always applied on the whole TCP
connection.

This broke any TCP connection that took longer than tcp-initial-timeout,
most often this would affect large zone AXFRs.

This commit changes the timeout logic in this way:

  * On TCP connection accept the tcp-initial-timeout is applied
    and the timer is started
  * When we are processing and/or sending any DNS message the timer is
    stopped
  * When we stop processing all DNS messages, the tcp-idle-timeout
    is applied and the timer is started again
2021-03-18 16:37:57 +01:00
Ondřej Surý
64cff61c02 Add TCP timeouts system test
The system tests were missing a test that would test tcp-initial-timeout
and tcp-idle-timeout.

This commit adds new "timeouts" system test that adds:

  * Test that waits longer than tcp-initial-timeout and then checks
    whether the socket was closed

  * Test that sends and receives DNS message then waits longer than
    tcp-initial-timeout but shorter time than tcp-idle-timeout than
    sends DNS message again than waits longer than tcp-idle-timeout
    and checks whether the socket was closed

  * Similar test, but bursting 25 DNS messages than waiting longer than
    tcp-initial-timeout and shorter than tcp-idle-timeout than do second
    25 DNS message burst

  * Check whether transfer longer than tcp-initial-timeout succeeds
2021-03-18 16:37:57 +01:00
Michal Nowak
3265dfa929
Set up release notes for BIND 9.17.12 2021-03-18 15:58:15 +01:00
Michal Nowak
8853ec09a5
Update BIND version to 9.17.11 2021-03-18 15:55:36 +01:00
Michal Nowak
9d4da23850
Add a CHANGES marker 2021-03-18 15:55:32 +01:00
Michal Nowak
a8b525290f
Merge branch 'mnowak/prepare-documentation-for-bind-9.17.11' into 'v9_17_11-release'
Prepare documentation for BIND 9.17.11

See merge request isc-private/bind9!252
2021-03-18 15:55:11 +01:00
Michal Nowak
924f8ceb06
Prepare release notes for BIND 9.17.11 2021-03-18 15:55:11 +01:00
Michal Nowak
e6ca82b2c4
Add release notes for GL #2472 2021-03-18 15:55:10 +01:00
Michal Nowak
566b8ab85e
Add release note for GL #2504 2021-03-18 15:55:10 +01:00
Michal Nowak
baf79279f0
Add release note for GL #2041 2021-03-18 15:55:10 +01:00
Michal Nowak
70076fb7c8
Reorder release notes 2021-03-18 15:55:10 +01:00
Michal Nowak
b66bb0c89e
Tweak and reword release notes 2021-03-18 15:54:41 +01:00
Michal Nowak
188d605c2a
Tweak and reword recent CHANGES entries 2021-03-18 15:53:30 +01:00
Michal Nowak
68128f2092
Release template: update the -S edition delivery tickets
Change requested by the Support team.
2021-03-18 15:53:30 +01:00
Mark Andrews
ffea605679 Merge branch '2580-does-not-compile-without-deprecated-openssl-apis' into 'main'
Resolve "Does not compile without deprecated OpenSSL APIs"

Closes #2580

See merge request isc-projects/bind9!4806
2021-03-17 20:10:11 +00:00
Mark Andrews
a9f883cbc2 Stop using deprecated calls in lib/isc/tls.c
from Rosen Penev @neheb
2021-03-17 20:05:47 +00:00
Matthijs Mekking
8d8373c21c Merge branch '2523-thaw-dnssec-policy-zone' into 'main'
Resolve "Unable to thaw a frozen dynamic zone when KASP is configured."

Closes #2523

See merge request isc-projects/bind9!4777
2021-03-17 10:11:13 +00:00
Matthijs Mekking
0cae3249e3 Add test for thaw dynamic kasp zone
Add a test for freezing, manually updating, and then thawing a dynamic
zone with "dnssec-policy". In the kasp system test we add parameters
to the "update_is_signed" check to signal the indicated IP addresses
for the labels "a" and "d". If set to '-', the test is skipped.

After nsupdating the dynamic.kasp zone, we revert the update (with
nsupdate) and update the zone again, but now with the freeze/thaw
approach.
2021-03-17 08:24:17 +01:00
Matthijs Mekking
b90846f222 Fully sign a thawed zone
When thawing a zone, we don't know what changes have been made. If we
do DNSSEC maintenance on this zone, schedule a full sign.
2021-03-17 08:24:17 +01:00
Matthijs Mekking
b518ed9f46 Fix "unable to thaw dynamic kasp zone"
Dynamic zones with dnssec-policy could not be thawed because KASP
zones were considered always dynamic. But a dynamic KASP zone should
also check whether updates are disabled.
2021-03-17 08:24:15 +01:00
Matthijs Mekking
0eb0dabdcc Merge branch '2561-dnssec-guide-signing-type' into 'main'
Fix typo in DNSSEC Guide

Closes #2561

See merge request isc-projects/bind9!4791
2021-03-16 13:37:32 +00:00
Matthijs Mekking
d45af8877a Fix typo in DNSSEC Guide
The "dnssec-policy" example should say "keys" instead of "key".
2021-03-16 13:37:16 +00:00
Artem Boldariev
50eaa0f38f Merge branch '2514-tls-cert-chain' into 'main'
Load full certificate chain from a certificate chain file

Closes #2514

See merge request isc-projects/bind9!4792
2021-03-16 10:33:35 +00:00
Matthijs Mekking
c69fafdd65 Add change entry for [#2514] 2021-03-16 11:50:32 +02:00
Artem Boldariev
75363dcb7c Load full certificate chain from a certificate chain file
This commit fixes loading the certificate chain files so that the full
chain could be sent to the clients which require that for
verification. Before that fix only the top most certificate would be
loaded from the chain and sent to clients preventing some of them to
perform certificate validation (e.g. Windows 10 DoH client).
2021-03-16 11:49:04 +02:00
Matthijs Mekking
6dee5c1b28 Merge branch '2562-xot-crash' into 'main'
Fix a XoT crash

Closes #2562

See merge request isc-projects/bind9!4803
2021-03-16 09:42:18 +00:00
Matthijs Mekking
ee0835d977 Fix a XoT crash
The transport should also be detached when we skip a master, otherwise
named will crash when sending a SOA query to the next master over TLS,
because the transport must be NULL when we enter
'dns_view_gettransport'.
2021-03-16 10:11:12 +01:00
Mark Andrews
24c796942f Merge branch '2569-nsupdate-on-solaris-produces-different-failure-text-than-expected' into 'main'
Resolve "nsupdate on Solaris produces different failure text than expected"

Closes #2569

See merge request isc-projects/bind9!4804
2021-03-16 00:11:02 +00:00
Mark Andrews
25d1276170 Ignore the actual error code returned by getaddrinfo
when testing if interactive mode continues or not on
invalid hostname.  We only need to detect that getaddrinfo
failed and that we continued or not.
2021-03-16 10:20:28 +11:00
Mark Andrews
a9339fe7fc Merge branch '2567-warning-array-subscript-is-of-type-char-on-netbsd-9' into 'main'
Resolve "warning: array subscript is of type 'char' on NetBSD 9"

Closes #2567

See merge request isc-projects/bind9!4794
2021-03-15 03:33:21 +00:00
Mark Andrews
d768336cc6 Add CHANGES for [GL #2567] 2021-03-15 14:18:46 +11:00
Mark Andrews
99bd0c346f cast (char) to (unsigned char) when calling is*() 2021-03-15 14:18:03 +11:00
Michal Nowak
e391209212 Merge branch '2565-servestale-fetchlimits-crash' into 'main'
Fix servestale fetchlimits crash

Closes #2565

See merge request isc-projects/bind9!4797
2021-03-11 12:14:47 +00:00
Matthijs Mekking
87591de6f7 Fix servestale fetchlimits crash
When we query the resolver for a domain name that is in the same zone
for which is already one or more fetches outstanding, we could
potentially hit the fetch limits. If so, recursion fails immediately
for the incoming query and if serve-stale is enabled, we may try to
return a stale answer.

If the resolver is also is authoritative for the parent zone (for
example the root zone), first a delegation is found, but we first
check the cache for a better response.

Nothing is found in the cache, so we try to recurse to find the
answer to the query.

Because of fetch-limits 'dns_resolver_createfetch()' returns an error,
which 'ns_query_recurse()' propagates to the caller,
'query_delegation_recurse()'.

Because serve-stale is enabled, 'query_usestale()' is called,
setting 'qctx->db' to the cache db, but leaving 'qctx->version'
untouched. Now 'query_lookup()' is called to search for stale data
in the cache database with a non-NULL 'qctx->version'
(which is set to a zone db version), and thus we hit an assertion
in rbtdb.

This crash was introduced in 'main' by commit
8bcd7fe69e5343071fc917738d6092a8b974ef3f.
2021-03-11 12:16:14 +01:00
Ondřej Surý
74a0294be0 Merge branch '2568-test_client-c-error-static-declaration-of-yield-follows-non-static-declaration-on-solaris' into 'main'
Resolve "test_client.c: error: static declaration of 'yield' follows non-static declaration on Solaris"

Closes #2568

See merge request isc-projects/bind9!4795
2021-03-11 06:09:49 +00:00
Mark Andrews
af0ee2c718 Rename 'yield' to 'waitforsignal' due to namespace clash 2021-03-11 11:34:15 +11:00
Michał Kępień
77ac8db0c6 Merge branch '2556-fix-documentation-for-the-max-ixfr-ratio-option' into 'main'
Fix documentation for the "max-ixfr-ratio" option

Closes #2556

See merge request isc-projects/bind9!4787
2021-03-08 11:28:37 +00:00