Commit Graph

28982 Commits

Author SHA1 Message Date
Petr Menšík
7885bbff99 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:17:52 +11:00
Mark Andrews
2dc5dbfeb2 Merge branch 'rename-shadowed-variable-v9_14' into 'v9_14'
rename-shadowed-variable

See merge request isc-projects/bind9!1699
2019-03-14 21:35:49 -04:00
Mark Andrews
b57ca2982f rename-shadowed-variable
(cherry picked from commit 15bfe4f2e1)
2019-03-15 12:23:57 +11:00
Evan Hunt
3123d8714f Merge branch '938-cppcheck-format-issues-v9_14' into 'v9_14'
Resolve "Cppcheck format issues."

See merge request isc-projects/bind9!1695
2019-03-14 17:03:16 -04:00
Mark Andrews
b30e5f11fb force promotion to unsigned int
(cherry picked from commit 1eba2c5b06)
2019-03-14 13:51:30 -07:00
Mark Andrews
838906b3cd isc_quota_* return unsigned int
(cherry picked from commit a43d648b95)
2019-03-14 13:51:30 -07:00
Evan Hunt
46bc92d5d1 Merge branch '890-assert-the-hevent-rdataset-is-non-null-v9_14' into 'v9_14'
Resolve "Assert the hevent->rdataset is non-NULL."

See merge request isc-projects/bind9!1693
2019-03-14 16:34:22 -04:00
Mark Andrews
68608eaa3c assert hevent->rdataset is non NULL
(cherry picked from commit d8d04edfba)
2019-03-14 13:16:43 -07:00
Evan Hunt
1c1fb922c2 Merge branch '937-potential-null-pointer-dereference-in-bin-tests-system-dlzexternal-driver-c-v9_14' into 'v9_14'
Resolve "potential null pointer dereference in bin/tests/system/dlzexternal/driver.c"

See merge request isc-projects/bind9!1690
2019-03-14 16:14:06 -04:00
Mark Andrews
8f2227a423 check that state and state->log are non NULL before calling state->log
(cherry picked from commit 7bf6750330)
2019-03-14 12:55:57 -07:00
Evan Hunt
be71d9cc43 Merge branch 'missing-isc-lang-h-v9_14' into 'v9_14'
missing lang.h

See merge request isc-projects/bind9!1689
2019-03-14 15:43:34 -04:00
Mark Andrews
cdaf04f043 missing #include <isc/lang.h>
(cherry picked from commit 719b1d7fdc)
2019-03-14 12:24:19 -07:00
Mark Andrews
12fa506459 Merge branch 'u/fanf2/man-dnssec-keygen-again-v9_14' into 'v9_14'
A bit more cleanup in the dnssec-keygen manual

See merge request isc-projects/bind9!1684
2019-03-14 00:30:36 -04:00
Tony Finch
d69530cae8 A bit more cleanup in the dnssec-keygen manual
Remove another remnant of shared secret HMAC-MD5 support.

Explain that with currently recommended setups DNSKEY records are
inserted automatically, but you can still use $INCLUDE in other cases.

(cherry picked from commit acc3fa04b7)
2019-03-14 15:17:03 +11:00
Mark Andrews
d8ef8b5658 Merge branch '936-missing-unlocks-in-sdlz-c-v9_14' into 'v9_14'
Resolve "Missing unlocks in sdlz.c"

See merge request isc-projects/bind9!1679
2019-03-13 20:08:10 -04:00
Mark Andrews
1210201ab3 add CHANGES
(cherry picked from commit 32f2ae3791)
2019-03-14 09:01:12 +11:00
Mark Andrews
e9a1087e96 add missing MAYBE_UNLOCK
(cherry picked from commit ff8bf617e7)
2019-03-14 09:01:12 +11:00
Evan Hunt
e658e92ada Merge branch '881-cleanup-ecs-v9_14' into 'v9_14'
clean up ECS before reusing clients

See merge request isc-projects/bind9!1676
2019-03-12 17:10:04 -04:00
Evan Hunt
a87585aba3 CHANGES
(cherry picked from commit 9463a781fb)
2019-03-12 13:59:12 -07:00
Witold Kręcicki
fcb5642ec0 Clean up client->ecs when we're done with the request.
(cherry picked from commit aa3da7a232)
2019-03-12 13:59:12 -07:00
Evan Hunt
84910c0920 Merge branch '834-fix-race-in-fctx-cancel-v9_14' into 'v9_14'
fix race in socket code

See merge request isc-projects/bind9!1672
2019-03-12 16:10:22 -04:00
Witold Kręcicki
ec8621ae10 CHANGES
(cherry picked from commit 50f6054294)
2019-03-12 11:55:04 -07:00
Witold Kręcicki
fcc7a8c6ca 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 11:54:43 -07:00
Michał Kępień
769982d7db Merge branch 'michal/silence-a-perl-warning-output-by-stop.pl-v9_14' into 'v9_14'
[v9_14] Silence a Perl warning output by stop.pl

See merge request isc-projects/bind9!1669
2019-03-12 04:04:14 -04:00
Michał Kępień
abf84143e4 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:07 +01:00
Mark Andrews
b0b1c5f88f Merge branch 'ifconfig.sh-anywhere-v9_14' into 'v9_14'
Allow ifconfig to be called from any directory

See merge request isc-projects/bind9!1667
2019-03-11 23:22:08 -04:00
Petr Menšík
2b526cf8e1 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:10:40 +11:00
Evan Hunt
4e0e40dee7 Merge branch '892-fix-redirect-name-v9_14' into 'v9_14'
use qname in redirect2

See merge request isc-projects/bind9!1663
2019-03-11 14:34:35 -04:00
Mark Andrews
7dcee14699 add CHANGES
(cherry picked from commit ad785e4f93)
2019-03-11 11:22:13 -07:00
Mark Andrews
d974a28898 use client->query.qname
(cherry picked from commit 8758d36a5e)
2019-03-11 11:19:00 -07:00
Evan Hunt
85f6e00755 Merge branch 'each-fix-changes' into 'v9_14'
remove accidentally-included CHANGES notes

See merge request isc-projects/bind9!1661
2019-03-11 13:59:59 -04:00
Evan Hunt
0faa56cb6c remove accidentally-included CHANGES notes 2019-03-11 10:58:51 -07:00
Michał Kępień
802a965245 Merge branch '928-stabilize-delzsk.example-zone-checks-v9_14' into 'v9_14'
[v9_14] Stabilize "delzsk.example" zone checks

See merge request isc-projects/bind9!1658
2019-03-11 08:28:15 -04:00
Michał Kępień
79a4cbd203 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:17 +01:00
Michał Kępień
83acb4ffad Merge branch '129-dnssec-system-test-tweaks-v9_14' into 'v9_14'
[v9_14] "dnssec" system test tweaks

See merge request isc-projects/bind9!1656
2019-03-11 08:02:07 -04:00
Mark Andrews
8f2f5d98dc ${ttl} must exist and be non null
(cherry picked from commit dee1f1a498)
2019-03-11 12:11:58 +01:00
Michał Kępień
f301744f59 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:11:58 +01:00
Michał Kępień
f28953b6fc 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:11:58 +01:00
Michał Kępień
8f1c3e5da6 Fix message section checked in a TTL capping test
Commit c032c54dda inadvertently changed
the DNS message section inspected by one of the TTL capping checks from
ADDITIONAL to ANSWER, introducing a discrepancy between that check's
description and its actual meaning.  Revert to inspecting the ADDITIONAL
section in the aforementioned check.

(cherry picked from commit a597bd52a6)
2019-03-11 12:11:58 +01:00
Michał Kępień
95a765202c 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:11:58 +01:00
Evan Hunt
b23e7208ed Merge branch 'ondrej/restore-flockfile-check-v9_14' into 'v9_14'
(v9_14) Restore missing check for flockfile and getc_unlocked

See merge request isc-projects/bind9!1654
2019-03-08 19:41:33 -05:00
Ondřej Surý
a169e35634 Restore missing check for flockfile and getc_unlocked
(cherry picked from commit 7eea756858)
2019-03-08 21:35:08 +01:00
Michał Kępień
4e38e3bb24 Merge branch 'michal/fix-regex-used-for-mangling-druz-dnskey-v9_14' into 'v9_14'
[v9_14] Fix regex used for mangling druz/DNSKEY (in the "dlv" system test)

See merge request isc-projects/bind9!1647
2019-03-08 08:08:57 -05:00
Michał Kępień
3bf0350ae7 Fix regex used for mangling druz/DNSKEY
During "dlv" system test setup, the "sed" regex used for mangling the
DNSKEY RRset for the "druz" zone does not include the plus sign ("+"),
which may:

  - cause the replacement to happen near the end of DNSKEY RDATA, which
    can cause the latter to become an invalid Base64 string,

  - prevent the replacement from being performed altogether.

Both cases prevent the "dlv" system test from behaving as intended and
may trigger false positives.  Add the missing character to the
aforementioned regex to ensure the replacement is always performed on
bytes 10-25 of DNSKEY RDATA.

(cherry picked from commit fd13fef299)
2019-03-08 13:48:39 +01:00
Michał Kępień
7202303f8c Merge branch '925-make-delv-use-os-supplied-ephemeral-port-range-v9_14' into 'v9_14'
[v9_14] Make delv use OS-supplied ephemeral port range

See merge request isc-projects/bind9!1645
2019-03-08 07:46:09 -05:00
Michał Kępień
9fe1f29d39 Add CHANGES entry
5180.	[bug]		delv now honors the operating system's preferred
			ephemeral port range. [GL #925]

(cherry picked from commit bf98324956)
2019-03-08 13:14:01 +01:00
Michał Kępień
040d631027 Make delv use OS-supplied ephemeral port range
Make delv honor the operating system's preferred ephemeral port range
instead of always using the default 1024-65535 range for outgoing
messages.

(cherry picked from commit ada6846a10)
2019-03-08 13:14:00 +01:00
Mark Andrews
a364783956 Merge branch 'u/fanf2/sectypes-v9_14' into 'v9_14'
cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate

See merge request isc-projects/bind9!1643
2019-03-08 06:38:51 -05:00
Tony Finch
1e2bfb1460 cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate
Use them in structs for various rdata types where they are missing.
This doesn't change the structs since we are replacing explicit
uint8_t field types with aliases for uint8_t.

Use dns_dsdigest_t in library function arguments.

Improve dnssec-cds with these more specific types.

(cherry picked from commit 0f219714e1)
2019-03-08 22:16:48 +11:00
Mark Andrews
1d3a271352 Merge branch 'marka-define-path-max-v9_14' into 'v9_14'
#include <limits.h> for PATH_MAX, define if not found

See merge request isc-projects/bind9!1639
2019-03-08 02:45:39 -05:00