9171 Commits

Author SHA1 Message Date
Mark Andrews
34f4295d1f also insist that keycount == dscpcount
(cherry picked from commit dbdd19853e)
2019-09-06 16:44:05 +10:00
Mark Andrews
0c75cb9a1e silence dos2unix messages
(cherry picked from commit 2390d16955)
2019-09-04 10:50:00 +10:00
Mark Andrews
d72f73af48 implement maxudp under windows
(cherry picked from commit 2f558854b7)
2019-09-04 10:50:00 +10:00
Evan Hunt
2a58b03336 when a response-policy zone expires, unload its polices from RPZ summary
(cherry picked from commit 7ba6d592ec)
2019-08-30 13:08:48 -07:00
Mark Andrews
ed92040d7a don't escape commas when saving named's command line
(cherry picked from commit 70dd93bf8a)
2019-08-30 10:42:48 +10:00
Mark Andrews
b25262b1df Add support for displaying EDNS option LLQ.
(cherry picked from commit d98f446d3f)
2019-08-28 17:22:11 +10:00
Mark Andrews
f109c56f4e add good and bad CDS / CDNSKEY test zones
(cherry picked from commit 30610eb9a5)
2019-08-28 16:14:46 +10:00
Mark Andrews
491b2ebcf2 fix dnssec system tests that fail now that we call dns_zone_cdscheck
(cherry picked from commit 3705605e0b)
2019-08-28 16:14:45 +10:00
Evan Hunt
b361e7523e remove unneeded files and options from glue test
- the cache-file and check-itegrity options were not needed
- some zones and files were not used

(cherry picked from commit 7b65ea4c11)
2019-08-27 18:26:47 -07:00
Tinderbox User
cbc0f07a70 prep 9.14.5 2019-08-21 21:35:31 +00:00
Tinderbox User
7f67efcc14 prep 9.14.5 2019-08-21 21:35:30 +00:00
Matthijs Mekking
3e3fd9bb2e Add serve-stale test for ancient RRsets counters
(cherry picked from commit 98b460e604)
2019-08-12 10:44:07 +02:00
Matthijs Mekking
a8b29e051e Make rbtdb maintain stale counters
When updating the statistics for RRset types, if a header is marked
stale or ancient, the appropriate statistic counters are decremented,
then incremented.

Also fix some out of date comments.

(cherry picked from commit a3af2c57e7)
2019-08-12 10:42:23 +02:00
Matthijs Mekking
ca4c9f3b06 Print out ancient type stats with '~' prefix.
The stale RR types are now printed with '#'.  This used to be the
prefix for RR types that were marked ancient, but commit
df50751585 changed the meaning.  It is
probably better to keep '#' for stale RR types and introduce a new
prefix for reintroducing ancient type stat counters.

(cherry picked from commit c9d56a8185)
2019-08-12 10:41:19 +02:00
Michał Kępień
e68255814e Use rndc_dumpdb() in the "sfcache" system test
(cherry picked from commit 4a8b3a8ac0)
2019-08-08 15:12:01 +02:00
Michał Kępień
f520e571b4 Use rndc_dumpdb() in the "serve-stale" system test
(cherry picked from commit 52beeed444)
2019-08-08 15:12:01 +02:00
Michał Kępień
25bd10710a Use rndc_dumpdb() in the "rndc" system test
(cherry picked from commit 443449863b)
2019-08-08 15:12:01 +02:00
Michał Kępień
50f6c92ae6 Use rndc_dumpdb() in the "dnssec" system test
(cherry picked from commit 44c0cc881f)
2019-08-08 15:12:01 +02:00
Michał Kępień
c356748700 Use rndc_dumpdb() in the "cookie" system test
(cherry picked from commit cbf32b901b)
2019-08-08 15:12:01 +02:00
Michał Kępień
66cfb7a34e Use rndc_dumpdb() in the "cacheclean" system test
(cherry picked from commit 22d5355782)
2019-08-08 15:12:01 +02:00
Michał Kępień
841be8d06d Implement a convenience function for "rndc dumpdb"
Add a helper shell function, rndc_dumpdb(), which provides a convenient
way to call "rndc dumpdb" for a given server with optional additional
arguments.  Since database dumping is an asynchronous process, the
function waits until the dump is complete before returning, which
prevents false positives in system tests caused by inspecting the dump
before its preparation is finished.  The function also renames the dump
file before returning so that it does not get overwritten by subsequent
calls; this retains forensic data in case of an unexpected test failure.

(cherry picked from commit ab78e350dd)
2019-08-08 15:12:01 +02:00
Evan Hunt
81312bcf82 added "mdig +multi +norrcomment" test; also fixed the flawed dig test
(cherry picked from commit 93ad3eea90)
2019-08-07 20:52:20 -07:00
Evan Hunt
c2a128587c minor bugfix in mdig: when using +multi, +norrcomments was ignored
(cherry picked from commit edab51b420)
2019-08-07 20:52:20 -07:00
Evan Hunt
e6b8944f9e clarify descriptions of comment-related options in dig usage and man page
(cherry picked from commit 9679c8c20a)
2019-08-05 21:57:09 -07:00
Evan Hunt
4caffaaad2 always check 'printcmd' before printing cmdline message
(cherry picked from commit 6d50f7d924)
2019-08-05 21:57:09 -07:00
Mark Andrews
c9e6813899 check that example/DS is not fetched when validating a.example
(cherry picked from commit 4293a2f4bf)
2019-08-02 15:34:22 +10:00
Mark Andrews
f0fa5ce397 check that bits 64..71 in a dns64 prefix are zero
(cherry picked from commit a7ec7eb6ed)
2019-07-31 22:35:14 +10:00
Michał Kępień
558ee243a6 Make root hints consistent with authoritative data
Multiple resolvers in the "wildcard" system test are configured with a
single root hint: "ns.root-servers.nil", pointing to 10.53.0.1, which is
inconsistent with authoritative data served by ns1.  This may cause
intermittent resolution failures, triggering false positives for the
"wildcard" system test.  Prevent this from happening by making ns2, ns3,
and ns5 use root hints corresponding to the contents of ns1/root.db.in.

(cherry picked from commit dd430c3093)
2019-07-31 11:07:22 +02:00
Michał Kępień
df4d771ed8 Make root hints consistent with authoritative data
The ns2 named instance in the "staticstub" system test is configured
with a single root hint commonly used in BIND system tests
(a.root-servers.nil with an address of 10.53.0.1), which is inconsistent
with authoritative data served by ns1.  This may cause intermittent
resolution failures, triggering false positives for the "staticstub"
system test.  Prevent this from happening by making ns1 serve data
corresponding to the contents of bin/tests/system/common/root.hint.

(cherry picked from commit 4b5e1da0e3)
2019-07-31 09:18:16 +02:00
Michał Kępień
5159597db5 Fix awk invocation in the "verify" system test
Appending output of a command to the same file as the one that command
is reading from is a dangerous practice.  It seems to have accidentally
worked with all the awk implementations we have tested against so far,
but for BusyBox awk, doing this may result in the input/output file
being written to in an infinite loop.  Prevent this from happening by
redirect awk output to a temporary file and appending its contents to
the original file in a separate shell pipeline.

(cherry picked from commit bb9c1654e2)
2019-07-30 21:25:47 +02:00
Michał Kępień
61981b3688 Extend prerequisites for the "xfer" system test
The Net::DNS Perl module needs the Digest::HMAC module to support TSIG.
However, since the latter is not a hard requirement for the former, some
packagers do not make Net::DNS depend on Digest::HMAC.  If Net::DNS is
installed on a host but Digest::HMAC is not, the "xfer" system test
breaks in a very hard-to-debug way (ans5 returns TSIG RRs with empty
RDATA, which prevents TSIG-signed SOA queries and transfers from
working).  Prevent this from happening by making the "xfer" system test
explicitly require Digest::HMAC apart from Net::DNS.

(cherry picked from commit b10d28d1e0)
2019-07-30 21:25:47 +02:00
Michał Kępień
fe7dec851b Make "digdelv" system test work with BusyBox sed
The BusyBox version of sed treats leading '\+' in a regular expression
to be matched as a syntax error ("Repetition not preceded by valid
expression"), which triggers false positives for the "digdelv" system
test.  Make the relevant sed invocations work portably across all sed
implementations by removing the leading backslash.

(cherry picked from commit 266e3ed52a)
2019-07-30 21:25:47 +02:00
Michał Kępień
fdd926d7cb Make "autosign" system test work with BusyBox awk
The BusyBox version of awk treats some variables which other awk
implementations consider to be decimal values as octal values.  This
intermittently breaks key event interval calculations in the "autosign"
system test, trigger false positives for it.  Prevent the problem from
happening by stripping leading zeros from the affected awk variables.

(cherry picked from commit ad008f7dbf)
2019-07-30 21:25:46 +02:00
Michał Kępień
3f341b996d Always include <errno.h> instead of <sys/errno.h>
Including <sys/errno.h> instead of <errno.h> raises a compiler warning
when building against musl libc.  Always include <errno.h> instead of
<sys/errno.h> to prevent that compilation warning from being triggered
and to achieve consistency in this regard across the entire source tree.

(cherry picked from commit b5cd146033)
2019-07-30 21:25:46 +02:00
Michał Kępień
7bcb5a3178 Make root hints consistent with authoritative data
Resolvers in the "filter-aaaa" system test are configured with a single
root hint: "ns.rootservers.net", pointing to 10.53.0.1.  However,
querying ns1 for "ns.rootservers.net" results in NXDOMAIN answers.
Since the TTL for the root hint is set to 0, it may happen that a
resolver's ADB will be asked to return any known addresses for
"ns.rootservers.net", but it will only have access to a cached NXDOMAIN
answer for that name and an expired root hint, which will result in a
resolution failure, triggering a false positive for the "filter-aaaa"
system test.  Prevent this from happening by making all the root hints
consistent with authoritative data served by ns1.

(cherry picked from commit c19ebde14b)
2019-07-29 21:44:51 +02:00
Evan Hunt
8f1cdaeed9 add a system test, confirming that named fails to reload without crashing 2019-07-25 16:53:01 -04:00
Mark Andrews
2524d76133 named-checkconf failed to report dnstap-output missing
from named.conf when dnstap was specified

(cherry picked from commit a4f38bec6a)
2019-07-23 21:09:34 +10:00
Mark Andrews
984f2cea47 Check that RPZ 'CNAME *.' (NODATA) works with DNS64.
(cherry picked from commit b9dc9b68cd)
2019-07-23 05:10:41 +10:00
Ondřej Surý
196b342bc9 Add new default siphash24 cookie algorithm
This commit changes the BIND cookie algorithms to match
draft-sury-toorop-dnsop-server-cookies-00.  Namely, it changes the Client Cookie
algorithm to use SipHash 2-4, adds the new Server Cookie algorithm using SipHash
2-4.  The change doesn't make the SipHash 2-4 to be the default algorithm, this
is up to the operator.
2019-07-21 17:30:53 -04:00
Michał Kępień
496397eb3f Make ifconfig.sh work on DragonFly BSD
On DragonFly BSD, use the same commands for configuring network
interfaces used during system tests as on NetBSD and OpenBSD.
2019-07-21 15:37:22 -04:00
Ondřej Surý
4e04e3d861 Convert isc_hash functions to use isc_siphash24
(cherry picked from commit 2e7d82443f)
2019-07-21 15:32:57 -04:00
Witold Kręcicki
4748d7e6d4 statschannel.c: declare dnssecsignstat_dump only if it's used (LIBXML2 or LIBJSON is available) 2019-07-09 19:38:35 +02:00
Tinderbox User
1f83aca5e8 prep 9.14.4 2019-07-09 13:51:41 +00:00
Evan Hunt
b5032f7a8b add support for building GeoIP2 on windows 2019-07-04 12:05:32 -07:00
Evan Hunt
2b8cdc06f9 fix broken windows build
The MSVS C compiler requires every struct to have at least one member.
The dns_geoip_databases_t structure had one set of members for
HAVE_GEOIP and a different set for HAVE_GEOIP2, and none when neither
API is in use.

This commit silences the compiler error by moving the declaration of
dns_geoip_databases_t to types.h as an opaque reference, and commenting
out the contents of geoip.h when neither version of GeoIP is enabled.

(cherry picked from commit 81fcde5953)
2019-07-03 10:00:28 -07:00
Michał Kępień
6045adbd1a Add and use keyfile_to_key_id() helper function
When trying to extract the key ID from a key file name, some test code
incorrectly attempts to strip all leading zeros.  This breaks tests when
keys with ID 0 are generated.  Add a new helper shell function,
keyfile_to_key_id(), which properly handles keys with ID 0 and use it in
test code whenever a key ID needs to be extracted from a key file name.

(cherry picked from commit 7d6eaad1bd)
2019-06-28 14:05:44 +02:00
Michał Kępień
1a1e550f94 dnstap-read: clear buffer before expanding it
When printing a packet, dnstap-read checks whether its text form takes
up more than the 2048 bytes allocated for the output buffer by default.
If that is the case, the output buffer is automatically expanded, but
the truncated output is left in the buffer, resulting in malformed data
being printed.  Clear the output buffer before expanding it to prevent
this issue from occurring.

(cherry picked from commit 3549abe81d)
2019-06-28 12:46:53 +02:00
Evan Hunt
049d8a311b add geoip2 system test
(cherry picked from commit 9a1caf99ef)
2019-06-27 16:32:30 -07:00
Evan Hunt
0283ab7512 implement searching of geoip2 database
- revise mapping of search terms to database types to match the
  GeoIP2 schemas.
- open GeoIP2 databases when starting up; close when shutting down.
- clarify the logged error message when an unknown database type
  is configured.
- add new geoip ACL subtypes to support searching for continent in
  country databases.
- map geoip ACL subtypes to specific MMDB database queries.
- perform MMDB lookups based on subtype, saving state between
  queries so repeated lookups for the same address aren't necessary.

(cherry picked from commit 6e0b93e5a0)
2019-06-27 16:32:29 -07:00
Evan Hunt
7fc92bee0c add HAVE_GEOIP2 #ifdef branches, without implementing yet
(cherry picked from commit fe46d5bc34)
2019-06-27 16:25:29 -07:00