]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 years agoDo not require config.h to use isc/util.h
Petr Mensik [Fri, 26 Mar 2021 10:01:59 +0000 (11:01 +0100)] 
Do not require config.h to use isc/util.h

util.h requires ISC_CONSTRUCTOR definition, which depends on config.h
inclusion. It does not include it from isc/util.h (or any other header).
Using isc/util.h fails hard when isc/util.h is used without including
bind's config.h.

Move the check to c file, where ISC_CONSTRUCTOR is used. Ensure config.h
is included there.

5 years agoMerge branch '2490-dig-tcp-does-not-honor-tries-1-nor-retry-0' into 'main'
Diego dos Santos Fronza [Thu, 25 Mar 2021 17:30:24 +0000 (17:30 +0000)] 
Merge branch '2490-dig-tcp-does-not-honor-tries-1-nor-retry-0' into 'main'

Resolve "dig +tcp does not honor +tries=1 nor +retry=0"

Closes #2490

See merge request isc-projects/bind9!4682

5 years agoAdd CHANGES note for [GL #2490]
Diego Fronza [Tue, 16 Feb 2021 16:34:44 +0000 (13:34 -0300)] 
Add CHANGES note for [GL #2490]

5 years agoUpdate dig's man page
Diego Fronza [Tue, 16 Feb 2021 16:23:14 +0000 (13:23 -0300)] 
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.

5 years agoAdded tests for tries=1 and retry=0 on TCP EOF
Diego Fronza [Tue, 16 Feb 2021 16:13:07 +0000 (13:13 -0300)] 
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.

5 years agoAdjusted dig system tests
Diego Fronza [Tue, 16 Feb 2021 15:36:45 +0000 (12:36 -0300)] 
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.

5 years agoDon't retry +tcp queries on failure if tries=1 or retries=0
Diego Fronza [Mon, 15 Feb 2021 22:28:50 +0000 (19:28 -0300)] 
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.

5 years agoMerge branch 'matthijs-configure-kaspsh' into 'main'
Michał Kępień [Wed, 24 Mar 2021 09:07:33 +0000 (09:07 +0000)] 
Merge branch 'matthijs-configure-kaspsh' into 'main'

Configure kasp.sh

See merge request isc-projects/bind9!4836

5 years agoAdd kasp.sh to run.sh.in script
Matthijs Mekking [Wed, 24 Mar 2021 07:48:23 +0000 (08:48 +0100)] 
Add kasp.sh to run.sh.in script

Add kasp.sh to the list of scripts copied from the source directory to
the build directory before any test is run. This will fix
the out-of-tree test failures introduced in commit
ecb073bdd6b1ff5ad07293c1db190cf28df6708e on the 'main' branch.

5 years agoMerge branch '2488-refresh-keys-after-rndc-rollover' into 'main'
Matthijs Mekking [Mon, 22 Mar 2021 13:35:12 +0000 (13:35 +0000)] 
Merge branch '2488-refresh-keys-after-rndc-rollover' into 'main'

Rekey immediately after rndc checkds/rollover

Closes #2488

See merge request isc-projects/bind9!4813

5 years agoFix some intermittent kasp failures
Matthijs Mekking [Thu, 18 Mar 2021 09:47:56 +0000 (10:47 +0100)] 
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.

5 years agoRekey immediately after rndc checkds/rollover
Matthijs Mekking [Wed, 17 Mar 2021 14:57:34 +0000 (15:57 +0100)] 
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.

5 years agoMerge branch '2517-cds-dnskey-delete-records-prevent-loading-unsigned-zone' into...
Matthijs Mekking [Mon, 22 Mar 2021 10:06:45 +0000 (10:06 +0000)] 
Merge branch '2517-cds-dnskey-delete-records-prevent-loading-unsigned-zone' into 'main'

Resolve "CDS and CDNSKEY DELETE records prevent (re-)loading unsigned zone"

Closes #2517

See merge request isc-projects/bind9!4810

5 years agoAdd CHANGES and notes for [#2517]
Matthijs Mekking [Wed, 17 Mar 2021 09:09:59 +0000 (10:09 +0100)] 
Add CHANGES and notes for [#2517]

5 years agoDelete CDS/CDNSKEY records when zone is unsigned
Matthijs Mekking [Wed, 17 Mar 2021 09:04:00 +0000 (10:04 +0100)] 
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.

5 years agoAllow CDS/CDNSKEY DELETE records in unsigned zone
Matthijs Mekking [Wed, 17 Mar 2021 09:02:22 +0000 (10:02 +0100)] 
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.

5 years agoMerge branch 'matthijs-test-keymgr2kasp' into 'main'
Matthijs Mekking [Mon, 22 Mar 2021 09:09:06 +0000 (09:09 +0000)] 
Merge branch 'matthijs-test-keymgr2kasp' into 'main'

Test migrating to dnssec-policy

Closes #2544

See merge request isc-projects/bind9!4758

5 years agoRetry quiet check keys
Matthijs Mekking [Fri, 19 Mar 2021 11:13:28 +0000 (12:13 +0100)] 
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.

5 years agoUpdate copyrights for keymgr2kasp
Matthijs Mekking [Fri, 19 Mar 2021 07:29:55 +0000 (08:29 +0100)] 
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.

5 years agoFix keymgr key init bug
Matthijs Mekking [Fri, 26 Feb 2021 08:27:32 +0000 (09:27 +0100)] 
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.

5 years agoTest keymgr2kasp state from timing metadata
Matthijs Mekking [Thu, 25 Feb 2021 16:51:58 +0000 (17:51 +0100)] 
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.

5 years agoEditorial commit keymgr2kasp test
Matthijs Mekking [Wed, 24 Feb 2021 16:00:42 +0000 (17:00 +0100)] 
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.

5 years agoIntroduce kasp.sh
Matthijs Mekking [Wed, 24 Feb 2021 14:28:22 +0000 (15:28 +0100)] 
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.

5 years agoMove kasp migration tests to different directory
Matthijs Mekking [Wed, 24 Feb 2021 14:11:59 +0000 (15:11 +0100)] 
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'.

5 years agoMerge branch '1946-man-page-fixes' into 'main'
Michał Kępień [Mon, 22 Mar 2021 08:39:38 +0000 (08:39 +0000)] 
Merge branch '1946-man-page-fixes' into 'main'

Man page fixes

See merge request isc-projects/bind9!4817

5 years agoInstall man page for named-compilezone
Michał Kępień [Mon, 22 Mar 2021 08:36:48 +0000 (09:36 +0100)] 
Install man page for named-compilezone

The named-checkzone tool can also be invoked as named-compilezone.  Make
sure a man page is installed for that alias.  Move and rename the
"man_named-checkzone" label to prevent a Sphinx duplicate label warning
from being raised (see commit 84862e96c1fcff6e7c1ca31884e2fad921afa4f7
for more information).

5 years agoInstall named-nzd2nzf man page conditionally
Michał Kępień [Mon, 22 Mar 2021 08:36:48 +0000 (09:36 +0100)] 
Install named-nzd2nzf man page conditionally

The named-nzd2nzf utility is only built and installed for LMDB-enabled
builds.  Adjust the relevant Makefile.am file to make sure the
named-nzd2nzf.1 man page is also only built and installed for
LMDB-enabled builds.

5 years agoInstall dnstap-read man page conditionally
Michał Kępień [Mon, 22 Mar 2021 08:36:48 +0000 (09:36 +0100)] 
Install dnstap-read man page conditionally

The dnstap-read utility is only built and installed for dnstap-enabled
builds.  Adjust the relevant Makefile.am file to make sure the
dnstap-read.1 man page is also only built and installed for
dnstap-enabled builds.

5 years agoMerge branch 'placeholder' into 'main'
Evan Hunt [Sat, 20 Mar 2021 19:16:16 +0000 (19:16 +0000)] 
Merge branch 'placeholder' into 'main'

placeholder for #2575

See merge request isc-projects/bind9!4828

5 years agoplaceholder for #2575
Evan Hunt [Sat, 20 Mar 2021 19:11:11 +0000 (12:11 -0700)] 
placeholder for #2575

Issue #2575 was merged to 9.16 only as change 5603, but a placeholder
was not added to CHANGES in the main branch. This commit adds the
placeholder and renumbers the two subsequent changes.

5 years agoMerge branch '2592-dig-clock-realtime' into 'main'
Evan Hunt [Sat, 20 Mar 2021 18:58:16 +0000 (18:58 +0000)] 
Merge branch '2592-dig-clock-realtime' into 'main'

Resolve "dig -u is extremely inaccurate, especially on machines with the kernel timer tick set at 100Hz"

Closes #2592

See merge request isc-projects/bind9!4826

5 years agoCHANGES
Evan Hunt [Sat, 20 Mar 2021 18:02:39 +0000 (11:02 -0700)] 
CHANGES

5 years agodig: Use high resolution clocks when microsecond accuracy is requested
Patrick McLean [Sat, 20 Mar 2021 05:50:51 +0000 (22:50 -0700)] 
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.

5 years agoAdd isc_time_now_hires function to get current time with high resolution
Patrick McLean [Sat, 20 Mar 2021 05:48:22 +0000 (22:48 -0700)] 
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.

5 years agoMerge branch '2416-improve-netmgr-unit-tests-reliability' into 'main'
Ondřej Surý [Fri, 19 Mar 2021 16:22:22 +0000 (16:22 +0000)] 
Merge branch '2416-improve-netmgr-unit-tests-reliability' into 'main'

Improve reliability of the netmgr unit tests

Closes #2455 and #2416

See merge request isc-projects/bind9!4628

5 years agoRequire CMocka >= 1.1.3 to run the unit tests
Ondřej Surý [Mon, 15 Mar 2021 09:22:15 +0000 (10:22 +0100)] 
Require CMocka >= 1.1.3 to run the unit tests

In CMocka versions << 1.1.3, the skip() function would cause the whole
unit test to abort when CMOCKA_TEST_ABORT is set.  As this is problem
only in Debian 9 Stretch and Ubuntu 16.04 Xenial, we just require the
CMocka >= 1.1.3 and disable the unit testing on Debian 9 Stretch until
we can pull the libcmocka-dev from stretch-backports and remove the
Ubuntu 16.04 Xenial from the CI as it is reaching End of Standard
Support at the end of April 2021.

5 years agoFix compilation with NETMGR_TRACE(_VERBOSE) enabled on non-Linux
Ondřej Surý [Fri, 29 Jan 2021 12:00:46 +0000 (13:00 +0100)] 
Fix compilation with NETMGR_TRACE(_VERBOSE) enabled on non-Linux

When NETMGR_TRACE(_VERBOSE) is enabled, the build would fail on some
non-Linux non-glibc platforms because:

  * Use <stdint.h> print macros because uint_fast32_t is not always
    unsigned long

  * The header <execinfo.h> is not available on non-glibc, thus commit
    adds dummy backtrace() and backtrace_symbols_fd() functions for
    platforms without HAVE_BACKTRACE

5 years agoImprove reliability of the netmgr unit tests
Ondřej Surý [Fri, 29 Jan 2021 12:00:46 +0000 (13:00 +0100)] 
Improve reliability of the netmgr unit tests

The netmgr unit tests were designed to push the system limits to maximum
by sending as many queries as possible in the busy loop from multiple
threads.  This mostly works with UDP, but in the stateful protocol where
establishing the connection takes more time, it failed quite often in
the CI.  On FreeBSD, this happened more often, because the socket() call
would fail spuriosly making the problem even worse.

This commit does several things to improve reliability:

* return value of isc_nm_<proto>connect() is always checked and retried
  when scheduling the connection fails

* The busy while loop has been slowed down with usleep(1000); so the
  netmgr threads could schedule the work and get executed.

* The isc_thread_yield() was replaced with usleep(1000); also to allow
  the other threads to do any work.

* Instead of waiting on just one variable, we wait for multiple
  variables to reach the final value

* We are wrapping the netmgr operations (connects, reads, writes,
  accepts) with reference counting and waiting for all the callbacks to
  be accounted for.

  This has two effects:

  a) the isc_nm_t is always clean of active sockets and handles when
     destroyed, so it will prevent the spurious INSIST(references == 1)
     from isc_nm_destroy()

  b) the unit test now ensures that all the callbacks are always called
     when they should be called, so any stuck test means that there was
     a missing callback call and it is always a real bug

These changes allows us to remove the workaround that would not run
certain tests on systems without port load-balancing.

5 years agoMerge branch 'ondrej/call-failed_read-from-tls_error' into 'main'
Ondřej Surý [Fri, 19 Mar 2021 14:57:53 +0000 (14:57 +0000)] 
Merge branch 'ondrej/call-failed_read-from-tls_error' into 'main'

Call isc__nm_tlsdns_failed_read on tls_error to cleanup the socket

See merge request isc-projects/bind9!4824

5 years agoCall isc__nm_tlsdns_failed_read on tls_error to cleanup the socket
Ondřej Surý [Fri, 19 Mar 2021 14:08:14 +0000 (15:08 +0100)] 
Call isc__nm_tlsdns_failed_read on tls_error to cleanup the socket

In tls_error(), we now call isc__nm_tlsdns_failed_read() instead of just
stopping timer and reading from the socket.  This allows us to properly
cleanup any pending operation on the socket.

5 years agoMerge branch 'treysis-filter-a' into 'main'
Matthijs Mekking [Fri, 19 Mar 2021 09:41:02 +0000 (09:41 +0000)] 
Merge branch 'treysis-filter-a' into 'main'

filter-a plugin

Closes #2585

See merge request isc-projects/bind9!4816

5 years agoAdd changes for filter-a plugin
Matthijs Mekking [Thu, 18 Mar 2021 10:20:17 +0000 (11:20 +0100)] 
Add changes for filter-a plugin

5 years agoAdd filter-a plugin for IPv6-dominant environments
treysis [Wed, 3 Mar 2021 10:33:55 +0000 (11:33 +0100)] 
Add filter-a plugin for IPv6-dominant environments

(cherry picked from commit 78f6cd57e1cc166823415438fe2d19a324cf7a67)

5 years agoMerge branch '2581-oldsize-assertion' into 'main'
Ondřej Surý [Thu, 18 Mar 2021 22:03:25 +0000 (22:03 +0000)] 
Merge branch '2581-oldsize-assertion' into 'main'

Fix memory accounting bug in TLSDNS

Closes #2581

See merge request isc-projects/bind9!4809

5 years agoCall the isc__nm_failed_connect_cb() early when shutting down
Ondřej Surý [Thu, 18 Mar 2021 20:37:12 +0000 (21:37 +0100)] 
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.

5 years agoFix typo in processbuffer() - tcpdns vs tlsdns
Ondřej Surý [Thu, 18 Mar 2021 20:19:18 +0000 (21:19 +0100)] 
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.

5 years agoFix memory accounting bug in TLSDNS
Ondřej Surý [Thu, 18 Mar 2021 17:14:38 +0000 (18:14 +0100)] 
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.

5 years agoMerge branch 'ondrej/fix-dangling-uvreq-in-tlsdns' into 'main'
Ondřej Surý [Thu, 18 Mar 2021 17:02:18 +0000 (17:02 +0000)] 
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

5 years agoFix dangling uvreq when data is sent from tlsdns_cycle()
Ondřej Surý [Fri, 29 Jan 2021 12:00:46 +0000 (13:00 +0100)] 
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.

5 years agoMerge branch '2573-dont-timeout-when-sending-data' into 'main'
Ondřej Surý [Thu, 18 Mar 2021 16:01:01 +0000 (16:01 +0000)] 
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

5 years agoMerge branch 'v9_17_11-release' into 'main'
Michal Nowak [Thu, 18 Mar 2021 15:38:54 +0000 (15:38 +0000)] 
Merge branch 'v9_17_11-release' into 'main'

Merge 9.17.11 release branch

See merge request isc-projects/bind9!4818

5 years agoAdd CHANGES and release note for GL #2573
Ondřej Surý [Wed, 17 Mar 2021 12:42:19 +0000 (13:42 +0100)] 
Add CHANGES and release note for GL #2573

5 years agoChange the isc_nm_(get|set)timeouts() to work with milliseconds
Ondřej Surý [Thu, 18 Mar 2021 10:16:45 +0000 (11:16 +0100)] 
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.

5 years agoMerge the common parts between udp, tcpdns and tlsdns protocol
Ondřej Surý [Thu, 18 Mar 2021 08:27:38 +0000 (09:27 +0100)] 
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.

5 years agoFix TCPDNS and TLSDNS timers
Ondřej Surý [Tue, 16 Mar 2021 08:03:02 +0000 (09:03 +0100)] 
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

5 years agoAdd TCP timeouts system test
Ondřej Surý [Wed, 17 Mar 2021 11:20:40 +0000 (12:20 +0100)] 
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

5 years agoSet up release notes for BIND 9.17.12
Michal Nowak [Thu, 18 Mar 2021 14:58:15 +0000 (15:58 +0100)] 
Set up release notes for BIND 9.17.12

5 years agoUpdate BIND version to 9.17.11
Michal Nowak [Tue, 9 Mar 2021 10:44:13 +0000 (11:44 +0100)] 
Update BIND version to 9.17.11

5 years agoAdd a CHANGES marker
Michal Nowak [Tue, 9 Mar 2021 10:42:48 +0000 (11:42 +0100)] 
Add a CHANGES marker

5 years agoMerge branch 'mnowak/prepare-documentation-for-bind-9.17.11' into 'v9_17_11-release'
Michal Nowak [Tue, 9 Mar 2021 09:17:19 +0000 (09:17 +0000)] 
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

5 years agoPrepare release notes for BIND 9.17.11
Michal Nowak [Mon, 8 Mar 2021 10:57:02 +0000 (11:57 +0100)] 
Prepare release notes for BIND 9.17.11

5 years agoAdd release notes for GL #2472
Michal Nowak [Mon, 8 Mar 2021 12:44:22 +0000 (13:44 +0100)] 
Add release notes for GL #2472

5 years agoAdd release note for GL #2504
Michal Nowak [Mon, 8 Mar 2021 12:47:45 +0000 (13:47 +0100)] 
Add release note for GL #2504

5 years agoAdd release note for GL #2041
Michal Nowak [Mon, 8 Mar 2021 12:47:30 +0000 (13:47 +0100)] 
Add release note for GL #2041

5 years agoReorder release notes
Michal Nowak [Fri, 5 Mar 2021 15:21:51 +0000 (16:21 +0100)] 
Reorder release notes

5 years agoTweak and reword release notes
Michal Nowak [Fri, 26 Feb 2021 12:07:08 +0000 (13:07 +0100)] 
Tweak and reword release notes

5 years agoTweak and reword recent CHANGES entries
Michal Nowak [Fri, 26 Feb 2021 11:19:57 +0000 (12:19 +0100)] 
Tweak and reword recent CHANGES entries

5 years agoRelease template: update the -S edition delivery tickets
Michal Nowak [Wed, 3 Mar 2021 17:35:55 +0000 (18:35 +0100)] 
Release template: update the -S edition delivery tickets

Change requested by the Support team.

5 years agoMerge branch '2580-does-not-compile-without-deprecated-openssl-apis' into 'main'
Mark Andrews [Wed, 17 Mar 2021 20:10:11 +0000 (20:10 +0000)] 
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

5 years agoStop using deprecated calls in lib/isc/tls.c
Mark Andrews [Tue, 16 Mar 2021 21:58:55 +0000 (21:58 +0000)] 
Stop using deprecated calls in lib/isc/tls.c

from Rosen Penev @neheb

5 years agoMerge branch '2523-thaw-dnssec-policy-zone' into 'main'
Matthijs Mekking [Wed, 17 Mar 2021 10:11:13 +0000 (10:11 +0000)] 
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

5 years agoAdd test for thaw dynamic kasp zone
Matthijs Mekking [Fri, 5 Mar 2021 10:29:06 +0000 (11:29 +0100)] 
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.

5 years agoFully sign a thawed zone
Matthijs Mekking [Fri, 5 Mar 2021 10:27:59 +0000 (11:27 +0100)] 
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.

5 years agoFix "unable to thaw dynamic kasp zone"
Matthijs Mekking [Fri, 5 Mar 2021 10:22:01 +0000 (11:22 +0100)] 
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.

5 years agoMerge branch '2561-dnssec-guide-signing-type' into 'main'
Matthijs Mekking [Tue, 16 Mar 2021 13:37:32 +0000 (13:37 +0000)] 
Merge branch '2561-dnssec-guide-signing-type' into 'main'

Fix typo in DNSSEC Guide

Closes #2561

See merge request isc-projects/bind9!4791

5 years agoFix typo in DNSSEC Guide
Matthijs Mekking [Tue, 9 Mar 2021 08:14:18 +0000 (09:14 +0100)] 
Fix typo in DNSSEC Guide

The "dnssec-policy" example should say "keys" instead of "key".

5 years agoMerge branch '2514-tls-cert-chain' into 'main'
Artem Boldariev [Tue, 16 Mar 2021 10:33:35 +0000 (10:33 +0000)] 
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

5 years agoAdd change entry for [#2514]
Matthijs Mekking [Fri, 12 Mar 2021 08:18:01 +0000 (09:18 +0100)] 
Add change entry for [#2514]

5 years agoLoad full certificate chain from a certificate chain file
Artem Boldariev [Tue, 9 Mar 2021 12:45:03 +0000 (14:45 +0200)] 
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).

5 years agoMerge branch '2562-xot-crash' into 'main'
Matthijs Mekking [Tue, 16 Mar 2021 09:42:18 +0000 (09:42 +0000)] 
Merge branch '2562-xot-crash' into 'main'

Fix a XoT crash

Closes #2562

See merge request isc-projects/bind9!4803

5 years agoFix a XoT crash
Matthijs Mekking [Mon, 15 Mar 2021 14:08:04 +0000 (15:08 +0100)] 
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'.

5 years agoMerge branch '2569-nsupdate-on-solaris-produces-different-failure-text-than-expected...
Mark Andrews [Tue, 16 Mar 2021 00:11:02 +0000 (00:11 +0000)] 
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

5 years agoIgnore the actual error code returned by getaddrinfo
Mark Andrews [Mon, 15 Mar 2021 22:49:52 +0000 (09:49 +1100)] 
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.

5 years agoMerge branch '2567-warning-array-subscript-is-of-type-char-on-netbsd-9' into 'main'
Mark Andrews [Mon, 15 Mar 2021 03:33:21 +0000 (03:33 +0000)] 
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

5 years agoAdd CHANGES for [GL #2567]
Mark Andrews [Thu, 11 Mar 2021 00:12:06 +0000 (11:12 +1100)] 
Add CHANGES for [GL #2567]

5 years agocast (char) to (unsigned char) when calling is*()
Mark Andrews [Thu, 11 Mar 2021 00:08:54 +0000 (11:08 +1100)] 
cast (char) to (unsigned char) when calling is*()

5 years agoMerge branch '2565-servestale-fetchlimits-crash' into 'main'
Michal Nowak [Thu, 11 Mar 2021 12:14:47 +0000 (12:14 +0000)] 
Merge branch '2565-servestale-fetchlimits-crash' into 'main'

Fix servestale fetchlimits crash

Closes #2565

See merge request isc-projects/bind9!4797

5 years agoFix servestale fetchlimits crash
Matthijs Mekking [Wed, 10 Mar 2021 14:14:56 +0000 (15:14 +0100)] 
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.

5 years agoMerge branch '2568-test_client-c-error-static-declaration-of-yield-follows-non-static...
Ondřej Surý [Thu, 11 Mar 2021 06:09:49 +0000 (06:09 +0000)] 
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

5 years agoRename 'yield' to 'waitforsignal' due to namespace clash
Mark Andrews [Thu, 11 Mar 2021 00:34:15 +0000 (11:34 +1100)] 
Rename 'yield' to 'waitforsignal' due to namespace clash

5 years agoMerge branch '2556-fix-documentation-for-the-max-ixfr-ratio-option' into 'main'
Michał Kępień [Mon, 8 Mar 2021 11:28:37 +0000 (11:28 +0000)] 
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

5 years agoFix documentation for the "max-ixfr-ratio" option
Michał Kępień [Mon, 8 Mar 2021 11:27:39 +0000 (12:27 +0100)] 
Fix documentation for the "max-ixfr-ratio" option

Commit 9fb6d11abbdb10ded128f0ee5c004f24b4030ede (which converted BIND 9
documentation from DocBook to Sphinx) inadvertently removed a paragraph
from the description of the "max-ixfr-ratio" option.  Add the missing
paragraph back.

5 years agoMerge branch 'ondrej/disable-github-pr-fix' into 'main'
Ondřej Surý [Mon, 8 Mar 2021 11:25:15 +0000 (11:25 +0000)] 
Merge branch 'ondrej/disable-github-pr-fix' into 'main'

Fix syntax error in GitHub Actions lockdown.yml file

See merge request isc-projects/bind9!4789

5 years agoFix syntax error in GitHub Actions lockdown.yml file
Ondřej Surý [Mon, 8 Mar 2021 11:24:17 +0000 (12:24 +0100)] 
Fix syntax error in GitHub Actions lockdown.yml file

5 years agoMerge branch 'ondrej/disable-github-pr' into 'main'
Ondřej Surý [Mon, 8 Mar 2021 11:13:24 +0000 (11:13 +0000)] 
Merge branch 'ondrej/disable-github-pr' into 'main'

Add GitHub Action that immediately closes issue / PRs

See merge request isc-projects/bind9!4788

5 years agoAdd GitHub Action that immediately closes issue / PRs
Ondřej Surý [Mon, 8 Mar 2021 11:09:14 +0000 (12:09 +0100)] 
Add GitHub Action that immediately closes issue / PRs

Unfortunately, it's not possible to disable Pull Requests on the
mirrored repository on the GitHub, so this commit adds external action
that closes any new open Issue or Pull Requests instead letting them rot
unnoticed.

5 years agoMerge branch '2555-workaround-truncated-64-bit-enum-in-journal-on-windows' into ...
Ondřej Surý [Mon, 8 Mar 2021 08:42:14 +0000 (08:42 +0000)] 
Merge branch '2555-workaround-truncated-64-bit-enum-in-journal-on-windows' into 'main'

Resolve "journal test fails on Windows"

Closes #2555

See merge request isc-projects/bind9!4784

5 years agofix automatic journal upgrade on windows
Evan Hunt [Fri, 5 Mar 2021 22:28:33 +0000 (14:28 -0800)] 
fix automatic journal upgrade on windows

- use a value less than 2^32 for DNS_ZONEFLG_FIXJOURNAL; a larger value
  could cause problems in some build environments. the zone flag
  DNS_ZONEFLG_DIFFONRELOAD, which was no longer in use, has now been
  deleted and its value reused for _FIXJOURNAL.

5 years agoadd start and end serial numbers to 'named-printjournal -x'
Evan Hunt [Mon, 8 Mar 2021 04:50:56 +0000 (20:50 -0800)] 
add start and end serial numbers to 'named-printjournal -x'

add the starting and ending serial number from the journal
header to the output of dns_journal_print().

5 years agoMerge branch '2559-cid-329159-logically-dead-code-in-lib-dns-journal-c' into 'main'
Mark Andrews [Mon, 8 Mar 2021 05:25:17 +0000 (05:25 +0000)] 
Merge branch '2559-cid-329159-logically-dead-code-in-lib-dns-journal-c' into 'main'

Resolve "CID 329159: Logically dead code in lib/dns/journal.c"

Closes #2559

See merge request isc-projects/bind9!4780