Commit Graph

26595 Commits

Author SHA1 Message Date
Michał Kępień
bfdeac09af Reset dig exit code after a TCP connection is established
The "exitcode" variable is set to 9 if a TCP connection fails, but is
not reset to 0 if a subsequent TCP connection succeeds.  This causes dig
to return a non-zero exit code if it succeeds in getting a TCP response
after a retry.  Fix by resetting "exitcode" to 0 if connect_done()
receives an event with the "result" field set to ISC_R_SUCCESS.

(cherry picked from commit deb3b85cb2)
2018-08-27 14:30:51 +10:00
Ondřej Surý
9e44e320c5 Merge branch 'run-update_copyrights-v9_11' into 'v9_11'
[v9_11] Run and check update_copyrights script in precheck stage

See merge request isc-projects/bind9!700
2018-08-24 08:46:21 -04:00
Ondřej Surý
76a910b683 Check update_copyright results in precheck stage
(cherry picked from commit 4016369212)
2018-08-24 08:33:36 -04:00
Ondřej Surý
5a30d71e85 Whitespace fixes
(cherry picked from commit 31b5360943)
2018-08-24 08:33:36 -04:00
Ondřej Surý
a03e5b8791 Cleanup cruft in util/copyrights
(cherry picked from commit 65de91f512)
2018-08-24 08:33:36 -04:00
Ondřej Surý
367ed601c7 Make update_copyrights return error code when error is encountered during processing the files
(cherry picked from commit db3d69263d)
2018-08-24 08:33:36 -04:00
Michał Kępień
e99bc895bd Merge branch '470-log-a-message-when-ixfr-from-differences-is-set-for-an-inline-signed-zone-v9_11' into 'v9_11'
[v9_11] Log a message when "ixfr-from-differences" is set for an inline-signed zone

See merge request isc-projects/bind9!696
2018-08-24 04:35:34 -04:00
Michał Kępień
285736bd18 Add CHANGES entry
5019.	[cleanup]	A message is now logged when ixfr-from-differences is
			set at zone level for an inline-signed zone. [GL #470]

(cherry picked from commit 4fb5d072c2)
2018-08-24 10:24:48 +02:00
Michał Kępień
c84a2342f4 Log a message when "ixfr-from-differences" is set for an inline-signed zone
For inline-signed zones, the value of "ixfr-from-differences" is
hardcoded to:

  - "yes" for the raw version of the zone,
  - "no" for the signed version of the zone.

In other words, any user-provided "ixfr-from-differences" setting is
effectively ignored for an inline-signed zone.  Ensure the user is aware
of that by adding a note to the ARM and logging a message when an
"ixfr-from-differences" option is found at the zone level.

(cherry picked from commit 087157d14f)
2018-08-24 10:24:46 +02:00
Michał Kępień
a31da7182d Merge branch '477-fix-intermittent-mkeys-system-test-failures-v9_11' into 'v9_11'
[v9_11] Fix intermittent "mkeys" system test failures

See merge request isc-projects/bind9!694
2018-08-24 04:10:44 -04:00
Michał Kępień
9a76ffc61f Do not call bin/tools/genrandom unconditionally in system tests
$RANDFILE, i.e. bin/tests/system/random.data, should only be written to
if a system test requires support for cryptography and that file does
not already exist.  Otherwise, when multiple system tests are run in
parallel, that file might get truncated due to bin/tools/genrandom.c
using fopen() with mode "w" when writing the destination file.  With
unfortunate timing, this may cause system tests employing BIND tools
which need entropy (e.g. dnssec-keygen) to fail.

Make sure bin/tests/system/metadata/tests.sh no longer calls
bin/tools/genrandom since $RANDFILE is guaranteed to already be created
by the time bin/tools/genrandom is currently called because
bin/tests/system/metadata/prereq.sh uses bin/tests/system/testcrypto.sh.

Make sure bin/tests/system/sfcache/prereq.sh only writes to $RANDFILE if
it does not already exist.

(cherry picked from commit c12388f5e8)
2018-08-24 09:58:08 +02:00
Michał Kępień
deaf1cff4c Merge branch '491-prevent-a-race-in-the-inline-system-test-v9_11' into 'v9_11'
[v9_11] Prevent a race in the "inline" system test

See merge request isc-projects/bind9!693
2018-08-24 03:55:15 -04:00
Michał Kępień
6831af7717 Prevent a race in the "inline" system test
A short time window exists between logging the addition of an NSEC3PARAM
record to a zone and committing it to the current version of the zone
database.  If a query arrives during such a time window, an unsigned
response will be returned.  One of the checks in the "inline" system
test requires NSEC3 records to be present in an answer - that check
would fail in the case described above.  Use rndc instead of log
watching for checking whether zone signing and NSEC3 chain modifications
are complete in order to prevent intermittent "inline" system test
failures.

(cherry picked from commit e36c869e85)
2018-08-24 09:38:38 +02:00
Mark Andrews
46e439ba8d Merge branch 'fix-non-portable-v9_11' into 'v9_11'
use sizeof(CK_SLOT_ID)

See merge request isc-projects/bind9!690
2018-08-23 21:43:18 -04:00
Mark Andrews
a83b272085 add CHANGES note
(cherry picked from commit 42b16771db)
2018-08-24 11:33:21 +10:00
Mark Andrews
c2c7020057 use sizeof(CK_SLOT_ID)
(cherry picked from commit 2c1d8b2e99)
2018-08-24 11:33:12 +10:00
Mark Andrews
353ed07b58 Merge branch 'value-not-updated-atomically-v9_11' into 'v9_11'
unlink before unlock

See merge request isc-projects/bind9!688
2018-08-23 21:07:28 -04:00
Mark Andrews
d9bb683946 add CHANGES note
(cherry picked from commit 05531d3a86)
2018-08-24 10:58:31 +10:00
Mark Andrews
58e33fcdb4 unlink before unlock
(cherry picked from commit 4742f4ecba)
2018-08-24 10:58:30 +10:00
Mark Andrews
1bbed57e94 Merge branch '445-filter-aaaa-and-dns64-can-both-attempt-to-recurse-for-a-records-at-the-same-time-v9_11' into 'v9_11'
Resolve "filter-aaaa and dns64 can both attempt to recurse for A records at the same time"

See merge request isc-projects/bind9!686
2018-08-23 20:54:08 -04:00
Mark Andrews
70f4f7968b add CHANGES note
(cherry picked from commit c1bc3baf7f)
2018-08-24 10:33:36 +10:00
Mark Andrews
56f8303377 when filter-aaaa and dns64 are both configured a assertion failure could occur
(cherry picked from commit 1056376d10)
2018-08-24 10:33:33 +10:00
Michał Kępień
30a24678c3 Merge branch '435-fix-reloading-inline-signed-zones-v9_11' into 'v9_11'
[v9_11] Fix reloading inline-signed zones

See merge request isc-projects/bind9!675
2018-08-22 06:01:00 -04:00
Michał Kępień
be840f45df Add CHANGES entry
5015.	[bug]		Reloading all zones caused zone maintenance to cease
			for inline-signed zones. [GL #435]

(cherry picked from commit f9931f1d22)
2018-08-22 11:46:12 +02:00
Michał Kępień
cf7557dce0 Fix reloading inline-signed zones
While "rndc reload" causes dns_zone_asyncload() to be called for the
signed version of an inline-signed zone, the subsequent zone_load() call
causes the raw version to be reloaded from storage.  This means that
DNS_ZONEFLG_LOADPENDING gets set for the signed version of the zone by
dns_zone_asyncload() before the reload is attempted, but zone_postload()
is only called for the raw version and thus DNS_ZONEFLG_LOADPENDING is
cleared for the raw version, but not for the signed version.  This in
turn prevents zone maintenance from happening for the signed version of
the zone.

Until commit 749b3cacfc, this problem
remained dormant because DNS_ZONEFLG_LOADPENDING was previously
immediately, unconditionally cleared after zone loading was started
(whereas it should only be cleared when zone loading is finished or an
error occurs).  This behavior caused other issues [1] and thus had to be
changed.

Fix reloading inline-signed zones by clearing DNS_ZONEFLG_LOADPENDING
for the signed version of the zone once the raw version reload
completes.  Take care not to clear it prematurely during initial zone
load.  Also make sure that DNS_ZONEFLG_LOADPENDING gets cleared when
zone_postload() encounters an error or returns early, to prevent other
scenarios from resulting in the same problem.  Add comments aiming to
help explain code flow.

[1] see RT #47076

(cherry picked from commit 5431583971)
2018-08-22 11:46:08 +02:00
Michał Kępień
4f2481b4c2 Merge branch '482-fix-secure-journal-loading-for-inline-signed-zones-v9_11' into 'v9_11'
[v9_11] Set DNS_JOURNALOPT_RESIGN when loading the secure journal for an inline-signed zone

See merge request isc-projects/bind9!673
2018-08-22 05:21:25 -04:00
Michał Kępień
6acf1bc5f7 Add CHANGES entry
5014.	[bug]		Signatures loaded from the journal for the signed
			version of an inline-signed zone were not scheduled for
			refresh. [GL #482]

(cherry picked from commit b3b1a9081b)
2018-08-22 10:56:45 +02:00
Michał Kępień
de6b8ded56 Set DNS_JOURNALOPT_RESIGN when loading the secure journal for an inline-signed zone
When an inline-signed zone is loaded, the master file for its signed
version is loaded and then a rollforward of the journal for the signed
version of the zone is performed.  If DNS_JOURNALOPT_RESIGN is not set
during the latter phase, signatures loaded from the journal for the
signed version of the zone will not be scheduled for refresh.  Fix the
conditional expression determining which flags should be used for the
dns_journal_rollforward() call so that DNS_JOURNALOPT_RESIGN is set when
zone_postload() is called for the signed version of an inline-signed
zone.

Extend bin/tests/system/stop.pl so that it can use "rndc halt" instead
of "rndc stop" as the former allows master file flushing upon shutdown
to be suppressed.

(cherry picked from commit 8db550c42f)
2018-08-22 10:56:42 +02:00
Ondřej Surý
3628082cc9 Merge branch '9-use-C99-integer-types-in-lwres-v9_11' into 'v9_11'
Resolve "Replace custom datatypes (isc_<foo>_t) with C11 equivalents"

See merge request isc-projects/bind9!669
2018-08-22 03:21:09 -04:00
Ondřej Surý
6af3e2412e Add install test job 2018-08-22 09:10:51 +02:00
Ondřej Surý
32a0d602ea We want to install compatibility shim isc/int.h and isc/boolean.h headers 2018-08-22 09:07:39 +02:00
Ondřej Surý
e37e27c560 Update lwres to use stdint types to finish transition to using stdint types 2018-08-22 09:04:02 +02:00
Mark Andrews
71f62894b5 Merge branch 'fix-lock-order-reversal-v9_11' into 'v9_11'
fix lock order reversal

See merge request isc-projects/bind9!667
2018-08-20 23:43:26 -04:00
Mark Andrews
a1235739cd add CHANGES note
(cherry picked from commit 083007e930)
2018-08-21 13:34:03 +10:00
Mark Andrews
d5cef9cd55 fix lock order reversal
(cherry picked from commit 2bb4392bb3)
2018-08-21 13:33:37 +10:00
Mark Andrews
f88536817c Merge branch '9-use-C99-integer-types-fix-install-v9_11' into 'v9_11'
Resolve "Replace custom datatypes (isc_<foo>_t) with C11 equivalents"

See merge request isc-projects/bind9!633
2018-08-14 20:23:32 -04:00
Ondřej Surý
a2ffc37ad3 Don't install removed int.h and boolean.h headers 2018-08-14 20:14:05 -04:00
Mark Andrews
c65f66d2c0 Merge branch '465-missing-check-in-acl_test-c-unit-test-v9_11' into 'v9_11'
Resolve "Missing check in acl_test.c unit test"

See merge request isc-projects/bind9!652
2018-08-14 20:13:08 -04:00
Mark Andrews
49b7ac4d44 add missing ATF_REQUIRE
(cherry picked from commit 0ce82e9d5f)
2018-08-14 19:59:06 -04:00
Evan Hunt
6fe07675f7 Merge branch '474-mempool-is-broken-if-object-size-is-below-the-alignment-size-v9_11' into 'v9_11'
Resolve "mempool is broken if object size is below the alignment size"

See merge request isc-projects/bind9!650
2018-08-14 12:22:49 -04:00
Mark Andrews
a21b1b86dc mempool didn't work for sizes less than sizeof(void*)
(cherry picked from commit 5dd1beec8e)
2018-08-14 09:12:41 -07:00
Michał Kępień
298c1c3a05 Merge branch '476-fix-openssl-error-logging-v9_11' into 'v9_11'
[v9_11] Fix OpenSSL error logging

See merge request isc-projects/bind9!646
2018-08-14 07:11:51 -04:00
Michał Kępień
ffb32dbb32 Add CHANGES entry
5009.	[bug]		Upon an OpenSSL failure, the first error in the OpenSSL
			error queue was not logged. [GL #476]

(cherry picked from commit 218166acf8)
2018-08-14 12:53:47 +02:00
Michał Kępień
0d174c46ff Do not remove errors from the OpenSSL error queue in toresult()
dst__openssl_toresult3() first calls toresult() and subsequently uses
ERR_get_error_line_data() in a loop.  Given this, it is a mistake to use
ERR_get_error() in toresult() because it causes the retrieved error to
be removed from the OpenSSL error queue, thus preventing it from being
retrieved by the subsequent ERR_get_error_line_data() calls.  Fix by
using ERR_peek_error() instead of ERR_get_error() in toresult().

(cherry picked from commit 36436268b5)
2018-08-14 12:53:44 +02:00
Michał Kępień
812002089e Merge branch '471-fix-rbt_insert_and_remove-unit-test-v9_11' into 'v9_11'
[v9_11] Prevent rare rbt_insert_and_remove unit test failures

See merge request isc-projects/bind9!643
2018-08-14 05:11:19 -04:00
Michał Kępień
c6d1239d90 Prevent rare rbt_insert_and_remove unit test failures
When two or more absolute, two-label names are added to a completely
empty RBT, an extra, empty node for the root name will be created due to
node splitting.  check_tree() expects that, but the extra node will not
be created when just one name is added to a completely empty RBT.  This
problem could be handled inside check_tree(), but that would introduce
unnecessary complexity into it since adding a single name will result in
a different node count for a completely empty RBT (node count will be 1)
and an RBT containing only an empty node for the root name, created due
to prior node splitting (node count will be 2).  Thus, first explicitly
create a node for the root name to prevent rare check_tree() failures
caused by a single name being added in the first iteration of the
insert/remove loop.

(cherry picked from commit 13fe763798)
2018-08-14 10:44:59 +02:00
Michał Kępień
b2d4ab89b3 Merge branch '285-make-the-inline-system-test-more-lightweight-v9_11' into 'v9_11'
[v9_11] Make the "inline" system test more lightweight

See merge request isc-projects/bind9!641
2018-08-14 04:39:02 -04:00
Michał Kępień
a3490ef66e Make the "inline" system test more lightweight
Each zone used in the "inline" system test contains a few dozen records.
Over a dozen of these zones are used in the test.  Most records present
in these zones are not subsequently used in the test itself, but all of
them need to be signed by the named instances launched by the test,
which puts quite a bit of strain on lower-end machines, leading to
intermittent failures of the "inline" system test.  Remove all redundant
records from the zones used in the "inline" system test in order to
stabilize it.

(cherry picked from commit 24dd865b97)
2018-08-14 10:16:39 +02:00
Michał Kępień
c4f02b0de4 Merge branch '468-queue-rndc-signing-nsec3param-requests-if-needed-v9_11' into 'v9_11'
[v9_11] Queue "rndc signing -nsec3param ..." requests if needed

See merge request isc-projects/bind9!638
2018-08-14 03:44:58 -04:00
Michał Kępień
2e0856c43d Add CHANGES entry
5008.	[bug]		"rndc signing -nsec3param ..." requests were silently
			ignored for zones which were not yet loaded or
			transferred. [GL #468]

(cherry picked from commit eed6778be4)
2018-08-14 09:29:54 +02:00