Commit Graph

32947 Commits

Author SHA1 Message Date
Ondřej Surý
ee7283b3ee Merge branch 'bind-dyndb-ldap-v9.16.13' into 'main'
Do not require config.h to use isc/util.h

See merge request isc-projects/bind9!4840

(cherry picked from commit 19b69e9a3b)

81eb3396 Do not require config.h to use isc/util.h
2021-03-26 18:48:06 +00:00
Diego dos Santos Fronza
1c7b15151b Merge branch '2490-dig-tcp-does-not-honor-tries-1-nor-retry-0-v9_16' into 'v9_16'
Resolve "dig +tcp does not honor +tries=1 nor +retry=0"

See merge request isc-projects/bind9!4839
2021-03-25 17:59:37 +00:00
Diego Fronza
ec83e02ed2 Add CHANGES note for [GL #2490] 2021-03-25 14:35:16 -03:00
Diego Fronza
db2c180feb Update dig's man page
Adjusted man page entries for +tries and +retry options to reflect the
fact that now those options apply to TCP as well.
2021-03-25 14:33:50 -03:00
Diego Fronza
9c2d52bcdb Added tests for tries=1 and retry=0 on TCP EOF
Added tests to ensure that dig won't retry sending a query over tcp
(+tcp) when a TCP connection is closed prematurely (EOF is read) if
either +tries=1 or retry=0 is specified on the command line.
2021-03-25 14:33:08 -03:00
Diego Fronza
d299f0e9ab Adjusted dig system tests
Now that premature EOF on tcp connections take +tries and +retry into
account, the dig system tests handling TCP EOF with +tries=1 were
expecting dig to do a second attempt in handling the tcp query, which
doesn't happen anymore.

To make the test work as expected +tries value was adjusted to 2, to
make it behave as before after the new update on dig.
2021-03-25 14:32:46 -03:00
Diego Fronza
1e5f3e6fa3 Don't retry +tcp queries on failure if tries=1 or retries=0
Before this commit, a premature EOF (connection closed) on tcp queries
was causing dig to automatically attempt to send the query again, even
if +tries=1 or +retries=0 was provided on command line.

This commit fix the problem by taking into account the no. of retries
specified by the user when processing a premature EOF on tcp
connections.
2021-03-25 14:32:37 -03:00
Matthijs Mekking
b813eab387 Merge branch '2488-refresh-keys-after-rndc-rollover-v9_16' into 'v9_16'
Resolve "Update key refresh timer after 'rndc dnssec -rollover'"

See merge request isc-projects/bind9!4833
2021-03-22 15:27:29 +00:00
Matthijs Mekking
a36257ea60 Fix some intermittent kasp failures
When calling "rndc dnssec -checkds", it may take some milliseconds
before the appropriate changes have been written to the state file.
Add retry_quiet mechanisms to allow the write operation to finish.

Also retry_quiet the check for the next key event. A "rndc dnssec"
command may trigger a zone_rekey event and this will write out
a new "next key event" log line, but it may take a bit longer than
than expected in the tests.

(cherry picked from commit 82d667e1d5)
2021-03-22 15:35:22 +01:00
Matthijs Mekking
d12b40f6fb Rekey immediately after rndc checkds/rollover
Call 'dns_zone_rekey' after a 'rndc dnssec -checkds' or 'rndc dnssec
-rollover' command is received, because such a command may influence
the next key event. Updating the keys immediately avoids unnecessary
rollover delays.

The kasp system test no longer needs to call 'rndc loadkeys' after
a 'rndc dnssec -checkds' or 'rndc dnssec -rollover' command.

(cherry picked from commit 82f72ae249)
2021-03-22 15:35:22 +01:00
Matthijs Mekking
a5c402b67d Merge branch '2517-cds-dnskey-delete-records-prevent-loading-unsigned-zone-v9_16' into 'v9_16'
Resolve "CDS and CDNSKEY DELETE records prevent (re-)loading unsigned zone"

See merge request isc-projects/bind9!4832
2021-03-22 13:27:36 +00:00
Matthijs Mekking
3156c0d103 Add CHANGES and notes for [#2517]
(cherry picked from commit 841e90c6fc)
2021-03-22 13:57:10 +01:00
Matthijs Mekking
1f8c5786f8 Delete CDS/CDNSKEY records when zone is unsigned
CDS/CDNSKEY DELETE records are only useful if they are signed,
otherwise the parent cannot verify these RRsets anyway. So once the DS
has been removed (and signaled to BIND), we can remove the DNSKEY and
RRSIG records, and at this point we can also remove the CDS/CDNSKEY
records.

(cherry picked from commit 6f31f62d69)
2021-03-22 13:57:10 +01:00
Matthijs Mekking
7882c7fbea Allow CDS/CDNSKEY DELETE records in unsigned zone
While not useful, having a CDS/CDNSKEY DELETE record in an unsigned
zone is not an error and "named-checkzone" should not complain.

(cherry picked from commit f211c7c2a1)
2021-03-22 13:31:02 +01:00
Matthijs Mekking
62592d59cb Merge branch 'matthijs-test-keymgr2kasp-v9_16' into 'v9_16'
Test keymgr2kasp (9.16)

See merge request isc-projects/bind9!4830
2021-03-22 11:40:59 +00:00
Matthijs Mekking
fe09becc7e Retry quiet check keys
Change the 'check_keys' function to try three times. Some intermittent
kasp test failures are because we are inspecting the key files
before the actual change has happen. The 'retry_quiet' approach allows
for a bit more time to let the write operation finish.

(cherry picked from commit d5531df79a)
2021-03-22 11:24:55 +01:00
Matthijs Mekking
b24a0da8f4 Update copyrights for keymgr2kasp
This MR introduces a new system test 'keymgr2kasp' to test
migration to 'dnssec-policy'. It moves some existing tests from
the 'kasp' system test to here.

Also a common script 'kasp.sh', to be used in kasp specific tests,
is introduced.

(manually picked from commit 923c2a07bf)
2021-03-22 11:24:55 +01:00
Matthijs Mekking
b81502f4ae Fix keymgr key init bug
The 'keymgr_key_init()' function initializes key states if they have
not been set previously. It looks at the key timing metadata and
determines using the given times whether a state should be set to
RUMOURED or OMNIPRESENT.

However, the DNSKEY and ZRRSIG states were mixed up: When looking
at the Activate timing metadata we should set the ZRRSIG state, and
when looking at the Published timing metadata we should set the
DNSKEY state.

(cherry picked from commit 27e7d5f698)
2021-03-22 11:24:55 +01:00
Matthijs Mekking
68e9603ed8 Test keymgr2kasp state from timing metadata
Add two test zones that migrate to dnssec-policy. Test if the key
states are set accordingly given the timing metadata.

The rumoured.kasp zone has its Publish/Active/SyncPublish times set
not too long ago so the key states should be set to RUMOURED. The
omnipresent.kasp zone has its Publish/Active/SyncPublish times set
long enough to set the key states to OMNIPRESENT.

Slightly change the init_migration_keys function to set the
key lifetime to "none" (legacy keys don't have lifetime). Then in the
test case set the expected key lifetime explicitly.

(cherry picked from commit c40c1ebcb1)
2021-03-22 11:24:55 +01:00
Matthijs Mekking
177ceb6cda Editorial commit keymgr2kasp test
This commit is somewhat editorial as it does not introduce something
new nor fixes anything.

The layout in keymgr2kasp/tests.sh has been changed, with the
intention to make more clear where a test scenario ends and begins.

The publication time of some ZSKs has been changed. It makes a more
clear distinction between publication time and activation time.

(cherry picked from commit f6fa254256)
2021-03-22 11:24:55 +01:00
Matthijs Mekking
e91f53cc6e Introduce kasp.sh
Add a script similar to conf.sh to include common functions and
variables for testing KASP. Currently used in kasp, keymgr2kasp, and
nsec3.

(cherry picked from commit ecb073bdd6)
2021-03-22 11:24:55 +01:00
Matthijs Mekking
2fa68d985f Move kasp migration tests to different directory
The kasp system test was getting pretty large, and more tests are on
the way. Time to split up. Move tests that are related to migrating
to dnssec-policy to a separate directory 'keymgr2kasp'.

(cherry picked from commit 5389172111)
2021-03-22 11:24:55 +01:00
Evan Hunt
885524ed38 Merge branch '2592-dig-clock-realtime-v9_16' into 'v9_16'
Resolve "dig -u is extremely inaccurate, especially on machines with the kernel timer tick set at 100Hz"

See merge request isc-projects/bind9!4827
2021-03-20 19:28:45 +00:00
Evan Hunt
0c74340e76 CHANGES 2021-03-20 12:02:23 -07:00
Patrick McLean
702edde73a dig: Use high resolution clocks when microsecond accuracy is requested
The TIME_NOW macro calls isc_time_now which uses CLOCK_REALTIME_COARSE
for getting the current time. This is perfectly fine for millisecond,
however when the user request microsecond resolutiuon, they are going
to get very inaccurate results. This is especially true on a server
class machine where the clock ticks may be set to 100HZ.

This changes dig to use the new TIME_NOW_HIRES macro that uses the
CLOCK_MONOTONIC_RAW that is more expensive, but gets the *actual*
current time rather than the at the last kernel time tick.

(cherry picked from commit 56cef1495f)
2021-03-20 12:00:59 -07:00
Patrick McLean
c5c9c9b83f Add isc_time_now_hires function to get current time with high resolution
The current isc_time_now uses CLOCK_REALTIME_COARSE which only updates
on a timer tick. This clock is generally fine for millisecond accuracy,
but on servers with 100hz clocks, this clock is nowhere near accurate
enough for microsecond accuracy.

This commit adds a new isc_time_now_hires function that uses
CLOCK_REALTIME, which gives the current time, though it is somewhat
expensive to call. When microsecond accuracy is required, it may be
required to use extra resources for higher accuracy.

(cherry picked from commit ebced74b19)
2021-03-20 11:59:21 -07:00
Michal Nowak
a0db1ac26c Merge branch 'v9_16_13-release' into 'v9_16'
Merge 9.16.13 release branch

See merge request isc-projects/bind9!4821
2021-03-19 09:36:09 +00:00
Michal Nowak
63cb814f3c Set up release notes for BIND 9.16.14 2021-03-19 10:10:59 +01:00
Tinderbox User
cfb6cca52d Merge branch 'prep-release' into v9_16_13-release 2021-03-19 09:57:51 +01:00
Michal Nowak
4bbc3587e0 Merge branch 'mnowak/prepare-documentation-for-bind-9.16.13' into 'v9_16_13-release'
Prepare documentation for BIND 9.16.13

See merge request isc-private/bind9!267
2021-03-19 09:57:51 +01:00
Tinderbox User
0525112928 prep 9.16.13 2021-03-19 09:57:51 +01:00
Michal Nowak
d0444472d8 Prepare release notes for BIND 9.16.13 2021-03-19 09:57:51 +01:00
Michal Nowak
7ce5609e8b Add release note for GL #2041 2021-03-19 09:57:51 +01:00
Michal Nowak
ed42c89938 Reorder release notes 2021-03-19 09:57:51 +01:00
Michal Nowak
4af8825c27 Tweak and reword release notes 2021-03-19 09:57:36 +01:00
Michal Nowak
3ef42ca6db Tweak and reword recent CHANGES entries 2021-03-19 09:54:30 +01:00
Diego dos Santos Fronza
706c8c6a12 Merge branch '2575-memory-leak-when-named-attempts-to-listen-on-freebsd-virtual-interface' into 'v9_16'
Resolve "memory leak when named attempts to listen on FreeBSD virtual interface"

See merge request isc-projects/bind9!4823
2021-03-18 21:40:49 +00:00
Diego Fronza
392a08bc95 Add CHANGES and release notes 2021-03-18 18:20:18 -03:00
Witold Kręcicki
a6c4702796 Fix a startup/shutdown crash in ns_clientmgr_create 2021-03-18 15:33:28 -03:00
Witold Kręcicki
dd564da286 Shutdown interface if we can't listen on it to avoid shutdown hang 2021-03-18 15:27:28 -03:00
Ondřej Surý
2d2ac820ef Merge branch '2573-dont-timeout-when-sending-data-v9_16' into 'v9_16'
Resolve "Fix TCPDNS and TLSDNS timers" (v9.16)

See merge request isc-projects/bind9!4819
2021-03-18 15:59:48 +00:00
Ondřej Surý
121641686c Temporarily disable tlsdns_test until it gets refactored
The tlsdns API is not yet used in the 9.16 branch and the tlsdns_test
fails too often.  Temporarily disable running the test until it is
actually needed.
2021-03-18 15:42:03 +01:00
Ondřej Surý
e822b77dc0 Add CHANGES and release note for GL #2573 2021-03-18 15:16:13 +01:00
Ondřej Surý
db49ffca20 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 15:16:13 +01:00
Ondřej Surý
5d0647e067 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 15:16:13 +01:00
Ondřej Surý
a017ba2615 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 15:16:13 +01:00
Ondřej Surý
94a32eaf29 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 15:16:13 +01:00
Mark Andrews
30f749cdf3 Merge branch '2580-does-not-compile-without-deprecated-openssl-apis-v9_16' into 'v9_16'
Stop using deprecated calls in lib/isc/tls.c

See merge request isc-projects/bind9!4815
2021-03-17 23:39:13 +00:00
Mark Andrews
3f9d7227b3 Stop using deprecated calls in lib/isc/tls.c
from Rosen Penev @neheb

(cherry picked from commit a9f883cbc2)
2021-03-18 10:15:44 +11:00
Matthijs Mekking
bcfdb0a6f6 Merge branch '2523-thaw-dnssec-policy-zone-v9_16' into 'v9_16'
Resolve "Unable to thaw a frozen dynamic zone when KASP is configured."

See merge request isc-projects/bind9!4811
2021-03-17 10:56:19 +00:00