Commit graph

9187 commits

Author SHA1 Message Date
Michał Kępień
c19ebde14b 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.
2019-07-29 21:44:31 +02:00
Ondřej Surý
36bc018275 Regenerate bind9.xsl.h 2019-07-25 21:31:47 -04:00
Matthijs Mekking
4b40266a1d The 'addzone' test ignored some test results 2019-07-25 16:30:20 +02:00
Mark Andrews
570d1cf0bb use h?+script selectors 2019-07-25 08:03:10 -04:00
Mark Andrews
e6c13ebb26 toggle graph/counter pairs 2019-07-25 08:03:10 -04:00
Mark Andrews
34ce90565c toggle graph/counter pairs 2019-07-25 08:03:10 -04:00
Timothe Litt
86595ed8cb Make statistics tables (in HTML view) togglable
The HTML view of the statistics channel creates
pages with many long tables.  These can be difficult
to navigate.

This commit adds a "show/hide" toggle to each
heading, which makes it easy to compress/expand
the view.
2019-07-25 08:03:10 -04:00
Evan Hunt
a1871e7f1d further cleanup
- removed some dead code
- dns_zone_setdbtype is now void as it could no longer return
  anything but ISC_R_SUCCESS; calls to it no longer check for a result
- controlkeylist_fromconfig() is also now void
- fixed a whitespace error
2019-07-23 15:32:36 -04:00
Ondřej Surý
f0c6aef542 Cleanup stray goto labels from removing isc_mem_allocate/strdup checking blocks 2019-07-23 15:32:36 -04:00
Ondřej Surý
9bdc24a9fd Use coccinelle to cleanup the failure handling blocks from isc_mem_strdup 2019-07-23 15:32:36 -04:00
Ondřej Surý
601cb4e4cc Use coccinelle to cleanup the failure handling blocks from isc_mem_allocate 2019-07-23 15:32:35 -04:00
Ondřej Surý
ae83801e2b Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
Mark Andrews
a4f38bec6a named-checkconf failed to report dnstap-output missing
from named.conf when dnstap was specified
2019-07-23 05:09:01 +10:00
Mark Andrews
b9dc9b68cd Check that RPZ 'CNAME *.' (NODATA) works with DNS64. 2019-07-23 04:14:20 +10:00
Ondřej Surý
a912f31398 Add new default siphash24 cookie algorithm, but keep AES as legacy
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, and changes the default for the Server Cookie algorithm to be siphash24.

Add siphash24 cookie algorithm, and make it keep legacy aes as
2019-07-21 15:16:28 -04:00
Witold Kręcicki
afa81ee4e4 Remove all cookie algorithms but AES, which was used as a default, for legacy purposes. 2019-07-21 10:08:14 -04:00
Tinderbox User
2e637325ed prep 9.15.2 2019-07-10 14:59:47 +00:00
Witold Kręcicki
111d08a6ad statschannel.c: declare dnssecsignstat_dump only if it's used (LIBXML2 or LIBJSON is available) 2019-07-09 18:08:49 +02:00
Witold Kręcicki
e56cc07f50 Fix a few broken atomics initializations 2019-07-09 16:11:14 +02:00
Ondřej Surý
a2e89ff0c1 Get rid of DNS_GEOIP_DATABASE_INIT explicit initializer for geoip dbs
Instead of the explicit struct initializer with all member, rely on the fact
that static variables are explicitly initialized to 0 if not explicitly
initialized.
2019-07-04 08:58:26 -07:00
Thomas Jach
9ba3e3f1b5 convert geoip to geoip2 in win32utils/Configure 2019-07-04 08:58:26 -07:00
Evan Hunt
787f2a7e03 remove all support for legacy GeoIP 2019-07-04 08:56:45 -07:00
Evan Hunt
77c2a8bcbd remove spurious commas from docbook 2019-07-04 14:15:07 +02:00
Matthijs Mekking
d1503cbfa2 Deprecate dnssec-lookaside option
Add the CFG_CLAUSEFLAG_DEPRECATED flag to the option so that people are
discouraged from using DLV.
2019-07-04 14:14:28 +02:00
Evan Hunt
81fcde5953 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.
2019-07-03 12:17:27 -04:00
Ondřej Surý
b104a9bc50 bin/dnssec/dnssec-signzone.c: Protect global variables by making them atomic
Both global shuttingdown and finished bool variables were prone to data race
(as reported by ThreadSanitizer).  The commit makes them both atomic.
2019-07-03 00:05:34 -04:00
Matthijs Mekking
a5dc24b25a Mark some managed-keys instances deprecated
The 'managed-keys' (and 'trusted-keys') options have been deprecated
by 'dnssec-keys'.  Some documentation references to 'managed-keys'
had not yet been marked or noted as such.
2019-07-01 10:31:33 +02:00
Michał Kępień
7d6eaad1bd 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.
2019-06-28 14:05:04 +02:00
Michał Kępień
3549abe81d 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.
2019-06-28 12:43:51 +02:00
Matthijs Mekking
0b8790967e named-checkconf -i: ignore deprecate warnings
Adds a new option to named-checkconf, -i.  If set, named-checkconf
will not warn you about deprecated options.  This allows people
to use named-checkconf in automated deployment precoesses where an
operator only cares if their conf is valid, even if it is not optimal.

This was added as a request as part of introducing a policy on
removing named.conf options.
2019-06-28 11:02:59 +02:00
Evan Hunt
9a1caf99ef add geoip2 system test 2019-06-27 14:59:13 -07:00
Evan Hunt
6e0b93e5a0 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.
2019-06-27 14:59:03 -07:00
Evan Hunt
fe46d5bc34 add HAVE_GEOIP2 #ifdef branches, without implementing yet 2019-06-27 14:58:14 -07:00
Evan Hunt
fea6b5bf10 add a search for GeoIP2 libraries in configure
- "--with-geoip" is used to enable the legacy GeoIP library.
- "--with-geoip2" is used to enable the new GeoIP2 library
  (libmaxminddb), and is on by default if the library is found.
- using both "--with-geoip" and "--with-geoip2" at the same time
  is an error.
- an attempt is made to determine the default GeoIP2 database path at
  compile time if pkg-config is able to report the module prefix. if
  this fails, it will be necessary to set the path in named.conf with
  geoip-directory
- Makefiles have been updated, and a stub lib/dns/geoip2.c has been
  added for the eventual GeoIP2 search implementation.
2019-06-27 14:58:13 -07:00
Mark Andrews
d5c795942f check xsl vs xml 2019-06-26 14:03:53 -07:00
Evan Hunt
ce3907e9fe add odd/even shading to the remaining tables 2019-06-26 14:01:41 -07:00
Mark Andrews
eaba8dd799 remove 'Configured Zones'; add even/odd to zone list 2019-06-26 13:31:58 -07:00
Timothe Litt
96f0bbd4d5 Fix ISC-Bugs 45340: Statschannel XSL for zones, Traffic
In ISC-Bugs 45340, I wrote:

The Statistics channel offers links to Zones and Traffic.
Both produce valid data, but display as blank pages with
a web browser.

Zones never had XSL (I provided the original
implementation, but punted on the XSL).

Traffic has XSL, but it wasn't updated to reflect the
split between IPv4 and IPv6 data.

I've picked up enough XSL to fix my original omission,
and as penance for my sloth, fixed the Traffic bug as well.
2019-06-26 13:31:58 -07:00
Evan Hunt
9a1f0ea873 add system test to confirm glue is returned in priming queries 2019-06-26 08:53:42 -07:00
Evan Hunt
e48b3f1a00 add a test that reloading errors are not ignored 2019-06-26 08:26:32 -07:00
Michał Kępień
60ce0ed411 Prevent "idna" test failures with libidn2 2.2.0+
libidn2 2.2.0+ parses Punycode more strictly than older versions and
thus "dig +idnin +noidnout xn--19g" fails with libidn2 2.2.0+ but
succeeds with older versions.

We could preserve the old behavior by using the IDN2_NO_ALABEL_ROUNDTRIP
flag available in libidn2 2.2.0+, but:

  - this change in behavior is considered a libidn2 bug fix [1],
  - we want to make sure dig behaves as expected, not libidn2,
  - implementing that would require additional configure.ac cruft.

Removing the problematic check appears to be the simplest solution as it
does not prevent the relevant block of checks in the "idna" system test
from achieving its purpose, i.e. ensuring dig properly handles invalid
U-labels.

[1] see upstream commit 241e8f486134793cb0f4a5b0e5817a97883401f5
2019-06-26 14:20:17 +02:00
Michał Kępień
9fc5e48b14 Wait for outgoing transfer statistics to be logged
Since the message confirming outgoing transfer completion is logged
asynchronously, it may happen that transfer statistics may not yet be
logged by the time the dig command triggering a given transfer returns.
This causes false positives for the "ixfr" and "xfer" system tests.
Prevent this from happening by checking outgoing transfer statistics up
to 10 times, in 1-second intervals.
2019-06-25 21:41:42 +02:00
Ondřej Surý
5d1e7be582 Rename OPENSSL_INCLUDES to OPENSSL_CFLAGS in AX_CHECK_OPENSSL() macro
The ax_check_openssl m4 macro used OPENSSL_INCLUDES.  Rename the
subst variable to OPENSSL_CFLAGS and wrap AX_CHECK_OPENSSL() in
action-if-not-found part of PKG_CHECK_MODULE check for libcrypto.
2019-06-25 12:36:01 +02:00
Ondřej Surý
e3e6888946 Make the usage of json-c objects opaque to the caller
The json-c have previously leaked into the global namespace leading
to forced -I<include_path> for every compilation unit using isc/xml.h
header.  This MR fixes the usage making the caller object opaque.
2019-06-25 12:04:20 +02:00
Ondřej Surý
0771dd3be8 Make the usage of libxml2 opaque to the caller
The libxml2 have previously leaked into the global namespace leading
to forced -I<include_path> for every compilation unit using isc/xml.h
header.  This MR fixes the usage making the caller object opaque.
2019-06-25 12:01:32 +02:00
Matthijs Mekking
6f67546cd6 Also collect DNSSEC refresh signature statistics
In addition to gather how many times signatures are created per
key in a zone, also count how many of those signature creations are
because of DNSSEC maintenance.  These maintenance counters are
incremented if a signature is refreshed (but the RRset did not
changed), when the DNSKEY RRset is changed, and when that leads
to additional RRset / RRSIG updates (for example SOA, NSEC).
2019-06-25 11:40:01 +02:00
Matthijs Mekking
a8750a8805 Add tests for DNSSEC sign statistics
This adds tests to the statschannel system test for testing if
the dnskey sign operation counters are incremented correctly.

It tests three cases:

1. A zone maintenance event where all the signatures that are about
   to expire are resigned.
2. A dynamic update event where the new RR and other relevant records
   (SOA, NSEC) are resigned.
3. Adding a standby key, that means the DNSKEY and SOA RRset are
   resigned.
2019-06-25 11:40:01 +02:00
Matthijs Mekking
d8cf7aedfa Add DNSSEC sign operations statistics channel
Add a new statistics structure to record how many sign operations
a key has made within a zone.
2019-06-25 11:40:01 +02:00
Tony Finch
8e05e2e9d5 When a server reload fails, print a note in rndc status.
After a failed reload I noticed two problems:

* There was a missing newline in the output of `rndc status` so it
  finished "reload/reconfig in progressserver is up and running"
* The "reconfig in progress" note should have said "reconfig failed"
2019-06-24 11:49:48 -07:00
Mark Andrews
b62e6418b5 wait for zones to load 2019-06-23 21:37:37 -04:00