Commit graph

27361 commits

Author SHA1 Message Date
Ondřej Surý
ef2f3e38e4 Sort the top level .gitignore file
(cherry picked from commit b9d524ed7e)
2019-03-20 10:41:29 +01:00
Ondřej Surý
af5c2186c3 Update top level .gitignore to ignore automake files
(cherry picked from commit 5c67d1d120)
2019-03-20 10:41:29 +01:00
Ondřej Surý
8e5e854858 Merge branch '946-enable-fips-mode-option-breaks-build-of-hmacmd5-c-and-md5-c' into 'v9_11'
Resolve "--enable-fips-mode option breaks build of  hmacmd5.c and md5.c"

See merge request isc-projects/bind9!1722
2019-03-20 04:33:51 -04:00
Mark Andrews
d3976fe4cc add CHANGES 2019-03-20 12:52:07 +11:00
Mark Andrews
98a37c9aba add #include <isc/util.h> 2019-03-20 11:41:51 +11:00
Michał Kępień
20483dc12b Merge branch '944-make-stop.pl-wait-for-lock-file-cleanup-v9_11' into 'v9_11'
[v9_11] Make stop.pl wait for lock file cleanup

See merge request isc-projects/bind9!1711
2019-03-19 06:18:38 -04:00
Michał Kępień
537765df80 Make stop.pl wait for lock file cleanup
bin/tests/system/stop.pl only waits for the PID file to be cleaned up
while named cleans up the lock file after the PID file.  Thus, the
aforementioned script may consider a named instance to be fully shut
down when in fact it is not.

Fix by also checking whether the lock file exists when determining a
given instance's shutdown status.  This change assumes that if a named
instance uses a lock file, it is called "named.lock", and that if an
lwresd instance uses a lock file, it is called "lwresd.lock".

Also rename clean_pid_file() to pid_file_exists(), so that it is called
more appropriately (it does not clean up the PID file itself, it only
returns the server's identifier if its PID file is not yet cleaned up).

(cherry picked from commit c787a539d2)
2019-03-19 11:03:46 +01:00
Michał Kępień
ebedeffa25 Correctly invoke stop.pl when start.pl fails
MR !1141 broke the way stop.pl is invoked when start.pl fails:

  - start.pl changes the working directory to $testdir/$server before
    attempting to start $server,

  - commit 27ee629e6b causes the $testdir
    variable in stop.pl to be determined using the $SYSTEMTESTTOP
    environment variable, which is set to ".." by all tests.sh scripts,

  - commit e227815af5 makes start.pl pass
    $test (the test's name) rather than $testdir (the path to the test's
    directory) to stop.pl when a given server fails to start.

Thus, when a server is restarted from within a tests.sh script and such
a restart fails, stop.pl attempts to look for the server directory in a
nonexistent location ($testdir/$server/../$test, i.e. $testdir/$test,
instead of $testdir/../$test).  Fix the issue by changing the working
directory before stop.pl is invoked in the scenario described above.

(cherry picked from commit 4afad2a047)
2019-03-19 10:28:59 +01:00
Evan Hunt
707b2349b8 Merge branch '945-remove-revoked-root-key-from-bind-keys-v9_14-v9_11' into 'v9_11'
Resolve "Remove revoked root key from bind.keys."

See merge request isc-projects/bind9!1709
2019-03-19 00:30:51 -04:00
Mark Andrews
d5c57db1ae Remove revoked root DNSKEY from bind.keys.
(cherry picked from commit 0e805b58e8)
(cherry picked from commit 3954d4ec30)
2019-03-18 21:30:22 -07:00
Matthijs Mekking
a7b8090ca6 Merge branch '813-matthijs-failure-loading-rpz-v9_11' into 'v9_11'
Resolve "Problems after failure of loading rpz [ISC-support #14002]"

See merge request isc-projects/bind9!1566
2019-03-15 04:58:03 -04:00
Matthijs Mekking
1461accf9c Add test for rpz zone load fail 2019-03-15 09:16:49 +01:00
Matthijs Mekking
97118d59ba Make RPZ tests more readable 2019-03-15 08:32:03 +01:00
Matthijs Mekking
a8f20871c4 Add README to RPZ tests 2019-03-15 08:32:03 +01:00
Mark Andrews
fc17d57d0d Merge branch '940-unit-dnstap-pkcs11-tz-v9_11' into 'v9_11'
Fix regression in dnstap_test with native pkcs11

See merge request isc-projects/bind9!1701
2019-03-15 01:35:57 -04:00
Mark Andrews
b4963500df add CHANGES
(cherry picked from commit 788f784191)
2019-03-15 16:20:14 +11:00
Petr Menšík
6992c50240 Fix regression in dnstap_test with native pkcs11
Change to cmocka broken initialization of TZ environment. This time,
commit 1cf1254051 is not soon enough. Has
to be moved more forward, before any other tests. It library is not full
reinitialized on each test.

(cherry picked from commit 71c4fad592)
2019-03-15 16:19:44 +11:00
Evan Hunt
49358c7652 Merge branch 'pmensik-skip-timer-test' into 'v9_11'
Workaround to kyua bug

See merge request isc-projects/bind9!1697
2019-03-14 17:31:08 -04:00
Petr Mensik
5480d26da4 Workaround to kyua bug
Kyua 0.13 is not able to correctly handle whole test skipping.
Make workaround to it, include skipping message.
2019-03-14 14:19:45 -07:00
Evan Hunt
dacfa09725 Merge branch '938-cppcheck-format-issues-v9_11' into 'v9_11'
Resolve "Cppcheck format issues."

See merge request isc-projects/bind9!1696
2019-03-14 17:03:35 -04:00
Mark Andrews
8a85e3d924 force promotion to unsigned int
(cherry picked from commit 1eba2c5b06)
2019-03-14 13:53:04 -07:00
Evan Hunt
09f9f10ead Merge branch '890-assert-the-hevent-rdataset-is-non-null-v9_11' into 'v9_11'
Resolve "Assert the hevent->rdataset is non-NULL."

See merge request isc-projects/bind9!1694
2019-03-14 16:28:43 -04:00
Mark Andrews
25268aaf8c assert hevent->rdataset is non NULL
(cherry picked from commit d8d04edfba)
2019-03-14 13:17:10 -07:00
Evan Hunt
be1dc0d82c Merge branch '937-potential-null-pointer-dereference-in-bin-tests-system-dlzexternal-driver-c-v9_11' into 'v9_11'
Resolve "potential null pointer dereference in bin/tests/system/dlzexternal/driver.c"

See merge request isc-projects/bind9!1691
2019-03-14 16:09:07 -04:00
Mark Andrews
3756a08d30 check that state and state->log are non NULL before calling state->log
(cherry picked from commit 7bf6750330)
2019-03-14 12:57:21 -07:00
Mark Andrews
7d70b31542 Merge branch '935-fix-ecc-algorithms-unused-constants-in-pkcs-11-build-c116fb96-falls-short' into 'v9_11'
Resolve "Fix ECC algorithms unused constants in PKCS#11 build (c116fb96) falls short"

See merge request isc-projects/bind9!1682
2019-03-13 22:29:46 -04:00
Mark Andrews
9c2f4af5a1 pkcs11-kegen build failed if ECDSA was not supported 2019-03-14 13:15:21 +11:00
Mark Andrews
eb5696f04e Merge branch '936-missing-unlocks-in-sdlz-c-v9_11' into 'v9_11'
Resolve "Missing unlocks in sdlz.c"

See merge request isc-projects/bind9!1680
2019-03-13 20:08:19 -04:00
Mark Andrews
0a1e079e79 add CHANGES
(cherry picked from commit 32f2ae3791)
2019-03-14 09:02:12 +11:00
Mark Andrews
e6ab8fc7d0 add missing MAYBE_UNLOCK
(cherry picked from commit ff8bf617e7)
2019-03-14 09:01:31 +11:00
Evan Hunt
d87f19323c Merge branch '834-fix-race-in-fctx-cancel-v9_11' into 'v9_11'
fix race in socket code

See merge request isc-projects/bind9!1674
2019-03-12 16:18:45 -04:00
Witold Kręcicki
3993503de4 CHANGES
(cherry picked from commit 50f6054294)
2019-03-12 13:00:44 -07:00
Witold Kręcicki
ff401e670f Fix a race in fctx_cancelquery.
When sending an udp query (resquery_send) we first issue an asynchronous
isc_socket_connect and increment query->connects, then isc_socket_sendto2
and increment query->sends.
If we happen to cancel this query (fctx_cancelquery) we need to cancel
all operations we might have issued on this socket. If we are under very high
load the callback from isc_socket_connect (resquery_udpconnected) might have
not yet been fired. In this case we only cancel the CONNECT event on socket,
and ignore the SEND that's waiting there (as there is an `else if`).
Then we call dns_dispatch_removeresponse which kills the dispatcher socket
and calls isc_socket_close - but if system is under very high load, the send
we issued earlier might still not be complete - which triggers an assertion
because we're trying to close a socket that's still in use.

The fix is to always check if we have incomplete sends on the socket and cancel
them if we do.

(cherry picked from commit 56183a3917)
2019-03-12 13:00:05 -07:00
Michał Kępień
369f3c392b Merge branch 'michal/silence-a-perl-warning-output-by-stop.pl-v9_11' into 'v9_11'
[v9_11] Silence a Perl warning output by stop.pl

See merge request isc-projects/bind9!1670
2019-03-12 04:04:15 -04:00
Michał Kępień
42a210b7cf Silence a Perl warning output by stop.pl
On Unix systems, the CYGWIN environment variable is not set at all when
BIND system tests are run.  If a named instance crashes on shutdown or
otherwise fails to clean up its pidfile and the CYGWIN environment
variable is not set, stop.pl will print an uninitialized value warning
on standard error.  Prevent this by using defined().

(cherry picked from commit 91e5a99b9b)
2019-03-12 08:43:13 +01:00
Mark Andrews
e57796dd15 Merge branch 'ifconfig.sh-anywhere-v9_11' into 'v9_11'
Allow ifconfig to be called from any directory

See merge request isc-projects/bind9!1668
2019-03-11 23:24:54 -04:00
Petr Menšík
1f32ad6064 Allow ifconfig to be called from any directory
ifconfig.sh depends on config.guess for platform guessing. It uses it to
choose between ifconfig or ip tools to configure interfaces. If
system-wide automake script is installed and local was not found, use
platform guess. It should work well on mostly any sane platform. Still
prefers local guess, but passes when if cannot find it.

(cherry picked from commit 38301052e1)
2019-03-12 14:11:03 +11:00
Evan Hunt
a4fef634f5 Merge branch '892-fix-redirect-name-v9_11' into 'v9_11'
use qname in redirect2

See merge request isc-projects/bind9!1664
2019-03-11 14:39:15 -04:00
Mark Andrews
6115670bd4 add CHANGES
(cherry picked from commit ad785e4f93)
2019-03-11 11:28:29 -07:00
Mark Andrews
93ee793d97 use client->query.qname
(cherry picked from commit 8758d36a5e)
2019-03-11 11:27:45 -07:00
Michał Kępień
64d16586f2 Merge branch 'michal/stabilize-the-gost-system-test' into 'v9_11'
Stabilize the "gost" system test

See merge request isc-projects/bind9!1642
2019-03-11 08:48:05 -04:00
Michał Kępień
170cb442a9 Stabilize the "gost" system test
In the "gost" system test, the ./NS RRset returned in the response to
ns2's priming query might not yet be validated when ns2 assembles the
response to the ./SOA query.  If that happens, the ./NS RRset will not
be placed in the AUTHORITY section of the response to the ./SOA query,
triggering a false positive for the "gost" system test as the ./NS RRset
is always present in the response sent by ns1 (since it is authoritative
for the root zone).  As the purpose of the "gost" system test is to
check whether a zone signed using GOST is properly validated and only
positive responses are inspected, use the +noauth dig option for all
queries in that test, so that the contents of the AUTHORITY section do
not influence its outcome.
2019-03-11 13:32:02 +01:00
Michał Kępień
23435c423c Merge branch '928-stabilize-delzsk.example-zone-checks-v9_11' into 'v9_11'
[v9_11] Stabilize "delzsk.example" zone checks

See merge request isc-projects/bind9!1659
2019-03-11 08:28:15 -04:00
Michał Kępień
780e1134e7 Stabilize "delzsk.example" zone checks
When a zone is converted from NSEC to NSEC3, the private record at zone
apex indicating that NSEC3 chain creation is in progress may be removed
during a different (later) zone_nsec3chain() call than the one which
adds the NSEC3PARAM record.  The "delzsk.example" zone check only waits
for the NSEC3PARAM record to start appearing in dig output while private
records at zone apex directly affect "rndc signing -list" output.  This
may trigger false positives for the "autosign" system test as the output
of the "rndc signing -list" command used for checking ZSK deletion
progress may contain extra lines which are not accounted for.  Ensure
the private record is removed from zone apex before triggering ZSK
deletion in the aforementioned check.

Also future-proof the ZSK deletion progress check by making it only look
at lines it should care about.

(cherry picked from commit e02de04e97)
2019-03-11 13:03:23 +01:00
Michał Kępień
08713b334b Merge branch '129-dnssec-system-test-tweaks-v9_11' into 'v9_11'
[v9_11] "dnssec" system test tweaks

See merge request isc-projects/bind9!1657
2019-03-11 08:02:08 -04:00
Mark Andrews
e6718cf4c4 ${ttl} must exist and be non null
(cherry picked from commit dee1f1a498)
2019-03-11 12:25:19 +01:00
Michał Kępień
7656e7431b Make ANSWER TTL capping checks stricter
For checks querying a named instance with "dnssec-accept-expired yes;"
set, authoritative responses have a TTL of 300 seconds.  Assuming empty
resolver cache, TTLs of RRsets in the ANSWER section of the first
response to a given query will always match their authoritative
counterparts.  Also note that for a DNSSEC-validating named resolver,
validated RRsets replace any existing non-validated RRsets with the same
owner name and type, e.g. cached from responses received while resolving
CD=1 queries.  Since TTL capping happens before a validated RRset is
inserted into the cache and RRSIG expiry time does not impose an upper
TTL bound when "dnssec-accept-expired yes;" is set and, as pointed out
above, the original TTLs of the relevant RRsets equal 300 seconds, the
RRsets in the ANSWER section of the responses to expiring.example/SOA
and expired.example/SOA queries sent with CD=0 should always be exactly
120 seconds, never a lower value.  Make the relevant TTL checks stricter
to reflect that.

(cherry picked from commit a85cc41486)
2019-03-11 12:23:27 +01:00
Michał Kępień
bacbe3a5aa Relax ADDITIONAL TTL capping checks
Always expecting a TTL of exactly 300 seconds for RRsets found in the
ADDITIONAL section of responses received for CD=1 queries sent during
TTL capping checks is too strict since these responses will contain
records cached from multiple DNS messages received during the resolution
process.

In responses to queries sent with CD=1, ns.expiring.example/A in the
ADDITIONAL section will come from a delegation returned by ns2 while the
ANSWER section will come from an authoritative answer returned by ns3.
If the queries to ns2 and ns3 happen at different Unix timestamps,
RRsets cached from the older response will have a different TTL by the
time they are returned to dig, triggering a false positive.

Allow a safety margin of 60 seconds for checks inspecting the ADDITIONAL
section of responses to queries sent with CD=1 to fix the issue.  A
safety margin this large is likely overkill, but it is used nevertheless
for consistency with similar safety margins used in other TTL capping
checks.

(cherry picked from commit 8baf859063)
2019-03-11 12:22:23 +01:00
Michał Kępień
38da4bdf5e Fix NTA-related races
Changes introduced by commit 6b8e4d6e69
were incomplete as not all time-sensitive checks were updated to match
revised "nta-lifetime" and "nta-recheck" values.  Prevent rare false
positives by updating all NTA-related checks so that they work reliably
with "nta-lifetime 12s;" and "nta-recheck 9s;".  Update comments as well
to prevent confusion.

(cherry picked from commit 9a36a1bba3)
2019-03-11 12:17:36 +01:00
Michał Kępień
d9354d32c4 Merge branch 'michal/fix-regex-used-for-mangling-druz-dnskey-v9_11' into 'v9_11'
[v9_11] Fix regex used for mangling druz/DNSKEY (in the "dlv" system test)

See merge request isc-projects/bind9!1648
2019-03-08 08:08:58 -05:00