Compare commits

...
Author SHA1 Message Date
Mark Andrews 2224022297 add --with-geoip2 to CI 2019-07-02 12:00:15 +10:00
Mark Andrews f812ef5f44 add --without-geoip2 2019-07-02 11:56:51 +10:00
Mark Andrews c945a0c1db add missing break 2019-07-02 11:56:51 +10:00
Mark Andrews 31775074b7 test --with-geoip 2019-07-01 23:05:07 +10:00
Michał Kępień d66a9a9b9a Merge branch 'michal/add-and-use-keyfile_to_key_id-helper-function-v9_14' into 'v9_14'
[v9_14] Add and use keyfile_to_key_id() helper function

See merge request isc-projects/bind9!2108
2019-06-28 08:33:30 -04: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ń 23c2b14064 Merge branch '1093-dnstap-read-clear-buffer-before-expanding-it-v9_14' into 'v9_14'
[v9_14] dnstap-read: clear buffer before expanding it

See merge request isc-projects/bind9!2106
2019-06-28 07:08:35 -04:00
Michał Kępień 18aa38610f Add CHANGES entry
5260.	[bug]		dnstap-read was producing malformed output for large
			packets. [GL #1093]

(cherry picked from commit 7354207e1b)
2019-06-28 12:46:54 +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 5369bbe6e6 Merge branch '182-geoip2-api-v9_14' into 'v9_14'
Resolve "Update GeoIP support to new API (GeoLite2 from Maxmind)"

See merge request isc-projects/bind9!2099
2019-06-27 19:54:34 -04:00
Evan Hunt 24103171ca CHANGES, release note, README
(cherry picked from commit 8854e284fd)
2019-06-27 16:32:31 -07:00
Evan Hunt d6bd7bb9af update ARM documentation
(cherry picked from commit c9945d6148)
2019-06-27 16:32:30 -07:00
Evan Hunt 049d8a311b add geoip2 system test
(cherry picked from commit 9a1caf99ef)
2019-06-27 16:32:30 -07:00
Evan Hunt 7468036226 add GeoIP2 lookups to unit test
(cherry picked from commit 6399a70cb4)
2019-06-27 16:32:29 -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
Evan Hunt 6a7e805796 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.

(cherry picked from commit fea6b5bf10)
2019-06-27 16:25:28 -07:00
Ondřej Surý 38e10a8201 Merge branch '1095-when-gnu-c-compiler-is-used-on-solaris-gnu-ld-must-be-used-v9_14' into 'v9_14'
Enforce usage -zrelax=transtls when GNU C Compiler is used on Solaris

See merge request isc-projects/bind9!2098
2019-06-27 07:51:21 -04:00
Ondřej Surý e87a180187 Enforce usage -zrelax=transtls when GNU C Compiler is used on Solaris
When GNU C Compiler is used on Solaris (11), the Thread Local Storage
is completely broken.  The behaviour doesn't manifest when GNU ld is
used.  Thus, we need to enforce usage of GNU ld when GNU C Compiler is
the compiler of choice.

For more background for this change, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90912

(cherry picked from commit d584223653)
2019-06-27 13:33:26 +02:00
Matthijs Mekking 34bacac31e Merge branch '513-matthijs-dnssec-sign-stats-v9_14' into 'v9_14'
Resolve "New metrics to report DNSSEC signing operations and IXFRs [ISC-support #13431]"

See merge request isc-projects/bind9!2080
2019-06-27 07:14:21 -04:00
Matthijs Mekking 04c8c43f09 DNSSEC sign metrics: CHANGES, doc, release note
Add some information about the new statistic-channel DNS sign
metrics. Also add a CHANGES and release note entry.

(cherry picked from commit 3a3f40e372)
2019-06-27 12:37:48 +02:00
Matthijs Mekking 97041a38a7 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).

(cherry picked from commit 6f67546cd6)
2019-06-27 12:37:27 +02:00
Matthijs Mekking 212db50edd 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.

(cherry picked from commit a8750a8805)
2019-06-27 12:37:27 +02:00
Matthijs Mekking 2c494feee6 Update dnskey sign operations statistics
Update per key tag the stats counter when it creates a new signature.
This can happen upon a dynamic update, or when doing DNSSEC
maintenance.

(cherry picked from commit 312fa7f65e)
2019-06-27 12:37:27 +02:00
Matthijs Mekking ec799c667d Add DNSSEC sign operations statistics channel
Add a new statistics structure to record how many sign operations
a key has made within a zone.

(cherry picked from commit d8cf7aedfa)
2019-06-27 12:37:27 +02:00
Mark Andrews a25668a58b Merge branch '1030-statistics-channel-fixes-v9_14' into 'v9_14'
Statistics Channel Fixes

See merge request isc-projects/bind9!2096
2019-06-26 23:41:38 -04:00
Mark Andrews 93b3964bc1 add CHANGES
(cherry picked from commit f8b3aa97df)
2019-06-27 13:23:57 +10:00
Mark Andrews 8573a1d752 check xsl vs xml
(cherry picked from commit d5c795942f)
2019-06-27 13:23:57 +10:00
Evan HuntandMark Andrews 41bb9505d4 add odd/even shading to the remaining tables
(cherry picked from commit ce3907e9fe)
2019-06-27 13:23:56 +10:00
Mark Andrews e20eb63a6d remove 'Configured Zones'; add even/odd to zone list
(cherry picked from commit eaba8dd799)
2019-06-27 13:23:56 +10:00
Timothe LittandMark Andrews bbb55191c5 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.

(cherry picked from commit 96f0bbd4d5)
2019-06-27 13:23:56 +10:00
Evan Hunt 0c6b4f7285 Merge branch '1092-allow-priming-glue-v9_14' into 'v9_14'
allow glue in authoritative responses to root priming queries

See merge request isc-projects/bind9!2094
2019-06-26 12:38:22 -04:00
Evan Hunt 5246f6ecaa CHANGES, release note
(cherry picked from commit 03a6a78b55)
2019-06-26 09:21:05 -07:00
Evan Hunt e8ce85d073 add system test to confirm glue is returned in priming queries
(cherry picked from commit 9a1f0ea873)
2019-06-26 09:21:05 -07:00
Evan Hunt 11b4bd4d7e allow glue in authoritative responses to root priming queries
- when processing authoritative queries for ./NS, set 'gluedb' so
  that glue will be included in the response, regardless of how
  'minimal-responses' has been configured.

(cherry picked from commit e7684c7b64)
2019-06-26 09:21:05 -07:00
Evan Hunt 3d839809c9 Merge branch '1109-inline-reload-error-v9_14' into 'v9_14'
don't overwrite the dns_master_loadfile() result before calling zone_postload()

See merge request isc-projects/bind9!2092
2019-06-26 12:09:04 -04:00
Evan Hunt 6b3eef02c5 CHANGES
(cherry picked from commit c29e344f07)
2019-06-26 08:50:14 -07:00
Evan Hunt a049ce872f add a test that reloading errors are not ignored
(cherry picked from commit e48b3f1a00)
2019-06-26 08:49:52 -07:00
Evan Hunt 09fc9d4f87 don't overwrite the dns_master_loadfile() result before calling zone_postload()
if "rndc reload" fails, the result code is supposed to be passed to
zone_postload, but for inline-signing zones, the result can be
overwritten first by a call to the ZONE_TRYLOCK macro. this can lead
to the partially-loaded unsigned zone being synced over to the signed
zone instead of being rejected.

(cherry picked from commit 0b792bd37b)
2019-06-26 08:49:52 -07:00
Michał Kępień 9ea8ff424a Merge branch 'michal/prevent-idna-test-failures-with-libidn2-2.2.0-v9_14' into 'v9_14'
[v9_14] Prevent "idna" test failures with libidn2 2.2.0+

See merge request isc-projects/bind9!2090
2019-06-26 09:00:54 -04:00
Michał Kępień e79362eaee 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

(cherry picked from commit 60ce0ed411)
2019-06-26 14:40:58 +02:00
Ondřej Surý efaa857219 Merge branch '1067-underflow-recursing-clients-stats-v9_14' into 'v9_14'
Resolve "Underflow in Stats Channel RecursClients value?"

See merge request isc-projects/bind9!2035
2019-06-26 05:36:51 -04:00
Witold KręcickiandOndřej Surý 22a40323b0 CHANGES note
(cherry picked from commit c62a7c88b8)
2019-06-26 11:09:05 +02:00
Witold KręcickiandOndřej Surý 0612da5d5d Make sure that recursclient gauge is calculated correctly.
We increase recursclients when we attach to recursion quota,
decrease when we detach. In some cases, when we hit soft
quota, we might attach to quota without increasing recursclients
gauge. We then decrease the gauge when we detach from quota,
and it causes the statistics to underflow.
Fix makes sure that we increase recursclients always when we
succesfully attach to recursion quota.

(cherry picked from commit 24cfee942f)
2019-06-26 11:08:44 +02:00
Michał Kępień 5324e332c5 Merge branch 'michal/wait-for-outgoing-transfer-statistics-to-be-logged-v9_14' into 'v9_14'
[v9_14] Wait for outgoing transfer statistics to be logged

See merge request isc-projects/bind9!2082
2019-06-25 16:15:22 -04:00
Michał Kępień 8c1c47b22b 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.

(cherry picked from commit 9fc5e48b14)
2019-06-25 22:01:53 +02:00
Mark Andrews 32e5035ddb Merge branch 'marka-silence-unchecked-return-v9_14' into 'v9_14'
silence unchecked return

See merge request isc-projects/bind9!2078
2019-06-25 01:44:31 -04:00
Mark Andrews e98921fd8d silence unchecked return
(cherry picked from commit 134248531c)
2019-06-25 15:32:12 +10:00
Mark Andrews aff3391656 Merge branch '1098-compile-failure-on-9-11-8-v9_14' into 'v9_14'
Resolve "Compile failure on 9.11.8"

See merge request isc-projects/bind9!2076
2019-06-24 20:14:31 -04:00
Mark Andrews 019c5f3d12 add CHANGES
(cherry picked from commit 5c23623094)
2019-06-25 09:49:37 +10:00
Mark Andrews 7c963d0fc4 define ULLONG_MAX if not already defined
(cherry picked from commit 4110b9184d)
2019-06-25 09:48:59 +10:00
Mark Andrews 79765491c0 Merge branch 'marka-wait-for-zones-to-load-v9_14' into 'v9_14'
wait for zones to load

See merge request isc-projects/bind9!2070
2019-06-24 00:30:21 -04:00
Mark Andrews 1f9eb50f56 wait for zones to load
(cherry picked from commit b62e6418b5)
2019-06-24 14:18:43 +10:00
Ondřej Surý add9625713 Merge branch '1081-fix-statistics-in-x86-windows-builds-v9_14' into 'v9_14'
Resolve "Statistics are broken in x86 Windows builds"

See merge request isc-projects/bind9!2068
2019-06-20 12:45:31 -04:00
Michał KępieńandOndřej Surý 4906e9cb9a Add CHANGES entry
5249.	[bug]		Statistics were broken in x86 Windows builds.
			[GL #1081]

(cherry picked from commit cbb2edb8d3)
2019-06-20 18:34:55 +02:00
Michał KępieńandOndřej Surý de65b8f0f8 Fix statistics for x86 Windows builds
Using atomic_int_fast64_t variables with atomic functions on x86 does
not cause Visual Studio to report build errors, but such operations
yield useless results.  Since the isc_stat_t type is unconditionally
typedef'd to atomic_int_fast64_t, any code performing atomic operations
on isc_stat_t variables is broken in x86 Windows builds.  Fix by using
the atomic_int_fast32_t type for isc_stat_t in x86 Windows builds.

(cherry picked from commit e21103f2d3)
2019-06-20 18:34:27 +02:00
Ondřej Surý 095cfa32a3 Merge branch '1094-bump-clientinfomethods-version-v9_14' into 'v9_14'
[v9_14] Bump DNS_CLIENTINFOMETHODS VERSION and AGE

See merge request isc-projects/bind9!2060
2019-06-20 11:45:48 -04:00
Brian ConryandOndřej Surý 5de88e29f8 Bump DNS_CLIENTINFOMETHODS_VERSION/_AGE to 2/1 in clientinfo.h
BIND 9.11.0 has bumped DNS_CLIENTINFOMETHODS_VERSION and _AGE to
version 2 and 1 in the dlz_minimal.h because a member was addet to the
dnsclientinfo struct.  It was found out that the new member is not
used anywhere and there are no accessor functions therefore the change
was reverted.

Later on, it was found out that the revert caused some problems to the
users of BIND 9, and thus this changes takes a different approach by
syncing the values other way around.

(cherry picked from commit 39344dfb3e)
2019-06-20 14:18:50 +02:00
Ondřej Surý 5f777e6a49 Revert "Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c"
This reverts commit a6f09b2255.

(cherry picked from commit 04961a7e6b)
2019-06-20 14:18:50 +02:00
Evan Hunt b0c7a44744 Merge branch 'security-v9_14' into 'v9_14'
merge security-v9_14

See merge request isc-projects/bind9!2063
2019-06-19 19:25:17 -04:00
Tinderbox UserandEvan Hunt 84c8c26ae4 Merge branch 'prep-release' into security-v9_14 2019-06-19 15:54:22 -07:00
Evan Hunt adf5b60e50 Merge branch '942-security-move-test-inside-lock-security-v9_14' into 'security-v9_14' 2019-06-19 15:54:22 -07:00
Tinderbox UserandEvan Hunt 5a70336065 prep 9.14.3 2019-06-19 15:54:22 -07:00
Evan Hunt 1c6ce19e1b CHANGES, release note
(cherry picked from commit 332af50eed96cbcb20173f297e543adaded0ed92)
2019-06-19 15:54:22 -07:00
Mark AndrewsandEvan Hunt 878dfb1e52 move item_out test inside lock in dns_dispatch_getnext()
(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712)
2019-06-19 15:54:21 -07:00
Michał Kępień 488656375c Merge branch '1088-always-fail-a-system-test-if-crashes-are-detected-v9_14' into 'v9_14'
[v9_14] Always fail a system test if crashes are detected

See merge request isc-projects/bind9!2047
2019-06-18 03:55:22 -04:00
Michał Kępień 931357d801 Always fail a system test if crashes are detected
In certain situations (e.g. a named instance crashing upon shutdown in a
system test which involves shutting down a server and restarting it
afterwards), a system test may succeed despite a named crash being
triggered.  This must never be the case.  Extend run.sh to mark a test
as failed if core dumps or log lines indicating assertion failures are
detected (the latter is only an extra measure aimed at test environments
in which core dumps are not generated; note that some types of crashes,
e.g. segmentation faults, will not be detected using this method alone).

(cherry picked from commit 7706f22924)
2019-06-18 09:18:41 +02:00
Michał Kępień 14d4968f78 Merge branch 'michal/fix-transfer-statistics-extraction-v9_14' into 'v9_14'
[v9_14] Fix transfer statistics extraction

See merge request isc-projects/bind9!2046
2019-06-18 03:12:54 -04:00
Michał Kępień aa54cc407f Fix transfer statistics extraction
Make the get_named_xfer_stats() helper shell function more precise in
order to prevent it from matching the wrong lines as that may trigger
false positives for the "ixfr" and "xfer" system tests.  As an example,
the regular expression responsible for extracting the number of bytes
transmitted throughout an entire zone transfer could also match a line
containing the following string:

    transfer of '<zone-name>/IN': sending TCP message of <integer> bytes

However, such a line is not one summarizing a zone transfer.

Also simplify both get_dig_xfer_stats() and get_named_xfer_stats() by
eliminating the need for "echo" statements in them.

(cherry picked from commit fab67c074a)
2019-06-18 08:53:35 +02:00
Mark Andrews 4f23a48449 Merge branch 'marka-cleanup-builtin-config-v9_14' into 'v9_14'
remove geoip-use-ecs from default config

See merge request isc-projects/bind9!2044
2019-06-17 20:49:55 -04:00
Mark Andrews a4946bfd23 remove geoip-use-ecs from default config
(cherry picked from commit b2026bd9e8)
2019-06-18 09:59:59 +10:00
Michał Kępień 7e8884e2e3 Merge branch 'michal/tkey-system-test-fix-key-id-processing-v9_14' into 'v9_14'
[v9_14] "tkey" system test: fix key ID processing

See merge request isc-projects/bind9!2042
2019-06-17 08:43:19 -04:00
Michał Kępień b9820ec727 Fix key ID processing
If ns1/setup.sh generates a key with ID 0, the "KEYID" token in
ns1/named.conf.in will be replaced with an empty string, causing the
following broken statement to appear in ns1/named.conf:

    tkey-dhkey "server" ;

Such a statement triggers false positives for the "tkey" system test due
to ns1 being unable to start with a broken configuration file.  Fix by
tweaking the regular expression used for removing leading zeros from the
key ID, so that it removes at most 4 leading zeros.

(cherry picked from commit 0b7b1161c2)
2019-06-17 14:15:36 +02:00
Michał Kępień 87b7562bfb Merge branch 'michal/address-compilation-warnings-for-O3-builds-v9_14' into 'v9_14'
[v9_14] Address compilation warnings for -O3 builds

See merge request isc-projects/bind9!2028
2019-06-11 04:49:02 -04:00
Michał Kępień 1d0bb1de10 Address GCC 9.1 -O3 compilation warnings
Compiling with -O3 triggers the following warnings with GCC 9.1:

    task.c: In function ‘isc_taskmgr_create’:
    task.c:1386:43: warning: ‘%04u’ directive output may be truncated writing between 4 and 10 bytes into a region of size 6 [-Wformat-truncation=]
     1386 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                           ^~~~
    task.c:1386:32: note: directive argument in the range [0, 4294967294]
     1386 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                ^~~~~~~~~~~~~~~~
    task.c:1386:3: note: ‘snprintf’ output between 15 and 21 bytes into a destination of size 16
     1386 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    private_test.c: In function ‘private_nsec3_totext_test’:
    private_test.c:113:9: warning: array subscript 4 is outside array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
      113 |  while (*sp == '\0' && slen > 0) {
          |         ^~~
    private_test.c:106:11: note: while referencing ‘salt’
      106 |  uint32_t salt;
          |           ^~~~

Prevent these warnings from being triggered by increasing the size of
the relevant array (task.c) and reordering conditions (private_test.c).

(cherry picked from commit ce796ac1f4)
2019-06-11 10:19:04 +02:00
Witold KręcickiandMichał Kępień a0621b51d8 Address GCC 8.3 -O3 compilation warning
Compiling with -O3 triggers the following warning with GCC 8.3:

    driver.c: In function ‘dlz_findzonedb’:
    driver.c:193:29: warning: ‘%u’ directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                                 ^~
    driver.c:193:25: note: directive argument in the range [0, 65535]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                             ^~~~~~~
    driver.c:193:2: note: ‘snprintf’ output between 3 and 106 bytes into a destination of size 100
      snprintf(buffer, size, "%s#%u", addr_buf, port);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Increase the size of the relevant array to prevent this warning from
being triggered.

(cherry picked from commit 44e6bb8b93)
2019-06-11 10:18:58 +02:00
Michał Kępień bd501abaa6 Make some build jobs use -O3 optimizations
Change the compiler optimization level for Debian sid build jobs from
-O2 to -O3 in order to enable triggering compilation warnings which are
not raised when -O2 is used.

(cherry picked from commit 3569487875)
2019-06-11 10:18:53 +02:00
Evan Hunt 8d2ae614e4 Merge branch 'each-pandoc-args-v9_14' into 'v9_14'
specify title metadata and markdown format when calling pandoc

See merge request isc-projects/bind9!2023
2019-06-10 00:31:13 -04:00
Evan Hunt 639bdf24c7 specify title metadata and markdown format when calling pandoc
this change silences a warning message and prevents the unwanted
use of smart quotes when using pandoc 2.7.1 to generate human-readable
versions of README and other markdown files.

(cherry picked from commit 3663f61e0e)
2019-06-09 21:30:28 -07:00
Evan Hunt 929ee132fc Merge branch 'michal/minor-doc-fixes-v9_14' into 'v9_14'
[v9_14] Minor doc fixes

See merge request isc-projects/bind9!2019
2019-06-10 00:22:25 -04:00
Stephen MorrisandMichał Kępień 823c7babf8 Tweak paragraph style in release notes PDF 2019-06-07 08:37:33 +02:00
Stephen MorrisandMichał Kępień 6e058ea035 Fix typos in README and release notes 2019-06-07 08:37:33 +02:00
Stephen MorrisandMichał Kępień 4e0e7e2f24 Reword release note about obsolete systems 2019-06-07 08:37:33 +02:00
Mark Andrews 60177eb292 Merge branch 'marka-capture-checkconf-output-v9_14' into 'v9_14'
capture named-checkconf output

See merge request isc-projects/bind9!2015
2019-06-06 04:49:28 -04:00
Mark Andrews b65b268fde capture named-checkconf output
(cherry picked from commit 36dd373ab4)
2019-06-06 18:34:51 +10:00
Mark Andrews 9a957fef40 Merge branch 'marka-rndc-manpage-fix-v9_14' into 'v9_14'
add missing word 'includes'

See merge request isc-projects/bind9!2012
2019-06-05 19:49:19 -04:00
Mark Andrews 9c374db434 add missing word 'includes'
(cherry picked from commit c6553eb3fc)
2019-06-06 09:33:13 +10:00
Mark Andrews e3afb5c619 Merge branch '1066-macports-uses-opt-local-as-its-openssl-location-v9_14' into 'v9_14'
Resolve "MacPorts uses /opt/local as its OpenSSL location"

See merge request isc-projects/bind9!2010
2019-06-04 04:32:51 -04:00
Mark Andrews a86cf8eef6 add /opt/local to list of locations for OpenSSL
(cherry picked from commit 8973d4bd16)
2019-06-04 18:19:34 +10:00
Mark Andrews 535cf4b1aa Merge branch '1063-pkcs11_test-is-not-being-expanded-v9_14' into 'v9_14'
Resolve "@PKCS11_TEST@ is not being expanded"

See merge request isc-projects/bind9!2008
2019-06-04 04:15:41 -04:00
Mark Andrews 0c65d9dc3a make PKCS11_TEST unix only
(cherry picked from commit fbd9c5c97f)
2019-06-04 18:00:45 +10:00
Mark Andrews f9649f0529 Merge branch '1017-remove-dead-stores-v9_14' into 'v9_14'
Resolve "remove dead stores"

See merge request isc-projects/bind9!2006
2019-06-04 02:07:42 -04:00
Mark Andrews f33d9a825f POST(optlen)
(cherry picked from commit 4e97f7dccc)
2019-06-04 15:48:52 +10:00
Mark Andrews 023b44a921 Merge branch 'cppcheck-and-cmocka-false-positive-v9_14' into 'v9_14'
teach clang analyser that _assert_int_equal and _assert_int_not_equal don't return on failure

See merge request isc-projects/bind9!2003
2019-06-04 01:46:52 -04:00
Mark Andrews 65ece077c2 teach cppcheck that _assert_int_equal and _assert_int_not_equal don't return on failure
(cherry picked from commit 5d5d751c7f)
2019-06-04 15:23:49 +10:00
Michał Kępień 9c3c0c463f Merge branch 'michal/smartsign-system-test-properly-detect-presence-of-cds-cdnskey-records-v9_14' into 'v9_14'
[v9_14] "smartsign" system test: properly detect presence of CDS/CDNSKEY records

See merge request isc-projects/bind9!2002
2019-06-03 07:59:09 -04:00
Michał Kępień 0fc89e0f9f Properly detect presence of CDS/CDNSKEY records
Replace grep calls with awk scripts to more precisely detect presence of
CDS and CDNSKEY records in a signed zone file, in order to prevent rare
false positives for the "smartsign" system test triggered by the strings
"CDS" and/or "CDNSKEY" being accidentally present in the Base64 form of
DNSSEC-related data in the zone file being checked.

(cherry picked from commit d0a73c7da6)
2019-06-03 13:44:18 +02:00
Evan Hunt d19507416d Merge branch '1061-update-supported-rfc-list-v9_14' into 'v9_14'
Resolve "update supported RFC list"

See merge request isc-projects/bind9!1996
2019-05-31 19:25:11 -04:00
Mark AndrewsandEvan Hunt 4a889d5fe3 add RFC6944 2019-05-31 16:23:15 -07:00
Mark AndrewsandEvan Hunt 8da63b7e7b update RFC compliance document 2019-05-31 16:23:05 -07:00
Evan Hunt 5dda2cfca7 Merge branch '943-race-in-dispatcher-socket-v9_14' into 'v9_14'
Fix a possible race between udp dispatch and socket code

See merge request isc-projects/bind9!1995
2019-05-31 15:43:52 -04:00
Witold KręcickiandEvan Hunt 95c2595194 CHANGES
(cherry picked from commit e56d95847b)
2019-05-31 12:32:37 -07:00
Witold KręcickiandEvan Hunt b6d11230b2 Fix a possible race between udp dispatch and socket code
There's a small possibility of race between udp dispatcher and
socket code - socket code can still hold internal reference to a
socket while dispatcher calls isc_socket_open, which can cause
an assertion failure. Fix it by relaxing the assertion test, and
instead simply locking the socket in isc_socket_open.

(cherry picked from commit e517c18d98)
2019-05-31 12:32:37 -07:00
Witold Krecicki dddc16d1d5 Merge branch '1055-qname-minimization-relaxed-lame-v9_14' into 'v9_14'
Resolve "Make relaxed qname minimization work with lame delegations"

See merge request isc-projects/bind9!1991
2019-05-31 04:01:42 -04:00
Evan HuntandWitold Kręcicki 40b2ebc9c7 CHANGES
(cherry picked from commit 8783735f89)
2019-05-31 09:25:44 +02:00
Witold Kręcicki 60d0da833b Use experimental "_ A" minimization in relaxed mode.
qname minimization, even in relaxed mode, can fail on
some very broken domains. In relaxed mode, instead of
asking for "foo.bar NS" ask for "_.foo.bar A" to either
get a delegation or NXDOMAIN. It will require more queries
than regular mode for proper NXDOMAINs.

(cherry picked from commit ae52c2117e)
2019-05-31 09:25:44 +02:00
Witold Kręcicki 8b29a7cbf4 Don't SERVFAIL on lame delegations when doing minimization in relaxed mode.
qname minimization in relaxed mode should fall back to regular
resolution in case of failure.

(cherry picked from commit 2691e729f0)
2019-05-31 09:25:23 +02:00
Mark Andrews 668fce4f79 Merge branch '225-ed448-broken-with-openssl-1-1-1-pre6-v9_14' into 'v9_14'
Fix ASN.1 length values in Ed448 public and private key prefix blobs.

See merge request isc-projects/bind9!1987
2019-05-30 09:22:55 -04:00
Mark Andrews 630d05e920 add CHANGES note
(cherry picked from commit 6c499a0c08)
2019-05-30 23:09:56 +10:00
Mark Andrews e726515e03 test Ed448 against test vectors
(cherry picked from commit 20f2d9b41b)
2019-05-30 23:09:23 +10:00
Mark Andrews 6ca95b5478 fix Ed448 length values for precomputed ASN.1 prefix blobs
(cherry picked from commit 5da97eeea6)
2019-05-30 23:09:23 +10:00
Ondřej Surý b7a14300d8 Merge branch '996-revert-wrong-key-id-is-displayed-for-rsamd5-keys-v9_14' into 'v9_14'
Revert "Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'"

See merge request isc-projects/bind9!1982
2019-05-30 09:00:00 -04:00
Ondřej Surý d0181cb97d Revert "Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'"
This reverts commit ea131d2e6a, reversing
changes made to e79dd268b6.

(cherry picked from commit 52a8fb31c7)
2019-05-30 14:32:58 +02:00
Mark Andrews 09b95b399e Merge branch '1011-use-proper-linker-config-on-hp-ux-v9_14' into 'v9_14'
Resolve "Use proper linker (config) on HP-UX"

See merge request isc-projects/bind9!1983
2019-05-29 21:47:53 -04:00
Mark Andrews 7273a5fa98 regen
(cherry picked from commit 92325d3150)
2019-05-30 11:27:27 +10:00
Mark Andrews 93063a0d3a add link flags for ia64-hp-hpux
(cherry picked from commit 61752bf8ac)
2019-05-30 11:27:27 +10:00
Ondřej Surý 53683aeed5 Merge branch '1044-fix-LFS-flags-on-BSDs-v9_14' into 'v9_14'
Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make

See merge request isc-projects/bind9!1979
2019-05-29 07:54:49 -04:00
Ondřej Surý 8464fef786 Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make
(cherry picked from commit d4596baed4)
2019-05-29 13:34:55 +02:00
Michał Kępień 2a569ef9e4 Merge branch 'michal/legacy-system-test-fixes-v9_14' into 'v9_14'
[v9_14] "legacy" system test fixes

See merge request isc-projects/bind9!1974
2019-05-29 05:33:52 -04:00
Michał Kępień 30c9068714 Optimize dig parameters to decrease test run time
Performing server setup checks using "+tries=3 +time=5" is redundant as
a single query is arguably good enough for determining whether a given
named instance was set up properly.  Only use multiple queries with a
long timeout for resolution checks in the "legacy" system test, in order
to significantly reduce its run time (on a contemporary machine, from
about 1m45s to 0m40s).

(cherry picked from commit 47b850348c)
2019-05-29 11:09:53 +02:00
Michał Kępień 909651afe6 Make "plain" server setup checks more similar
Send a test TCP query to the "plain" server during its setup check to
improve its consistency with the setup check for the "plain + no TCP"
server.

(cherry picked from commit bb939a03ff)
2019-05-29 11:09:49 +02:00
Michał Kępień 0f5871e0fa Add more EDNS checks for dig output files
In the "legacy" system test, in order to make server setup checks more
consistent with each other, add further checks for either presence or
absence of the EDNS OPT pseudo-RR in the responses returned by the
tested named instances.

(cherry picked from commit 56ed1275c6)
2019-05-29 11:09:44 +02:00
Michał Kępień e1823c5240 Do not ignore dig exit codes
Make sure the "legacy" system test fails if any exit code returned by
dig does not match the expected one.

(cherry picked from commit 4dea5cb799)
2019-05-29 11:09:34 +02:00
Michał Kępień eeb0747efa Use helper functions for checking resolution
Extract repeated dig and grep calls into two helper shell functions,
resolution_succeeds() and resolution_fails(), in order to reduce code
duplication in the "legacy" system test, emphasize the similarity
between all the resolution checks in that test, and make the conditions
for success and failure uniform for all resolution checks in that test.

(cherry picked from commit effd16ab25)
2019-05-29 11:09:28 +02:00
Michał Kępień 762344a468 Use +dnssec instead of separate TXT records
When testing named instances which are configured to drop outgoing UDP
responses larger than 512 bytes, querying with DO=1 may be used instead
of querying for large TXT records as the effect achieved will be
identical: an unsigned response for a SOA query will be below 512 bytes
in size while a signed response for the same query will be over 512
bytes in size.  Doing this makes all resolution checks in the "legacy"
system test more similar.  Add checks for the TC flag being set in UDP
responses which are expected to be truncated to further make sure that
tested named instances behave as expected.

(cherry picked from commit aaf81ca6ef)
2019-05-29 11:09:16 +02:00
Michał Kępień 96a4c329f1 Fix the name of the file to inspect
One of the checks in the "legacy" system test inspects dig.out.1.test$n
instead of dig.out.2.test$n.  Fix the file name used in that check.

(cherry picked from commit 3e7fa15ca3)
2019-05-29 11:09:12 +02:00
Michał Kępień a74bcebbff Ensure queries expected to time out really do
Make sure that the "legacy" system test fails if queries which are
expected to time out do not really time out.

(cherry picked from commit 6283c1cc7e)
2019-05-29 11:09:01 +02:00
Michał Kępień 82f3c88d46 Properly test servers with TCP support disabled
Sending TCP queries to test named instances with TCP support disabled
should cause dig output to contain the phrase "connection refused", not
"connection timed out", as such instances never open the relevant
sockets.  Make sure that the "legacy" system test fails if the expected
phrase is not found in any of the relevant files containing dig output.

(cherry picked from commit 9491616e5c)
2019-05-29 11:08:47 +02:00
Ondřej Surý bdae8ed097 Merge branch '1044-include-config.h-in-gen.c-v9_14' into 'v9_14'
Resolve "gen fails to generate headers on Debian buster"

See merge request isc-projects/bind9!1976
2019-05-29 04:44:33 -04:00
Ondřej Surý f7050fc728 Use getconf LFS_{CFLAGS,LDFLAGS,LIBS} to get flags to compile lib/dns/gen
On some systems (namely Debian buster armhf) the readdir() call fails
with `Value too large for defined data type` unless the
_FILE_OFFSET_BITS=64 is defined.  The correct way to fix this is to
get the appropriate compilation parameters from getconf system
interface.

(cherry picked from commit 4c7345bcb6)
2019-05-29 10:30:39 +02:00
Ondřej Surý a17eb8dec4 Exit the ./gen program on failed readdir() call
(cherry picked from commit 05b7c08a16)
2019-05-29 10:30:39 +02:00
Mark Andrews 477515fb09 Merge branch '1056-misleading-error-message-when-trying-to-build-without-python-support-v9_14' into 'v9_14'
Resolve "Misleading error message when trying to build without Python support"

See merge request isc-projects/bind9!1965
2019-05-27 00:13:27 -04:00
Mark Andrews 1ceef52e21 fix configire error message to say --without-python
(cherry picked from commit d70bf76d80)
2019-05-27 14:00:04 +10:00
Witold Krecicki 43f5b94da6 Merge branch '1046-deadlock-in-tcp-code-v9_14' into 'v9_14'
Fix a possible deadlock in TCP accepting

See merge request isc-projects/bind9!1961
2019-05-24 07:03:05 -04:00
Witold Kręcicki 000fdd8fa5 Fix a possible deadlock in TCP accepting
Each network thread holds an array of locks, indexed by a hash
of fd. When we accept a connection we hold a lock in accepting thread.
We then generate the thread number and lock bucket for the new
connection socket - if we hit the same thread and lock bucket as
accepting socket we get a deadlock. Avoid this by checking if we're
in the same thread/lock bucket and not locking in this case.

(cherry picked from commit 75815c1581)
2019-05-24 12:50:15 +02:00
Mark Andrews 0fc9c25cd8 Merge branch '1028-dig-trace-should-not-set-rd-0-norecurse-for-the-initial-root-hints-query-v9_14' into 'v9_14'
Resolve "dig +trace should not set RD=0 (+norecurse) for the initial root hints query"

See merge request isc-projects/bind9!1955
2019-05-22 02:31:22 -04:00
Mark Andrews 98de15b780 Recurse to find the root server list with 'dig +trace'.
(cherry picked from commit e65d4989a1)
2019-05-22 16:05:25 +10:00
Evan Hunt 4b21ee60b6 Merge branch 'each-document-bug-ids-v9_14' into 'v9_14'
update README to explain gitlab numbers

See merge request isc-projects/bind9!1948
2019-05-17 02:44:47 -04:00
Evan Hunt 1aabcfc725 update README to explain gitlab numbers
(cherry picked from commit 45d76498d9)
2019-05-16 23:44:16 -07:00
Ondřej Surý 9088679e85 Merge branch '1003-SO_REUSEPORT-tweaks-v9_14' into 'v9_14'
Resolve "socket.c error 'SO_REUSEPORT' undeclared"

See merge request isc-projects/bind9!1947
2019-05-17 01:58:56 -04:00
Ondřej Surý 2b343d1fc1 Use SO_REUSEPORT_LB on FreeBSD if available
(cherry picked from commit 94cb73d96c)
2019-05-17 07:45:21 +02:00
Ondřej Surý 5d8d65bfdc Add safeguard against the other usage of SO_REUSEPORT
(cherry picked from commit 1c672367a0)
2019-05-17 07:45:21 +02:00
Ondřej Surý 110beba49c Merge branch '984-remove-dead-code-in-pkcs11-keygen-c-v9_14' into 'v9_14'
Resolve "Remove dead code in pkcs11-keygen.c"

See merge request isc-projects/bind9!1929
2019-05-13 00:35:44 -04:00
Mark AndrewsandOndřej Surý b61d6cde83 remove dead code and unnecessary call to pkcs_C_GetAttributeValue
(cherry picked from commit 2e4986e2c4)
2019-05-13 11:22:33 +07:00
Ondřej Surý f433202a5e Merge branch '899-remove-unspec-v9_14' into 'v9_14'
Remove UNSPEC rrtype

See merge request isc-projects/bind9!1932
2019-05-13 00:20:11 -04:00
Witold KręcickiandOndřej Surý 0617148792 Remove UNSPEC rrtype
(cherry picked from commit a8e2ca6f7d)
2019-05-13 10:52:48 +07:00
Mark Andrews 7ad719f45a Merge branch '981-armv5-build-is-broken-v9_14' into 'v9_14'
Resolve "armv5 build is broken"

See merge request isc-projects/bind9!1930
2019-05-12 23:05:45 -04:00
Mark Andrews 4de58ee1c8 arm: just use the compiler's default yield support
(cherry picked from commit f546769b8b)
2019-05-13 12:19:26 +10:00
Tinderbox User 354cf1f66f Merge branch 'prep-release' into v9_14 2019-05-10 04:51:34 +00:00
Tinderbox User d7862ea81c prep 9.14.2 2019-05-10 04:51:22 +00:00
Evan Hunt 092b9d3cba Merge branch 'fix-changes' into 'v9_14'
fix change number

See merge request isc-projects/bind9!1924
2019-05-10 00:02:25 -04:00
Evan Hunt 3b7bf9ecac fix change number 2019-05-09 21:00:54 -07:00
Evan Hunt ddb09b8046 Merge branch '997-make-ntas-work-with-validating-forwarders-v9_14' into 'v9_14'
Make NTAs work with validating forwarders

See merge request isc-projects/bind9!1922
2019-05-09 23:51:13 -04:00
Michał KępieńandEvan Hunt 9ca0c63f1f Add CHANGES entry
5219.	[bug]		Negative trust anchors did not work with "forward only;"
			to validating resolvers. [GL #997]

(cherry picked from commit 5be7c6f4b3)
2019-05-09 20:37:37 -07:00
Michał KępieńandEvan Hunt c6bf43a821 Make NTAs work with validating forwarders
If named is configured to perform DNSSEC validation and also forwards
all queries ("forward only;") to validating resolvers, negative trust
anchors do not work properly because the CD bit is not set in queries
sent to the forwarders.  As a result, instead of retrieving bogus DNSSEC
material and making validation decisions based on its configuration,
named is only receiving SERVFAIL responses to queries for bogus data.
Fix by ensuring the CD bit is always set in queries sent to forwarders
if the query name is covered by an NTA.

(cherry picked from commit 5e80488270)
2019-05-09 20:37:37 -07:00
Evan Hunt 90c4e778d5 Merge branch '958-improve-message-about-python-ply-v9_14' into 'v9_14'
Improve the error message about missing PLY Python package

See merge request isc-projects/bind9!1919
2019-05-09 23:16:34 -04:00
Ondřej SurýandEvan Hunt 31fbfe56fd Improve the error message about missing PLY Python package
Previously, only a message about missing Python was printed, which was
misleading to many users.  The new message clearly states that Python
AND PLY is required and prints basic instructions how to install PLY
package.

(cherry picked from commit 55b48700da)
2019-05-09 19:55:53 -07:00
Ondřej Surý c3162ac196 Merge branch 'ondrej/reproducible-build-v9_14' into 'v9_14'
Make lib/dns/gen.c compatible with reproducible builds.

See merge request isc-projects/bind9!1912
2019-05-09 05:26:34 -04:00
Ondřej Surý c10f361f44 Make lib/dns/gen.c compatible with reproducible builds.
The gen.c will now use SOURCE_DATE_EPOCH[1] if found in environment
to make the build more reproducible build friendly.

1. https://reproducible-builds.org/specs/source-date-epoch/

(cherry picked from commit c8cb612d39)
2019-05-09 16:05:12 +07:00
Mark Andrews ace60a3daa Merge branch '960-add-edns-client-tag-and-edns-server-tag-v9_14' into 'v9_14'
Resolve "Add EDNS Client Tag and EDNS Server Tag"

See merge request isc-projects/bind9!1910
2019-05-09 04:39:06 -04:00
Mark Andrews 07f8daf536 Recognise EDNS Client Tag and EDNS Server Tag
(cherry picked from commit ee7cf180b3)
2019-05-09 18:19:29 +10:00
Evan Hunt b31a9ce95d Merge branch '868-fix-trusted-keys-handling-with-dnssec-validation-auto-v9_14' into 'v9_14'
fix incorrect behavior mixing trusted-keys with validation auto

See merge request isc-projects/bind9!1904
2019-05-09 01:19:23 -04:00
Evan Hunt bfd646795d CHANGES, release notes 2019-05-08 21:59:35 -07:00
Evan Hunt 9b59425d06 warn about the use of trusted-keys and managed-keys for the same name 2019-05-08 21:59:35 -07:00
Mark Andrews 80d946e90e Merge branch '899-totext-fromtext-fuzz-v9_14' into 'v9_14'
fuzz dns_rdata_fromwire

See merge request isc-projects/bind9!1907
2019-05-08 21:00:08 -04:00
Mark Andrews 228a50a3f3 dns_rdata_fromwire_text fuzzer
Fuzz input to dns_rdata_fromwire(). Then convert the result
to text, back to wire format, to multiline text, and back to wire
format again, checking for consistency throughout the sequence.

(cherry picked from commit 8ffdf6759e)
2019-05-09 10:46:21 +10:00
Mark Andrews 0ae562e2af Merge branch '852-bind-returning-malformed-packet-error-when-sshfp-record-has-fingerprint-value-less-than-4-characters-v9_14' into 'v9_14'
Resolve "Bind returning malformed packet error when sshfp record has fingerprint value less than 4 characters"

See merge request isc-projects/bind9!1905
2019-05-08 18:59:55 -04:00
Mark Andrews 7dd4fa9da3 enforce known SSHFP finger print lengths
(cherry picked from commit 1722728c80)
2019-05-09 08:48:28 +10:00
Mark Andrews b99c0f93b1 Merge branch '991-provide-ixfr-should-only-be-tests-on-tcp-clients-v9_14' into 'v9_14'
Resolve "provide-ixfr should only be tested on TCP clients."

See merge request isc-projects/bind9!1900
2019-05-07 00:28:40 -04:00
Mark Andrews 7098238039 add CHANGES
(cherry picked from commit ba1d7f3a07)
2019-05-07 13:43:15 +10:00
Mark Andrews 227b49a830 add test for 'provide-ixfr no;' ; add forensics support
(cherry picked from commit d547465af5)
2019-05-07 13:43:14 +10:00
Mark Andrews 8c7052e1cf only test provideixfr if the transport is TCP
(cherry picked from commit 18c49853e3)
2019-05-07 13:43:14 +10:00
Mark Andrews ea9083647e Merge branch '1005-filter-aaaa-crash-in-9-14-1-v9_14' into 'v9_14'
Resolve "filter-aaaa crash in 9.14.1"

See merge request isc-projects/bind9!1899
2019-05-06 21:19:35 -04:00
Mark Andrews 0b6a698320 add CHANGES
(cherry picked from commit bdc66eb5d9)
2019-05-07 11:07:32 +10:00
Mark Andrews a0feec3dbc lock accesses to hash table
(cherry picked from commit 2483a8c76d)
2019-05-07 11:07:32 +10:00
Mark Andrews dbbbed29e9 clear pointer before hash table
(cherry picked from commit 4886701c03)
2019-05-07 11:07:32 +10:00
Mark Andrews b01ebf8168 Merge branch '983-delv-www-isc-org-any-rtrace-multiline-leaks-memory-v9_14' into 'v9_14'
Resolve "'delv www.isc.org ANY +rtrace +multiline' leaks memory"

See merge request isc-projects/bind9!1896
2019-05-06 20:39:34 -04:00
Mark Andrews 83310317c7 add CHANGES note
(cherry picked from commit ce5520b695)
2019-05-07 10:27:18 +10:00
Mark Andrews 3ebf1ddeb2 check that delv -t any works
(cherry picked from commit 6999bee7ef)
2019-05-07 10:27:18 +10:00
Mark Andrews 0e6a620432 fix whitespace
(cherry picked from commit 32ba5a0494)
2019-05-07 10:27:18 +10:00
Mark Andrews 2ffdbe9eff return rdatasets when processing ANY queries in client_resfind
(cherry picked from commit 127333c71f)
2019-05-07 10:27:18 +10:00
Evan Hunt 9c9b9ab651 Merge branch 'each-win32-parallel-tests-v9_14' into 'v9_14'
enable parallel system tests on windows

See merge request isc-projects/bind9!1894
2019-05-06 19:13:26 -04:00
Evan Hunt df9cfeaf1b CHANGES
(cherry picked from commit d3cd0729c9)
2019-05-06 15:54:31 -07:00
Evan Hunt 96e0e38fcd move the test lists into conf.sh.common
there is now a common list of tests in conf.sh.common, with the
tests that are either unique to windows or to unix, or which are
enabled or disabled by configure or Configure, being listed in
separate variables in conf.sh.in and conf.sh.win32.

(cherry picked from commit a33237f070)
2019-05-06 15:54:31 -07:00
Evan Hunt 5755465c2f enable parallel system tests on windows
this moves the creation of "parallel.mk" into a separate shell script
instead of bin/tests/system/Makefile. that shell script can now be
executed by runall.sh, allowing us to make use of the cygwin "make"
command, which supports parallel execution.

(cherry picked from commit bbae24c140)
2019-05-06 15:54:30 -07:00
Evan Hunt 9fe5acc36b Merge branch 'each-simplify-stats-v9_14' into 'v9_14'
simplify the isc_stat structure to take avantage of atomics

See merge request isc-projects/bind9!1893
2019-05-06 17:13:17 -04:00
Evan Hunt 6925c8136d CHANGES
(cherry picked from commit f1aaf45085)
2019-05-06 14:02:41 -07:00
Evan Hunt fb58d23a94 simplify the isc_stat structure to take avantage of atomics
(cherry picked from commit 4e5edb35e4)
2019-05-06 14:02:41 -07:00
Mark Andrews 3e052caca8 Merge branch '1000-arm-doc-rpz-nodata-policy-says-ancount-1-v9_14' into 'v9_14'
Resolve "ARM doc RPZ NODATA policy says ANCOUNT=1"

See merge request isc-projects/bind9!1890
2019-05-06 04:05:38 -04:00
Mark Andrews 756bb201bd A NODATA response has ANCOUNT of 0 assuming no CNAME/DNAMES
(cherry picked from commit 4889e06c3a)
2019-05-06 17:53:42 +10:00
Mark Andrews 63fe63c8c5 Merge branch 'marka-fix-changes' into 'v9_14'
move change 5190 above 9.14.1 release point.

See merge request isc-projects/bind9!1885
2019-04-29 18:54:05 -04:00
Mark Andrews 455472c817 move change 5190 above 9.14.1 release point. 2019-04-30 08:41:35 +10:00
Evan Hunt 0e30e6abaa Merge branch '956-fix-dnstap-test-v9_14' into 'v9_14'
attach memory context sooner so that cleanup will work correctly

See merge request isc-projects/bind9!1883
2019-04-26 19:10:32 -04:00
Evan Hunt 524d36bc2d attach memory context sooner so that cleanup will work correctly
(cherry picked from commit 0fd344e77a)
2019-04-26 15:53:48 -07:00
Ondřej Surý 60a834789e Merge branch '999-tcp-client-crash-v9_11-locks-v9_14' into 'v9_14'
Replace atomic operations in bin/named/client.c with isc_refcount reference counting

See merge request isc-projects/bind9!1880
2019-04-26 15:45:38 -04:00
Ondřej Surý e203d4d65a Replace atomic operations in bin/named/client.c with isc_refcount reference counting
(cherry picked from commit ef49780d30)
2019-04-26 21:33:50 +02:00
Michał Kępień bb258967c3 Merge branch 'michal/simplify-trailing-period-handling-in-system-tests-v9_14' into 'v9_14'
[v9_14] Simplify trailing period handling in system tests

See merge request isc-projects/bind9!1877
2019-04-26 15:12:11 -04:00
Michał Kępień 3b7bc3421c Simplify trailing period handling in system tests
Windows systems do not allow a trailing period in file names while Unix
systems do.  When BIND system tests are run, the $TP environment
variable is set to an empty string on Windows systems and to "." on Unix
systems.  This environment variable is then used by system test scripts
for handling this discrepancy properly.

In multiple system test scripts, a variable holding a zone name is set
to a string with a trailing period while the names of the zone's
corresponding dlvset-* and/or dsset-* files are determined using
numerous sed invocations like the following one:

    dlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"

In order to improve code readability, use zone names without trailing
periods and replace sed invocations with variable substitutions.

To retain local consistency, also remove the trailing period from
certain other zone names used in system tests that are not subsequently
processed using sed.

(cherry picked from commit da2c1b74ad)
2019-04-26 20:38:29 +02:00
Michał Kępień e3a090e159 Merge branch 'michal/fix-rare-allow-query-system-test-failures-v9_14' into 'v9_14'
[v9_14] Fix rare "allow-query" system test failures

See merge request isc-projects/bind9!1876
2019-04-26 05:31:25 -04:00
Michał Kępień 027c6179a8 Make root zone data match root hints
In the "allow-query" system test, ns3 uses a root hints file which
contains a single entry for a.root-servers.nil (10.53.0.1).  This name
is not present in the root zone served by ns1, which means querying it
for that name and any type will yield an NXDOMAIN response.  When
combined with unfavorable thread scheduling, this can lead to ns3
caching an NXDOMAIN response for the only root server it is aware of and
thus to false positives for the "allow-query" system test caused by ns3
returning unexpected SERVFAIL responses.  Fix by modifying the root zone
served by ns1 so that authoritative responses to a.root-servers.nil
queries match the root hints file used by ns3.

(cherry picked from commit 978a0d2555)
2019-04-26 11:07:00 +02:00
Evan Hunt 9215d68c6b Merge branch '982-filter-aaaa-race-v9_14' into 'v9_14'
Resolve "filter-aaaa crash in 9.14.0"

See merge request isc-projects/bind9!1874
2019-04-26 03:44:38 -04:00
Evan Hunt e4204809ed CHANGES
(cherry picked from commit ce8ad08a45)
2019-04-26 00:32:55 -07:00
Evan Hunt 8c1af0d3f5 associate a lock with the memory pool in the filter-aaaa plugin
(cherry picked from commit 4f4c18d643)
2019-04-26 00:32:55 -07:00
Ondřej Surý 1d6133277f Merge branch 'prep-release-v9_14' into 'v9_14'
Prep release v9 14

See merge request isc-projects/bind9!1872
2019-04-25 11:28:50 -04:00
Tinderbox UserandOndřej Surý 586e085a71 doc rebuild
(cherry picked from commit b441152036)
2019-04-25 17:01:11 +02:00
Tinderbox UserandOndřej Surý 02cbca91d7 prep 9.14.1
(cherry picked from commit c7004347bc)
2019-04-25 17:00:56 +02:00
Ondřej Surý a6fac68b4f Merge branch '615-tcp-client-crash-v9_14-v9_14' into 'v9_14'
Resolve "tcp-clients mostly ineffective"

See merge request isc-projects/bind9!1870
2019-04-25 10:40:31 -04:00
Evan HuntandOndřej Surý 228a29da4b CHANGES, release note
(cherry picked from commit 244e44af432121a05e0a308b7ccce96a8ecd28ab)
(cherry picked from commit 79fad84bf6)
2019-04-25 16:20:50 +02:00
Evan HuntandOndřej Surý 86e9e54766 restore allowance for tcp-clients < interfaces
in the "refactor tcpquota and pipeline refs" commit, the counting
of active interfaces was tightened in such a way that named could
fail to listen on an interface if there were more interfaces than
tcp-clients. when checking the quota to start accepting on an
interface, if the number of active clients was above zero, then
it was presumed that some other client was able to handle accepting
new connections. this, however, ignored the fact that the current client
could be included in that count, so if the quota was already exceeded
before all the interfaces were listening, some interfaces would never
listen.

we now check whether the current client has been marked active; if so,
then the number of active clients on the interface must be greater
than 1, not 0.

(cherry picked from commit 02365b87ea0b1ea5ea8b17376f6734c811c95e61)
(cherry picked from commit cae79e1bab)
2019-04-25 16:20:50 +02:00
Evan HuntandOndřej Surý a78af2f1d3 refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota
- if the TCP quota has been exceeded but there are no clients listening
  for new connections on the interface, we can now force attachment to the
  quota using isc_quota_force(), instead of carrying on with the quota not
  attached.
- the TCP client quota is now referenced via a reference-counted
  'ns_tcpconn' object, one of which is created whenever a client begins
  listening for new connections, and attached to by members of that
  client's pipeline group. when the last reference to the tcpconn
  object is detached, it is freed and the TCP quota slot is released.
- reduce code duplication by adding mark_tcp_active() function
- convert counters to stdatomic

(cherry picked from commit a8dd133d270873b736c1be9bf50ebaa074f5b38f)
(cherry picked from commit 4a8fc979c4)
2019-04-25 16:20:50 +02:00
Evan HuntandOndřej Surý a41c9dbfc1 better tcpquota accounting and client mortality checks
- ensure that tcpactive is cleaned up correctly when accept() fails.
- set 'client->tcpattached' when the client is attached to the tcpquota.
  carry this value on to new clients sharing the same pipeline group.
  don't call isc_quota_detach() on the tcpquota unless tcpattached is
  set.  this way clients that were allowed to accept TCP connections
  despite being over quota (and therefore, were never attached to the
  quota) will not inadvertently detach from it and mess up the
  accounting.
- simplify the code for tcpquota disconnection by using a new function
  tcpquota_disconnect().
- before deciding whether to reject a new connection due to quota
  exhaustion, check to see whether there are at least two active
  clients. previously, this was "at least one", but that could be
  insufficient if there was one other client in READING state (waiting
  for messages on an open connection) but none in READY (listening
  for new connections).
- before deciding whether a TCP client object can to go inactive, we
  must ensure there are enough other clients to maintain service
  afterward -- both accepting new connections and reading/processing new
  queries.  A TCP client can't shut down unless at least one
  client is accepting new connections and (in the case of pipelined
  clients) at least one additional client is waiting to read.

(cherry picked from commit 427a2fb4d17bc04ca3262f58a9dcf5c93fc6d33e)
(cherry picked from commit 0896841272)
2019-04-25 16:20:49 +02:00
Michał KępieńandOndřej Surý 010e6f4bd7 use reference counter for pipeline groups (v3)
Track pipeline groups using a shared reference counter
instead of a linked list.

(cherry picked from commit 31f392db20207a1b05d6286c3c56f76c8d69e574)
(cherry picked from commit 2211120222)
2019-04-25 16:20:49 +02:00
Witold KręcickiandOndřej Surý ef28e8879b tcp-clients could still be exceeded (v2)
the TCP client quota could still be ineffective under some
circumstances.  this change:

- improves quota accounting to ensure that TCP clients are
  properly limited, while still guaranteeing that at least one client
  is always available to serve TCP connections on each interface.
- uses more descriptive names and removes one (ntcptarget) that
  was no longer needed
- adds comments

(cherry picked from commit 9e74969f85329fe26df2fad390468715215e2edd)
(cherry picked from commit d7e84cee0b)
2019-04-25 16:20:49 +02:00
Witold KręcickiandOndřej Surý 4ca208adb8 fix enforcement of tcp-clients (v1)
tcp-clients settings could be exceeded in some cases by
creating more and more active TCP clients that are over
the set quota limit, which in the end could lead to a
DoS attack by e.g. exhaustion of file descriptors.

If TCP client we're closing went over the quota (so it's
not attached to a quota) mark it as mortal - so that it
will be destroyed and not set up to listen for new
connections - unless it's the last client for a specific
interface.

(cherry picked from commit eafcff07c25bdbe038ae1e4b6660602a080b9395)
(cherry picked from commit 9e7617cc84)
2019-04-25 16:20:49 +02:00
Ondřej Surý b128b54261 Merge branch '880-secure-asdfasdfasdf-abacadabra-crash-v9_14-v9_14' into 'v9_14'
Resolve "CVE-2019-6467: lib/ns/query.c:9176: INSIST(!qctx->is_zone) failed, back trace"

See merge request isc-projects/bind9!1867
2019-04-25 10:19:26 -04:00
Evan HuntandOndřej Surý 31c690396d CHANGES, release note
(cherry picked from commit ab5473007e91f011d003ff0ba5ab32fa0d56360c)
(cherry picked from commit 404be59527)
2019-04-25 15:59:43 +02:00
Matthijs MekkingandOndřej Surý 6b22e1f4fe Fix nxdomain-redirect assertion failure
- Always set is_zonep in query_getdb; previously it was only set if
  result was ISC_R_SUCCESS or ISC_R_NOTFOUND.
- Don't reset is_zone for redirect.
- Style cleanup.

(cherry picked from commit a85cc641d7a4c66cbde03cc4e31edc038a24df46)
(cherry picked from commit 486a201149)
2019-04-25 15:59:43 +02:00
Matthijs MekkingandOndřej Surý a38d17dc1c Add test for nxdomain-redirect ncachenxdomain
(cherry picked from commit 2d65626630c19bb8159a025accb18e5179da5dc3)
(cherry picked from commit 05d29443eb)
2019-04-25 15:59:43 +02:00
Mark Andrews ef6001e055 Merge branch '992-fetchcount-increment-in-resume-qmin-v9_14' into 'v9_14'
When resuming from qname-minimization increase fetches-per-zone counters for the 'new' zone

See merge request isc-projects/bind9!1850
2019-04-23 21:14:40 -04:00
Witold KręcickiandMark Andrews 434ef46661 When resuming from qname-minimization increase fetches-per-zone counters for the 'new' zone
(cherry picked from commit 7043c6eaf5)
2019-04-24 11:03:37 +10:00
Mark Andrews 84a02a0ed7 Merge branch '995-dlz_open_driver-fix-build-failure-without-dlfcn-h-v9_14' into 'v9_14'
Resolve "dlz_open_driver: fix build failure without dlfcn.h"

See merge request isc-projects/bind9!1856
2019-04-23 21:00:55 -04:00
Mark Andrews c7bf78d52d add CHANGES
(cherry picked from commit 19e4098139)
2019-04-24 09:31:04 +10:00
Mark Andrews 0c5ab7563a conditionally include <dlfcn.h>
(cherry picked from commit eee8084734)
2019-04-24 09:31:04 +10:00
Mark Andrews d5ec990f18 Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys-v9_14' into 'v9_14'
Resolve "Wrong key id is displayed for RSAMD5 keys."

See merge request isc-projects/bind9!1853
2019-04-23 19:10:33 -04:00
Mark Andrews c15805d74d add CHANGES
(cherry picked from commit 11cddb689f)
2019-04-24 08:52:20 +10:00
Mark Andrews 1b432b3633 compute the RSAMD5 key id
(cherry picked from commit ffaa5a07dd)
2019-04-24 08:51:50 +10:00
Matthijs Mekking ae9c457878 Merge branch 'matthijs-fix-dnssec-test-intermittent-failure-kskonly-v9_14' into 'v9_14'
Fix dnssec test intermittent failure related to kskonly bugfix

See merge request isc-projects/bind9!1851
2019-04-23 11:25:39 -04:00
Matthijs Mekking f58a0bbcc1 Harden grep key ID calls
Key IDs may accidentally match dig output that is not the key ID (for
example the RRSIG inception or expiration time, the query ID, ...).
Search for key ID + signer name should prevent that, as that is what
only should occur in the RRSIG record, and signer name always follows
the key ID.

(cherry picked from commit 83473b9758)
2019-04-23 17:12:20 +02:00
Matthijs Mekking 5496b04829 Remove sleeps
Remove sleep calls from test, rely on wait_for_log().  Make
wait_for_log() and dnssec_loadkeys_on() fail the test if the
appropriate log line is not found.

Slightly adjust the echo_i() lines to print only the key ID (not the
key name).

(cherry picked from commit 67f0635f3c)
2019-04-23 17:12:11 +02:00
Michał Kępień 5bb8f501ee Merge branch 'michal/minor-nsupdate-system-test-tweaks-v9_14' into 'v9_14'
[v9_14] Minor "nsupdate" system test tweaks

See merge request isc-projects/bind9!1848
2019-04-23 09:20:07 -04:00
Michał Kępień 5bd52654e8 Wait more than 1 second for NSEC3 chain changes
One second may not be enough for an NSEC3 chain change triggered by an
UPDATE message to complete.  Wait up to 10 seconds when checking whether
a given NSEC3 chain change is complete in the "nsupdate" system test.

(cherry picked from commit f8746cddbc)
2019-04-23 14:59:22 +02:00
Michał Kępień 8691b38edf Remove redundant sleeps
In the "nsupdate" system test, do not sleep before checking results of
changes which are expected to be processed synchronously, i.e. before
nsupdate returns.

(cherry picked from commit 1c8e5ea333)
2019-04-23 14:59:22 +02:00
Mark Andrews 41af10f069 Merge branch 'cleanup-socket-references-v9_14' into 'v9_14'
use isc_refcount_decrement to decrement NEWCONNSOCK(dev)->references; use...

See merge request isc-projects/bind9!1845
2019-04-23 02:44:19 -04:00
Mark Andrews ca51ee2bb3 use isc_refcount_decrement to decrement NEWCONNSOCK(dev)->references; use isc_refcount_increment instead of isc_refcount_init in socket_create
(cherry picked from commit 265554f895)
2019-04-23 14:47:20 +10:00
Mark Andrews f5eae9d637 Merge branch 'clang-false-positive-v9_14' into 'v9_14'
add assertions to silence clang false positive

See merge request isc-projects/bind9!1844
2019-04-23 00:22:26 -04:00
Mark Andrews ff2c10cced add assertions to silence clang false positive
(cherry picked from commit bed9ad79ba)
2019-04-23 14:05:47 +10:00
Mark Andrews 8af9f59a58 Merge branch '962-bind-just-disables-gssapi-support-if-no-gssapi-krb5-headers-found-v9_14' into 'v9_14'
Resolve "Bind just disables GSSAPI support if no GSSAPI/KRB5 headers found"

See merge request isc-projects/bind9!1842
2019-04-22 23:17:02 -04:00
Mark Andrews eee13b7786 make 'configure --with-gssapi=yes' fatal if support is not found
(cherry picked from commit e420078c63)
2019-04-23 12:59:26 +10:00
Evan Hunt 6419622575 Merge branch '990-return-servfail-v9_14' into 'v9_14'
force SERVFAIL response in the gotanswer failure case

See merge request isc-projects/bind9!1841
2019-04-22 22:30:37 -04:00
Evan Hunt 358e37309c CHANGES
(cherry picked from commit 4d358c9bce)
2019-04-22 19:11:41 -07:00
Evan Hunt fcd2c2b644 force SERVFAIL response in the gotanswer failure case
- named could return FORMERR if parsing iterative responses
  ended with a result code such as DNS_R_OPTERR. instead of
  computing a response code based on the result, in this case
  we now just force the response to be SERVFAIL.

(cherry picked from commit 7402615697)
2019-04-22 19:11:41 -07:00
Mark Andrews 93af6cd40e Merge branch 'incorrect-use-of-bool-v9_14' into 'v9_14'
using 0 instead of false

See merge request isc-projects/bind9!1839
2019-04-22 22:06:57 -04:00
Mark Andrews d5d4ddd764 using 0 instead of false
(cherry picked from commit da7f683abf)
2019-04-23 11:45:33 +10:00
Michał Kępień 5ac1725b67 Merge branch 'michal/win32-system-test-fixes-v9_14' into 'v9_14'
[v9_14] Miscellaneous Windows system test fixes

See merge request isc-projects/bind9!1834
2019-04-19 05:52:15 -04:00
Michał Kępień f069aca7ed Update interface lists in ifconfig scripts
Make bin/tests/system/ifconfig.bat also configure addresses ending with
9 and 10, so that the script is in sync with its Unix counterpart.

Update comments listing the interfaces created by ifconfig.{bat,sh} so
that they do not include addresses whose last octet is zero (since an
address like 10.53.1.0/24 is not a valid host address and thus the
aforementioned scripts do not even attempt configuring them).

(cherry picked from commit b6c1cdfffe)
2019-04-19 11:29:29 +02:00
Michał Kępień 26907f1b0b Fix the "dnssec" system test on Windows
On Windows, the bin/tests/system/dnssec/signer/example.db.signed file
contains carriage return characters at the end of each line.  Remove
them before passing the aforementioned file to the awk script extracting
key IDs so that the latter can work properly.

(cherry picked from commit e4280ed9f5)
2019-04-19 11:29:24 +02:00
Michał Kępień 2c7e341bf3 Do not wait for lock file cleanup on Windows
As signals are currently not handled by named on Windows, instances
terminated using signals are not able to perform a clean shutdown, which
involves e.g. removing the lock file.  Thus, waiting for a given
instance's lock file to be removed beforing assuming it is shut down
is pointless on Windows, so do not even attempt it.

(cherry picked from commit 761ba4514f)
2019-04-19 11:28:05 +02:00
Michał Kępień aa5839b19c Merge branch '979-win32-remove-lock-file-upon-shutdown-v9_14' into 'v9_14'
[v9_14] win32: remove lock file upon shutdown

See merge request isc-projects/bind9!1832
2019-04-19 05:20:31 -04:00
Michał Kępień b45e5fc0c6 Add CHANGES entry
5214.	[bug]		win32: named now removes its lock file upon shutdown.
			[GL #979]

(cherry picked from commit e048436805)
2019-04-19 11:00:36 +02:00
Michał Kępień a228c5b7be win32: remove lock file upon shutdown
Upon named shutdown, the lock file should not just be unlocked but also
removed.

(cherry picked from commit c506077da5)
2019-04-19 11:00:35 +02:00
Michał Kępień f9b7e2834c Merge branch '978-win32-fix-service-state-reported-during-shutdown-v9_14' into 'v9_14'
[v9_14] win32: fix service state reported during shutdown

See merge request isc-projects/bind9!1830
2019-04-19 04:19:35 -04:00
Michał Kępień d79ad36b90 Add CHANGES entry
5213.	[bug]		win32: Eliminated a race which allowed named.exe running
			as a service to be killed prematurely during shutdown.
			[GL #978]

(cherry picked from commit e7332343ed)
2019-04-19 09:53:39 +02:00
Michał Kępień a8172d06cf win32: fix service state reported during shutdown
When a Windows service receives a request to stop, it should not set its
state to SERVICE_STOPPED until it is completely shut down as doing that
allows the operating system to kill that service prematurely, which in
the case of named may e.g. prevent the PID file and/or the lock file
from being cleaned up.

Set service state to SERVICE_STOP_PENDING when named begins its shutdown
and only report the SERVICE_STOPPED state immediately before exiting.

(cherry picked from commit 964749dfdb)
2019-04-19 09:38:45 +02:00
Ondřej Surý 1aeeb6ab85 Merge branch '989-check-for-typeof-extension-v9_14' into 'v9_14'
(v9_14) Use uintmax_t instead of typeof(x) in the ISC_ALIGN macro on non-GNUC systems

See merge request isc-projects/bind9!1827
2019-04-18 07:38:40 -04:00
Ondřej Surý 3349792aa3 On non-GNUC systems, use uintmax_t in the ISC_ALIGN macro
(cherry picked from commit 2e40cc94dc)
2019-04-18 13:17:21 +02:00
Ondřej Surý 5c1d831069 Merge branch 'ondrej/text-files-dont-need-copyright-v9_14' into 'v9_14'
(v9_14) Simple text files don't need copyright header

See merge request isc-projects/bind9!1822
2019-04-18 02:58:22 -04:00
Ondřej Surý c8e376af50 Simple text files with docs on build or design don't really need copyright on their own
(cherry picked from commit 1877139a32)
2019-04-18 08:56:01 +02:00
Ondřej Surý 9e44151d40 Merge branch 'ondrej/refactor-DNS_RDATASET_FIXED-code-flow-v9_14' into 'v9_14'
(v9_14) Refactor the DNS_RDATASET_FIXED code to use macros instead of ifdefs

See merge request isc-projects/bind9!1817
2019-04-17 05:53:58 -04:00
Ondřej Surý cd40d65e1b Refactor the DNS_RDATASET_FIXED code to use constants instead of ifdefs
(cherry picked from commit 4edbb773a1)
2019-04-17 11:34:17 +02:00
Matthijs Mekking d583362353 Merge branch '757-unsupported-algorithms-v9_14' into 'v9_14'
Resolve "Investigate and fix what happens when managed-key algorithm is not supported"

See merge request isc-projects/bind9!1816
2019-04-17 04:54:45 -04:00
Matthijs Mekking 30ec661356 Update CHANGES
(cherry picked from commit 768ded1102)
2019-04-17 10:36:20 +02:00
Matthijs Mekking b93cb57afe Add documentation
(cherry picked from commit a67dac5d21)
2019-04-17 10:35:33 +02:00
Matthijs Mekking d52bed8864 DLV tests unsupported/disabled algorithms
This tests both the cases when the DLV trust anchor is of an
unsupported or disabled algorithm, as well as if the DLV zone
contains a key with an unsupported or disabled algorithm.

(cherry picked from commit 3b7c849a3f)
2019-04-17 10:35:19 +02:00
Michał KępieńandMatthijs Mekking 3113dc24ec Move code handling key loading errors into a common function
Some values returned by dstkey_fromconfig() indicate that key loading
should be interrupted, others do not.  There are also certain subsequent
checks to be made after parsing a key from configuration and the results
of these checks also affect the key loading process.  All of this
complicates the key loading logic.

In order to make the relevant parts of the code easier to follow, reduce
the body of the inner for loop in load_view_keys() to a single call to a
new function, process_key().  Move dstkey_fromconfig() error handling to
process_key() as well and add comments to clearly describe the effects
of various key loading errors.

(cherry picked from commit b85007e0a6)
2019-04-17 10:35:07 +02:00
Matthijs Mekking a224bea4b2 Also ignore configured revoked trusted anchors
(cherry picked from commit 4d1ed1283a)
2019-04-17 10:34:54 +02:00
Matthijs Mekking a7c59e322b Ignore trust anchors using disabled algorithm
More specifically: ignore configured trusted and managed keys that
match a disabled algorithm.  The behavioral change is that
associated responses no longer SERVFAIL, but return insecure.

(cherry picked from commit 1d45ad8f39)
2019-04-17 10:33:25 +02:00
Matthijs Mekking 42c543bb85 Move algorithm variables, add disabled algorithms
Move from conf.sh.in to conf.sh.common as they will also need to be
added to conf.sh.win32.  Add variables for testing disabled
algorithms.

(cherry picked from commit 07c35f32f9)
2019-04-17 10:29:09 +02:00
Matthijs Mekking 96312dadc6 Add inline test related to unsupported algorithms
(cherry picked from commit 924fdad0e5)
2019-04-17 10:28:57 +02:00
Matthijs Mekking 5626c56862 System tests for tools and unsupported algorithms
(cherry picked from commit dfcf9bb0ed)
2019-04-17 10:28:40 +02:00
Evan Hunt ab125db998 Merge branch '817-out-of-zone-additional-v9_14' into 'v9_14'
out of zone additional data

See merge request isc-projects/bind9!1805
2019-04-15 14:54:58 -04:00
Evan Hunt 0d6a4f7a89 CHANGES
(cherry picked from commit 5071e43c19)
2019-04-15 11:38:28 -07:00
Evan Hunt 0ccddb2b0e revise "minimal-responses" documentation in the ARM
(cherry picked from commit b7e9115793)
2019-04-15 11:38:28 -07:00
Evan Hunt 19f249ffa5 if recursion is allowed and minimal-responses is no, search other databases
this restores functionality that was removed in commit 03be5a6b4e,
allowing named to search in authoritative zone databases outside the
current zone for additional data, if and only if recursion is allowed
and minimal-responses is disabled.

(cherry picked from commit 7fff3295f5)
2019-04-15 11:38:28 -07:00
Matthijs Mekking 7d7930cb82 Merge branch '763-matthijs-active-zsk-but-ksk-only-v9_14' into 'v9_14'
Don't sign DNKSEY RRset with ZSK if KSK is offline

See merge request isc-projects/bind9!1796
2019-04-12 06:02:16 -04:00
Matthijs Mekking f4dc62f33b With update-check-ksk also consider offline keys
The option `update-check-ksk` will look if both KSK and ZSK are
available before signing records.  It will make sure the keys are
active and available.  However, for operational practices keys may
be offline.  This commit relaxes the update-check-ksk check and will
mark a key that is offline to be available when adding signature
tasks.

(cherry picked from commit 3cb8c49c73)
2019-04-12 11:33:06 +02:00
Matthijs Mekking 244870844c Style: some curly brackets
(cherry picked from commit 2e83e3255a)
2019-04-12 11:33:06 +02:00
Matthijs Mekking 3e75bea995 Add detail on echo message in autosign test
(cherry picked from commit d330986374)
2019-04-12 11:33:06 +02:00
Matthijs Mekking 4dee3d149c Add test for ZSK rollover while KSK offline
This commit adds a lengthy test where the ZSK is rolled but the
KSK is offline (except for when the DNSKEY RRset is changed).  The
specific scenario has the `dnskey-kskonly` configuration option set
meaning the DNSKEY RRset should only be signed with the KSK.

A new zone `updatecheck-kskonly.secure` is added to test against,
that can be dynamically updated, and that can be controlled with rndc
to load the DNSSEC keys.

There are some pre-checks for this test to make sure everything is
fine before the ZSK roll, after the new ZSK is published, and after
the old ZSK is deleted.  Note there are actually two ZSK rolls in
quick succession.

When the latest added ZSK becomes active and its predecessor becomes
inactive, the KSK is offline.  However, the DNSKEY RRset did not
change and it has a good signature that is valid for long enough.
The expected behavior is that the DNSKEY RRset stays signed with
the KSK only (signature does not need to change).  However, the
test will fail because after reconfiguring the keys for the zone,
it wants to add re-sign tasks for the new active keys (in sign_apex).
Because the KSK is offline, named determines that the only other
active key, the latest ZSK, will be used to resign the DNSKEY RRset,
in addition to keeping the RRSIG of the KSK.

The question is: Why do we need to resign the DNSKEY RRset
immediately when a new key becomes active?  This is not required,
only once the next resign task is triggered the new active key
should replace signatures that are in need of refreshing.

(cherry picked from commit 8bc10bcf59)
2019-04-12 11:33:06 +02:00
Mark Andrews 72ba7d132d Merge branch '980-util-update_copyrights-now-needs-to-handle-files-with-cr-lf-endings-v9_14' into 'v9_14'
Resolve "util/update_copyrights now needs to handle files with CR LF endings."

See merge request isc-projects/bind9!1803
2019-04-12 00:50:03 -04:00
Mark Andrews a7e1a91a36 support files which have CR LF ending like those in win32utils
(cherry picked from commit e76936fd85)
2019-04-12 14:32:32 +10:00
Evan Hunt 7378ba8a80 Merge branch '963-dnstap-check-ra-v9_14' into 'v9_14'
dnstap: if recursion is not available, log queries as AQ instead of CQ

See merge request isc-projects/bind9!1799
2019-04-11 19:08:50 -04:00
Evan Hunt ded4650794 CHANGES 2019-04-11 15:48:50 -07:00
Evan Hunt f6c3b13522 dnstap: if recursion is not available, log queries as AQ instead of CQ
(cherry picked from commit 1f578cdb12)
2019-04-11 15:45:52 -07:00
Evan Hunt c675e366f2 Merge branch '972-auto-validation-summary-v9_14' into 'v9_14'
configure summary failed to report --disable-auto-validation correctly

See merge request isc-projects/bind9!1798
2019-04-11 13:05:00 -04:00
Evan Hunt 7b99a235a8 configure summary failed to report --disable-auto-validation correctly 2019-04-11 09:45:47 -07:00
Mark Andrews 57c8cb42db Merge branch '899-add-totext-fromtext-to-wirechecks-v9_14' into 'v9_14'
Run wire check through "totext" and "fromtext" methods including multi-line.

See merge request isc-projects/bind9!1789
2019-04-11 06:01:29 -04:00
Mark Andrews ad73e08b07 Add CHANGES
(cherry picked from commit 307a1b563b)
2019-04-11 19:47:44 +10:00
Mark Andrews b27ef87c38 Add debug printfs
(cherry picked from commit b78e128a2f)
2019-04-11 19:47:44 +10:00
Mark Andrews 86bb6e23ce Prevent WIRE_INVALID() being called without a argument
(cherry picked from commit e73a5b0ce3)
2019-04-11 19:47:44 +10:00
Mark Andrews 1eb7267e60 Check multi-line output from dns_rdata_tofmttext()
Check that multi-line output from dns_rdata_tofmttext() can be read
back in by dns_rdata_fromtext().

(cherry picked from commit b089f43b7a)
2019-04-11 19:47:44 +10:00
Mark Andrews 14c2db8c5d Process master file comments and make input invalid again
(cherry picked from commit 1a75a5cee6)
2019-04-11 19:47:43 +10:00
Mark Andrews 4395311280 Set 'specials' to match 'specials' in 'lib/dns/master.c'
(cherry picked from commit 7941a9554f)
2019-04-11 19:47:43 +10:00
Mark Andrews c5b191e78f Fix whitespace so that the names align
(cherry picked from commit cc5e16e4d3)
2019-04-11 19:47:43 +10:00
Mark Andrews 56a534ab06 Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire
Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire for
valid inputs to ensure that what we accept in dns_rdata_fromwire()
can be written out and read back in.

(cherry picked from commit 36f30f5731)
2019-04-11 19:47:43 +10:00
Mark Andrews 63b34486c1 Merge branch '965-delv-prints-weird-ttl-values-2-v9_14' into 'v9_14'
Test that dig and delve print correct TTL values.

See merge request isc-projects/bind9!1786
2019-04-10 02:01:08 -04:00
Mark Andrews fe0c131061 add CHANGES
(cherry picked from commit dfc485b02e)
2019-04-10 15:48:48 +10:00
Matthijs MekkingandMark Andrews 5b77d02cbb Check dig TTLs.
This also fixes a bug in the tests ($n was not incremented in one
place).

(cherry picked from commit 195277ca6d)
2019-04-10 15:48:48 +10:00
Mark Andrews f471907db8 Check delv TTLs.
(cherry picked from commit 146202d6a8)
2019-04-10 15:48:48 +10:00
Mark Andrews 6ba7607283 Merge branch '965-delv-prints-weird-ttl-values-v9_14' into 'v9_14'
Initialise view->mincachettl and view->minncachettl to zero in dns_view_create.

See merge request isc-projects/bind9!1785
2019-04-10 01:20:45 -04:00
Mark Andrews dad1a49e4e Add CHANGES.
(cherry picked from commit 538da8c80d)
2019-04-10 15:08:33 +10:00
Mark Andrews 10fba8fd8d Initialise mincachettl and minncachettl to zero in dns_view_create.
(cherry picked from commit 8fd4308bda)
2019-04-10 15:08:33 +10:00
Mark Andrews 3818f05513 Merge branch '899-enforce-hash-in-ds-v9_14' into 'v9_14'
enforce DS hash exists

See merge request isc-projects/bind9!1783
2019-04-10 01:03:30 -04:00
Mark Andrews 92bb35b2f5 add CHANGES
(cherry picked from commit 97b7360ce1)
2019-04-10 14:44:05 +10:00
Mark Andrews 480bcb314d add ds unit test
(cherry picked from commit 6eb28eda1e)
2019-04-10 14:44:05 +10:00
Mark Andrews b24c128a2c enforce DS hash exists
(cherry picked from commit b274f3fad7)
2019-04-10 14:44:05 +10:00
Mark Andrews 4b3df7b577 Merge branch '852-run-fromtext-through-fromwire-v9_14' into 'v9_14'
check that from fromtext produces valid towire input

See merge request isc-projects/bind9!1780
2019-04-09 23:36:54 -04:00
Mark Andrews 2e7a18fb3c add CHANGES
(cherry picked from commit d712b88048)
2019-04-10 13:24:17 +10:00
Mark Andrews d006ae2195 check that from fromtext produces valid towire input
(cherry picked from commit 7b0a653858)
2019-04-10 13:24:17 +10:00
Ondřej Surý 25b1635310 Merge branch '971-downgrade-DLZ_DBCLIENTINFO_VERSION-in-dlz_minimal.h-v9_14' into 'v9_14'
Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c

See merge request isc-projects/bind9!1778
2019-04-09 15:39:25 -04:00
Ondřej Surý 69e218ea45 Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c
(cherry picked from commit a6f09b2255)
2019-04-09 20:25:53 +01:00
Mark Andrews e09a3f0a2b Merge branch '899-fromwire-check-flags-for-nokey-v9_14' into 'v9_14'
Check KEY flags for empty key in fromwire method

See merge request isc-projects/bind9!1776
2019-04-09 00:49:12 -04:00
Mark Andrews 3c32b765c1 add CHANGES
(cherry picked from commit f78c688c4f)
2019-04-09 14:22:50 +10:00
Mark Andrews 53a62e2977 for rkey flags MUST be zero
(cherry picked from commit 82d4931440)
2019-04-09 14:22:50 +10:00
Mark Andrews 07d024a4da check flags for no key in fromwire for *KEY
(cherry picked from commit 2592e91516)
2019-04-09 14:22:50 +10:00
Mark Andrews 356bf021e2 Merge branch '976-dns-ecs-h-missing-isc_lang_enddecls-v9_14' into 'v9_14'
Resolve "dns/ecs.h missing ISC_LANG_ENDDECLS"

See merge request isc-projects/bind9!1775
2019-04-08 22:19:11 -04:00
Mark Andrews 14313d798a <dns/ecs.h> was missing ISC_LANG_ENDDECLS.
(cherry picked from commit 698a6f955e)
2019-04-09 12:05:57 +10:00
Evan Hunt e5de594ddb Merge branch '973-pause-dbiterator-in-rpz-v9_14' into 'v9_14'
Fix deadlock in RPZ update code.

See merge request isc-projects/bind9!1772
2019-04-06 15:55:03 -04:00
Witold KręcickiandEvan Hunt 6e63d7047d Fix deadlock in RPZ update code.
In dns_rpz_update_from_db we call setup_update which creates the db
iterator and calls dns_dbiterator_first. This unpauses the iterator and
might cause db->tree_lock to be acquired. We then do isc_task_send(...)
on an event to do quantum_update, which (correctly) after each iteration
calls dns_dbiterator_pause, and re-isc_task_sends itself.

That's an obvious bug, as we're holding a lock over an async task send -
if a task requesting write (e.g. prune_tree) is scheduled on the same
workers queue as update_quantum but before it, it will wait for the
write lock indefinitely, resulting in a deadlock.

To fix it we have to pause dbiterator in setup_update.

(cherry picked from commit 06021b3529)
2019-04-06 12:41:36 -07:00
Witold Krecicki 5ca807d65d Merge branch '966-resume-qmin-shuttingdown-v9_14' into 'v9_14'
Resolve "Crash in resolver code"

See merge request isc-projects/bind9!1766
2019-04-03 10:57:36 -04:00
Witold Kręcicki 4df48b84c1 CHANGES
(cherry picked from commit d11791e24c)
2019-04-03 16:34:33 +02:00
Witold Kręcicki 9ff296afeb In resume_qmin check if the fetch context is already shutting down - if so, try to destroy it, don't continue
(cherry picked from commit 7c960e89ea)
2019-04-03 16:34:33 +02:00
Michał Kępień 4024dac62b Merge branch '893-do-not-rely-on-default-dig-options-in-system-tests-v9_14' into 'v9_14'
[v9_14] Do not rely on default dig options in system tests

See merge request isc-projects/bind9!1764
2019-04-03 07:21:57 -04:00
Michał Kępień 915f94a6a3 Do not rely on default dig options in system tests
Some system tests assume dig's default setings are in effect.  While
these defaults may only be silently overridden (because of specific
options set in /etc/resolv.conf) for BIND releases using liblwres for
parsing /etc/resolv.conf (i.e. BIND 9.11 and older), it is arguably
prudent to make sure that tests relying on specific +timeout and +tries
settings specify these explicitly in their dig invocations, in order to
prevent test failures from being triggered by any potential changes to
current defaults.

(cherry picked from commit b6cce0fb8b)
2019-04-03 12:57:45 +02:00
Mark Andrews cabee6b765 Merge branch '920-see-problem-when-multiple-sigs-with-besteffort-parsing-v9_14' into 'v9_14'
Address problems with best effort parsing.

See merge request isc-projects/bind9!1752
2019-03-26 06:46:09 -04:00
Mark Andrews ffdd736b63 add CHANGES
(cherry picked from commit b779342017)
2019-03-26 21:32:08 +11:00
Witold KręcickiandMark Andrews 69d3bb78c2 Fix assertion failure in nslookup/dig/mdig when message has multiple SIG(0) options.
When parsing message with DNS_MESSAGE_BESTEFFORT (used exclusively in
tools, never in named itself) if we hit an invalid SIG(0) in wrong
place we continue parsing the message, and put the sig0 in msg->sig0.
If we then hit another sig0 in a proper place we see that msg->sig0
is already 'taken' and we don't free name and rdataset, and we don't
set seen_problem. This causes an assertion failure.
This fixes that issue by setting seen_problem if we hit second sig0,
tsig or opt, which causes name and rdataset to be always freed.

(cherry picked from commit 51a55ddbb7)
2019-03-26 21:32:08 +11:00
Mark Andrews ddfd5be3b7 Merge branch '955-make-install-fails-after-configure-with-dlopen-no-v9_14' into 'v9_14'
Resolve "`make install` fails after ./configure --with-dlopen=no"

See merge request isc-projects/bind9!1750
2019-03-26 05:09:06 -04:00
Mark Andrews 7a0f39b848 add CHANGES
(cherry picked from commit bd670d4a04)
2019-03-26 19:54:40 +11:00
Mark Andrews 8c2a3b03f4 fix plugin installation
(cherry picked from commit cd3593c38d)
2019-03-26 19:54:39 +11:00
Evan Hunt e1240eaa2e Merge branch 'each-merge-9140-doc' into 'v9_14'
merge version updates for 9.14.0rc3 and 9.14.0

See merge request isc-projects/bind9!1748
2019-03-22 13:35:42 -04:00
Tinderbox UserandEvan Hunt 684f90a674 doc rebuild 2019-03-22 10:35:15 -07:00
Tinderbox UserandEvan Hunt e6225b210b prep 9.14.0 2019-03-22 10:35:15 -07:00
Tinderbox UserandEvan Hunt 19c53595ff doc rebuild 2019-03-22 10:35:15 -07:00
Tinderbox UserandEvan Hunt 2d36283bc1 prep 9.14.0rc3 2019-03-22 10:35:15 -07:00
Tinderbox UserandEvan Hunt fdeb694c1e doc rebuild 2019-03-22 10:35:15 -07:00
Tinderbox UserandEvan Hunt fc43fe565a prep 9.14.0rc2 2019-03-22 10:35:15 -07:00
Ondřej Surý 9cfcce0858 Merge branch '4-make-dnstap.pb-c.h-private-v9_14' into 'v9_14'
(v9_14) Make lib/dns/dnstap.pb-c.h header a private to lib/dns

See merge request isc-projects/bind9!1745
2019-03-22 07:20:10 -04:00
Ondřej Surý 7485a4332e Make lib/dns/dnstap.pb-c.h private header
This changes dns_dtdata struct to not expose data types from dnstap.pb-c.h to
prevent the need for including this header where not really needed.

(cherry picked from commit 8ccce7e24b)
2019-03-22 12:07:31 +01:00
Evan Hunt ffb950c8ae Merge branch '913-allow-update-v9_14' into 'v9_14'
restore inheritance of 'allow-update' and 'allow-update-forwarding'

See merge request isc-projects/bind9!1743
2019-03-22 03:29:39 -04:00
Evan Hunt 6b09e885b8 CHANGES, release notes
(cherry picked from commit 55a7961cf3)
2019-03-22 00:15:22 -07:00
Evan Hunt dde35a8edf don't fail when allow-update{,-forwarding} is used globally
(cherry picked from commit 91dca0f8da)
2019-03-22 00:14:52 -07:00
Mark Andrews a31960314a Merge branch '899-zonemd-check-for-hash-existence-v9_14' into 'v9_14'
zonemd require non empty hash

See merge request isc-projects/bind9!1740
2019-03-21 16:10:49 -04:00
Mark Andrews 5125a367ad add CHANGES
(cherry picked from commit e1db1b8dcb)
2019-03-22 06:52:10 +11:00
Mark Andrews 753d77c51f Disallow empty ZONEMD hashes
This change is the result of discussions with the authors of
draft-wessels-dns-zone-digest.

(cherry picked from commit 473987d8d9)
2019-03-22 06:52:10 +11:00
Mark Andrews e4bd0c00e2 Merge branch '899-eid-totext-is-broken-v9_14' into 'v9_14'
EID and NIMLOC totext is broken.

See merge request isc-projects/bind9!1736
2019-03-21 05:40:45 -04:00
Mark Andrews 2818a83df9 add CHANGES
(cherry picked from commit c20b89fcf8)
2019-03-21 20:26:29 +11:00
Mark Andrews c52dfb2063 add brackets for multi-line output
(cherry picked from commit 40a770b932)
2019-03-21 20:26:02 +11:00
Michał Kępień 8b047466c9 Merge branch 'michal/fix-key-id-extraction-in-the-dnssec-system-test-v9_14' into 'v9_14'
[v9_14] Fix key ID extraction in the "dnssec" system test

See merge request isc-projects/bind9!1734
2019-03-21 03:35:54 -04:00
Michał Kępień d14d661c20 Fix key ID extraction in the "dnssec" system test
Simply looking for the key ID surrounded by spaces in the tested
dnssec-signzone output file is not a precise enough method of checking
for signatures prepared using a given key ID: it can be tripped up by
cross-algorithm key ID collisions and certain low key IDs (e.g. 60, the
TTL specified in bin/tests/system/dnssec/signer/example.db.in), which
triggers false positives for the "dnssec" system test.  Make key ID
extraction precise by using an awk script which operates on specific
fields.

(cherry picked from commit a40c60e4c1)
2019-03-21 08:10:47 +01:00
Michał Kępień 7046195e23 Merge branch 'michal/minor-mirror-system-test-tweaks-v9_14' into 'v9_14'
[v9_14] Minor "mirror" system test tweaks

See merge request isc-projects/bind9!1726
2019-03-20 05:09:21 -04:00
Michał Kępień 689f5aef5a Increase dig query timeout to 2 seconds
The "mirror" system test expects all dig queries (including recursive
ones) to be responded to within 1 second, which turns out to be overly
optimistic in certain cases and leads to false positives being
triggered.  Increase dig query timeout used throughout the "mirror"
system test to 2 seconds in order to alleviate the issue.

(cherry picked from commit 73afbdc552)
2019-03-20 09:51:18 +01:00
Michał Kępień 78cce30893 Increase TAT query interval
Currently, ns3 in the "mirror" system test sends trust anchor telemetry
queries every second as it is started with "-T tat=1".  Given the number
of trust anchors configured on ns3 (9), TAT-related traffic clutters up
log files, hindering troubleshooting efforts.  Increase TAT query
interval to 3 seconds in order to alleviate the issue.

Note that the interval chosen cannot be much higher if intermittent test
failures are to be avoided: TAT queries are only sent after the
configured number of seconds passes since resolver startup.  Quick
experiments show that even on contemporary hardware, ns3 should be
running for at least 5 seconds before it is first shut down, so a
3-second TAT query interval seems to be a reasonable, future-proof
compromise.  Ensure the relevant check is performed before ns3 is first
shut down to emphasize this trade-off and make it more clear by what
time TAT queries are expected to be sent.

(cherry picked from commit 6847a29b54)
2019-03-20 09:51:18 +01:00
Ondřej Surý 31a2a00c64 Merge branch '4-update-gitignore-for-future-automake-v9_14' into 'v9_14'
(v9_14) Update and sort the top level .gitignore to ignore automake files

See merge request isc-projects/bind9!1728
2019-03-20 04:45:11 -04:00
Ondřej Surý 514ed3d0fa Sort the top level .gitignore file
(cherry picked from commit b9d524ed7e)
2019-03-20 09:25:07 +01:00
Ondřej Surý 03a7e521df Update top level .gitignore to ignore automake files
(cherry picked from commit 5c67d1d120)
2019-03-20 09:25:07 +01:00
Michał Kępień cab6c2ff01 Merge branch 'michal/serve-stale-system-test-wait-for-dump-completion-v9_14' into 'v9_14'
[v9_14] "serve-stale" system test: wait until "rndc dumpdb" completes

See merge request isc-projects/bind9!1725
2019-03-20 04:08:05 -04:00
Michał Kępień a61cc8cffe Wait until "rndc dumpdb" completes
"rndc dumpdb" works asynchronously, i.e. the requested dump may not yet
be fully written to disk by the time "rndc" returns.  Prevent false
positives for the "serve-stale" system test by only checking dump
contents after the line indicating that it is complete is written.

(cherry picked from commit 6e3f812afc)
2019-03-20 08:48:25 +01:00
Michał Kępień e677397e19 Merge branch '944-make-stop.pl-wait-for-lock-file-cleanup-v9_14' into 'v9_14'
[v9_14] Make stop.pl wait for lock file cleanup

See merge request isc-projects/bind9!1710
2019-03-19 06:18:36 -04:00
Michał Kępień a226afa2a6 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".

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 10:28:54 +01:00
Michał Kępień 1119cccf99 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:54 +01:00
Evan Hunt 6fd2475f3e Merge branch '945-remove-revoked-root-key-from-bind-keys-v9_14' into 'v9_14'
Resolve "Remove revoked root key from bind.keys."

See merge request isc-projects/bind9!1708
2019-03-19 00:23:16 -04:00
Mark AndrewsandEvan Hunt 3954d4ec30 Remove revoked root DNSKEY from bind.keys.
(cherry picked from commit 0e805b58e8)
2019-03-18 21:21:39 -07:00
Mark Andrews 8c0a0011f4 Merge branch '940-unit-dnstap-pkcs11-tz-v9_14' into 'v9_14'
Fix regression in dnstap_test with native pkcs11

See merge request isc-projects/bind9!1700
2019-03-15 01:37:53 -04:00
Mark Andrews b1c658b850 add CHANGES
(cherry picked from commit 788f784191)
2019-03-15 16:17:52 +11:00
Petr MenšíkandMark Andrews 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 AndrewsandEvan Hunt b30e5f11fb force promotion to unsigned int
(cherry picked from commit 1eba2c5b06)
2019-03-14 13:51:30 -07:00
Mark AndrewsandEvan Hunt 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 AndrewsandEvan Hunt 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 AndrewsandEvan Hunt 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 AndrewsandEvan Hunt 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 FinchandMark Andrews 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ęcickiandEvan Hunt 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ęcickiandEvan Hunt ec8621ae10 CHANGES
(cherry picked from commit 50f6054294)
2019-03-12 11:55:04 -07:00
Witold KręcickiandEvan Hunt 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šíkandMark Andrews 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 AndrewsandEvan Hunt 7dcee14699 add CHANGES
(cherry picked from commit ad785e4f93)
2019-03-11 11:22:13 -07:00
Mark AndrewsandEvan Hunt 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 AndrewsandMichał Kępień 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 FinchandMark Andrews 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
Mark Andrews 8faca93b37 #include <limits.h> for PATH_MAX, define if not found
(cherry picked from commit 1fc7be36eb)
2019-03-08 18:23:59 +11:00
Evan Hunt 06d2cb71da Merge branch 'each-silence-warning-v9_14' into 'v9_14'
silence a warning about potential snprintf overrun

See merge request isc-projects/bind9!1633
2019-03-08 01:16:42 -05:00
Evan Hunt e2ee2e9e0b silence a warning about potential snprintf overrun
(cherry picked from commit 7f26cad247)
2019-03-07 21:46:50 -08:00
Evan Hunt 61339e91ea Merge branch '902-hang-when-unexpected-errno-encountered-during-log-rename-v9_14' into 'v9_14'
Resolve "Hang when unexpected errno encountered during log rename"

See merge request isc-projects/bind9!1631
2019-03-08 00:44:04 -05:00
Mark AndrewsandEvan Hunt cdf928d391 Handle EDQUOT and ENOSPC errors
(cherry picked from commit 435ae2f29a)
2019-03-07 21:23:39 -08:00
Evan Hunt 5bb39746a1 Merge branch '884-patches-to-review-3-v9_14' into 'v9_14'
fix the use of dns_wildcardname as an optimisation in DLZ

See merge request isc-projects/bind9!1629
2019-03-07 23:39:30 -05:00
Mark AndrewsandEvan Hunt c1489dfa4f fix the use of dns_wildcardname as an optimisation in DLZ
(cherry picked from commit cb32cd98bd)
2019-03-07 20:27:57 -08:00
Evan Hunt 8b1e4ec8e9 Merge branch 'ckb-statistics-test-nit-v9_14' into 'v9_14'
the wrong variable was used to count the test cases in one place.

See merge request isc-projects/bind9!1627
2019-03-07 21:54:20 -05:00
Curtis BlackburnandEvan Hunt e58a77043c the wrong variable was used to count the test cases in one place.
(cherry picked from commit 4f60a84e34)
2019-03-07 18:42:14 -08:00
Mark Andrews ee9d1eca72 Merge branch '927-teach-clang-that-_fail-does-not-return-v9_14' into 'v9_14'
Resolve "teach clang that _fail() does not return."

See merge request isc-projects/bind9!1626
2019-03-07 20:26:08 -05:00
Mark Andrews c117605812 add noreturn attribute
(cherry picked from commit 3f2b7e1006)
2019-03-08 12:13:18 +11:00
Evan Hunt f13692afcf Merge branch '865-option-to-disable-information-leak-on-rpz-rewrites-isc-support-14178-v9_14' into 'v9_14'
Resolve "Option to disable information leak on RPZ rewrites [ISC-support

See merge request isc-projects/bind9!1623
2019-03-07 16:41:31 -05:00
Mark AndrewsandEvan Hunt d76b2147a8 CHANGES, release note
(cherry picked from commit 89234643e1)
2019-03-07 13:29:37 -08:00
Evan Hunt e152529fb7 disable a previously broken test under dnsrps
(cherry picked from commit aeed047495)
2019-03-07 13:29:11 -08:00
Mark AndrewsandEvan Hunt edc607bced add the ability to control whether SOA records are added response-policy modified answers
(cherry picked from commit d1fa8be611)
2019-03-07 13:29:11 -08:00
Evan Hunt b3e152610d Merge branch 'each-notes-914' into 'v9_14'
clear out 9.14.0 release notes

See merge request isc-projects/bind9!1622
2019-03-07 14:34:27 -05:00
Evan Hunt 5d09223874 clear out release notes from 9.14.0 to prepare the ground for 9.14.1 2019-03-07 11:11:15 -08:00
Evan Hunt 56e4b5c9dd Merge branch '882-zone-data-cannot-be-loaded-with-dnssec-coverage-v9_14' into 'v9_14'
Resolve "Zone data cannot be loaded with dnssec-coverage"

See merge request isc-projects/bind9!1619
2019-03-06 23:58:34 -05:00
Evan Hunt 36d91876bf add CHANGES
(cherry picked from commit 57e44efc73)
2019-03-06 20:41:23 -08:00
Mark AndrewsandEvan Hunt 4a46242ed2 explicitly convert byte to string
(cherry picked from commit ec3d830bc5)
2019-03-06 20:41:09 -08:00
Mark Andrews 5b27d26909 Merge branch 'u/fanf2/man-dnssec-keygen-v9_14' into 'v9_14'
cleanup dnssec-keygen manual page

See merge request isc-projects/bind9!1616
2019-03-06 19:15:23 -05:00
Tony FinchandMark Andrews 7ddd24ba97 cleanup dnssec-keygen manual page
Alphabetize options and synopsis; remove spurious -z from synopsis;
remove remnants of deprecated -k option; remove mention of long-gone
TSIG support; refer to -T KEY in options that are only relevant to
pre-RFC3755 DNSSEC; remove unnecessary -n ZONE from the example, and
add a -f KSK example.

(cherry picked from commit 1954f8d2bf)
2019-03-07 11:14:55 +11:00
Mark Andrews 9d3eb872d0 Merge branch '926-statschannel-system-tests-fails-json-only-no-libxml-v9_14' into 'v9_14'
Resolve "statschannel system tests fails json only (no libxml)"

See merge request isc-projects/bind9!1615
2019-03-06 19:02:59 -05:00
Mark Andrews ef46f75066 add CHANGES
(cherry picked from commit 5bc06a0a11)
2019-03-07 10:45:04 +11:00
Mark Andrews 98fd813532 remove dependancy on libxml
(cherry picked from commit a9c47414b3)
2019-03-07 10:44:11 +11:00
Evan Hunt be60fedced Merge branch '874-fix-race-in-socket-code-v9_14' into 'v9_14'
Fix a race in socket code

See merge request isc-projects/bind9!1613
2019-03-06 17:33:11 -05:00
Evan Hunt 71adab3f4a CHANGES
(cherry picked from commit 6d24292830)
2019-03-06 14:15:19 -08:00
Witold KręcickiandEvan Hunt 54f9c1d306 Fix a race in socket code when internal_{accept, send, receive} is called
from event loop on an socket and, in the meantime, someone has closed this
socket.

(cherry picked from commit b57a38ae43)
2019-03-06 14:15:19 -08:00
Evan Hunt c2fb1f8853 Merge branch 'michal/log-plugin-unloading-at-debug-level-v9_14' into 'v9_14'
Log plugin unloading at debug level

See merge request isc-projects/bind9!1612
2019-03-06 16:07:57 -05:00
Michał KępieńandEvan Hunt 9036952f84 Log plugin unloading at debug level
During server reconfiguration, plugin instances set up for the old views
are unloaded very close to the end of the whole process, after new
plugin instances are set up.  As the log message announcing plugin
unloading is emitted at the default "info" level, the user might be
misled into thinking that it is the new plugin instances that are being
unloaded for some reason, particularly because all other messages logged
at the "info" level around the same time inform about setting things up
rather than tearing them down.  Since no distinction is currently made
between destroying a view due to reconfiguration and due to a shutdown
in progress, there is no easy way to vary the contents of the log
message depending on circumstances.  Since this message is not a
particularly critical one, demote it to debug level to prevent
confusion.

(cherry picked from commit af4b81f944)
2019-03-06 12:55:29 -08:00
Michał Kępień 3e676b0d65 Merge branch '905-make-nsupdate-use-os-supplied-ephemeral-port-range-v9_14' into 'v9_14'
[v9_14] Make nsupdate use OS-supplied ephemeral port range

See merge request isc-projects/bind9!1609
2019-03-06 08:27:40 -05:00
Michał Kępień 0a5a0a5e97 Add CHANGES entry
5172.	[bug]		nsupdate now honors the operating system's preferred
			ephemeral port range. [GL #905]

(cherry picked from commit 0e64948274)
2019-03-06 14:03:37 +01:00
Michał Kępień a553168786 Make nsupdate use OS-supplied ephemeral port range
Make nsupdate 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 06f582f23e)
2019-03-06 14:03:36 +01:00
Evan Hunt d4d89a18af Merge branch '878-install-named-plugins-into-a-separate-directory-v9_14' into 'v9_14'
Install named plugins into a separate directory

See merge request isc-projects/bind9!1605
2019-03-05 20:04:27 -05:00
Michał KępieńandEvan Hunt f1f695ef5a Add CHANGES entry
5161.	[func]		named plugins are now installed into a separate
			directory.  Supplying a filename (a string without path
			separators) in a "plugin" configuration stanza now
			causes named to look for that plugin in that directory.
			[GL #878]

(cherry picked from commit d2c960cfc2)
2019-03-05 16:52:49 -08:00
Michał KępieńandEvan Hunt 1865264426 Add -c to usage message for named-checkconf
Add the -c command line option to the usage message for named-checkconf
as it is not present there despite being documented.

(cherry picked from commit cba155154b)
2019-03-05 16:52:49 -08:00
Michał KępieńandEvan Hunt 9b72458b1e Look for named plugins in ${libdir}/named
When the "library" part of a "plugin" configuration stanza does not
contain at least one path separator, treat it as a filename and assume
it is a name of a shared object present in the named plugin installation
directory.  Absolute and relative paths can still be used and will be
used verbatim.  Get the full path to a plugin before attempting to
check/register it so that all relevant log messages include the same
plugin path (apart from the one logged when the full path cannot be
determined).

(cherry picked from commit 1a9fc624ca)
2019-03-05 16:52:49 -08:00
Michał KępieńandEvan Hunt 3883acc5c2 Add ns_plugin_expandpath()
Implement a helper function which, given an input string:

  - copies it verbatim if it contains at least one path separator,
  - prepends the named plugin installation directory to it otherwise.

This function will allow configuration parsing code to conveniently
determine the full path to a plugin module given either a path or a
filename.

While other, simpler ways exist for making sure filenames passed to
dlopen() cause the latter to look for shared objects in a specific
directory, they are very platform-specific.  Using full paths is thus
likely the most portable and reliable solution.

Also added unit tests for ns_plugin_expandpath() to ensure it behaves
as expected for absolute paths, relative paths, and filenames, for
various target buffer sizes.

(Note: plugins share a directory with named on Windows; there is no
default plugin path. Therefore the source path is copied to the
destination path with no modification.)

(cherry picked from commit d181c28c60)
2019-03-05 16:52:49 -08:00
Michał KępieńandEvan Hunt 4ddfaeea3e Install named plugins into a separate directory
Installing named plugins into ${libdir} clutters the latter and is not
in line with common filesystem conventions.  Instead, install named
plugins into a separate directory, ${libdir}/named.

(cherry picked from commit c527b7fd5c)
2019-03-05 16:52:49 -08:00
Evan Hunt 017b190bdb Merge branch '909-add-explicit-link-check-for-libatomic-v9_14' into 'v9_14'
Add explicit check for libatomic to fix configure step on NetBSD

See merge request isc-projects/bind9!1604
2019-03-05 18:41:55 -05:00
Ondřej SurýandEvan Hunt 919dc5dd42 Add information about NetBSD 6 compilation on i386
(cherry picked from commit 9a16e0a5ae)
2019-03-05 15:24:05 -08:00
Ondřej SurýandEvan Hunt c7d164fad5 Add explicit check for libatomic
(cherry picked from commit fcade0610f)
2019-03-05 15:24:04 -08:00
Mark Andrews 1d8682d429 Merge branch '919-add-win32util-configure-file-list-check-to-ci-v9_14' into 'v9_14'
Resolve "Add win32util/Configure file list check to CI"

See merge request isc-projects/bind9!1602
2019-03-05 17:41:46 -05:00
Mark Andrews 3b6de8e0c1 remove '..\\bin\\tests\\system\\dlz\\prereq.sh' from win32util/Configure
(cherry picked from commit 442421906b)
2019-03-05 17:41:33 -05:00
Mark Andrews cb1006d95d add util/check-win32util-configure to precheck
(cherry picked from commit c3dd8bb9f0)
2019-03-05 17:41:33 -05:00
Evan Hunt 8c32b70956 Merge branch '884-patches-to-review-4-v9_14' into 'v9_14'
dlz filesystem driver failed to properly detect period at end of filename.

See merge request isc-projects/bind9!1600
2019-03-05 17:40:01 -05:00
Mark AndrewsandEvan Hunt b12970046a properly detect period as last character in filename
(cherry picked from commit c9dc59eb90)
2019-03-05 14:22:36 -08:00
Evan Hunt 4b0eaf7267 Merge branch 'michal/disable-servfail-cache-for-ns5-in-the-mkeys-system-test-v9_14' into 'v9_14'
Disable SERVFAIL cache for ns5 in the "mkeys" system test

See merge request isc-projects/bind9!1598
2019-03-05 16:40:49 -05:00
Michał KępieńandEvan Hunt e4a544e989 Disable SERVFAIL cache for ns5 in the "mkeys" system test
The "check key refreshes are resumed after root servers become
available" check may trigger a false positive for the "mkeys" system
test if the second example/TXT query sent by dig is received by ns5 less
than a second after it receives a REFUSED response to the upstream query
it sends to ns1 in order to resolve the first example/TXT query sent by
dig.  Since that REFUSED response from ns1 causes ns5 to return a
SERVFAIL answer to dig, example/TXT is added to the SERVFAIL cache,
which is enabled by default with a TTL of 1 second.  This in turn may
cause ns5 to return a cached SERVFAIL response to the second example/TXT
query sent by dig, i.e. make ns5 not perform full query processing as
expected by the check.

Since the primary purpose of the check in question is to ensure that key
refreshes are resumed once initially unavailable root servers become
available, the optimal solution appears to be disabling SERVFAIL cache
for ns5 as doing that still allows the check to fulfill its purpose and
it is arguably more prudent than always sleeping for 1 second.

(cherry picked from commit 7c6bff3c4e)
2019-03-05 13:25:04 -08:00
Evan Hunt 60beddf87f Merge branch '889-improve-clang-cmocka-interaction-v9_14' into 'v9_14'
Resolve "Improve clang/cmocka interaction."

See merge request isc-projects/bind9!1596
2019-03-05 14:01:37 -05:00
Mark AndrewsandEvan Hunt 7c78e5b90a improve clang / cmocka integration
(cherry picked from commit cb913177ae)
2019-03-05 10:42:01 -08:00
Matthijs Mekking 3ca83c19d9 Merge branch 'matthijs-more-clean.sh-related-cleanups-v9_14' into 'v9_14'
More clean.sh related cleanups

See merge request isc-projects/bind9!1592
2019-03-04 11:30:16 -05:00
Matthijs Mekking 8578d11ca7 Ensure all system tests run clean.sh from setup.sh
For consistency between all system tests, add missing setup.sh scripts
for tests which do not have one yet and ensure every setup.sh script
calls its respective clean.sh script.
2019-03-04 16:58:40 +01:00
Matthijs Mekking 00d04b28c2 Only perform test cleanups in clean.sh scripts
Temporary files created by a given system test should be removed by its
clean.sh script, not its setup.sh script.  Remove redundant "rm"
invocations from setup.sh scripts.  Move required "rm" invocations from
setup.sh scripts to their corresponding clean.sh scripts.
2019-03-04 16:58:30 +01:00
Mark Andrews 4e800096e6 Merge branch 'feature/featuretest-dlz-v9_14' into 'v9_14'
Test dlz support in feature-test

See merge request isc-projects/bind9!1588
2019-03-03 22:26:30 -05:00
Mark Andrews f9920f62c4 add CHANGES
(cherry picked from commit 5f125df462)
2019-03-04 14:08:21 +11:00
Mark Andrews 25e4ebaba6 run autoheader and autoconf
(cherry picked from commit 4988367b53)
2019-03-04 14:08:19 +11:00
Petr MenšíkandMark Andrews 3c29d47797 Support DLZ filesystem detection in feature-test
Do not use variable from configure to detect the feature.

(cherry picked from commit 759a7b4ce3)
2019-03-04 14:06:38 +11:00
Michał Kępień 6fd9415350 Merge branch 'michal/fix-ip-regex-used-in-the-resolver-system-test-v9_14' into 'v9_14'
[v9_14] Fix IP regex used in the "resolver" system test

See merge request isc-projects/bind9!1583
2019-03-01 01:55:45 -05:00
Michał Kępień 06b36db554 Fix IP regex used in the "resolver" system test
If dots are not escaped in the "1.2.3.4" regular expressions used for
checking whether IP address 1.2.3.4 is present in the tested resolver's
answers, a COOKIE that matches such a regular expression will trigger a
false positive for the "resolver" system test.  Properly escape dots in
the aforementioned regular expressions to prevent that from happening.

(cherry picked from commit 70ae48e5cb)
2019-03-01 07:53:27 +01:00
Evan Hunt 3761db36e8 Merge branch '901-empty-any-v9_14' into 'v9_14'
handle empty ANY query responses

See merge request isc-projects/bind9!1581
2019-02-28 19:24:52 -05:00
Evan Hunt 778cfd3a98 CHANGES 2019-02-28 16:07:41 -08:00
Evan Hunt 8431d18426 test correct occlusion of DNSSEC records
(cherry picked from commit c6939f0bd4)
2019-02-28 16:06:38 -08:00
Evan Hunt ed72b9434d fix crash in query_respond_any() from all records being hidden
in query_respond_any(), the assumption had previously been made that it
was impossible to get past iterating the node with a return value of
ISC_R_NOMORE but not have found any records, unless we were searching
for RRSIG or SIG. however, it is possible for other types to exist but
be hidden, such as when the zone is transitioning from insecure to
secure and DNSSEC types are encountered, and this situation could
trigger an assertion.  removed the assertion and reorganized the code.

(cherry picked from commit 3e74c7e5ff)
2019-02-28 16:06:38 -08:00
Michał Kępień 71f7589f08 Merge branch 'michal/do-not-include-conf.sh-from-ttl-clean.sh-v9_14' into 'v9_14'
[v9_14] Do not include conf.sh from ttl/clean.sh

See merge request isc-projects/bind9!1578
2019-02-28 07:42:46 -05:00
Michał Kępień 43eeb2319b Do not include conf.sh from ttl/clean.sh
Including $SYSTEMTESTTOP/conf.sh from a system test's clean.sh script is
not needed for anything while it causes an error message to be printed
out when "./configure" is run, as "make clean" is invoked at the end.
Remove the offending line to prevent the error from occurring.

(cherry picked from commit 6602848460)
2019-02-28 13:17:13 +01:00
Michał Kępień 79666f739b Merge branch 'michal/call-clean.sh-from-all-relevant-setup.sh-scripts-v9_14' into 'v9_14'
[v9_14] Call clean.sh from all relevant setup.sh scripts

See merge request isc-projects/bind9!1576
2019-02-28 07:11:02 -05:00
Michał Kępień 7b1f4c8a6a Call clean.sh from all relevant setup.sh scripts
For all system tests utilizing named instances, call clean.sh from each
test's setup.sh script in a consistent way to make sure running the same
system test multiple times using run.sh does not trigger false positives
caused by stale files created by previous runs.

Ideally we would just call clean.sh from run.sh, but that would break
some quirky system tests like "rpz" or "rpzrecurse" and being consistent
for the time being does not hurt.

(cherry picked from commit a077a3ae8a)
2019-02-28 12:39:06 +01:00
Tinderbox User c2c957735f Merge branch 'prep-release' into v9_14 2019-02-28 00:05:32 +00:00
Tinderbox User 4ea7fb82a7 doc rebuild 2019-02-28 00:05:06 +00:00
Tinderbox User 13c0bf922b prep 9.14.0rc1 2019-02-27 23:50:01 +00:00
Evan Hunt 8d3931409e Merge branch 'prep-914' into 'v9_14'
documentation changes establishing the 9.14 stable branch

See merge request isc-projects/bind9!1559
2019-02-27 18:33:05 -05:00
Evan Hunt 3396f9396f documentation changes establishing the 9.14 stable branch 2019-02-27 18:06:35 -05:00
Matthijs Mekking 06d5da0204 Merge branch '813-matthijs-failure-loading-rpz-v9_14' into 'v9_14'
Resolve "Problems after failure of loading rpz [ISC-support #14002]"

See merge request isc-projects/bind9!1562
2019-02-22 10:05:07 -05:00
Matthijs MekkingandMatthijs Mekking 0f520ac026 Update CHANGES 2019-02-22 15:26:43 +01:00
Matthijs MekkingandMatthijs Mekking 05f156e8ba Unregister RPZ CATZ db cbs when zone load fails
In case when a zone fails to load because the file does not exist
or is malformed, we should not run the callback that updates the
zone database when the load is done.  This is achieved by
unregistering the callbacks if at zone load end if the result
indicates something else than success.
2019-02-22 15:24:24 +01:00
Matthijs MekkingandMatthijs Mekking ae159914b0 Update copyrights 2019-02-22 15:24:16 +01:00
Matthijs MekkingandMatthijs Mekking d6cb3022a3 Add test for rpz zone load fail 2019-02-22 15:24:08 +01:00
Matthijs MekkingandMatthijs Mekking 6594f7acb2 Remove rpz->db_registered
As pointed out in !813 db_registered is sort of redundant.  It is
set to `true` only in `dns_zone_rpz_enable_db()` right before the
`dns_rpz_dbupdate_callback()` callback is registered.  It is only
required in that callback and it is the only place that the callback
is registered.  Therefore there is no path that that `REQUIRE` can
fail.

The `db_registered` variable is only set to `false` in
`dns_rpz_new_zone`, so it is not like the variable is unset again
later.

The only other place where `db_registered` is checked is in
`rpz_detach()`.  If `true`, it will call
`dns_db_updatenotify_unregister()`.  However if that happens, the
`db_registered` is not set back to `false` thus this implies that
this may happen multiple times.  If called a second time, most
likely the unregister function will return `ISC_R_NOTFOUND`, but
the return value is not checked anyway.  So it can do without the
`db_registered` check.
2019-02-22 15:23:59 +01:00
Matthijs MekkingandMatthijs Mekking a4cd74e71a Add curly brackets on if statements 2019-02-22 15:23:44 +01:00
Matthijs MekkingandMatthijs Mekking 48d7e4bb40 named crashes on shutdown after load rpz failed
This may happen when loading an RPZ failed and the code path skips
calling dns_db_endload().  The dns_rpz_zone_t object is still kept
marked as having registered db.  So when this object is finally
destroyed in rpz_detach(), this code will incorrectly call
`dns_db_updatenotify_unregister()`:

   if (rpz->db_registered)
     dns_db_updatenotify_unregister(rpz->db,
                                    dns_rpz_dbupdate_callback, rpz);

and trigger this assertion failure:

   REQUIRE(db != NULL);

To fix this, only call `dns_db_updatenotify_unregister()` when
`rpz->db` is not NULL.
2019-02-22 15:23:33 +01:00
Matthijs MekkingandMatthijs Mekking e2def297b6 Make RPZ tests more readable 2019-02-22 15:18:20 +01:00
Matthijs MekkingandMatthijs Mekking c01d63373c Add README to RPZ tests 2019-02-22 15:18:11 +01:00
Tinderbox User 6491691ac4 Merge branch 'prep-release' into security-v9_14 2019-02-21 02:11:26 +00:00
Tinderbox User 453f5da790 doc rebuild 2019-02-21 02:11:15 +00:00
Tinderbox User 856c74700f prep 9.13.7 2019-02-21 01:57:08 +00:00
Evan Hunt ce5857556b Merge branch 'security-dlz-axfr-deny-broken' into security-master
denied axfr requests were not effective for writable DLZ zones

See merge request isc-private/bind9!57
2019-02-20 17:45:50 -08:00
Mark AndrewsandEvan Hunt ed6c10d46b add CHANGES and release notes entries 2019-02-20 17:45:50 -08:00
Mark AndrewsandEvan Hunt bc01aadc02 denied axfr requests were not effective for writable DLZ zones 2019-02-20 17:45:50 -08:00
Evan Hunt 702e5dc21a Merge 'keytag-memleak' into security-master 2019-02-20 17:45:49 -08:00
Evan Hunt a47d2850c0 fix test error 2019-02-20 17:45:49 -08:00
Mark AndrewsandEvan Hunt 7d5b7192ec add CHANGES and release note entries 2019-02-20 17:45:49 -08:00
Mark AndrewsandEvan Hunt d68adfea9c check that multiple KEY-TAG trust-anchor-telemetry options don't leak memory 2019-02-20 17:45:49 -08:00
Mark AndrewsandEvan Hunt 873c704de9 silently ignore additional keytag options 2019-02-20 17:45:49 -08:00
Evan Hunt ff47556e26 Merge 'managed-key-assert' into security-master 2019-02-20 17:45:48 -08:00
Evan Hunt f3fbbc20d2 Merge 'managed-key-assert' into security-master 2019-02-20 17:45:48 -08:00
Evan Hunt 8b8e492e48 use algorithm 255 for both unsupported keys 2019-02-20 17:45:48 -08:00
Matthijs MekkingandEvan Hunt ea5a5b77f9 CHANGES, notes 2019-02-20 17:45:48 -08:00
Matthijs MekkingandEvan Hunt 98ef5c09d2 Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key.
2019-02-20 17:45:47 -08:00
Matthijs MekkingandEvan Hunt 3516864ade Add tests for mkeys with unsupported algorithm
These tests check if a key with an unsupported algorithm in
managed-keys is ignored and when seeing an algorithm rollover to
an unsupported algorithm, the new key will be ignored too.
2019-02-20 17:45:47 -08:00
Matthijs MekkingandEvan Hunt 5aa41ae9f8 Don't free key in compute_tag in case of failure
If `dns_dnssec_keyfromrdata` failed we don't need to call
`dst_key_free` because no `dstkey` was created.  Doing so
nevertheless will result in an assertion failure.

This can happen if the key uses an unsupported algorithm.
2019-02-20 17:45:47 -08:00
Evan Hunt 566ad7021e Merge branch 'setup-v914' into v9_14 2019-02-20 17:44:43 -08:00
Evan Hunt 2579f31f54 begin setup of 9.14 branch 2019-02-20 17:44:32 -08:00
499 changed files with 15170 additions and 6187 deletions
+51 -29
View File
@@ -1,36 +1,58 @@
Makefile
config.log
config.h
config.cache
config.status
libtool
/isc-config.sh
/configure.lineno
autom4te.cache/
*.rej
*.orig
*.o
*.lo
*.so
*.a
*.la
*.gcno
*.gcda
*_test
*-symtbl.c
timestamp
ans.run
named.run
named.memstats
gen.dSYM/
*.a
*.gcda
*.gcno
*.la
*.lo
*.o
*.orig
*.plist/ # ccc-analyzer store its results in .plist directories
*.rej
*.so
*_test
*~
.ccache/
.cproject
.deps/
.dirstamp
.libs/
# ccc-analyzer store its results in .plist directories
*.plist/
*~
.project
.cproject
.settings
kyua.log
/aclocal.m4
/ar-lib
/autom4te.cache/
/bind.keys.h
/compile
/config.cache
/config.guess
/config.h
/config.h.in
/config.log
/config.status
/config.sub
/configure
/configure.lineno
/depcomp
/install-sh
/isc-config.sh
/libltdl/*
/libtool
/ltmain.sh
/m4/libtool.m4
/m4/ltargz.m4
/m4/ltdl.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/missing
/py-compile
/stamp-h1
/test-driver
Makefile
ans.run
gen.dSYM/
kyua.log
named.memstats
named.run
timestamp
+48 -3
View File
@@ -107,7 +107,7 @@ stages:
before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
script:
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- ./configure --enable-developer --with-libtool --with-geoip2=auto --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install
artifacts:
@@ -167,6 +167,7 @@ misc:sid:amd64:
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
- xmllint --noout --nonet --html `git ls-files '*.html'`
- sh util/check-win32util-configure
artifacts:
paths:
- util/newcopyrights
@@ -300,7 +301,7 @@ unit:gcc:stretch:amd64:
gcc:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "-Wall -Wextra -O3 -g"
EXTRA_CONFIGURE: "--with-libidn2"
RUN_MAKE_INSTALL: 1
<<: *debian_sid_amd64_image
@@ -323,7 +324,7 @@ unit:gcc:sid:amd64:
gcc:sid:i386:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "-Wall -Wextra -O3 -g"
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
<<: *debian_sid_i386_image
<<: *build_job
@@ -475,3 +476,47 @@ unit:pkcs11:sid:amd64:
<<: *unit_test_job
dependencies:
- pkcs11:sid:amd64
# Jobs for testing --with-geoip builds on Debian Sid (amd64)
geoip:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--without-geoip2 --with-geoip"
<<: *debian_sid_amd64_image
<<: *build_job
system:geoip:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- pkcs11:sid:amd64
unit:geoip:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:sid:amd64
# Jobs for testing --with-geoip2 builds on Debian Sid (amd64)
geoip2:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--without-geoip --with-geoip2"
<<: *debian_sid_amd64_image
<<: *build_job
system:geoip2:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- pkcs11:sid:amd64
unit:geoip2:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:sid:amd64
+278 -12
View File
@@ -1,3 +1,263 @@
5260. [bug] dnstap-read was producing malformed output for large
packets. [GL #1093]
5258. [func] Added support for the GeoIP2 API from MaxMind,
when BIND is compiled using "configure --with-geoip2".
The legacy GeoIP API can be enabled by using
"configure --with-geoip" instead. These options
cannot be used together.
Certain geoip ACL settings that were available with
legacy GeoIP are not available when using GeoIP2.
See the ARM for details. [GL #182]
5257. [bug] Some statistics data was not being displayed.
Add shading to the zone tables. [GL #1030]
5256. [bug] Ensure that glue records are included in root
priming responses if "minimal-responses" is not
set to "yes". [GL #1092]
5255. [bug] Errors encountered while reloading inline-signing
zones could be ignored, causing the zone content to
be left in an incompletely updated state rather than
reverted. [GL #1109]
5254. [func] Collect metrics to report to the statistics-channel
DNSSEC signing operations (dnssec-sign) and refresh
operations (dnssec-refresh) per zone and per keytag.
[GL #513]
5253. [port] Support platforms that don't define ULLONG_MAX.
[GL #1098]
5251. [bug] Statistics were broken in x86 Windows builds.
[GL #1081]
5249. [bug] Fix a possible underflow in recursion clients
statistics when hitting recursive clients
soft quota. [GL #1067]
--- 9.14.3 released ---
5244. [security] Fixed a race condition in dns_dispatch_getnext()
that could cause an assertion failure if a
significant number of incoming packets were
rejected. (CVE-2019-6471) [GL #942]
5243. [bug] Fix a possible race between dispatcher and socket
code in a high-load cold-cache resolver scenario.
[GL #943]
5242. [bug] In relaxed qname minimizatiom mode, fall back to
normal resolution when encountering a lame
delegation, and use _.domain/A queries rather
than domain/NS. [GL #1055]
5241. [bug] Fix Ed448 private and public key ASN.1 prefix blobs.
[GL #225]
5240. [bug] Remove key id calculation for RSAMD5. [GL #996]
5238. [bug] Fix a possible deadlock in TCP code. [GL #1046]
5237. [bug] Recurse to find the root server list with 'dig +trace'.
[GL #1028]
5234. [port] arm: just use the compiler's default support for
yield. [GL #981]
--- 9.14.2 released ---
5233. [bug] Negative trust anchors did not work with "forward only;"
to validating resolvers. [GL #997]
5231. [protocol] Add support for displaying CLIENT-TAG and SERVER-TAG.
[GL #960]
5229. [protocol] Enforce known SSHFP fingerprint lengths. [GL #852]
5228. [cleanup] If trusted-keys and managed-keys are configured
simultaneously for the same name, the key cannot
be rolled automatically. This configuration now
logs a warning. [GL #868]
5224. [bug] Only test provide-ixfr on TCP streams. [GL #991]
5223. [bug] Fixed a race in the filter-aaaa plugin accessing
the hash table. [GL #1005]
5222. [bug] 'delv -t ANY' could leak memory. [GL #983]
5221. [test] Enable parallel execution of system tests on
Windows. [GL !4101]
5220. [cleanup] Refactor the isc_stat structure to take advantage
of stdatomic. [GL !1493]
5219. [bug] Fixed a race in the filter-aaaa plugin that could
trigger a crash when returning an instance object
to the memory pool. [GL #982]
5218. [bug] Conditionally include <dlfcn.h>. [GL #995]
5217. [bug] Restore key id calculation for RSAMD5. [GL #996]
5216. [bug] Fetches-per-zone counter wasn't updated correctly
when doing qname minimization. [GL #992]
5215. [bug] Change #5124 was incomplete; named could still
return FORMERR instead of SERVFAIL in some cases.
[GL #990]
5214. [bug] win32: named now removes its lock file upon shutdown.
[GL #979]
5213. [bug] win32: Eliminated a race which allowed named.exe running
as a service to be killed prematurely during shutdown.
[GL #978]
5211. [bug] Allow out-of-zone additional data to be included
in authoritative responses if recursion is allowed
and "minimal-responses" is disabled. This behavior
was inadvertently removed in change #4605. [GL #817]
5210. [bug] When dnstap is enabled and recursion is not
available, incoming queries are now logged
as "auth". Previously, this depended on whether
recursion was requested by the client, not on
whether recursion was available. [GL #963]
5209. [bug] When update-check-ksk is true, add_sigs was not
considering offline keys, leaving record sets signed
with the incorrect type key. [GL #763]
5208. [test] Run valid rdata wire encodings through totext+fromtext
and tofmttext+fromtext methods to check these methods.
[GL #899]
5207. [test] Check delv and dig TTL values. [GL #965]
5206. [bug] Delv could print out bad TTLs. [GL #965]
5205. [bug] Enforce that a DS hash exists. [GL #899]
5204. [test] Check that dns_rdata_fromtext() produces a record that
will be accepted by dns_rdata_fromwire(). [GL #852]
5203. [bug] Enforce whether key rdata exists or not in KEY,
DNSKEY, CDNSKEY and RKEY. [GL #899]
5202. [bug] <dns/ecs.h> was missing ISC_LANG_ENDDECLS. [GL #976]
5190. [bug] Ignore trust anchors using disabled algorithms.
[GL #806]
--- 9.14.1 released ---
5201. [bug] Fix a possible deadlock in RPZ update code. [GL #973]
5200. [security] tcp-clients settings could be exceeded in some cases,
which could lead to exhaustion of file descriptors.
(CVE-2018-5743) [GL #615]
5199. [security] In certain configurations, named could crash
if nxdomain-redirect was in use and a redirected
query resulted in an NXDOMAIN from the cache.
(CVE-2019-6467) [GL #880]
5198. [bug] If a fetch context was being shut down and, at the same
time, we returned from qname minimization, an INSIST
could be hit. [GL #966]
5197. [bug] dig could die in best effort mode on multiple SIG(0)
records. Similarly on multiple OPT and multiple TSIG
records. [GL #920]
5196. [bug] make install failed with --with-dlopen=no. [GL #955]
5195. [bug] "allow-update" and "allow-update-forwarding" were
treated as configuration errors if used at the
options or view level. [GL #913]
5194. [bug] Enforce non empty ZOMEMD hash. [GL #899]
5193. [bug] EID and NIMLOC failed to do multi-line output
correctly. [GL #899]
5189. [cleanup] Remove revoked root DNSKEY from bind.keys. [GL #945]
5187. [test] Set time zone before running any tests in dnstap_test.
[GL #940]
5186. [cleanup] More dnssec-keygen manual tidying. [GL !1678]
5184. [bug] Missing unlocks in sdlz.c. [GL #936]
5183. [bug] Reinitialize ECS data before reusing client
structures. [GL #881]
--- 9.14.0 released ---
--- 9.14.0rc3 released ---
5182. [bug] Fix a high-load race/crash in handling of
isc_socket_close() in resolver. [GL #834]
5180. [bug] delv now honors the operating system's preferred
ephemeral port range. [GL #925]
5179. [cleanup] Replace some vague type declarations with the more
specific dns_secalg_t and dns_dsdigest_t.
Thanks to Tony Finch. [GL !1498]
5178. [bug] Handle EDQUOT (disk quota) and ENOSPC (disk full)
errors when writing files. [GL #902]
5177. [func] Add the ability to specify in named.conf whether a
response-policy zone's SOA record should be added
to the additional section (add-soa yes/no). [GL #865]
5167. [bug] nxdomain-redirect could sometimes lookup the wrong
redirect name. [GL #892]
--- 9.14.0rc2 released ---
5176. [tests] Remove a dependency on libxml in statschannel system
test. [GL #926]
5175. [bug] Fixed a problem with file input in dnssec-keymgr,
dnssec-coverage and dnssec-checkds when using
python3. [GL #882]
5174. [doc] Tidy dnssec-keygen manual. [GL !1557]
5173. [bug] Fixed a race in socket code that could occur when
accept, send, or recv were called from an event
loop but the socket had been closed by another
thread. [RT #874]
5172. [bug] nsupdate now honors the operating system's preferred
ephemeral port range. [GL #905]
5171. [func] named plugins are now installed into a separate
directory. Supplying a filename (a string without path
separators) in a "plugin" configuration stanza now
causes named to look for that plugin in that directory.
[GL #878]
5170. [test] Added --with-dlz-filesystem to feature-test. [GL !1587]
5169. [bug] The presence of certain types in an otherwise
empty node could cause a crash while processing a
type ANY query. [GL #901]
--- 9.14.0rc1 released ---
5168. [bug] Do not crash on shutdown when RPZ fails to load. Also,
keep previous version of the database if RPZ fails to
load. [GL #813]
5165. [contrib] Removed SDB drivers from contrib; they're obsolete.
[GL #428]
@@ -25,6 +285,18 @@
5157. [bug] Nslookup now errors out if there are extra command
line arguments. [GL #207]
5141. [security] Zone transfer controls for writable DLZ zones were
not effective as the allowzonexfr method was not being
called for such zones. (CVE-2019-6465) [GL #790]
5118. [security] Named could crash if it is managing a key with
`managed-keys` and the authoritative zone is rolling
the key to an unsupported algorithm. (CVE-2018-5745)
[GL #780]
5110. [security] Named leaked memory if there were multiple Key Tag
EDNS options present. (CVE-2018-5744) [GL #772]
--- 9.13.6 released ---
5156. [doc] Extended and refined the section of the ARM describing
@@ -48,7 +320,7 @@
- Zone signing and DNSKEY maintenance events are
now logged to the "dnssec" category
- Messages are now logged when DNSSEC keys are
pubished, activated, inactivated, deleted,
published, activated, inactivated, deleted,
or revoked.
[GL #714]
@@ -85,8 +357,6 @@
and "nsdname-enable" both now default to yes,
regardless of compile-time settings. [GL #824]
5141. [placeholder]
5140. [bug] Don't immediately mark existing keys as inactive and
deleted when running dnssec-keymgr for the first
time. [GL #117]
@@ -157,8 +427,6 @@
5119. [placeholder]
5118. [placeholder]
5117. [placeholder]
5116. [bug] Named/named-checkconf triggered a assertion when
@@ -179,8 +447,6 @@
5111. [bug] Occluded DNSKEY records could make it into the
delegating NSEC/NSEC3 bitmap. [GL #742]
5110. [placeholder]
5109. [cleanup] Remove support for RSAMD5 algorithm. [GL #628]
--- 9.13.5 released ---
@@ -259,8 +525,8 @@
5091. [func] Two new global and per-view options min-cache-ttl
and min-ncache-ttl [GL #613]
5090. [bug] dig and mdig failed to properly preparse dash value
pairs when value was a seperate argument and started
5090. [bug] dig and mdig failed to properly pre-parse dash value
pairs when value was a separate argument and started
with a dash. [GL #584]
5089. [bug] Restore localhost fallback in dig and host which is
@@ -326,7 +592,7 @@
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
behavior for auto-reallocated buffers. [GL #644]
5071. [bug] Comparision of NXT records was broken. [GL #631]
5071. [bug] Comparison of NXT records was broken. [GL #631]
5070. [bug] Record types which support a empty rdata field were
not handling the empty rdata field case. [GL #638]
@@ -345,7 +611,7 @@
5065. [bug] Only set IPV6_USE_MIN_MTU on IPv6. [GL #553]
5064. [test] Initalize TZ environment variable before calling
5064. [test] Initialize TZ environment variable before calling
dns_test_begin in dnstap_test. [GL #624]
5063. [test] In statschannel test try a few times before failing
@@ -571,7 +837,7 @@
5001. [bug] Fix refcount errors on error paths. [GL !563]
5000. [bug] named_server_servestale() could leave the server in
exclusive mode if an error occured. [GL #441]
exclusive mode if an error occurred. [GL #441]
4999. [cleanup] Remove custom printf implementation in lib/isc/print.c.
[GL #261]
+2
View File
@@ -1,3 +1,5 @@
CONTRIBUTING
BIND Source Access and Contributor Guidelines
Feb 22, 2018
+6 -4
View File
@@ -1,3 +1,5 @@
HISTORY
Functional enhancements from prior major releases of BIND 9
BIND 9.11
@@ -431,11 +433,11 @@ BIND 9.4.0
* Detect duplicates of UDP queries we are recursing on and drop them.
New stats category "duplicates".
* "USE INTERNAL MALLOC" is now runtime selectable.
* The lame cache is now done on a basis as some servers only appear to
be lame for certain query types.
* The lame cache is now done on a <qname,qclass,qtype> basis as some
servers only appear to be lame for certain query types.
* Limit the number of recursive clients that can be waiting for a single
query () to resolve. New options clients-per-query and
max-clients-per-query.
query (<qname,qtype,qclass>) to resolve. New options clients-per-query
and max-clients-per-query.
* dig: report the number of extra bytes still left in the packet after
processing all the records.
* Support for IPSECKEY rdata type.
+5 -5
View File
@@ -97,27 +97,27 @@ test-force:
exit $$status
README: README.md
${PANDOC} --email-obfuscation=none -s -t html README.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
HISTORY: HISTORY.md
${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
OPTIONS: OPTIONS.md
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
CONTRIBUTING: CONTRIBUTING.md
${PANDOC} --email-obfuscation=none -s -t html CONTRIBUTING.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
PLATFORMS: PLATFORMS.md
${PANDOC} --email-obfuscation=none -s -t html PLATFORMS.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html PLATFORMS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
+3 -1
View File
@@ -1,10 +1,12 @@
OPTIONS
Setting the STD_CDEFINES environment variable before running configure can
be used to enable certain compile-time options that are not explicitly
defined in configure.
Some of these settings are:
Setting Description
Setting Description
Overwrite memory with tag values when allocating
-DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but
makes debugging of memory problems easier.
+9 -24
View File
@@ -1,3 +1,5 @@
PLATFORMS
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
@@ -13,7 +15,7 @@ offer support on a "best effort" basis for some.
Regularly tested platforms
As of Jan 2019, BIND 9.13 is fully supported and regularly tested on the
As of Feb 2019, BIND 9.14 is fully supported and regularly tested on the
following systems:
* Debian 8, 9, 10
@@ -51,7 +53,7 @@ Server 2012 R2, none of these are tested regularly by ISC.
Unsupported platforms
These are platforms on which BIND 9.13 is known not to build or run:
These are platforms on which BIND 9.14 is known not to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
@@ -64,27 +66,10 @@ These are platforms on which BIND 9.13 is known not to build or run:
Platform quirks
ARM
NetBSD 6 i386
If the compilation ends with following error:
The i386 build of NetBSD requires the libatomic library, available from
the gcc5-libs package. Because this library is in a non-standard path, its
location must be specified in the configure command line:
Error: selected processor does not support `yield' in ARM mode
You will need to set -march compiler option to native, so the compiler
recognizes yield assembler instruction. The proper way to set -march=
native would be to put it into CFLAGS, e.g. run ./configure like this:
CFLAGS="-march=native -Os -g" ./configure plus your usual options.
If that doesn't work, you can enforce the minimum CPU and FPU (taken from
Debian armhf documentation):
* The lowest worthwhile CPU implementation is Armv7-A, therefore the
recommended build option is -march=armv7-a.
* FPU should be set at VFPv3-D16 as they represent the minimum
specification of the processors to support here, therefore the
recommended build option is -mfpu=vfpv3-d16.
The configure command should look like this:
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
+7 -26
View File
@@ -23,7 +23,7 @@ offer support on a "best effort" basis for some.
### Regularly tested platforms
As of Jan 2019, BIND 9.13 is fully supported and regularly tested on the
As of Feb 2019, BIND 9.14 is fully supported and regularly tested on the
following systems:
* Debian 8, 9, 10
@@ -60,7 +60,7 @@ Server 2012 R2, none of these are tested regularly by ISC.
## Unsupported platforms
These are platforms on which BIND 9.13 is known *not* to build or run:
These are platforms on which BIND 9.14 is known *not* to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
@@ -72,31 +72,12 @@ These are platforms on which BIND 9.13 is known *not* to build or run:
## Platform quirks
### ARM
### NetBSD 6 i386
If the compilation ends with following error:
The i386 build of NetBSD requires the `libatomic` library, available from
the `gcc5-libs` package. Because this library is in a non-standard path,
its location must be specified in the `configure` command line:
```
Error: selected processor does not support `yield' in ARM mode
```
You will need to set `-march` compiler option to `native`, so the compiler
recognizes `yield` assembler instruction. The proper way to set `-march=native`
would be to put it into `CFLAGS`, e.g. run `./configure` like this:
`CFLAGS="-march=native -Os -g" ./configure` plus your usual options.
If that doesn't work, you can enforce the minimum CPU and FPU (taken from Debian
armhf documentation):
* The lowest worthwhile CPU implementation is Armv7-A, therefore the recommended
build option is `-march=armv7-a`.
* FPU should be set at VFPv3-D16 as they represent the minimum specification of
the processors to support here, therefore the recommended build option is
`-mfpu=vfpv3-d16`.
The configure command should look like this:
```
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
```
+49 -7
View File
@@ -1,3 +1,5 @@
README
BIND 9
Contents
@@ -5,7 +7,7 @@ Contents
1. Introduction
2. Reporting bugs and getting help
3. Contributing to BIND
4. BIND 9.13 features
4. BIND 9.14 features
5. Building BIND
6. macOS
7. Dependencies
@@ -37,7 +39,7 @@ in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a
501(c)(3) public benefit corporation dedicated to providing software and
services in support of the Internet infrastructure, developed BIND 9 and
is responsible for its ongoing maintenance and improvement. BIND is open
source software licenced under the terms of the Mozilla Public License,
source software licensed under the terms of the Mozilla Public License,
version 2.0.
For a summary of features introduced in past major releases of BIND, see
@@ -100,17 +102,19 @@ If you prefer, you may also submit code by opening a GitLab Issue and
including your patch as an attachment, preferably generated by git
format-patch.
BIND 9.13 features
BIND 9.14 features
BIND 9.13 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.12 and earlier releases. New features include:
BIND 9.14.0 is the first release from a new stable branch of BIND 9,
incorporating all changes from the 9.13 development branch, updating the
most recent stable branch, 9.12. These changes include:
* A new "plugin" mechanism has been added to allow query functionality
to be extended using dynamically loadable libraries. The "filter-aaaa"
feature has been removed from named and is now implemented as a
plugin.
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* Socket and task code has been refactored to improve performance on
most modern machines.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root
zone.
@@ -138,7 +142,27 @@ is now mandatory: building BIND without DNSSEC is no longer supported.
Special code to support certain legacy operating systems has also been
removed; see the file PLATFORMS.md for details of supported platforms. In
addition to OpenSSL, BIND now requires support for IPv6, threads, and
standard atomic operations provided by the C compiler.
standard atomic operations provided by the C compiler. Non-threaded builds
are no longer supported.
BIND 9.14.1
BIND 9.14.1 is a maintenance release, and addresses security
vulnerabilities disclosed in CVE-2018-5743 and CVE-2019-6467.
BIND 9.14.2
BIND 9.14.2 is a maintenance release.
BIND 9.14.3
BIND 9.14.3 is a maintenance release, and addresses the security
vulnerability disclosed in CVE-2019-6471.
BIND 9.14.4
BIND 9.14.4 is a maintenance release, and also adds support for the new
MaxMind GeoIP2 geolocation API when built with configure --with-geoip2.
Building BIND
@@ -349,6 +373,24 @@ releases (i.e., those with version numbers ending in zero). Some new
functionality may be backported to older releases on a case-by-case basis.
All other change types may be applied to all currently-supported releases.
Bug report identifiers
Most notes in the CHANGES file include a reference to a bug report or
issue number. Prior to 2018, these were usually of the form [RT #NNN] and
referred to entries in the "bind9-bugs" RT database, which was not open to
the public. More recent entries use the form [GL #NNN] or, less often, [GL
!NNN], which, respectively, refer to issues or merge requests in the
Gitlab database. Most of these are publically readable, unless they
include information which is confidential or security senstive.
To look up a Gitlab issue by its number, use the URL https://
gitlab.isc.org/isc-projects/bind9/issues/NNN. To look up a merge request,
use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN.
In rare cases, an issue or merge request number may be followed with the
letter "P". This indicates that the information is in the private ISC
Gitlab instance, which is not visible to the public.
Acknowledgments
* The original development of BIND 9 was underwritten by the following
+48 -8
View File
@@ -15,7 +15,7 @@
1. [Introduction](#intro)
1. [Reporting bugs and getting help](#help)
1. [Contributing to BIND](#contrib)
1. [BIND 9.13 features](#features)
1. [BIND 9.14 features](#features)
1. [Building BIND](#build)
1. [macOS](#macos)
1. [Dependencies](#dependencies)
@@ -48,7 +48,7 @@ used in versions 4 and 8. Internet Systems Consortium
corporation dedicated to providing software and services in support of the
Internet infrastructure, developed BIND 9 and is responsible for its
ongoing maintenance and improvement. BIND is open source software
licenced under the terms of the Mozilla Public License, version 2.0.
licensed under the terms of the Mozilla Public License, version 2.0.
For a summary of features introduced in past major releases of BIND,
see the file [HISTORY](HISTORY.md).
@@ -117,17 +117,18 @@ If you prefer, you may also submit code by opening a
including your patch as an attachment, preferably generated by
`git format-patch`.
### <a name="features"/> BIND 9.13 features
### <a name="features"/> BIND 9.14 features
BIND 9.13 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features
include:
BIND 9.14.0 is the first release from a new stable branch of BIND 9,
incorporating all changes from the 9.13 development branch, updating
the most recent stable branch, 9.12. These changes include:
* A new "plugin" mechanism has been added to allow query functionality
to be extended using dynamically loadable libraries. The "filter-aaaa"
feature has been removed from named and is now implemented as a plugin.
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* Socket and task code has been refactored to improve performance on most
modern machines.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root zone.
* Secondary zones can now be configured as "mirror" zones; their contents
@@ -157,7 +158,27 @@ Special code to support certain legacy operating systems has also
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
of supported platforms. In addition to OpenSSL, BIND now requires
support for IPv6, threads, and standard atomic operations provided
by the C compiler.
by the C compiler. Non-threaded builds are no longer supported.
#### BIND 9.14.1
BIND 9.14.1 is a maintenance release, and addresses security
vulnerabilities disclosed in CVE-2018-5743 and CVE-2019-6467.
#### BIND 9.14.2
BIND 9.14.2 is a maintenance release.
#### BIND 9.14.3
BIND 9.14.3 is a maintenance release, and addresses the security
vulnerability disclosed in CVE-2019-6471.
#### BIND 9.14.4
BIND 9.14.4 is a maintenance release, and also adds support for
the new MaxMind GeoIP2 geolocation API when built with
`configure --with-geoip2`.
### <a name="build"/> Building BIND
@@ -360,6 +381,25 @@ releases (i.e., those with version numbers ending in zero). Some new
functionality may be backported to older releases on a case-by-case basis.
All other change types may be applied to all currently-supported releases.
#### Bug report identifiers
Most notes in the CHANGES file include a reference to a bug report or
issue number. Prior to 2018, these were usually of the form `[RT #NNN]`
and referred to entries in the "bind9-bugs" RT database, which was not open
to the public. More recent entries use the form `[GL #NNN]` or, less often,
`[GL !NNN]`, which, respectively, refer to issues or merge requests in the
Gitlab database. Most of these are publically readable, unless they include
information which is confidential or security senstive.
To look up a Gitlab issue by its number, use the URL
[https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
To look up a merge request, use
[https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
In rare cases, an issue or merge request number may be followed with the
letter "P". This indicates that the information is in the private ISC
Gitlab instance, which is not visible to the public.
### <a name="ack"/> Acknowledgments
* The original development of BIND 9 was underwritten by the
Vendored
+2
View File
@@ -291,6 +291,8 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
m4_include([m4/ax_check_openssl.m4])
m4_include([m4/ax_posix_shell.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/ax_restore_flags.m4])
m4_include([m4/ax_save_flags.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
+1 -1
View File
@@ -21,7 +21,7 @@ CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES}
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
+1 -1
View File
@@ -63,7 +63,7 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
fprintf(stderr, "usage: %s [-hjlvz] [-p [-x]] [-t directory] "
fprintf(stderr, "usage: %s [-chjlvz] [-p [-x]] [-t directory] "
"[named.conf]\n", program);
exit(1);
}
+1 -1
View File
@@ -29,7 +29,7 @@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+1 -1
View File
@@ -23,7 +23,7 @@ CDEFINES = -DVERSION=\"${VERSION}\" \
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@
+1 -1
View File
@@ -25,7 +25,7 @@ CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
+3 -3
View File
@@ -584,11 +584,11 @@ A synonym for
.RS 4
Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
\fBdig\fR
normally sends recursive queries\&. Recursion is automatically disabled when the
normally sends recursive queries\&. Recursion is automatically disabled when using the
\fI+nssearch\fR
or
option, and when using
\fI+trace\fR
query options are used\&.
except for an initial recursive query to get the list of root servers\&.
.RE
.PP
\fB+retry=T\fR
+1 -1
View File
@@ -1445,7 +1445,7 @@ plus_option(char *option, bool is_batchfile,
lookup->trace = state;
lookup->trace_root = state;
if (state) {
lookup->recurse = false;
lookup->recurse = true;
lookup->identify = true;
lookup->comments = false;
lookup->rrcomments = 0;
+4 -2
View File
@@ -1000,8 +1000,10 @@
in the query. This bit is set by default, which means
<command>dig</command> normally sends recursive
queries. Recursion is automatically disabled when
the <parameter>+nssearch</parameter> or
<parameter>+trace</parameter> query options are used.
using the <parameter>+nssearch</parameter> option, and
when using <parameter>+trace</parameter> except for
an initial recursive query to get the list of root
servers.
</para>
</listitem>
</varlistentry>
+4 -2
View File
@@ -790,8 +790,10 @@
in the query. This bit is set by default, which means
<span class="command"><strong>dig</strong></span> normally sends recursive
queries. Recursion is automatically disabled when
the <em class="parameter"><code>+nssearch</code></em> or
<em class="parameter"><code>+trace</code></em> query options are used.
using the <em class="parameter"><code>+nssearch</code></em> option, and
when using <em class="parameter"><code>+trace</code></em> except for
an initial recursive query to get the list of root
servers.
</p>
</dd>
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
+7 -3
View File
@@ -1411,6 +1411,8 @@ dig_ednsoptname_t optnames[] = {
{ 12, "PAD" }, /* shorthand */
{ 13, "CHAIN" }, /* RFC 7901 */
{ 14, "KEY-TAG" }, /* RFC 8145 */
{ 16, "CLIENT-TAG" }, /* draft-bellis-dnsop-edns-tags */
{ 17, "SERVER-TAG" }, /* draft-bellis-dnsop-edns-tags */
{ 26946, "DEVICEID" }, /* Brian Hartvigsen */
};
@@ -2189,12 +2191,14 @@ setup_lookup(dig_lookup_t *lookup) {
lookup->sendmsg->id = (dns_messageid_t)isc_random16();
lookup->sendmsg->opcode = lookup->opcode;
lookup->msgcounter = 0;
/*
* If this is a trace request, completely disallow recursion, since
* it's meaningless for traces.
* If this is a trace request, completely disallow recursion after
* looking up the root name servers, since it's meaningless for traces.
*/
if (lookup->trace || (lookup->ns_search_only && !lookup->trace_root))
if ((lookup->trace || lookup->ns_search_only) && !lookup->trace_root) {
lookup->recurse = false;
}
if (lookup->recurse &&
lookup->rdtype != dns_rdatatype_axfr &&
+1 -1
View File
@@ -20,7 +20,7 @@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
+10 -10
View File
@@ -86,7 +86,7 @@ static dns_rdataclass_t rdclass = dns_rdataclass_in;
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
* from -a arguments. The size of the array is an arbitrary limit.
*/
static uint8_t dtype[8];
static dns_dsdigest_t dtype[8];
static const char *startstr = NULL; /* from which we derive notbefore */
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
@@ -129,7 +129,7 @@ static int nkey; /* number of child zone DNSKEY records */
typedef struct keyinfo {
dns_rdata_t rdata;
dst_key_t *dst;
uint8_t algo;
dns_secalg_t algo;
dns_keytag_t tag;
} keyinfo_t;
@@ -614,12 +614,12 @@ free_keytable(keyinfo_t **keytable_p) {
* otherwise the key algorithm. This is used by the signature coverage
* check functions below.
*/
static uint8_t *
static dns_secalg_t *
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
dns_rdataset_t *sigset)
{
isc_result_t result;
uint8_t *algo;
dns_secalg_t *algo;
int i;
algo = isc_mem_get(mctx, nkey);
@@ -702,7 +702,7 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
* fetched from the child zone, any working signature is enough.
*/
static bool
signed_loose(uint8_t *algo) {
signed_loose(dns_secalg_t *algo) {
bool ok = false;
int i;
for (i = 0; i < nkey; i++) {
@@ -721,7 +721,7 @@ signed_loose(uint8_t *algo) {
* RRset.
*/
static bool
signed_strict(dns_rdataset_t *dsset, uint8_t *algo) {
signed_strict(dns_rdataset_t *dsset, dns_secalg_t *algo) {
isc_result_t result;
bool all_ok = true;
@@ -844,14 +844,14 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
*/
static int
cmp_dtype(const void *ap, const void *bp) {
int a = *(const uint8_t *)ap;
int b = *(const uint8_t *)bp;
int a = *(const dns_dsdigest_t *)ap;
int b = *(const dns_dsdigest_t *)bp;
return (a - b);
}
static void
add_dtype(const char *dn) {
uint8_t dt;
dns_dsdigest_t dt;
unsigned i, n;
dt = strtodsdigest(dn);
@@ -936,7 +936,7 @@ consistent_digests(dns_rdataset_t *dsset) {
dns_rdata_t *arrdata;
dns_rdata_ds_t *ds;
dns_keytag_t key_tag;
uint8_t algorithm;
dns_secalg_t algorithm;
bool match;
int i, j, n, d;
+2 -2
View File
@@ -235,7 +235,7 @@ logkey(dns_rdata_t *rdata)
}
static void
emit(unsigned int dtype, bool showall, char *lookaside,
emit(dns_dsdigest_t dtype, bool showall, char *lookaside,
bool cds, dns_rdata_t *rdata)
{
isc_result_t result;
@@ -350,7 +350,7 @@ main(int argc, char **argv) {
char *lookaside = NULL;
char *endp;
int ch;
unsigned int dtype = DNS_DSDIGEST_SHA1;
dns_dsdigest_t dtype = DNS_DSDIGEST_SHA1;
bool cds = false;
bool both = true;
bool usekeyset = false;
+41 -42
View File
@@ -39,7 +39,7 @@
dnssec-keygen \- DNSSEC key generation tool
.SH "SYNOPSIS"
.HP \w'\fBdnssec\-keygen\fR\ 'u
\fBdnssec\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {name}
\fBdnssec\-keygen\fR [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
.SH "DESCRIPTION"
.PP
\fBdnssec\-keygen\fR
@@ -58,6 +58,13 @@ may be preferable to direct use of
\fBdnssec\-keygen\fR\&.
.SH "OPTIONS"
.PP
\-3
.RS 4
Use an NSEC3\-capable algorithm to generate a DNSSEC key\&. If this option is used with an algorithm that has both NSEC and NSEC3 versions, then the NSEC3 version will be used; for example,
\fBdnssec\-keygen \-3a RSASHA1\fR
specifies the NSEC3RSASHA1 algorithm\&.
.RE
.PP
\-a \fIalgorithm\fR
.RS 4
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
@@ -83,29 +90,15 @@ to generate TSIG keys\&.
.PP
\-b \fIkeysize\fR
.RS 4
Specifies the number of bits in the key\&. The choice of key size depends on the algorithm used\&. RSA keys must be between 1024 and 2048 bits\&. Diffie Hellman keys must be between 128 and 4096 bits\&. DSA keys must be between 512 and 1024 bits and an exact multiple of 64\&. HMAC keys must be between 1 and 512 bits\&. Elliptic curve algorithms don\*(Aqt need this parameter\&.
Specifies the number of bits in the key\&. The choice of key size depends on the algorithm used\&. RSA keys must be between 1024 and 4096 bits\&. Diffie Hellman keys must be between 128 and 4096 bits\&. Elliptic curve algorithms don\*(Aqt need this parameter\&.
.sp
If the key size is not specified, some algorithms have pre\-defined defaults\&. For example, RSA keys for use as DNSSEC zone signing keys have a default size of 1024 bits; RSA keys for use as key signing keys (KSKs, generated with
\fB\-f KSK\fR) default to 2048 bits\&.
.RE
.PP
\-n \fInametype\fR
.RS 4
Specifies the owner type of the key\&. The value of
\fBnametype\fR
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
.RE
.PP
\-3
.RS 4
Use an NSEC3\-capable algorithm to generate a DNSSEC key\&. If this option is used with an algorithm that has both NSEC and NSEC3 versions, then the NSEC3 version will be used; for example,
\fBdnssec\-keygen \-3a RSASHA1\fR
specifies the NSEC3RSASHA1 algorithm\&.
.RE
.PP
\-C
.RS 4
Compatibility mode: generates an old\-style key, without any metadata\&. By default,
Compatibility mode: generates an old\-style key, without any timing metadata\&. By default,
\fBdnssec\-keygen\fR
will include the key\*(Aqs creation date in the metadata stored with the private key, and other dates may be set there as well (publication date, activation date, etc)\&. Keys that include this data may be incompatible with older versions of BIND; the
\fB\-C\fR
@@ -150,11 +143,6 @@ Prints a short summary of the options and arguments to
Sets the directory in which the key files are to be written\&.
.RE
.PP
\-k
.RS 4
Deprecated in favor of \-T KEY\&.
.RE
.PP
\-L \fIttl\fR
.RS 4
Sets the default TTL to use for this key when it is converted into a DNSKEY RR\&. If the key is imported into a zone, this is the TTL that will be used for it, unless there was already a DNSKEY RRset in place, in which case the existing TTL would take precedence\&. If this value is not set and there is no existing DNSKEY RRset, the TTL will default to the SOA TTL\&. Setting the default TTL to
@@ -164,9 +152,17 @@ none
is the same as leaving it unset\&.
.RE
.PP
\-n \fInametype\fR
.RS 4
Specifies the owner type of the key\&. The value of
\fBnametype\fR
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
.RE
.PP
\-p \fIprotocol\fR
.RS 4
Sets the protocol value for the generated key\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
Sets the protocol value for the generated key, for use with
\fB\-T KEY\fR\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
.RE
.PP
\-q
@@ -193,27 +189,25 @@ Specifies the strength value of the key\&. The strength is a number between 0 an
Specifies the resource record type to use for the key\&.
\fBrrtype\fR
must be either DNSKEY or KEY\&. The default is DNSKEY when using a DNSSEC algorithm, but it can be overridden to KEY for use with SIG(0)\&.
Specifying any TSIG algorithm (HMAC\-* or DH) with
\fB\-a\fR
forces this option to KEY\&.
.RE
.PP
\-t \fItype\fR
.RS 4
Indicates the use of the key\&.
Indicates the use of the key, for use with
\fB\-T KEY\fR\&.
\fBtype\fR
must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF\&. The default is AUTHCONF\&. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data\&.
.RE
.PP
\-v \fIlevel\fR
.RS 4
Sets the debugging level\&.
.RE
.PP
\-V
.RS 4
Prints version information\&.
.RE
.PP
\-v \fIlevel\fR
.RS 4
Sets the debugging level\&.
.RE
.SH "TIMING OPTIONS"
.PP
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS\&. If the argument begins with a \*(Aq+\*(Aq or \*(Aq\-\*(Aq, it is interpreted as an offset from the present time\&. For convenience, if such an offset is followed by one of the suffixes \*(Aqy\*(Aq, \*(Aqmo\*(Aq, \*(Aqw\*(Aq, \*(Aqd\*(Aq, \*(Aqh\*(Aq, or \*(Aqmi\*(Aq, then the offset is computed in years (defined as 365 24\-hour days, ignoring leap years), months (defined as 30 24\-hour days), weeks, days, hours, or minutes, respectively\&. Without a suffix, the offset is computed in seconds\&. To explicitly prevent a date from being set, use \*(Aqnone\*(Aq or \*(Aqnever\*(Aq\&.
@@ -314,23 +308,24 @@ contains the private key\&.
.PP
The
\&.key
file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement)\&.
file contains a DNSKEY or KEY record\&. When a zone is being signed by
\fBnamed\fR
or
\fBdnssec\-signzone\fR\fB\-S\fR, DNSKEY records are included automatically\&. In other cases, the
\&.key
file can be inserted into a zone file manually or with a
\fB$INCLUDE\fR
statement\&.
.PP
The
\&.private
file contains algorithm\-specific fields\&. For obvious security reasons, this file does not have general read permission\&.
.PP
Both
\&.key
and
\&.private
files are generated for symmetric cryptography algorithms such as HMAC\-MD5, even though the public and private key are equivalent\&.
.SH "EXAMPLE"
.PP
To generate an ECDSAP256SHA256 key for the domain
\fBexample\&.com\fR, the following command would be issued:
To generate an ECDSAP256SHA256 zone\-signing key for the zone
\fBexample\&.com\fR, issue the command:
.PP
\fBdnssec\-keygen \-a ECDSAP256SHA256 \-n ZONE example\&.com\fR
\fBdnssec\-keygen \-a ECDSAP256SHA256 example\&.com\fR
.PP
The command would print a string of the form:
.PP
@@ -342,6 +337,10 @@ creates the files
Kexample\&.com\&.+013+26160\&.key
and
Kexample\&.com\&.+013+26160\&.private\&.
.PP
To generate a matching key\-signing key, issue the command:
.PP
\fBdnssec\-keygen \-a ECDSAP256SHA256 \-f KSK example\&.com\fR
.SH "SEE ALSO"
.PP
\fBdnssec-signzone\fR(8),
+1 -6
View File
@@ -241,7 +241,7 @@ main(int argc, char **argv) {
/*
* Process memory debugging argument first.
*/
#define CMDLINE_FLAGS "3A:a:b:Cc:D:d:E:eFf:Gg:hI:i:K:kL:m:n:P:p:qR:r:S:s:T:t:" \
#define CMDLINE_FLAGS "3A:a:b:Cc:D:d:E:eFf:Gg:hI:i:K:L:m:n:P:p:qR:r:S:s:T:t:" \
"v:V"
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) {
@@ -322,11 +322,6 @@ main(int argc, char **argv) {
fatal("cannot open directory %s: %s",
directory, isc_result_totext(ret));
break;
case 'k':
fatal("The -k option has been deprecated.\n"
"To generate a key-signing key, use -f KSK.\n"
"To generate a key with TYPE=KEY, use -T KEY.\n");
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = true;
+74 -85
View File
@@ -58,11 +58,10 @@
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>dnssec-keygen</command>
<arg rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-3</option></arg>
<arg choice="opt" rep="norepeat"><option>-A <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
@@ -77,6 +76,7 @@
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-k</option></arg>
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">ttl</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-P sync <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
@@ -87,7 +87,6 @@
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-z</option></arg>
<arg choice="req" rep="norepeat">name</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -118,6 +117,20 @@
<variablelist>
<varlistentry>
<term>-3</term>
<listitem>
<para>
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used with an algorithm that has both
NSEC and NSEC3 versions, then the NSEC3 version will be
used; for example, <command>dnssec-keygen -3a RSASHA1</command>
specifies the NSEC3RSASHA1 algorithm.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
<listitem>
@@ -157,11 +170,9 @@
<para>
Specifies the number of bits in the key. The choice of key
size depends on the algorithm used. RSA keys must be
between 1024 and 2048 bits. Diffie Hellman keys must be between
128 and 4096 bits. DSA keys must be between 512 and 1024
bits and an exact multiple of 64. HMAC keys must be
between 1 and 512 bits. Elliptic curve algorithms don't need
this parameter.
between 1024 and 4096 bits. Diffie Hellman keys must be between
128 and 4096 bits. Elliptic curve algorithms don't need this
parameter.
</para>
<para>
If the key size is not specified, some algorithms have
@@ -173,43 +184,16 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-n <replaceable class="parameter">nametype</replaceable></term>
<listitem>
<para>
Specifies the owner type of the key. The value of
<option>nametype</option> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
with a host (KEY)), USER (for a key associated with a
user(KEY)) or OTHER (DNSKEY). These values are case
insensitive. Defaults to ZONE for DNSKEY generation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-3</term>
<listitem>
<para>
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used with an algorithm that has both
NSEC and NSEC3 versions, then the NSEC3 version will be
used; for example, <command>dnssec-keygen -3a RSASHA1</command>
specifies the NSEC3RSASHA1 algorithm.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-C</term>
<listitem>
<para>
Compatibility mode: generates an old-style key, without
any metadata. By default, <command>dnssec-keygen</command>
will include the key's creation date in the metadata stored
with the private key, and other dates may be set there as well
(publication date, activation date, etc). Keys that include
this data may be incompatible with older versions of BIND; the
Compatibility mode: generates an old-style key, without any
timing metadata. By default, <command>dnssec-keygen</command>
will include the key's creation date in the metadata stored with
the private key, and other dates may be set there as well
(publication date, activation date, etc). Keys that include this
data may be incompatible with older versions of BIND; the
<option>-C</option> option suppresses them.
</para>
</listitem>
@@ -293,15 +277,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-k</term>
<listitem>
<para>
Deprecated in favor of -T KEY.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-L <replaceable class="parameter">ttl</replaceable></term>
<listitem>
@@ -318,14 +293,28 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-n <replaceable class="parameter">nametype</replaceable></term>
<listitem>
<para>
Specifies the owner type of the key. The value of
<option>nametype</option> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
with a host (KEY)), USER (for a key associated with a
user(KEY)) or OTHER (DNSKEY). These values are case
insensitive. Defaults to ZONE for DNSKEY generation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p <replaceable class="parameter">protocol</replaceable></term>
<listitem>
<para>
Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
Other possible values for this argument are listed in
RFC 2535 and its successors.
Sets the protocol value for the generated key, for use
with <option>-T KEY</option>. The protocol is a number between 0
and 255. The default is 3 (DNSSEC). Other possible values for
this argument are listed in RFC 2535 and its successors.
</para>
</listitem>
</varlistentry>
@@ -383,10 +372,6 @@
<option>rrtype</option> must be either DNSKEY or KEY. The
default is DNSKEY when using a DNSSEC algorithm, but it can be
overridden to KEY for use with SIG(0).
<para>
</para>
Specifying any TSIG algorithm (HMAC-* or DH) with
<option>-a</option> forces this option to KEY.
</para>
</listitem>
</varlistentry>
@@ -395,19 +380,11 @@
<term>-t <replaceable class="parameter">type</replaceable></term>
<listitem>
<para>
Indicates the use of the key. <option>type</option> must be
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
is AUTHCONF. AUTH refers to the ability to authenticate
data, and CONF the ability to encrypt data.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-v <replaceable class="parameter">level</replaceable></term>
<listitem>
<para>
Sets the debugging level.
Indicates the use of the key, for use with <option>-T
KEY</option>. <option>type</option> must be one of AUTHCONF,
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH
refers to the ability to authenticate data, and CONF the ability
to encrypt data.
</para>
</listitem>
</varlistentry>
@@ -421,6 +398,15 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-v <replaceable class="parameter">level</replaceable></term>
<listitem>
<para>
Sets the debugging level.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
@@ -585,10 +571,12 @@
key.
</para>
<para>
The <filename>.key</filename> file contains a DNS KEY record
that
can be inserted into a zone file (directly or with a $INCLUDE
statement).
The <filename>.key</filename> file contains a DNSKEY or KEY record.
When a zone is being signed by <command>named</command>
or <command>dnssec-signzone</command> <option>-S</option>, DNSKEY
records are included automatically. In other cases,
the <filename>.key</filename> file can be inserted into a zone file
manually or with a <userinput>$INCLUDE</userinput> statement.
</para>
<para>
The <filename>.private</filename> file contains
@@ -596,21 +584,16 @@
fields. For obvious security reasons, this file does not have
general read permission.
</para>
<para>
Both <filename>.key</filename> and <filename>.private</filename>
files are generated for symmetric cryptography algorithms such as
HMAC-MD5, even though the public and private key are equivalent.
</para>
</refsection>
<refsection><info><title>EXAMPLE</title></info>
<para>
To generate an ECDSAP256SHA256 key for the domain
<userinput>example.com</userinput>, the following command would be
issued:
To generate an ECDSAP256SHA256 zone-signing key for the zone
<userinput>example.com</userinput>, issue the command:
</para>
<para><userinput>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</userinput>
<para>
<userinput>dnssec-keygen -a ECDSAP256SHA256 example.com</userinput>
</para>
<para>
The command would print a string of the form:
@@ -623,6 +606,12 @@
and
<filename>Kexample.com.+013+26160.private</filename>.
</para>
<para>
To generate a matching key-signing key, issue the command:
</para>
<para>
<userinput>dnssec-keygen -a ECDSAP256SHA256 -f KSK example.com</userinput>
</para>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
+64 -75
View File
@@ -33,11 +33,10 @@
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">dnssec-keygen</code>
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
[<code class="option">-3</code>]
[<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
[<code class="option">-C</code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>]
@@ -52,6 +51,7 @@
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-k</code>]
[<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>]
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
[<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-P sync <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
@@ -62,7 +62,6 @@
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
[<code class="option">-V</code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-z</code>]
{name}
</p></div>
</div>
@@ -95,6 +94,16 @@
<div class="variablelist"><dl class="variablelist">
<dt><span class="term">-3</span></dt>
<dd>
<p>
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used with an algorithm that has both
NSEC and NSEC3 versions, then the NSEC3 version will be
used; for example, <span class="command"><strong>dnssec-keygen -3a RSASHA1</strong></span>
specifies the NSEC3RSASHA1 algorithm.
</p>
</dd>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
@@ -130,11 +139,9 @@
<p>
Specifies the number of bits in the key. The choice of key
size depends on the algorithm used. RSA keys must be
between 1024 and 2048 bits. Diffie Hellman keys must be between
128 and 4096 bits. DSA keys must be between 512 and 1024
bits and an exact multiple of 64. HMAC keys must be
between 1 and 512 bits. Elliptic curve algorithms don't need
this parameter.
between 1024 and 4096 bits. Diffie Hellman keys must be between
128 and 4096 bits. Elliptic curve algorithms don't need this
parameter.
</p>
<p>
If the key size is not specified, some algorithms have
@@ -144,36 +151,15 @@
<code class="option">-f KSK</code>) default to 2048 bits.
</p>
</dd>
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
<dd>
<p>
Specifies the owner type of the key. The value of
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
with a host (KEY)), USER (for a key associated with a
user(KEY)) or OTHER (DNSKEY). These values are case
insensitive. Defaults to ZONE for DNSKEY generation.
</p>
</dd>
<dt><span class="term">-3</span></dt>
<dd>
<p>
Use an NSEC3-capable algorithm to generate a DNSSEC key.
If this option is used with an algorithm that has both
NSEC and NSEC3 versions, then the NSEC3 version will be
used; for example, <span class="command"><strong>dnssec-keygen -3a RSASHA1</strong></span>
specifies the NSEC3RSASHA1 algorithm.
</p>
</dd>
<dt><span class="term">-C</span></dt>
<dd>
<p>
Compatibility mode: generates an old-style key, without
any metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
will include the key's creation date in the metadata stored
with the private key, and other dates may be set there as well
(publication date, activation date, etc). Keys that include
this data may be incompatible with older versions of BIND; the
Compatibility mode: generates an old-style key, without any
timing metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
will include the key's creation date in the metadata stored with
the private key, and other dates may be set there as well
(publication date, activation date, etc). Keys that include this
data may be incompatible with older versions of BIND; the
<code class="option">-C</code> option suppresses them.
</p>
</dd>
@@ -234,12 +220,6 @@
Sets the directory in which the key files are to be written.
</p>
</dd>
<dt><span class="term">-k</span></dt>
<dd>
<p>
Deprecated in favor of -T KEY.
</p>
</dd>
<dt><span class="term">-L <em class="replaceable"><code>ttl</code></em></span></dt>
<dd>
<p>
@@ -253,13 +233,24 @@
or <code class="literal">none</code> is the same as leaving it unset.
</p>
</dd>
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
<dd>
<p>
Specifies the owner type of the key. The value of
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
with a host (KEY)), USER (for a key associated with a
user(KEY)) or OTHER (DNSKEY). These values are case
insensitive. Defaults to ZONE for DNSKEY generation.
</p>
</dd>
<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
<dd>
<p>
Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
Other possible values for this argument are listed in
RFC 2535 and its successors.
Sets the protocol value for the generated key, for use
with <code class="option">-T KEY</code>. The protocol is a number between 0
and 255. The default is 3 (DNSSEC). Other possible values for
this argument are listed in RFC 2535 and its successors.
</p>
</dd>
<dt><span class="term">-q</span></dt>
@@ -306,26 +297,15 @@
default is DNSKEY when using a DNSSEC algorithm, but it can be
overridden to KEY for use with SIG(0).
</p>
<p>
</p>
<p>
Specifying any TSIG algorithm (HMAC-* or DH) with
<code class="option">-a</code> forces this option to KEY.
</p>
</dd>
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
<dd>
<p>
Indicates the use of the key. <code class="option">type</code> must be
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
is AUTHCONF. AUTH refers to the ability to authenticate
data, and CONF the ability to encrypt data.
</p>
</dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
<dd>
<p>
Sets the debugging level.
Indicates the use of the key, for use with <code class="option">-T
KEY</code>. <code class="option">type</code> must be one of AUTHCONF,
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH
refers to the ability to authenticate data, and CONF the ability
to encrypt data.
</p>
</dd>
<dt><span class="term">-V</span></dt>
@@ -334,6 +314,12 @@
Prints version information.
</p>
</dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
<dd>
<p>
Sets the debugging level.
</p>
</dd>
</dl></div>
</div>
@@ -476,10 +462,12 @@
key.
</p>
<p>
The <code class="filename">.key</code> file contains a DNS KEY record
that
can be inserted into a zone file (directly or with a $INCLUDE
statement).
The <code class="filename">.key</code> file contains a DNSKEY or KEY record.
When a zone is being signed by <span class="command"><strong>named</strong></span>
or <span class="command"><strong>dnssec-signzone</strong></span> <code class="option">-S</code>, DNSKEY
records are included automatically. In other cases,
the <code class="filename">.key</code> file can be inserted into a zone file
manually or with a <strong class="userinput"><code>$INCLUDE</code></strong> statement.
</p>
<p>
The <code class="filename">.private</code> file contains
@@ -487,22 +475,17 @@
fields. For obvious security reasons, this file does not have
general read permission.
</p>
<p>
Both <code class="filename">.key</code> and <code class="filename">.private</code>
files are generated for symmetric cryptography algorithms such as
HMAC-MD5, even though the public and private key are equivalent.
</p>
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>EXAMPLE</h2>
<p>
To generate an ECDSAP256SHA256 key for the domain
<strong class="userinput"><code>example.com</code></strong>, the following command would be
issued:
To generate an ECDSAP256SHA256 zone-signing key for the zone
<strong class="userinput"><code>example.com</code></strong>, issue the command:
</p>
<p><strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</code></strong>
<p>
<strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 example.com</code></strong>
</p>
<p>
The command would print a string of the form:
@@ -515,6 +498,12 @@
and
<code class="filename">Kexample.com.+013+26160.private</code>.
</p>
<p>
To generate a matching key-signing key, issue the command:
</p>
<p>
<strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 -f KSK example.com</code></strong>
</p>
</div>
<div class="refsection">
+10 -4
View File
@@ -46,13 +46,14 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
${NS_INCLUDES} ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \
${DBDRIVER_INCLUDES} @OPENSSL_INCLUDES@
${DBDRIVER_INCLUDES} ${MAXMINDDB_CFLAGS} \
@OPENSSL_INCLUDES@
CDEFINES = @CONTRIB_DLZ@
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
@@ -85,9 +86,11 @@ SUBDIRS = unix
TARGETS = named@EXEEXT@
GEOIPLINKOBJS = geoip.@O@
GEOIP2LINKOBJS = geoip.@O@
OBJS = builtin.@O@ config.@O@ control.@O@ \
controlconf.@O@ fuzz.@O@ @GEOIPLINKOBJS@ \
controlconf.@O@ fuzz.@O@ \
@GEOIPLINKOBJS@ @GEOIP2LINKOBJS@ \
log.@O@ logconf.@O@ main.@O@ \
server.@O@ statschannel.@O@ \
tkeyconf.@O@ tsigconf.@O@ zoneconf.@O@ \
@@ -98,9 +101,11 @@ UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
SYMOBJS = symtbl.@O@
GEOIPLINKSRCS = geoip.c
GEOIP2LINKSRCS = geoip.c
SRCS = builtin.c config.c control.c \
controlconf.c fuzz.c @GEOIPLINKSRCS@ \
controlconf.c fuzz.c \
@GEOIPLINKSRCS@ @GEOIP2LINKSRCS@ \
log.c logconf.c main.c \
server.c statschannel.c \
tkeyconf.c tsigconf.c zoneconf.c \
@@ -132,6 +137,7 @@ config.@O@: config.c
-DDYNDB_LIBDIR=\"@libdir@/bind\" \
-DNAMED_LOCALSTATEDIR=\"${localstatedir}\" \
-DNAMED_SYSCONFDIR=\"${sysconfdir}\" \
-DMAXMINDDB_PREFIX=\"@MAXMINDDB_PREFIX@\" \
-c ${srcdir}/config.c
server.@O@: server.c
+69 -40
View File
@@ -15,6 +15,15 @@
<xsl:template match="statistics[@version=&quot;3.11&quot;]">
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
$(function($) {
var wid=0;
$('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });
$('table.zones').css('min-width', wid );
});
</script>
<xsl:if test="system-property('xsl:vendor')!='Transformiix'">
<!-- Non Mozilla specific markup -->
<script type="text/javascript" src="https://www.google.com/jsapi"/>
@@ -221,6 +230,22 @@
background-color: rgb(1,169,206);
color: #ffffff;
}
table.zones {
border: 1px solid grey;
}
table.zones td {
text-align: right;
font-family: monospace;
}
table.zones td:nth-child(2) {
text-align: center;
}
table.zones td:nth-child(3) {
text-align: left;
}
table.zones tr:hover{
background-color: #99ddff;
}
td, th {
padding-right: 5px;
@@ -293,25 +318,25 @@
<hr/>
<h2>Server Status</h2>
<table class="info">
<tr>
<tr class="odd">
<th>Boot time:</th>
<td>
<xsl:value-of select="server/boot-time"/>
</td>
</tr>
<tr>
<tr class="even">
<th>Last reconfigured:</th>
<td>
<xsl:value-of select="server/config-time"/>
</td>
</tr>
<tr>
<tr class="odd">
<th>Current time:</th>
<td>
<xsl:value-of select="server/current-time"/>
</td>
</tr>
<tr>
<tr class="even">
<th>Server version:</th>
<td>
<xsl:value-of select="server/version"/>
@@ -330,7 +355,13 @@
<table class="counters">
<xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']">
<xsl:sort select="." data-type="number" order="descending"/>
<tr>
<xsl:variable name="css-class0">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$css-class0}">
<th>
<xsl:value-of select="@name"/>
</th>
@@ -611,13 +642,13 @@
<br/>
</xsl:if>
</xsl:for-each>
<xsl:if test="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h2>Traffic Size Statistics</h2>
</xsl:if>
<xsl:if test="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<h4>UDP Requests Received</h4>
<table class="counters">
<xsl:for-each select="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -625,6 +656,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -636,10 +668,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h4>UDP Responses Sent</h4>
<table class="counters">
<xsl:for-each select="traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -647,6 +679,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -658,10 +691,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<h4>TCP Requests Received</h4>
<table class="counters">
<xsl:for-each select="traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -669,6 +702,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -680,10 +714,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h4>TCP Responses Sent</h4>
<table class="counters">
<xsl:for-each select="traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -691,6 +725,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -724,35 +759,29 @@
</table>
<br/>
</xsl:if>
<xsl:for-each select="views/view">
<xsl:if test="zones/zone">
<xsl:if test="views/view/zones/zone">
<xsl:for-each select="views/view">
<h3>Zones for View <xsl:value-of select="@name"/></h3>
<table class="zones">
<tr>
<th>Name</th>
<th>Class</th>
<th>Type</th>
<th>Serial</th>
</tr>
<xsl:for-each select="zones/zone">
<tr>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@rdataclass"/>
</td>
<td>
<xsl:value-of select="type"/>
</td>
<td>
<xsl:value-of select="serial"/>
</td>
</tr>
</xsl:for-each>
<thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>
<tbody>
<xsl:for-each select="zones/zone">
<xsl:variable name="css-class15">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$css-class15}">
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@rdataclass"/></td>
<td><xsl:value-of select="type"/></td>
<td><xsl:value-of select="serial"/></td></tr>
</xsl:for-each>
</tbody>
</table>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:if>
<xsl:if test="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
<h2>Received QTYPES per view/zone</h2>
<xsl:for-each select="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
+65 -36
View File
@@ -20,6 +20,15 @@ static char xslmsg[] =
" <xsl:template match=\"statistics[@version=&quot;3.11&quot;]\">\n"
" <html>\n"
" <head>\n"
" <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js\"></script>\n"
" <script type=\"text/javascript\">\n"
" $(function($) {\n"
" var wid=0;\n"
" $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });\n"
" $('table.zones').css('min-width', wid );\n"
" });\n"
" </script>\n"
"\n"
" <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
" <!-- Non Mozilla specific markup -->\n"
" <script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"/>\n"
@@ -226,6 +235,22 @@ static char xslmsg[] =
" background-color: rgb(1,169,206);\n"
" color: #ffffff;\n"
" }\n"
" table.zones {\n"
" border: 1px solid grey;\n"
" }\n"
" table.zones td {\n"
" text-align: right;\n"
" font-family: monospace;\n"
" }\n"
" table.zones td:nth-child(2) {\n"
" text-align: center;\n"
" }\n"
" table.zones td:nth-child(3) {\n"
" text-align: left;\n"
" }\n"
" table.zones tr:hover{\n"
" background-color: #99ddff;\n"
" }\n"
"\n"
" td, th {\n"
" padding-right: 5px;\n"
@@ -298,25 +323,25 @@ static char xslmsg[] =
" <hr/>\n"
" <h2>Server Status</h2>\n"
" <table class=\"info\">\n"
" <tr>\n"
" <tr class=\"odd\">\n"
" <th>Boot time:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/boot-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"even\">\n"
" <th>Last reconfigured:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/config-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"odd\">\n"
" <th>Current time:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/current-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"even\">\n"
" <th>Server version:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/version\"/>\n"
@@ -335,7 +360,13 @@ static char xslmsg[] =
" <table class=\"counters\">\n"
" <xsl:for-each select=\"server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']\">\n"
" <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
" <tr>\n"
" <xsl:variable name=\"css-class0\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" <xsl:otherwise>odd</xsl:otherwise>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class0}\">\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -616,13 +647,13 @@ static char xslmsg[] =
" <br/>\n"
" </xsl:if>\n"
" </xsl:for-each>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h2>Traffic Size Statistics</h2>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <h4>UDP Requests Received</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -630,6 +661,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -641,10 +673,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h4>UDP Responses Sent</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -652,6 +684,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -663,10 +696,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <h4>TCP Requests Received</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -674,6 +707,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -685,10 +719,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h4>TCP Responses Sent</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -696,6 +730,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -729,35 +764,29 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"views/view/zones/zone\">\n"
" <xsl:for-each select=\"views/view\">\n"
" <xsl:if test=\"zones/zone\">\n"
" <h3>Zones for View <xsl:value-of select=\"@name\"/></h3>\n"
" <table class=\"zones\">\n"
" <tr>\n"
" <th>Name</th>\n"
" <th>Class</th>\n"
" <th>Type</th>\n"
" <th>Serial</th>\n"
" </tr>\n"
" <thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>\n"
" <tbody>\n"
" <xsl:for-each select=\"zones/zone\">\n"
" <tr>\n"
" <td>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"@rdataclass\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"type\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"serial\"/>\n"
" </td>\n"
" </tr>\n"
" <xsl:variable name=\"css-class15\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" <xsl:otherwise>odd</xsl:otherwise>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class15}\">\n"
" <td><xsl:value-of select=\"@name\"/></td>\n"
" <td><xsl:value-of select=\"@rdataclass\"/></td>\n"
" <td><xsl:value-of select=\"type\"/></td>\n"
" <td><xsl:value-of select=\"serial\"/></td></tr>\n"
" </xsl:for-each>\n"
" </tbody>\n"
" </table>\n"
" </xsl:if>\n"
" </xsl:for-each>\n"
" </xsl:if>\n"
" <xsl:if test=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
" <h2>Received QTYPES per view/zone</h2>\n"
" <xsl:for-each select=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
+5 -5
View File
@@ -66,6 +66,9 @@ options {\n\
#ifndef WIN32
" files unlimited;\n"
#endif
#ifdef HAVE_GEOIP2
" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP2\";\n"
#endif
"\
# has-old-clients <obsolete>;\n\
heartbeat-interval 60;\n\
@@ -154,11 +157,8 @@ options {\n\
# fetch-glue <obsolete>;\n\
fetch-quota-params 100 0.1 0.3 0.7;\n\
fetches-per-server 0;\n\
fetches-per-zone 0;\n"
#ifdef HAVE_GEOIP
" geoip-use-ecs yes;\n"
#endif
" glue-cache yes;\n\
fetches-per-zone 0;\n\
glue-cache yes;\n\
lame-ttl 600;\n"
#ifdef HAVE_LMDB
" lmdb-mapsize 32M;\n"
+120 -20
View File
@@ -13,20 +13,27 @@
#include <config.h>
#if defined(HAVE_GEOIP2)
#include <maxminddb.h>
#elif defined(HAVE_GEOIP)
#include <GeoIP.h>
#include <GeoIPCity.h>
#endif
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
#include <dns/geoip.h>
#include <named/log.h>
#include <named/geoip.h>
#include <dns/geoip.h>
#ifdef HAVE_GEOIP
static dns_geoip_databases_t geoip_table = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
static dns_geoip_databases_t geoip_table = DNS_GEOIP_DATABASE_INIT;
#if defined(HAVE_GEOIP)
static void
init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
init_geoip_db(void **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
GeoIPOptions method, const char *name)
{
char *info;
@@ -34,7 +41,7 @@ init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
REQUIRE(dbp != NULL);
db = *dbp;
db = (GeoIP *)*dbp;
if (db != NULL) {
GeoIP_delete(db);
@@ -72,32 +79,93 @@ init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
*dbp = db;
return;
fail:
if (fallback != 0)
if (fallback != 0) {
init_geoip_db(dbp, fallback, 0, method, name);
}
}
#endif /* HAVE_GEOIP */
#elif defined(HAVE_GEOIP2)
static MMDB_s geoip_country, geoip_city, geoip_as, geoip_isp, geoip_domain;
static MMDB_s *
open_geoip2(const char *dir, const char *dbfile, MMDB_s *mmdb) {
char pathbuf[PATH_MAX];
unsigned int n;
int ret;
n = snprintf(pathbuf, sizeof(pathbuf), "%s/%s", dir, dbfile);
if (n >= sizeof(pathbuf)) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"GeoIP2 database '%s/%s': path too long",
(dir != NULL) ? dir : ".", dbfile);
return (NULL);
}
ret = MMDB_open(pathbuf, MMDB_MODE_MMAP, mmdb);
if (ret == MMDB_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"opened GeoIP2 database '%s'", pathbuf);
return (mmdb);
}
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
"unable to open GeoIP2 database '%s' (status %d)",
pathbuf, ret);
return (NULL);
}
#endif /* HAVE_GEOIP2 */
void
named_geoip_init(void) {
#ifndef HAVE_GEOIP
return;
#else
GeoIP_cleanup();
if (named_g_geoip == NULL)
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
if (named_g_geoip == NULL) {
named_g_geoip = &geoip_table;
}
#if defined(HAVE_GEOIP)
GeoIP_cleanup();
#endif
#else
return;
#endif
}
void
named_geoip_load(char *dir) {
#ifndef HAVE_GEOIP
#if defined(HAVE_GEOIP2)
REQUIRE(dir != NULL);
UNUSED(dir);
named_g_geoip->country = open_geoip2(dir, "GeoIP2-Country.mmdb",
&geoip_country);
if (named_g_geoip->country == NULL) {
named_g_geoip->country = open_geoip2(dir,
"GeoLite2-Country.mmdb",
&geoip_country);
}
return;
#else
named_g_geoip->city = open_geoip2(dir, "GeoIP2-City.mmdb",
&geoip_city);
if (named_g_geoip->city == NULL) {
named_g_geoip->city = open_geoip2(dir, "GeoLite2-City.mmdb",
&geoip_city);
}
named_g_geoip->as = open_geoip2(dir, "GeoIP2-ASN.mmdb", &geoip_as);
if (named_g_geoip->as == NULL) {
named_g_geoip->as = open_geoip2(dir, "GeoLite2-ASN.mmdb",
&geoip_as);
}
named_g_geoip->isp = open_geoip2(dir, "GeoIP2-ISP.mmdb", &geoip_isp);
named_g_geoip->domain = open_geoip2(dir, "GeoIP2-Domain.mmdb",
&geoip_domain);
#elif defined(HAVE_GEOIP)
GeoIPOptions method;
#ifdef _WIN32
@@ -141,5 +209,37 @@ named_geoip_load(char *dir) {
method, "Domain");
init_geoip_db(&named_g_geoip->netspeed, GEOIP_NETSPEED_EDITION, 0,
method, "NetSpeed");
#endif /* HAVE_GEOIP */
#else
UNUSED(dir);
return;
#endif
}
void
named_geoip_shutdown(void) {
#ifdef HAVE_GEOIP2
if (named_g_geoip->country != NULL) {
MMDB_close(named_g_geoip->country);
named_g_geoip->country = NULL;
}
if (named_g_geoip->city != NULL) {
MMDB_close(named_g_geoip->city);
named_g_geoip->city = NULL;
}
if (named_g_geoip->as != NULL) {
MMDB_close(named_g_geoip->as);
named_g_geoip->as = NULL;
}
if (named_g_geoip->isp != NULL) {
MMDB_close(named_g_geoip->isp);
named_g_geoip->isp = NULL;
}
if (named_g_geoip->domain != NULL) {
MMDB_close(named_g_geoip->domain);
named_g_geoip->domain = NULL;
}
#endif /* HAVE_GEOIP2 */
dns_geoip_shutdown();
}
+10 -13
View File
@@ -9,18 +9,15 @@
* information regarding copyright ownership.
*/
#ifndef _GEOIP_H
#define _GEOIP_H
#pragma once
#ifdef HAVE_GEOIP
#include <GeoIP.h>
#include <GeoIPCity.h>
#endif /* HAVE_GEOIP */
void named_geoip_init(void);
void named_geoip_load(char *dir);
#ifdef HAVE_GEOIP
extern dns_geoip_databases_t *named_g_geoip;
#endif /* HAVE_GEOIP */
#endif
void
named_geoip_init(void);
void
named_geoip_load(char *dir);
void
named_geoip_shutdown(void);
+1 -1
View File
@@ -154,7 +154,7 @@ EXTERN bool named_g_keepstderr INIT(false);
EXTERN unsigned int named_g_tat_interval INIT(24*3600);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
EXTERN dns_geoip_databases_t *named_g_geoip INIT(NULL);
#endif
+14 -12
View File
@@ -10,12 +10,12 @@
.\" Title: named.conf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2018-12-07
.\" Date: 2019-04-25
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "NAMED\&.CONF" "5" "2018\-12\-07" "ISC" "BIND9"
.TH "NAMED\&.CONF" "5" "2019\-04\-25" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -409,11 +409,12 @@ options {
resolver\-retry\-interval \fIinteger\fR;
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
\fIinteger\fR;
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
\fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ policy ( cname |
disabled | drop | given | no\-op | nodata | nxdomain | passthru
| tcp\-only \fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ] [
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [
response\-policy { zone \fIstring\fR [ add\-soa \fIboolean\fR ] [ log
\fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval
\fIttlval\fR ] [ policy ( cname | disabled | drop | given | no\-op |
nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ add\-soa \fIboolean\fR ] [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [
min\-update\-interval \fIttlval\fR ] [ min\-ns\-dots \fIinteger\fR ] [
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
@@ -761,11 +762,12 @@ view \fIstring\fR [ \fIclass\fR ] {
resolver\-retry\-interval \fIinteger\fR;
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
\fIinteger\fR;
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
\fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ policy ( cname |
disabled | drop | given | no\-op | nodata | nxdomain | passthru
| tcp\-only \fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ] [
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [
response\-policy { zone \fIstring\fR [ add\-soa \fIboolean\fR ] [ log
\fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval
\fIttlval\fR ] [ policy ( cname | disabled | drop | given | no\-op |
nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ add\-soa \fIboolean\fR ] [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [
min\-update\-interval \fIttlval\fR ] [ min\-ns\-dots \fIinteger\fR ] [
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
+13 -11
View File
@@ -13,7 +13,7 @@
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf">
<info>
<date>2018-12-07</date>
<date>2019-04-25</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
@@ -403,11 +403,12 @@ options {
resolver-retry-interval <replaceable>integer</replaceable>;
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
<replaceable>integer</replaceable>;
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
<replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ policy ( cname |
disabled | drop | given | no-op | nodata | nxdomain | passthru
| tcp-only <replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ] [
nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ]; ... } [
response-policy { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
min-update-interval <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
@@ -735,11 +736,12 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
resolver-retry-interval <replaceable>integer</replaceable>;
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
<replaceable>integer</replaceable>;
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
<replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ policy ( cname |
disabled | drop | given | no-op | nodata | nxdomain | passthru
| tcp-only <replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ] [
nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ]; ... } [
response-policy { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
min-update-interval <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
+12 -10
View File
@@ -390,11 +390,12 @@ options
resolver-retry-interval <em class="replaceable"><code>integer</code></em>;<br>
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
    <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname |<br>
    disabled | drop | given | no-op | nodata | nxdomain | passthru<br>
    | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ add-soa <em class="replaceable"><code>boolean</code></em> ] [ log<br>
    <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
    nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
    recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ add-soa <em class="replaceable"><code>boolean</code></em> ] [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [<br>
    min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
@@ -727,11 +728,12 @@ view
resolver-retry-interval <em class="replaceable"><code>integer</code></em>;<br>
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
    <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname |<br>
    disabled | drop | given | no-op | nodata | nxdomain | passthru<br>
    | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ add-soa <em class="replaceable"><code>boolean</code></em> ] [ log<br>
    <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
    nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
    recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ add-soa <em class="replaceable"><code>boolean</code></em> ] [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [<br>
    min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
+174 -85
View File
@@ -108,9 +108,9 @@
#include <named/config.h>
#include <named/control.h>
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
#include <named/geoip.h>
#endif /* HAVE_GEOIP */
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
#include <named/log.h>
#include <named/logconf.h>
#include <named/main.h>
@@ -165,23 +165,23 @@
* using it has a 'result' variable and a 'cleanup' label.
*/
#define CHECK(op) \
do { result = (op); \
if (result != ISC_R_SUCCESS) goto cleanup; \
do { result = (op); \
if (result != ISC_R_SUCCESS) goto cleanup; \
} while (0)
#define TCHECK(op) \
do { tresult = (op); \
if (tresult != ISC_R_SUCCESS) { \
isc_buffer_clear(*text); \
goto cleanup; \
} \
do { tresult = (op); \
if (tresult != ISC_R_SUCCESS) { \
isc_buffer_clear(*text); \
goto cleanup; \
} \
} while (0)
#define CHECKM(op, msg) \
do { result = (op); \
if (result != ISC_R_SUCCESS) { \
isc_log_write(named_g_lctx, \
NAMED_LOGCATEGORY_GENERAL, \
NAMED_LOGCATEGORY_GENERAL, \
NAMED_LOGMODULE_SERVER, \
ISC_LOG_ERROR, \
"%s: %s", msg, \
@@ -194,7 +194,7 @@
do { result = (op); \
if (result != ISC_R_SUCCESS) { \
isc_log_write(named_g_lctx, \
NAMED_LOGCATEGORY_GENERAL, \
NAMED_LOGCATEGORY_GENERAL, \
NAMED_LOGMODULE_SERVER, \
ISC_LOG_ERROR, \
"%s '%s': %s", msg, file, \
@@ -703,7 +703,8 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
static isc_result_t
dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
bool managed, dst_key_t **target, isc_mem_t *mctx)
bool managed, dst_key_t **target, const char **keynamestrp,
isc_mem_t *mctx)
{
dns_rdataclass_t viewclass;
dns_rdata_dnskey_t keystruct;
@@ -721,12 +722,14 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
dst_key_t *dstkey = NULL;
INSIST(target != NULL && *target == NULL);
INSIST(keynamestrp != NULL && *keynamestrp == NULL);
flags = cfg_obj_asuint32(cfg_tuple_get(key, "flags"));
proto = cfg_obj_asuint32(cfg_tuple_get(key, "protocol"));
alg = cfg_obj_asuint32(cfg_tuple_get(key, "algorithm"));
keyname = dns_fixedname_name(&fkeyname);
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
*keynamestrp = keynamestr;
if (managed) {
const char *initmethod;
@@ -760,6 +763,8 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
if (flags > 0xffff)
CHECKM(ISC_R_RANGE, "key flags");
if (flags & DNS_KEYFLAG_REVOKE)
CHECKM(DST_R_BADKEYTYPE, "key flags revoke bit set");
if (proto > 0xff)
CHECKM(ISC_R_RANGE, "key protocol");
if (alg > 0xff)
@@ -799,26 +804,118 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
return (ISC_R_SUCCESS);
cleanup:
if (result == DST_R_NOCRYPTO) {
if (dstkey != NULL) {
dst_key_free(&dstkey);
}
return (result);
}
/*%
* Parse 'key' in the context of view configuration 'vconfig'. If successful,
* add the key to 'secroots' if both of the following conditions are true:
*
* - 'keyname_match' is NULL or it matches the owner name of 'key',
* - support for the algorithm used by 'key' is not disabled by 'resolver'
* for the owner name of 'key'.
*
* 'managed' is true for managed keys and false for trusted keys. 'mctx' is
* the memory context to use for allocating memory.
*/
static isc_result_t
process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
dns_keytable_t *secroots, const dns_name_t *keyname_match,
dns_resolver_t *resolver, bool managed, isc_mem_t *mctx)
{
const dns_name_t *keyname = NULL;
const char *keynamestr = NULL;
dst_key_t *dstkey = NULL;
unsigned int keyalg;
isc_result_t result;
result = dstkey_fromconfig(vconfig, key, managed, &dstkey, &keynamestr,
mctx);
switch (result) {
case ISC_R_SUCCESS:
/*
* Key was parsed correctly, its algorithm is supported by the
* crypto library, and it is not revoked.
*/
keyname = dst_key_name(dstkey);
keyalg = dst_key_alg(dstkey);
break;
case DST_R_UNSUPPORTEDALG:
case DST_R_BADKEYTYPE:
/*
* Key was parsed correctly, but it cannot be used; this is not
* a fatal error - log a warning about this key being ignored,
* but do not prevent any further ones from being processed.
*/
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"ignoring %s key for '%s': %s",
managed ? "managed" : "trusted",
keynamestr, isc_result_totext(result));
return (ISC_R_SUCCESS);
case DST_R_NOCRYPTO:
/*
* Crypto support is not available.
*/
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
"ignoring %s key for '%s': no crypto support",
managed ? "managed" : "trusted",
keynamestr);
} else if (result == DST_R_UNSUPPORTEDALG) {
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"skipping %s key for '%s': %s",
managed ? "managed" : "trusted",
keynamestr, isc_result_totext(result));
} else {
return (result);
default:
/*
* Something unexpected happened; we have no choice but to
* indicate an error so that the configuration loading process
* is interrupted.
*/
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
"configuring %s key for '%s': %s",
managed ? "managed" : "trusted",
keynamestr, isc_result_totext(result));
result = ISC_R_FAILURE;
return (ISC_R_FAILURE);
}
if (dstkey != NULL)
/*
* If the caller requested to only load keys for a specific name and
* the owner name of this key does not match the requested name, do not
* load it.
*/
if (keyname_match != NULL && !dns_name_equal(keyname_match, keyname)) {
goto done;
}
/*
* Ensure that 'resolver' allows using the algorithm of this key for
* its owner name. If it does not, do not load the key and log a
* warning, but do not prevent further keys from being processed.
*/
if (!dns_resolver_algorithm_supported(resolver, keyname, keyalg)) {
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"ignoring %s key for '%s': algorithm is disabled",
managed ? "managed" : "trusted", keynamestr);
goto done;
}
/*
* Add the key to 'secroots'. This key is taken from the
* configuration, so if it's a managed key then it's an initializing
* key; that's why 'managed' is duplicated below.
*/
result = dns_keytable_add(secroots, managed, managed, &dstkey);
done:
/*
* Ensure 'dstkey' does not leak. Note that if dns_keytable_add()
* succeeds, ownership of the key structure is transferred to the key
* table, i.e. 'dstkey' is set to NULL.
*/
if (dstkey != NULL) {
dst_key_free(&dstkey);
}
return (result);
}
@@ -834,8 +931,7 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
const dns_name_t *keyname, isc_mem_t *mctx)
{
const cfg_listelt_t *elt, *elt2;
const cfg_obj_t *key, *keylist;
dst_key_t *dstkey = NULL;
const cfg_obj_t *keylist;
isc_result_t result;
dns_keytable_t *secroots = NULL;
@@ -851,42 +947,13 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
elt2 != NULL;
elt2 = cfg_list_next(elt2))
{
key = cfg_listelt_value(elt2);
result = dstkey_fromconfig(vconfig, key, managed,
&dstkey, mctx);
if (result == DST_R_UNSUPPORTEDALG) {
result = ISC_R_SUCCESS;
continue;
}
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
/*
* If keyname was specified, we only add that key.
*/
if (keyname != NULL &&
!dns_name_equal(keyname, dst_key_name(dstkey)))
{
dst_key_free(&dstkey);
continue;
}
/*
* This key is taken from the configuration, so
* if it's a managed key then it's an
* initializing key; that's why 'managed'
* is duplicated below.
*/
CHECK(dns_keytable_add(secroots, managed,
managed, &dstkey));
CHECK(process_key(cfg_listelt_value(elt2), vconfig,
secroots, keyname, view->resolver,
managed, mctx));
}
}
cleanup:
if (dstkey != NULL) {
dst_key_free(&dstkey);
}
if (secroots != NULL) {
dns_keytable_detach(&secroots);
}
@@ -2115,6 +2182,7 @@ configure_rpz_name2(dns_view_t *view, const cfg_obj_t *obj, dns_name_t *name,
static isc_result_t
configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
bool recursive_only_default,
bool add_soa_default,
dns_ttl_t ttl_default,
uint32_t minupdateinterval_default,
const dns_rpz_zone_t *old,
@@ -2259,6 +2327,13 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
!dns_name_equal(&old->cname, &zone->cname)))
*old_rpz_okp = false;
obj = cfg_tuple_get(rpz_obj, "add-soa");
if (cfg_obj_isvoid(obj)) {
zone->addsoa = add_soa_default;
} else {
zone->addsoa = cfg_obj_asboolean(obj);
}
return (ISC_R_SUCCESS);
}
@@ -2271,7 +2346,7 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
char *rps_cstr;
size_t rps_cstr_size;
const cfg_obj_t *sub_obj;
bool recursive_only_default;
bool recursive_only_default, add_soa_default;
bool nsip_enabled, nsdname_enabled;
dns_rpz_zbits_t nsip_on, nsdname_on;
dns_ttl_t ttl_default;
@@ -2367,6 +2442,13 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
recursive_only_default = true;
}
sub_obj = cfg_tuple_get(rpz_obj, "add-soa");
if (!cfg_obj_isvoid(sub_obj) && !cfg_obj_asboolean(sub_obj)) {
add_soa_default = false;
} else {
add_soa_default = true;
}
sub_obj = cfg_tuple_get(rpz_obj, "break-dnssec");
if (!cfg_obj_isvoid(sub_obj) && cfg_obj_asboolean(sub_obj)) {
zones->p.break_dnssec = true;
@@ -2429,6 +2511,7 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
}
result = configure_rpz_zone(view, zone_element,
recursive_only_default,
add_soa_default,
ttl_default,
minupdateinterval_default,
old_zone, old_rpz_okp);
@@ -3655,9 +3738,21 @@ register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
void *callback_data)
{
dns_view_t *view = callback_data;
char full_path[PATH_MAX];
isc_result_t result;
result = ns_plugin_register(plugin_path, parameters, config,
result = ns_plugin_expandpath(plugin_path,
full_path, sizeof(full_path));
if (result != ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"%s: plugin configuration failed: "
"unable to get full plugin path: %s",
plugin_path, isc_result_totext(result));
return (result);
}
result = ns_plugin_register(full_path, parameters, config,
cfg_obj_file(obj), cfg_obj_line(obj),
named_g_mctx, named_g_lctx,
named_g_aclconfctx, view);
@@ -3665,7 +3760,7 @@ register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"%s: plugin configuration failed: %s",
plugin_path, isc_result_totext(result));
full_path, isc_result_totext(result));
}
return (result);
@@ -4993,8 +5088,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
/*
* Configure default allow-update and allow-update-forwarding ACLs,
* so they can be inherited by zones. (Note these cannot be set at
* options/view level.)
* so they can be inherited by zones. (XXX: These are not
* read from the options/view level here. However, they may be
* read from there in zoneconf.c:configure_zone_acl() later.)
*/
if (view->updateacl == NULL) {
CHECK(configure_view_acl(NULL, NULL, named_g_config,
@@ -8187,7 +8283,7 @@ load_configuration(const char *filename, named_server_t *server,
}
isc_socketmgr_setreserved(named_g_socketmgr, reserved);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
/*
* Initialize GeoIP databases from the configured location.
* This should happen before configuring any ACLs, so that we
@@ -8204,7 +8300,7 @@ load_configuration(const char *filename, named_server_t *server,
named_geoip_load(NULL);
}
named_g_aclconfctx->geoip = named_g_geoip;
#endif /* HAVE_GEOIP */
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
/*
* Configure various server options.
@@ -9417,25 +9513,18 @@ run_server(isc_task_t *task, isc_event_t *event) {
dns_dispatchmgr_setstats(named_g_dispatchmgr, server->resolverstats);
#ifdef HAVE_GEOIP
CHECKFATAL(ns_interfacemgr_create(named_g_mctx, server->sctx,
named_g_taskmgr, named_g_timermgr,
named_g_socketmgr,
named_g_dispatchmgr,
server->task, named_g_udpdisp,
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
named_g_geoip,
&server->interfacemgr),
"creating interface manager");
#else
CHECKFATAL(ns_interfacemgr_create(named_g_mctx, server->sctx,
named_g_taskmgr, named_g_timermgr,
named_g_socketmgr,
named_g_dispatchmgr,
server->task, named_g_udpdisp,
NULL,
#endif
&server->interfacemgr),
"creating interface manager");
#endif
CHECKFATAL(isc_timer_create(named_g_timermgr, isc_timertype_inactive,
NULL, NULL, server->task,
@@ -9557,9 +9646,9 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
#ifdef HAVE_DNSTAP
dns_dt_shutdown();
#endif
#ifdef HAVE_GEOIP
dns_geoip_shutdown();
#endif
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
named_geoip_shutdown();
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
dns_db_detach(&server->in_roothints);
@@ -9675,14 +9764,14 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
&server->sctx),
"creating server context");
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP) || defined(HAVE_GEOIP2)
/*
* GeoIP must be initialized before the interface
* manager (which includes the ACL environment)
* is created
*/
named_geoip_init();
#endif
#endif /* HAVE_GEOIP || HAVE_GEOIP2 */
#ifdef ENABLE_AFL
server->sctx->fuzztype = named_g_fuzz_type;
@@ -10570,7 +10659,7 @@ add_zone_tolist(dns_zone_t *zone, void *uap) {
struct zonelistentry *zle;
zle = isc_mem_get(dctx->mctx, sizeof *zle);
if (zle == NULL)
if (zle == NULL)
return (ISC_R_NOMEMORY);
zle->zone = NULL;
dns_zone_attach(zone, &zle->zone);
@@ -11453,13 +11542,13 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
? "ON" : "OFF");
CHECK(putstr(text, line));
snprintf(line, sizeof(line), "recursive clients: %d/%d/%d\n",
snprintf(line, sizeof(line), "recursive clients: %u/%u/%u\n",
isc_quota_getused(&server->sctx->recursionquota),
isc_quota_getsoft(&server->sctx->recursionquota),
isc_quota_getmax(&server->sctx->recursionquota));
CHECK(putstr(text, line));
snprintf(line, sizeof(line), "tcp clients: %d/%d\n",
snprintf(line, sizeof(line), "tcp clients: %u/%u\n",
isc_quota_getused(&server->sctx->tcpquota),
isc_quota_getmax(&server->sctx->tcpquota));
CHECK(putstr(text, line));
@@ -14664,13 +14753,13 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
"added NTA '%s' (%d sec) in view '%s'",
namebuf, ntattl, view->name);
} else {
bool removed;
bool wasremoved;
result = dns_ntatable_delete(ntatable, ntaname);
if (result == ISC_R_SUCCESS) {
removed = true;
wasremoved = true;
} else if (result == ISC_R_NOTFOUND) {
removed = false;
wasremoved = false;
} else {
goto cleanup;
}
@@ -14681,13 +14770,13 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
first = false;
CHECK(putstr(text, "Negative trust anchor "));
CHECK(putstr(text, removed ? "removed: "
: "not found: "));
CHECK(putstr(text, wasremoved ? "removed: "
: "not found: "));
CHECK(putstr(text, namebuf));
CHECK(putstr(text, "/"));
CHECK(putstr(text, view->name));
if (removed) {
if (wasremoved) {
isc_log_write(named_g_lctx,
NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER,
+152 -2
View File
@@ -1446,6 +1446,60 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
#endif
}
static void
dnssecsignstat_dump(dns_keytag_t tag, uint64_t val, void *arg) {
FILE *fp;
char tagbuf[64];
stats_dumparg_t *dumparg = arg;
#ifdef HAVE_LIBXML2
xmlTextWriterPtr writer;
int xmlrc;
#endif
#ifdef HAVE_JSON
json_object *zoneobj, *obj;
#endif
snprintf(tagbuf, sizeof(tagbuf), "%u", tag);
switch (dumparg->type) {
case isc_statsformat_file:
fp = dumparg->arg;
fprintf(fp, "%20" PRIu64 " %s\n", val, tagbuf);
break;
case isc_statsformat_xml:
#ifdef HAVE_LIBXML2
writer = dumparg->arg;
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counter"));
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name",
ISC_XMLCHAR tagbuf ));
TRY0(xmlTextWriterWriteFormatString(writer,
"%" PRIu64,
val));
TRY0(xmlTextWriterEndElement(writer)); /* counter */
#endif
break;
case isc_statsformat_json:
#ifdef HAVE_JSON
zoneobj = (json_object *) dumparg->arg;
obj = json_object_new_int64(val);
if (obj == NULL) {
return;
}
json_object_object_add(zoneobj, tagbuf, obj);
#endif
break;
}
return;
#ifdef HAVE_LIBXML2
error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed at dnssecsignstat_dump()");
dumparg->result = ISC_R_FAILURE;
return;
#endif
}
#ifdef HAVE_LIBXML2
/*
* Which statistics to include when rendering to XML
@@ -1508,6 +1562,8 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
isc_stats_t *zonestats;
isc_stats_t *gluecachestats;
dns_stats_t *rcvquerystats;
dns_stats_t *dnssecsignstats;
dns_stats_t *dnssecrefreshstats;
uint64_t nsstat_values[ns_statscounter_max];
uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
@@ -1535,8 +1591,8 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer,
ISC_XMLCHAR "type",
ISC_XMLCHAR "gluecache"));
ISC_XMLCHAR "type",
ISC_XMLCHAR "gluecache"));
result = dump_counters(gluecachestats,
isc_statsformat_xml,
@@ -1569,6 +1625,46 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
/* counters type="qtype"*/
TRY0(xmlTextWriterEndElement(writer));
}
dnssecsignstats = dns_zone_getdnssecsignstats(zone);
if (dnssecsignstats != NULL) {
TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer,
ISC_XMLCHAR "type",
ISC_XMLCHAR "dnssec-sign"));
dumparg.result = ISC_R_SUCCESS;
dns_dnssecsignstats_dump(dnssecsignstats,
dnssecsignstat_dump,
&dumparg, 0);
if(dumparg.result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="dnssec-sign"*/
TRY0(xmlTextWriterEndElement(writer));
}
dnssecrefreshstats = dns_zone_getdnssecrefreshstats(zone);
if (dnssecrefreshstats != NULL) {
TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer,
ISC_XMLCHAR "type",
ISC_XMLCHAR "dnssec-refresh"));
dumparg.result = ISC_R_SUCCESS;
dns_dnssecsignstats_dump(dnssecrefreshstats,
dnssecsignstat_dump,
&dumparg, 0);
if(dumparg.result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="dnssec-refresh"*/
TRY0(xmlTextWriterEndElement(writer));
}
}
TRY0(xmlTextWriterEndElement(writer)); /* zone */
@@ -2289,6 +2385,8 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
isc_stats_t *zonestats;
isc_stats_t *gluecachestats;
dns_stats_t *rcvquerystats;
dns_stats_t *dnssecsignstats;
dns_stats_t *dnssecrefreshstats;
uint64_t nsstat_values[ns_statscounter_max];
uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
@@ -2366,6 +2464,58 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
else
json_object_put(counters);
}
dnssecsignstats = dns_zone_getdnssecsignstats(zone);
if (dnssecsignstats != NULL) {
stats_dumparg_t dumparg;
json_object *counters = json_object_new_object();
CHECKMEM(counters);
dumparg.type = isc_statsformat_json;
dumparg.arg = counters;
dumparg.result = ISC_R_SUCCESS;
dns_dnssecsignstats_dump(dnssecsignstats,
dnssecsignstat_dump,
&dumparg, 0);
if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters);
goto error;
}
if (json_object_get_object(counters)->count != 0) {
json_object_object_add(zoneobj,
"dnssec-sign",
counters);
} else {
json_object_put(counters);
}
}
dnssecrefreshstats = dns_zone_getdnssecrefreshstats(zone);
if (dnssecrefreshstats != NULL) {
stats_dumparg_t dumparg;
json_object *counters = json_object_new_object();
CHECKMEM(counters);
dumparg.type = isc_statsformat_json;
dumparg.arg = counters;
dumparg.result = ISC_R_SUCCESS;
dns_dnssecsignstats_dump(dnssecrefreshstats,
dnssecsignstat_dump,
&dumparg, 0);
if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters);
goto error;
}
if (json_object_get_object(counters)->count != 0) {
json_object_object_add(zoneobj,
"dnssec-refresh",
counters);
} else {
json_object_put(counters);
}
}
}
json_object_array_add(zonearray, zoneobj);
+2
View File
@@ -17,7 +17,9 @@
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#include <dns/log.h>
#include <dns/result.h>
+1 -1
View File
@@ -82,7 +82,7 @@ ServiceControl(DWORD dwCtrlCode) {
case SERVICE_CONTROL_STOP:
named_server_flushonshutdown(named_g_server, true);
isc_app_shutdown();
UpdateSCM(SERVICE_STOPPED);
UpdateSCM(SERVICE_STOP_PENDING);
break;
default:
break;
+2 -2
View File
@@ -349,9 +349,9 @@ named_os_shutdown(void) {
if (lockfilefd != -1) {
(void) UnlockFile((HANDLE) _get_osfhandle(lockfilefd),
0, 0, 0, 1);
close(lockfilefd);
lockfilefd = -1;
}
cleanup_lockfile();
ntservice_shutdown(); /* This MUST be the last thing done */
}
+17 -2
View File
@@ -906,6 +906,8 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
const dns_master_style_t *masterstyle = &dns_master_style_default;
isc_stats_t *zoneqrystats;
dns_stats_t *rcvquerystats;
dns_stats_t *dnssecsignstats;
dns_stats_t *dnssecrefreshstats;
dns_zonestat_level_t statlevel = dns_zonestat_none;
int seconds;
dns_zone_t *mayberaw = (raw != NULL) ? raw : zone;
@@ -1190,14 +1192,19 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
zoneqrystats = NULL;
rcvquerystats = NULL;
dnssecsignstats = NULL;
dnssecrefreshstats = NULL;
if (statlevel == dns_zonestat_full) {
RETERR(isc_stats_create(mctx, &zoneqrystats,
ns_statscounter_max));
RETERR(dns_rdatatypestats_create(mctx,
&rcvquerystats));
RETERR(dns_rdatatypestats_create(mctx, &rcvquerystats));
RETERR(dns_dnssecsignstats_create(mctx, &dnssecsignstats));
RETERR(dns_dnssecsignstats_create(mctx, &dnssecrefreshstats));
}
dns_zone_setrequeststats(zone, zoneqrystats);
dns_zone_setrcvquerystats(zone, rcvquerystats);
dns_zone_setdnssecsignstats(zone, dnssecsignstats);
dns_zone_setdnssecrefreshstats(zone, dnssecrefreshstats);
if (zoneqrystats != NULL)
isc_stats_detach(&zoneqrystats);
@@ -1205,6 +1212,14 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
if(rcvquerystats != NULL)
dns_stats_detach(&rcvquerystats);
if(dnssecsignstats != NULL) {
dns_stats_detach(&dnssecsignstats);
}
if(dnssecrefreshstats != NULL) {
dns_stats_detach(&dnssecrefreshstats);
}
/*
* Configure master functionality. This applies
* to primary masters (type "master") and slaves
+1 -1
View File
@@ -26,7 +26,7 @@ CINCLUDES = ${DNS_INCLUDES} ${BIND9_INCLUDES} ${ISC_INCLUDES} \
CDEFINES = -DVERSION=\"${VERSION}\" @USE_GSSAPI@
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
+31
View File
@@ -33,6 +33,7 @@
#include <isc/mem.h>
#include <isc/nonce.h>
#include <isc/parseint.h>
#include <isc/portset.h>
#include <isc/print.h>
#include <isc/platform.h>
#include <isc/random.h>
@@ -748,6 +749,34 @@ shutdown_program(isc_task_t *task, isc_event_t *event) {
maybeshutdown();
}
/*
* Try honoring the operating system's preferred ephemeral port range.
*/
static void
set_source_ports(dns_dispatchmgr_t *manager) {
isc_portset_t *v4portset = NULL, *v6portset = NULL;
in_port_t udpport_low, udpport_high;
isc_result_t result;
result = isc_portset_create(gmctx, &v4portset);
check_result(result, "isc_portset_create (v4)");
result = isc_net_getudpportrange(AF_INET, &udpport_low, &udpport_high);
check_result(result, "isc_net_getudpportrange (v4)");
isc_portset_addrange(v4portset, udpport_low, udpport_high);
result = isc_portset_create(gmctx, &v6portset);
check_result(result, "isc_portset_create (v6)");
result = isc_net_getudpportrange(AF_INET6, &udpport_low, &udpport_high);
check_result(result, "isc_net_getudpportrange (v6)");
isc_portset_addrange(v6portset, udpport_low, udpport_high);
result = dns_dispatchmgr_setavailports(manager, v4portset, v6portset);
check_result(result, "dns_dispatchmgr_setavailports");
isc_portset_destroy(gmctx, &v4portset);
isc_portset_destroy(gmctx, &v6portset);
}
static void
setup_system(void) {
isc_result_t result;
@@ -898,6 +927,8 @@ setup_system(void) {
check_result(result, "dst_lib_init");
is_dst_up = true;
set_source_ports(dispatchmgr);
attrmask = DNS_DISPATCHATTR_UDP | DNS_DISPATCHATTR_TCP;
attrmask |= DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_IPV6;
+4 -47
View File
@@ -187,13 +187,13 @@ main(int argc, char *argv[]) {
isc_result_t result;
CK_RV rv;
CK_SLOT_ID slot = 0;
CK_MECHANISM mech, dpmech;
CK_MECHANISM mech;
CK_SESSION_HANDLE hSession;
char *lib_name = NULL;
char *pin = NULL;
CK_ULONG bits = 0;
CK_CHAR *label = NULL;
CK_OBJECT_HANDLE privatekey, publickey, domainparams;
CK_OBJECT_HANDLE privatekey, publickey;
CK_BYTE exponent[5];
CK_ULONG expsize = 0;
pk11_context_t pctx;
@@ -201,7 +201,6 @@ main(int argc, char *argv[]) {
int c, errflg = 0;
int hide = 1, quiet = 0;
int idlen = 0, id_offset = 0;
unsigned int i;
unsigned long id = 0;
CK_BYTE idbuf[4];
CK_ULONG ulObjectCount;
@@ -209,10 +208,7 @@ main(int argc, char *argv[]) {
{CKA_LABEL, NULL_PTR, 0}
};
CK_ATTRIBUTE *public_template = NULL;
CK_ATTRIBUTE *domain_template = NULL;
CK_ATTRIBUTE *param_template = NULL;
CK_ULONG public_attrcnt = 0, private_attrcnt = PRIVATE_ATTRS;
CK_ULONG domain_attrcnt = 0, param_attrcnt = 0;
key_class_t keyclass = key_rsa;
pk11_optype_t op_type = OP_ANY;
@@ -457,46 +453,6 @@ main(int argc, char *argv[]) {
private_template[5].pValue = &truevalue;
}
if (keyclass == key_rsa || keyclass == key_ecc || keyclass == key_ecx)
goto generate_keys;
/* Generate Domain parameters */
rv = pkcs_C_GenerateKey(hSession, &dpmech, domain_template,
domain_attrcnt, &domainparams);
if (rv != CKR_OK) {
fprintf(stderr,
"C_GenerateKey: Error = 0x%.8lX\n", rv);
error = 1;
goto exit_search;
}
/* Get Domain parameters */
rv = pkcs_C_GetAttributeValue(hSession, domainparams,
param_template, param_attrcnt);
if (rv != CKR_OK) {
fprintf(stderr,
"C_GetAttributeValue0: Error = 0x%.8lX\n", rv);
error = 1;
goto exit_search;
}
/* Allocate space for parameter attributes */
for (i = 0; i < param_attrcnt; i++) {
param_template[i].pValue = NULL;
}
for (i = 0; i < param_attrcnt; i++) {
param_template[i].pValue = malloc(param_template[i].ulValueLen);
if (param_template[i].pValue == NULL) {
fprintf(stderr, "malloc failed\n");
error = 1;
goto exit_search;
}
}
generate_keys:
/* Generate Key pair for signing/verifying */
rv = pkcs_C_GenerateKeyPair(hSession, &mech,
public_template, public_attrcnt,
@@ -506,8 +462,9 @@ main(int argc, char *argv[]) {
if (rv != CKR_OK) {
fprintf(stderr, "C_GenerateKeyPair: Error = 0x%.8lX\n", rv);
error = 1;
} else if (!quiet)
} else if (!quiet) {
printf("Key pair generation complete.\n");
}
exit_search:
rv = pkcs_C_FindObjectsFinal(hSession);
+13 -6
View File
@@ -17,7 +17,7 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
${NS_INCLUDES} ${DNS_INCLUDES} \
${ISCCFG_INCLUDES} ${ISC_INCLUDES}
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
NSLIBS = ../../lib/ns/libns.@A@
@@ -25,6 +25,7 @@ NSLIBS = ../../lib/ns/libns.@A@
LIBS =
SO_TARGETS = lib/filter-aaaa.@SO@
SO_INSTALL = filter-aaaa.@SO@
TARGETS = @SO_TARGETS@
SO_OBJS = filter-aaaa.@O@
@@ -59,14 +60,20 @@ clean distclean::
rm -f ${TARGETS} ${OBJS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${libdir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${plugindir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: filter-aaaa.@SO@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} filter-aaaa.@SO@ \
${DESTDIR}${libdir}
install:: @SO_TARGETS@ installdirs
for i in ${SO_INSTALL} ; \
do \
if test -f $$i ; \
then \
${LIBTOOL_MODE_INSTALL} ${INSTALL_LIBRARY} $$i \
${DESTDIR}${plugindir}; \
fi \
done
${INSTALL_DATA} ${srcdir}/filter-aaaa.8 ${DESTDIR}${mandir}/man8
uninstall::
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${libdir}/filter-aaaa.@SO@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${plugindir}/filter-aaaa.@SO@
rm -f ${DESTDIR}${mandir}/man8/filter-aaaa.8
+13
View File
@@ -85,11 +85,13 @@ typedef struct filter_instance {
* Memory pool for use with persistent data.
*/
isc_mempool_t *datapool;
isc_mutex_t plock;
/*
* Hash table associating a client object with its persistent data.
*/
isc_ht_t *ht;
isc_mutex_t hlock;
/*
* Values configured when the module is loaded.
@@ -377,6 +379,7 @@ plugin_register(const char *parameters,
CHECK(isc_mempool_create(mctx, sizeof(filter_data_t),
&inst->datapool));
CHECK(isc_ht_init(&inst->ht, mctx, 16));
isc_mutex_init(&inst->hlock);
/*
* Fill the mempool with 1K filter_aaaa state objects at
@@ -390,6 +393,8 @@ plugin_register(const char *parameters,
*/
isc_mempool_setfillcount(inst->datapool, 1024);
isc_mempool_setfreemax(inst->datapool, UINT_MAX);
isc_mutex_init(&inst->plock);
isc_mempool_associatelock(inst->datapool, &inst->plock);
/*
* Set hook points in the view's hooktable.
@@ -445,9 +450,11 @@ plugin_destroy(void **instp) {
if (inst->ht != NULL) {
isc_ht_destroy(&inst->ht);
isc_mutex_destroy(&inst->hlock);
}
if (inst->datapool != NULL) {
isc_mempool_destroy(&inst->datapool);
isc_mutex_destroy(&inst->plock);
}
if (inst->aaaa_acl != NULL) {
dns_acl_detach(&inst->aaaa_acl);
@@ -517,8 +524,10 @@ client_state_get(const query_ctx_t *qctx, filter_instance_t *inst) {
filter_data_t *client_state = NULL;
isc_result_t result;
LOCK(&inst->hlock);
result = isc_ht_find(inst->ht, (const unsigned char *)&qctx->client,
sizeof(qctx->client), (void **)&client_state);
UNLOCK(&inst->hlock);
return (result == ISC_R_SUCCESS ? client_state : NULL);
}
@@ -536,8 +545,10 @@ client_state_create(const query_ctx_t *qctx, filter_instance_t *inst) {
client_state->mode = NONE;
client_state->flags = 0;
LOCK(&inst->hlock);
result = isc_ht_add(inst->ht, (const unsigned char *)&qctx->client,
sizeof(qctx->client), client_state);
UNLOCK(&inst->hlock);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
}
@@ -550,8 +561,10 @@ client_state_destroy(const query_ctx_t *qctx, filter_instance_t *inst) {
return;
}
LOCK(&inst->hlock);
result = isc_ht_delete(inst->ht, (const unsigned char *)&qctx->client,
sizeof(qctx->client));
UNLOCK(&inst->hlock);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
isc_mempool_put(inst->datapool, client_state);
+19 -17
View File
@@ -49,7 +49,7 @@ and
\fBdnssec\-settime\fR\&.
.PP
DNSSEC policy can be read from a configuration file (default
/etc/dnssec\-policy\&.conf), from which the key parameters, publication and rollover schedule, and desired coverage duration for any given zone can be determined\&. This file may be used to define individual DNSSEC policies on a per\-zone basis, or to set a default policy used for all zones\&.
/etc/dnssec\-policy\&.conf), from which the key parameters, publication and rollover schedule, and desired coverage duration for any given zone can be determined\&. This file may be used to define individual DNSSEC policies on a per\-zone basis, or to set a "default" policy used for all zones\&.
.PP
When
\fBdnssec\-keymgr\fR
@@ -181,7 +181,8 @@ would be used for zones that had unusually high security needs\&.
.sp -1
.IP \(bu 2.3
.\}
Algorithm policies: (\fBalgorithm\-policy \fR\fB\fIalgorithm\fR\fR\fB { \&.\&.\&. };\fR
\fIAlgorithm policies:\fR
(\fBalgorithm\-policy \fR\fB\fIalgorithm\fR\fR\fB { \&.\&.\&. };\fR
) override default per\-algorithm settings\&. For example, by default, RSASHA256 keys use 2048\-bit key sizes for both KSK and ZSK\&. This can be modified using
\fBalgorithm\-policy\fR, and the new key sizes would then be used for any key of type RSASHA256\&.
.RE
@@ -194,59 +195,60 @@ Algorithm policies: (\fBalgorithm\-policy \fR\fB\fIalgorithm\fR\fR\fB { \&.\&.\&
.sp -1
.IP \(bu 2.3
.\}
Zone policies: (\fBzone \fR\fB\fIname\fR\fR\fB { \&.\&.\&. };\fR
\fIZone policies:\fR
(\fBzone \fR\fB\fIname\fR\fR\fB { \&.\&.\&. };\fR
) set policy for a single zone by name\&. A zone policy can inherit a policy class by including a
\fBpolicy\fR
option\&. Zone names beginning with digits (i\&.e\&., 0\-9) must be quoted\&.
option\&. Zone names beginning with digits (i\&.e\&., 0\-9) must be quoted\&. If a zone does not have its own policy then the "default" policy applies\&.
.RE
.PP
Options that can be specified in policies:
.PP
\fBalgorithm\fR
\fBalgorithm\fR \fIname\fR;
.RS 4
The key algorithm\&. If no policy is defined, the default is RSASHA256\&.
.RE
.PP
\fBcoverage\fR
\fBcoverage\fR \fIduration\fR;
.RS 4
The length of time to ensure that keys will be correct; no action will be taken to create new keys to be activated after this time\&. This can be represented as a number of seconds, or as a duration using human\-readable units (examples: "1y" or "6 months")\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is six months\&.
.RE
.PP
\fBdirectory\fR
\fBdirectory\fR \fIpath\fR;
.RS 4
Specifies the directory in which keys should be stored\&.
.RE
.PP
\fBkey\-size\fR
\fBkey\-size\fR \fIkeytype\fR \fIsize\fR;
.RS 4
Specifies the number of bits to use in creating keys\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and size\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 2048 bits for RSA keys\&.
Specifies the number of bits to use in creating keys\&. The keytype is either "zsk" or "ksk"\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is 2048 bits for RSA keys\&.
.RE
.PP
\fBkeyttl\fR
\fBkeyttl\fR \fIduration\fR;
.RS 4
The key TTL\&. If no policy is defined, the default is one hour\&.
.RE
.PP
\fBpost\-publish\fR
\fBpost\-publish\fR \fIkeytype\fR \fIduration\fR;
.RS 4
How long after inactivation a key should be deleted from the zone\&. Note: If
\fBroll\-period\fR
is not set, this value is ignored\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and a duration\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&.
is not set, this value is ignored\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&.
.RE
.PP
\fBpre\-publish\fR
\fBpre\-publish\fR \fIkeytype\fR \fIduration\fR;
.RS 4
How long before activation a key should be published\&. Note: If
\fBroll\-period\fR
is not set, this value is ignored\&. Takes two arguments: keytype (either "zsk" or "ksk") and a duration\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&.
is not set, this value is ignored\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. The default is one month\&.
.RE
.PP
\fBroll\-period\fR
\fBroll\-period\fR \fIkeytype\fR \fIduration\fR;
.RS 4
How frequently keys should be rolled over\&. Takes two arguments: keytype (eihter "zsk" or "ksk") and a duration\&. A default value for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is one year for ZSK\*(Aqs\&. KSK\*(Aqs do not roll over by default\&.
How frequently keys should be rolled over\&. The keytype is either "zsk" or "ksk"\&. A default duration for this option can be set in algorithm policies as well as in policy classes or zone policies\&. If no policy is configured, the default is one year for ZSKs\&. KSKs do not roll over by default\&.
.RE
.PP
\fBstandby\fR
\fBstandby\fR \fIkeytype\fR \fInumber\fR;
.RS 4
Not yet implemented\&.
.RE
+37 -25
View File
@@ -57,11 +57,12 @@
</p>
<p>
DNSSEC policy can be read from a configuration file (default
<code class="filename">/etc/dnssec-policy.conf</code>), from which the key
parameters, publication and rollover schedule, and desired
coverage duration for any given zone can be determined. This
<code class="filename">/etc/dnssec-policy.conf</code>), from which the
key parameters, publication and rollover schedule, and desired
coverage duration for any given zone can be determined. This
file may be used to define individual DNSSEC policies on a
per-zone basis, or to set a default policy used for all zones.
per-zone basis, or to set a "<code class="literal">default</code>" policy
used for all zones.
</p>
<p>
When <span class="command"><strong>dnssec-keymgr</strong></span> runs, it examines the DNSSEC
@@ -210,7 +211,7 @@
</li>
<li class="listitem">
<p>
Algorithm policies:
<span class="emphasis"><em>Algorithm policies:</em></span>
(<code class="option">algorithm-policy <em class="replaceable"><code>algorithm</code></em> { ... };</code> )
override default per-algorithm settings. For example, by default,
RSASHA256 keys use 2048-bit key sizes for both KSK and ZSK. This
@@ -220,11 +221,13 @@
</li>
<li class="listitem">
<p>
Zone policies:
<span class="emphasis"><em>Zone policies:</em></span>
(<code class="option">zone <em class="replaceable"><code>name</code></em> { ... };</code> )
set policy for a single zone by name. A zone policy can inherit
a policy class by including a <code class="option">policy</code> option.
Zone names beginning with digits (i.e., 0-9) must be quoted.
If a zone does not have its own policy then the
"<code class="literal">default</code>" policy applies.
</p>
</li>
</ul></div>
@@ -232,81 +235,90 @@
Options that can be specified in policies:
</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><span class="command"><strong>algorithm</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>algorithm</strong></span>
<em class="replaceable"><code>name</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
The key algorithm. If no policy is defined, the default is
RSASHA256.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>coverage</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>coverage</strong></span>
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
The length of time to ensure that keys will be correct; no action
will be taken to create new keys to be activated after this time.
This can be represented as a number of seconds, or as a duration using
human-readable units (examples: "1y" or "6 months").
This can be represented as a number of seconds, or as a duration
using human-readable units (examples: "1y" or "6 months").
A default value for this option can be set in algorithm policies
as well as in policy classes or zone policies.
If no policy is configured, the default is six months.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>directory</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>directory</strong></span>
<em class="replaceable"><code>path</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
Specifies the directory in which keys should be stored.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>key-size</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>key-size</strong></span> <em class="replaceable"><code>keytype</code></em>
<em class="replaceable"><code>size</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
Specifies the number of bits to use in creating keys.
Takes two arguments: keytype (eihter "zsk" or "ksk") and size.
The keytype is either "zsk" or "ksk".
A default value for this option can be set in algorithm policies
as well as in policy classes or zone policies. If no policy is
configured, the default is 2048 bits for RSA keys.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>keyttl</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>keyttl</strong></span>
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
The key TTL. If no policy is defined, the default is one hour.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>post-publish</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>post-publish</strong></span> <em class="replaceable"><code>keytype</code></em>
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
How long after inactivation a key should be deleted from the zone.
Note: If <code class="option">roll-period</code> is not set, this value is
ignored. Takes two arguments: keytype (eihter "zsk" or "ksk") and a
duration. A default value for this option can be set in algorithm
ignored. The keytype is either "zsk" or "ksk".
A default duration for this option can be set in algorithm
policies as well as in policy classes or zone policies. The default
is one month.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>pre-publish</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>pre-publish</strong></span> <em class="replaceable"><code>keytype</code></em>
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
How long before activation a key should be published. Note: If
<code class="option">roll-period</code> is not set, this value is ignored.
Takes two arguments: keytype (either "zsk" or "ksk") and a duration.
A default value for this option can be set in algorithm policies
The keytype is either "zsk" or "ksk".
A default duration for this option can be set in algorithm policies
as well as in policy classes or zone policies. The default is
one month.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>roll-period</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>roll-period</strong></span> <em class="replaceable"><code>keytype</code></em>
<em class="replaceable"><code>duration</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
How frequently keys should be rolled over.
Takes two arguments: keytype (eihter "zsk" or "ksk") and a duration.
A default value for this option can be set in algorithm policies
The keytype is either "zsk" or "ksk".
A default duration for this option can be set in algorithm policies
as well as in policy classes or zone policies. If no policy is
configured, the default is one year for ZSK's. KSK's do not
configured, the default is one year for ZSKs. KSKs do not
roll over by default.
</p>
</dd>
<dt><span class="term"><span class="command"><strong>standby</strong></span></span></dt>
<dt><span class="term"><span class="command"><strong>standby</strong></span> <em class="replaceable"><code>keytype</code></em>
<em class="replaceable"><code>number</code></em><code class="literal">;</code></span></dt>
<dd>
<p>
Not yet implemented.
+4
View File
@@ -107,6 +107,8 @@ def check(zone, args):
fp, _ = Popen(cmd, stdout=PIPE).communicate()
for line in fp.splitlines():
if type(line) is not str:
line = line.decode('ascii')
rrlist.append(SECRR(line, args.lookaside))
rrlist = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg))
@@ -128,6 +130,8 @@ def check(zone, args):
fp, _ = Popen(cmd, stdin=PIPE, stdout=PIPE).communicate(intods)
for line in fp.splitlines():
if type(line) is not str:
line = line.decode('ascii')
klist.append(SECRR(line, args.lookaside))
if len(klist) < 1:
+2
View File
@@ -43,6 +43,8 @@ class keyzone:
fp, _ = Popen([czpath, "-o", "-", name, filename],
stdout=PIPE, stderr=PIPE).communicate()
for line in fp.splitlines():
if type(line) is not str:
line = line.decode('ascii')
if re.search('^[:space:]*;', line):
continue
fields = line.split()
+1 -1
View File
@@ -25,7 +25,7 @@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+1 -1
View File
@@ -1066,7 +1066,7 @@
<para>
List the names of all TSIG keys currently configured
for use by <command>named</command> in each view. The
list both statically configured keys and dynamic
list includes both statically configured keys and dynamic
TKEY-negotiated keys.
</para>
</listitem>
+1 -1
View File
@@ -20,7 +20,7 @@ CDEFINES =
CWARNINGS =
BACKTRACECFLAGS = @BACKTRACECFLAGS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
+1 -1
View File
@@ -22,7 +22,7 @@ CWARNINGS =
BACKTRACECFLAGS = @BACKTRACECFLAGS@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
DNSLIBS = ../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCLIBS = ../../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCCFGLIBS = ../../../lib/isccfg/libisccfg.@A@
+2 -47
View File
@@ -19,7 +19,7 @@ SUBDIRS = dlzexternal dyndb pipelined rndc rpz rsabigexponent tkey
CINCLUDES = ${ISC_INCLUDES} ${DNS_INCLUDES}
CDEFINES = @USE_GSSAPI@
CDEFINES = @USE_GSSAPI@ @CONTRIB_DLZ@
CWARNINGS =
DNSLIBS =
@@ -47,32 +47,6 @@ feature-test@EXEEXT@: feature-test.@O@
# Running the scripts below is bypassed when a separate build directory is
# used.
# Define the tests that can be run in parallel. This should be identical to
# the definition of PARALLELDIRS in conf.sh. Note: longer-running tests
# such as serve-stale and rpzrecurse stale are scheduled first to get more
# benefit from parallelism.
PARALLEL = rpzrecurse serve-stale dnssec \
acl additional addzone allow-query auth autosign \
builtin cacheclean case catz cds chain \
checkconf checknames checkzone \
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
cookie database digdelv dlv dlz dlzexternal \
dns64 @DNSTAP@ dscp dsdigest dyndb \
ednscompliance emptyzones \
fetchlimit filter-aaaa formerr forward \
geoip glue idna inline integrity ixfr keepalive \
legacy limits logfileconfig \
masterfile masterformat metadata mirror mkeys \
names notify nslookup nsupdate nzd2nzf \
padding pending pipelined qmin \
reclimit redirect resolver rndc rootkeysentinel rpz \
rrchecker rrl rrsetorder rsabigexponent runtime \
sfcache smartsign sortlist \
spf staticstub statistics statschannel stub synthfromdnssec \
tcp tools tsig tsiggss ttl \
unknown upforwd verify views wildcard \
xfer xferquota zero zonechecks
# Produce intermediate makefile that assigns unique port numbers to each
# parallel test. The start port number of 5,000 is arbitrary - it must just
# be greater than the highest privileged port, 1024.
@@ -84,26 +58,7 @@ PARALLEL = rpzrecurse serve-stale dnssec \
.PHONY: parallel.mk
parallel.mk:
@PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
echo "" >> $@ ; \
echo "check_interfaces:" >> $@ ; \
echo " @${PERL} testsock.pl > /dev/null 2>&1 || { \\" >> $@ ; \
echo " echo \"I:NOTE: System tests were skipped because they require that the\"; \\" >> $@ ; \
echo " echo \"I: IP addresses 10.53.0.1 through 10.53.0.8 be configured\"; \\" >> $@ ; \
echo " echo \"I: as alias addresses on the loopback interface. Please run\"; \\" >> $@ ; \
echo " echo \"I: \"bin/tests/system/ifconfig.sh up\" as root to configure them.\"; \\" >> $@ ; \
echo " exit 1; \\" >> $@ ; \
echo " }" >> $@ ; \
echo "" >> $@ ; \
echo "test check: $$PARALLEL_SANITIZED" >> $@ ; \
port=$${STARTPORT:-5000} ; \
for directory in $(PARALLEL) ; do \
echo "" >> $@ ; \
echo "test-`echo $$directory | tr _ -`: check_interfaces" >> $@ ; \
echo " @$(SHELL) ./run.sh -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
port=`expr $$port + 100` ; \
done
$(SHELL) parallel.sh > parallel.mk
# Targets to run the tests.
@@ -29,6 +29,11 @@ controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "." {
type master;
file "root.db";
};
zone "rt.example" {
type master;
file "rt.db";
@@ -29,6 +29,11 @@ controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "." {
type master;
file "root.db";
};
zone "rt.example" {
type master;
file "rt.db";
@@ -30,6 +30,11 @@ controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "." {
type master;
file "root.db";
};
zone "rt.example" {
type master;
file "rt.db";
@@ -29,6 +29,11 @@ controls {
inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
};
zone "." {
type master;
file "root.db";
};
zone "mx.example" {
type master;
file "mx.db";
+1 -1
View File
@@ -10,7 +10,7 @@
$TTL 86400
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
NS ns1
ns1 A 127.0.0.0
ns1 A 10.53.0.1
nap IN NAPTR 50 50 "S" "SIPS+D2T" "" server
server SRV 0 0 5061 server
+1 -1
View File
@@ -10,7 +10,7 @@
$TTL 86400
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
NS ns1
ns1 A 127.0.0.0
ns1 A 10.53.0.1
nap IN NAPTR 50 50 "S" "SIPS+D2T" "" server.hang3a.zone.
www AAAA 192::99
+1 -1
View File
@@ -10,7 +10,7 @@
$TTL 86400
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
NS ns1
ns1 A 127.0.0.0
ns1 A 10.53.0.1
ns1 NID 2 0:0:0:0
ns1 L64 2 0:0:0:0
+19
View File
@@ -0,0 +1,19 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
. IN SOA ns2. hostmaster ( 2 8H 2H 4W 1D);
. NS ns1.rt.example.
. NS ns2.rt.example.
ns1.rt.example. A 10.53.0.1
ns2.rt.example. A 10.53.0.2
rt.example. NS ns1.
naptr.example. NS ns1.
rt2.example. NS ns1.
naptr2.example. NS ns1.
nid.example. NS ns1.
+2 -1
View File
@@ -10,7 +10,8 @@
$TTL 86400
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
NS ns1
ns1 A 127.0.0.0
NS ns1.rt2.example.
ns1 A 10.53.0.1
rt RT 2 www
www AAAA 192::99
+1 -1
View File
@@ -10,7 +10,7 @@
$TTL 86400
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
NS ns1
ns1 A 127.0.0.0
ns1 A 10.53.0.1
rt RT 2 www.hang3b.zone.
server SRV 0 0 5061 server
+14
View File
@@ -0,0 +1,14 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 86400
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
NS ns1
NS ns1.ex2.
ns1 A 10.53.0.1
+13
View File
@@ -0,0 +1,13 @@
; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
;
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
$TTL 86400
@ IN SOA ns1 hostmaster ( 2 8H 2H 4W 1D );
NS ns1
ns1 A 10.53.0.1
@@ -21,9 +21,20 @@ options {
listen-on-v6 { none; };
recursion yes;
dnssec-validation yes;
minimal-responses no;
};
zone "." {
type hint;
file "root.hint";
};
zone "ex" {
type master;
file "ex.db";
};
zone "ex2" {
type master;
file "ex2.db";
};
+51 -1
View File
@@ -210,6 +210,38 @@ dotests() {
if [ $ret -eq 1 ] ; then
echo_i " failed"; status=1
fi
n=`expr $n + 1`
echo_i "test with NS, root zone ($n)"
ret=0
$DIG $DIGOPTS -t NS . @10.53.0.1 > dig.out.$n || ret=1
# Always expect glue for root priming queries, regardless $minimal
grep 'ADDITIONAL: 3' dig.out.$n > /dev/null || ret=1
if [ $ret -eq 1 ] ; then
echo_i " failed"; status=1
fi
n=`expr $n + 1`
echo_i "test with NS, non-root zone ($n)"
ret=0
$DIG $DIGOPTS -t NS rt.example @10.53.0.1 > dig.out.$n || ret=1
case $minimal in
yes)
grep 'ADDITIONAL: 1' dig.out.$n > /dev/null || ret=1
;;
no)
grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
;;
no-auth)
grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
;;
no-auth-recursive)
grep 'ADDITIONAL: 2' dig.out.$n > /dev/null || ret=1
;;
esac
if [ $ret -eq 1 ] ; then
echo_i " failed"; status=1
fi
}
echo_i "testing with 'minimal-responses yes;'"
@@ -228,7 +260,7 @@ n=`expr $n + 1`
echo_i "testing with 'minimal-any no;' ($n)"
ret=0
$DIG $DIGOPTS -t ANY www.rt.example @10.53.0.1 > dig.out.$n || ret=1
grep "ANSWER: 3, AUTHORITY: 1, ADDITIONAL: 2" dig.out.$n > /dev/null || ret=1
grep "ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 2" dig.out.$n > /dev/null || ret=1
if [ $ret -eq 1 ] ; then
echo_i " failed"; status=1
fi
@@ -322,5 +354,23 @@ if [ $ret -eq 1 ] ; then
echo_i " failed"; status=1
fi
n=`expr $n + 1`
echo_i "testing out-of-zone additional data from auth zones (authoritative) ($n)"
ret=0
$DIG $DIGOPTS -t NS rt.example @10.53.0.1 > dig.out.$n || ret=1
grep "ADDITIONAL: 2" dig.out.$n > /dev/null || ret=1
if [ $ret -eq 1 ] ; then
echo_i " failed"; status=1
fi
n=`expr $n + 1`
echo_i "testing out-of-zone additional data from auth zones (recursive) ($n)"
ret=0
$DIG $DIGOPTS -t NS ex @10.53.0.3 > dig.out.$n || ret=1
grep "ADDITIONAL: 3" dig.out.$n > /dev/null || ret=1
if [ $ret -eq 1 ] ; then
echo_i " failed"; status=1
fi
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1
-3
View File
@@ -23,7 +23,4 @@ copy_setports ns2/named1.conf.in ns2/named.conf
copy_setports ns3/named1.conf.in ns3/named.conf
cp -f ns2/default.nzf.in ns2/3bf305731dd26307.nzf
rm -f ns3/*.nzf ns3/*.nzf~
rm -f ns3/*.nzd ns3/*.nzd-lock
rm -f ns3/inlineslave.db
mkdir ns2/new-zones
+3 -3
View File
@@ -8,9 +8,9 @@
; information regarding copyright ownership.
$TTL 300
@ SOA ns1. hostmaster.localhost. 1 3600 1200 604800 3600
NS ns1.
ns1. A 10.53.0.1
@ SOA a.root-servers.nil. hostmaster.localhost. 1 3600 1200 604800 3600
NS a.root-servers.nil.
a.root-servers.nil. A 10.53.0.1
normal.example. NS ns2.normal.example.
ns2.normal.example. A 10.53.0.2
+1 -1
View File
@@ -12,7 +12,7 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
. ./clean.sh
$SHELL clean.sh
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+21 -17
View File
@@ -283,7 +283,7 @@ sleep 3
echo_i "checking that expired RRSIGs from missing key are not deleted ($n)"
ret=0
missing=`sed 's/^K.*+007+0*\([0-9]\)/\1/' < missingzsk.key`
missing=$(keyfile_to_key_id "$(cat missingzsk.key)")
$JOURNALPRINT ns3/nozsk.example.db.jnl | \
awk '{if ($1 == "del" && $5 == "RRSIG" && $12 == id) {exit 1}} END {exit 0}' id=$missing || ret=1
n=`expr $n + 1`
@@ -292,7 +292,7 @@ status=`expr $status + $ret`
echo_i "checking that expired RRSIGs from inactive key are not deleted ($n)"
ret=0
inactive=`sed 's/^K.*+007+0*\([0-9]\)/\1/' < inactivezsk.key`
inactive=$(keyfile_to_key_id "$(cat inactivezsk.key)")
$JOURNALPRINT ns3/inaczsk.example.db.jnl | \
awk '{if ($1 == "del" && $5 == "RRSIG" && $12 == id) {exit 1}} END {exit 0}' id=$inactive || ret=1
n=`expr $n + 1`
@@ -837,7 +837,7 @@ status=`expr $status + $ret`
echo_i "checking for unpublished key ($n)"
ret=0
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < unpub.key`
id=$(keyfile_to_key_id "$(cat unpub.key)")
$DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
n=`expr $n + 1`
@@ -846,7 +846,7 @@ status=`expr $status + $ret`
echo_i "checking for activated but unpublished key ($n)"
ret=0
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < activate-now-publish-1day.key`
id=$(keyfile_to_key_id "$(cat activate-now-publish-1day.key)")
$DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
n=`expr $n + 1`
@@ -855,7 +855,7 @@ status=`expr $status + $ret`
echo_i "checking that standby key does not sign records ($n)"
ret=0
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < standby.key`
id=$(keyfile_to_key_id "$(cat standby.key)")
$DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null && ret=1
n=`expr $n + 1`
@@ -864,7 +864,7 @@ status=`expr $status + $ret`
echo_i "checking that deactivated key does not sign records ($n)"
ret=0
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < inact.key`
id=$(keyfile_to_key_id "$(cat inact.key)")
$DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null && ret=1
n=`expr $n + 1`
@@ -873,7 +873,7 @@ status=`expr $status + $ret`
echo_i "checking insertion of public-only key ($n)"
ret=0
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < nopriv.key`
id=$(keyfile_to_key_id "$(cat nopriv.key)")
file="ns1/`cat nopriv.key`.key"
keydata=`grep DNSKEY $file`
$NSUPDATE > /dev/null 2>&1 <<END || status=1
@@ -892,7 +892,7 @@ status=`expr $status + $ret`
echo_i "checking key deletion ($n)"
ret=0
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < del.key`
id=$(keyfile_to_key_id "$(cat del.key)")
$DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
n=`expr $n + 1`
@@ -973,9 +973,9 @@ rm -f $file
echo_i "preparing ZSK roll"
starttime=`$PERL -e 'print time(), "\n";'`
oldfile=`cat active.key`
oldid=`sed 's/^K.+007+0*\([0-9]\)/\1/' < active.key`
oldid=$(keyfile_to_key_id "$(cat active.key)")
newfile=`cat standby.key`
newid=`sed 's/^K.+007+0*\([0-9]\)/\1/' < standby.key`
newid=$(keyfile_to_key_id "$(cat standby.key)")
$SETTIME -K ns1 -I now+2s -D now+25 $oldfile > /dev/null
$SETTIME -K ns1 -i 0 -S $oldfile $newfile > /dev/null
@@ -993,7 +993,7 @@ $RNDCCMD 10.53.0.2 loadkeys bar. 2>&1 | sed 's/^/ns2 /' | cat_i
echo_i "waiting for changes to take effect"
sleep 5
echo_i "checking former standby key is now active ($n)"
echo_i "checking former standby key $newid is now active ($n)"
ret=0
$DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
grep 'RRSIG.*'" $newid "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
@@ -1137,7 +1137,7 @@ status=`expr $status + $ret`
echo_i "checking private key file removal caused no immediate harm ($n)"
ret=0
id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < vanishing.key`
id=$(keyfile_to_key_id "$(cat vanishing.key)")
$DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
n=`expr $n + 1`
@@ -1404,8 +1404,12 @@ for i in 0 1 2 3 4 5 6 7 8 9; do
$DIG $DIGOPTS delzsk.example NSEC3PARAM @10.53.0.3 > dig.out.ns3.1.test$n 2>&1 || ret=1
grep "NSEC3PARAM.*12345678" dig.out.ns3.1.test$n > /dev/null 2>&1
if [ $? -eq 0 ]; then
_ret=0
break
$RNDCCMD 10.53.0.3 signing -list delzsk.example > signing.out.2.test$n 2>&1
grep "Creating NSEC3 chain " signing.out.2.test$n > /dev/null 2>&1
if [ $? -ne 0 ]; then
_ret=0
break
fi
fi
sleep 1
done
@@ -1420,10 +1424,10 @@ $SETTIME -D now-1h $file > settime.out.test$n 2>&1 || ret=1
$RNDCCMD 10.53.0.3 loadkeys delzsk.example 2>&1 | sed 's/^/ns3 /' | cat_i
for i in 0 1 2 3 4 5 6 7 8 9; do
_ret=1
$RNDCCMD 10.53.0.3 signing -list delzsk.example > signing.out.2.test$n 2>&1
grep "Signing " signing.out.2.test$n > /dev/null 2>&1
$RNDCCMD 10.53.0.3 signing -list delzsk.example > signing.out.3.test$n 2>&1
grep "Signing " signing.out.3.test$n > /dev/null 2>&1
if [ $? -ne 0 ]; then
if [ `cat signing.out.2.test$n | wc -l` -eq 2 ]; then
if [ `grep "Done signing " signing.out.3.test$n | wc -l` -eq 2 ]; then
_ret=0
break
fi
+2 -1
View File
@@ -10,7 +10,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
${SHELL} clean.sh
$SHELL clean.sh
cp -f ns1/dynamic.db.in ns1/dynamic.db
copy_setports ns1/named.conf.in ns1/named.conf
copy_setports ns2/named.conf.in ns2/named.conf
+3 -3
View File
@@ -24,9 +24,9 @@ keyz=`$KEYGEN -q -a RSASHA256 $Z`
key1=`$KEYGEN -q -a RSASHA256 -f KSK $Z`
key2=`$KEYGEN -q -a RSASHA256 -f KSK $Z`
idz=`echo $keyz | sed 's/.*+0*//'`
id1=`echo $key1 | sed 's/.*+0*//'`
id2=`echo $key2 | sed 's/.*+0*//'`
idz=$(keyfile_to_key_id $keyz)
id1=$(keyfile_to_key_id $key1)
id2=$(keyfile_to_key_id $key2)
cat <<EOF >vars.sh
Z=$Z
@@ -9,6 +9,6 @@
* information regarding copyright ownership.
*/
view {
view one {
allow-update-forwarding { any; };
};
@@ -9,6 +9,6 @@
* information regarding copyright ownership.
*/
view {
view one {
allow-update { any; };
};
@@ -0,0 +1,31 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dnssec-validation yes;
};
managed-keys {
example. initial-key 257 3 8 "AwEAAawvFp8GlBx8Qt6yaIqXkDe+nMkSk2HkTAG7qlVBo++AQwZ1j3Xl
25IN4jsw0VTMbKUbafw9DYsVzztIwx1sNkKRLo6qP9SSkBL8RicQaafG
tURtsYI3oqte5qqLve1CUpRD8J06Pg1xkOxsDlz9sQAyiQrOyvMbykJY
kYrFYGLzYAgl/JtMyVVYlBl9pqxQuAPKYPOuO1axaad/wLN3+wTy/hcJ
fpvJpqzXlDF9bI5RmpoX/7geZ06vpcYJEoT0xkkmPlEl0ZjEDrm/WIaS
WG0/CEDpHcOXFz4OEczMVpY+lnuFfKybwF1WHFn2BwVEOS6cMM6ukIjI
NQyrszHhWUU=";
example. initial-key 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
6zqCkwuMmrU=";
};
@@ -0,0 +1,31 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dnssec-validation yes;
};
trusted-keys {
example. 257 3 8 "AwEAAawvFp8GlBx8Qt6yaIqXkDe+nMkSk2HkTAG7qlVBo++AQwZ1j3Xl
25IN4jsw0VTMbKUbafw9DYsVzztIwx1sNkKRLo6qP9SSkBL8RicQaafG
tURtsYI3oqte5qqLve1CUpRD8J06Pg1xkOxsDlz9sQAyiQrOyvMbykJY
kYrFYGLzYAgl/JtMyVVYlBl9pqxQuAPKYPOuO1axaad/wLN3+wTy/hcJ
fpvJpqzXlDF9bI5RmpoX/7geZ06vpcYJEoT0xkkmPlEl0ZjEDrm/WIaS
WG0/CEDpHcOXFz4OEczMVpY+lnuFfKybwF1WHFn2BwVEOS6cMM6ukIjI
NQyrszHhWUU=";
example. 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
6zqCkwuMmrU=";
};
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
#
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# shellcheck source=conf.sh
. "$SYSTEMTESTTOP/conf.sh"
$SHELL clean.sh
+81 -52
View File
@@ -16,7 +16,7 @@ n=0
n=`expr $n + 1`
echo_i "checking that named-checkconf handles a known good config ($n)"
ret=0
$CHECKCONF good.conf > /dev/null 2>&1 || ret=1
$CHECKCONF good.conf > checkconf.out$n 2>&1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -25,7 +25,8 @@ echo_i "checking that named-checkconf prints a known good config ($n)"
ret=0
awk 'BEGIN { ok = 0; } /cut here/ { ok = 1; getline } ok == 1 { print }' good.conf > good.conf.in
[ -s good.conf.in ] || ret=1
$CHECKCONF -p good.conf.in | grep -v '^good.conf.in:' > good.conf.out 2>&1 || ret=1
$CHECKCONF -p good.conf.in > checkconf.out$n || ret=1
grep -v '^good.conf.in:' < checkconf.out$n > good.conf.out 2>&1 || ret=1
cmp good.conf.in good.conf.out || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -36,7 +37,8 @@ ret=0
# ensure there is a secret and that it is not the check string.
grep 'secret "' good.conf.in > /dev/null || ret=1
grep 'secret "????????????????"' good.conf.in > /dev/null 2>&1 && ret=1
$CHECKCONF -p -x good.conf.in | grep -v '^good.conf.in:' > good.conf.out 2>&1 || ret=1
$CHECKCONF -p -x good.conf.in > checkconf.out$n || ret=1
grep -v '^good.conf.in:' < checkconf.out$n > good.conf.out 2>&1 || ret=1
grep 'secret "????????????????"' good.conf.out > /dev/null 2>&1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -46,21 +48,21 @@ do
n=`expr $n + 1`
echo_i "checking that named-checkconf detects error in $bad ($n)"
ret=0
$CHECKCONF $bad > checkconf.out 2>&1
$CHECKCONF $bad > checkconf.out$n 2>&1
if [ $? != 1 ]; then ret=1; fi
grep "^$bad:[0-9]*: " checkconf.out > /dev/null || ret=1
grep "^$bad:[0-9]*: " < checkconf.out$n > /dev/null || ret=1
case $bad in
bad-update-policy[123].conf)
pat="identity and name fields are not the same"
grep "$pat" checkconf.out > /dev/null || ret=1
grep "$pat" < checkconf.out$n > /dev/null || ret=1
;;
bad-update-policy[4589].conf|bad-update-policy1[01].conf)
pat="name field not set to placeholder value"
grep "$pat" checkconf.out > /dev/null || ret=1
grep "$pat" < checkconf.out$n > /dev/null || ret=1
;;
bad-update-policy[67].conf|bad-update-policy1[2345].conf)
pat="missing name field type '.*' found"
grep "$pat" checkconf.out > /dev/null || ret=1
grep "$pat" < checkconf.out$n > /dev/null || ret=1
;;
esac
if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -72,7 +74,7 @@ do
n=`expr $n + 1`
echo_i "checking that named-checkconf detects no error in $good ($n)"
ret=0
$CHECKCONF $good > /dev/null 2>&1
$CHECKCONF $good > checkconf.out$n 2>&1
if [ $? != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
done
@@ -96,14 +98,15 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf catches range errors ($n)"
ret=0
$CHECKCONF range.conf > /dev/null 2>&1 && ret=1
$CHECKCONF range.conf > checkconf.out$n 2>&1 && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf warns of notify inconsistencies ($n)"
ret=0
warnings=`$CHECKCONF notify.conf 2>&1 | grep "'notify' is disabled" | wc -l`
$CHECKCONF notify.conf > checkconf.out$n 2>&1
warnings=`grep "'notify' is disabled" < checkconf.out$n | wc -l`
[ $warnings -eq 3 ] || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -111,12 +114,17 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking named-checkconf dnssec warnings ($n)"
ret=0
$CHECKCONF dnssec.1 2>&1 | grep 'validation yes.*enable no' > /dev/null || ret=1
$CHECKCONF dnssec.2 2>&1 | grep 'auto-dnssec may only be ' > /dev/null || ret=1
$CHECKCONF dnssec.2 2>&1 | grep 'validation auto.*enable no' > /dev/null || ret=1
$CHECKCONF dnssec.2 2>&1 | grep 'validation yes.*enable no' > /dev/null || ret=1
$CHECKCONF dnssec.1 > checkconf.out$n.1 2>&1
grep 'validation yes.*enable no' < checkconf.out$n.1 > /dev/null || ret=1
$CHECKCONF dnssec.2 > checkconf.out$n.2 2>&1
grep 'auto-dnssec may only be ' < checkconf.out$n.2 > /dev/null || ret=1
$CHECKCONF dnssec.2 > checkconf.out$n.3 2>&1
grep 'validation auto.*enable no' < checkconf.out$n.3 > /dev/null || ret=1
$CHECKCONF dnssec.2 > checkconf.out$n.4 2>&1
grep 'validation yes.*enable no' < checkconf.out$n.4 > /dev/null || ret=1
# this one should have no warnings
$CHECKCONF dnssec.3 2>&1 | grep '.*' && ret=1
$CHECKCONF dnssec.3 > checkconf.out$n.5 2>&1
grep '.*' < checkconf.out$n.5 && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -129,14 +137,14 @@ options {
$field 0;
};
EOF
$CHECKCONF badzero.conf > /dev/null 2>&1
$CHECKCONF badzero.conf > checkconf.out$n.1 2>&1
[ $? -eq 1 ] || { echo_i "options $field failed" ; ret=1; }
cat > badzero.conf << EOF
view dummy {
$field 0;
};
EOF
$CHECKCONF badzero.conf > /dev/null 2>&1
$CHECKCONF badzero.conf > checkconf.out$n.2 2>&1
[ $? -eq 1 ] || { echo_i "view $field failed" ; ret=1; }
cat > badzero.conf << EOF
options {
@@ -145,7 +153,7 @@ options {
view dummy {
};
EOF
$CHECKCONF badzero.conf > /dev/null 2>&1
$CHECKCONF badzero.conf > checkconf.out$n.3 2>&1
[ $? -eq 1 ] || { echo_i "options + view $field failed" ; ret=1; }
cat > badzero.conf << EOF
zone dummy {
@@ -154,7 +162,7 @@ zone dummy {
$field 0;
};
EOF
$CHECKCONF badzero.conf > /dev/null 2>&1
$CHECKCONF badzero.conf > checkconf.out$n.4 2>&1
[ $? -eq 1 ] || { echo_i "zone $field failed" ; ret=1; }
done
if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -163,22 +171,28 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking options allowed in inline-signing slaves ($n)"
ret=0
l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "dnssec-dnskey-kskonly.*requires inline" | wc -l`
$CHECKCONF bad-dnssec.conf > checkconf.out$n.1 2>&1
l=`grep "dnssec-dnskey-kskonly.*requires inline" < checkconf.out$n.1 | wc -l`
[ $l -eq 1 ] || ret=1
l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "dnssec-loadkeys-interval.*requires inline" | wc -l`
$CHECKCONF bad-dnssec.conf > checkconf.out$n.2 2>&1
l=`grep "dnssec-loadkeys-interval.*requires inline" < checkconf.out$n.2 | wc -l`
[ $l -eq 1 ] || ret=1
l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "update-check-ksk.*requires inline" | wc -l`
$CHECKCONF bad-dnssec.conf > checkconf.out$n.3 2>&1
l=`grep "update-check-ksk.*requires inline" < checkconf.out$n.3 | wc -l`
[ $l -eq 1 ] || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "check file + inline-signing for slave zones ($n)"
l=`$CHECKCONF inline-no.conf 2>&1 | grep "missing 'file' entry" | wc -l`
$CHECKCONF inline-no.conf > checkconf.out$n.1 2>&1
l=`grep "missing 'file' entry" < checkconf.out$n.1 | wc -l`
[ $l -eq 0 ] || ret=1
l=`$CHECKCONF inline-good.conf 2>&1 | grep "missing 'file' entry" | wc -l`
$CHECKCONF inline-good.conf > checkconf.out$n.2 2>&1
l=`grep "missing 'file' entry" < checkconf.out$n.2 | wc -l`
[ $l -eq 0 ] || ret=1
l=`$CHECKCONF inline-bad.conf 2>&1 | grep "missing 'file' entry" | wc -l`
$CHECKCONF inline-bad.conf > checkconf.out$n.3 2>&1
l=`grep "missing 'file' entry" < checkconf.out$n.3 | wc -l`
[ $l -eq 1 ] || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -186,7 +200,8 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking named-checkconf DLZ warnings ($n)"
ret=0
$CHECKCONF dlz-bad.conf 2>&1 | grep "'dlz' and 'database'" > /dev/null || ret=1
$CHECKCONF dlz-bad.conf > checkconf.out$n 2>&1
grep "'dlz' and 'database'" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
@@ -194,17 +209,30 @@ n=`expr $n + 1`
echo_i "checking for missing key directory warning ($n)"
ret=0
rm -rf test.keydir
l=`$CHECKCONF warn-keydir.conf 2>&1 | grep "'test.keydir' does not exist" | wc -l`
$CHECKCONF warn-keydir.conf > checkconf.out$n.1 2>&1
l=`grep "'test.keydir' does not exist" < checkconf.out$n.1 | wc -l`
[ $l -eq 1 ] || ret=1
touch test.keydir
l=`$CHECKCONF warn-keydir.conf 2>&1 | grep "'test.keydir' is not a directory" | wc -l`
$CHECKCONF warn-keydir.conf > checkconf.out$n.2 2>&1
l=`grep "'test.keydir' is not a directory" < checkconf.out$n.2 | wc -l`
[ $l -eq 1 ] || ret=1
rm -f test.keydir
mkdir test.keydir
l=`$CHECKCONF warn-keydir.conf 2>&1 | grep "key-directory" | wc -l`
$CHECKCONF warn-keydir.conf > checkconf.out$n.3 2>&1
l=`grep "key-directory" < checkconf.out$n.3 | wc -l`
[ $l -eq 0 ] || ret=1
rm -rf test.keydir
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking for trusted-key/managed-key collision warning ($n)"
ret=0
$CHECKCONF warn-duplicate-key.conf 2>&1 | grep "ROLLOVERS WILL FAIL" > /dev/null 2>&1 || ret=1
$CHECKCONF warn-duplicate-root-key.conf 2>&1 | grep "ROLLOVERS WILL FAIL" > /dev/null 2>&1 || ret=1
$CHECKCONF warn-validation-auto-key.conf 2>&1 | grep "ROLLOVERS WILL FAIL" > /dev/null 2>&1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf -z catches conflicting ttl with max-ttl ($n)"
@@ -219,49 +247,49 @@ status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf -z catches invalid max-ttl ($n)"
ret=0
$CHECKCONF -z max-ttl-bad.conf > /dev/null 2>&1 && ret=1
$CHECKCONF -z max-ttl-bad.conf > checkconf.out$n 2>&1 && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf -z skips zone check with alternate databases ($n)"
ret=0
$CHECKCONF -z altdb.conf > /dev/null 2>&1 || ret=1
$CHECKCONF -z altdb.conf > checkconf.out$n 2>&1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf -z skips zone check with DLZ ($n)"
ret=0
$CHECKCONF -z altdlz.conf > /dev/null 2>&1 || ret=1
$CHECKCONF -z altdlz.conf > checkconf.out$n 2>&1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf -z fails on view with ANY class ($n)"
ret=0
$CHECKCONF -z view-class-any1.conf > /dev/null 2>&1 && ret=1
$CHECKCONF -z view-class-any1.conf > checkconf.out$n 2>&1 && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf -z fails on view with CLASS255 class ($n)"
ret=0
$CHECKCONF -z view-class-any2.conf > /dev/null 2>&1 && ret=1
$CHECKCONF -z view-class-any2.conf > checkconf.out$n 2>&1 && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf -z passes on view with IN class ($n)"
ret=0
$CHECKCONF -z view-class-in1.conf > /dev/null 2>&1 || ret=1
$CHECKCONF -z view-class-in1.conf > checkconf.out$n 2>&1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that named-checkconf -z passes on view with CLASS1 class ($n)"
ret=0
$CHECKCONF -z view-class-in2.conf > /dev/null 2>&1 || ret=1
$CHECKCONF -z view-class-in2.conf > checkconf.out$n 2>&1 || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -269,7 +297,7 @@ n=`expr $n + 1`
echo_i "check that check-names fails as configured ($n)"
ret=0
$CHECKCONF -z check-names-fail.conf > checkconf.out$n 2>&1 && ret=1
grep "near '_underscore': bad name (check-names)" checkconf.out$n > /dev/null || ret=1
grep "near '_underscore': bad name (check-names)" < checkconf.out$n > /dev/null || ret=1
grep "zone check-names/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -278,7 +306,7 @@ n=`expr $n + 1`
echo_i "check that check-mx fails as configured ($n)"
ret=0
$CHECKCONF -z check-mx-fail.conf > checkconf.out$n 2>&1 && ret=1
grep "near '10.0.0.1': MX is an address" checkconf.out$n > /dev/null || ret=1
grep "near '10.0.0.1': MX is an address" < checkconf.out$n > /dev/null || ret=1
grep "zone check-mx/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -287,7 +315,7 @@ n=`expr $n + 1`
echo_i "check that check-dup-records fails as configured ($n)"
ret=0
$CHECKCONF -z check-dup-records-fail.conf > checkconf.out$n 2>&1 && ret=1
grep "has semantically identical records" checkconf.out$n > /dev/null || ret=1
grep "has semantically identical records" < checkconf.out$n > /dev/null || ret=1
grep "zone check-dup-records/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -296,7 +324,7 @@ n=`expr $n + 1`
echo_i "check that check-mx fails as configured ($n)"
ret=0
$CHECKCONF -z check-mx-fail.conf > checkconf.out$n 2>&1 && ret=1
grep "failed: MX is an address" checkconf.out$n > /dev/null || ret=1
grep "failed: MX is an address" < checkconf.out$n > /dev/null || ret=1
grep "zone check-mx/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -305,7 +333,7 @@ n=`expr $n + 1`
echo_i "check that check-mx-cname fails as configured ($n)"
ret=0
$CHECKCONF -z check-mx-cname-fail.conf > checkconf.out$n 2>&1 && ret=1
grep "MX.* is a CNAME (illegal)" checkconf.out$n > /dev/null || ret=1
grep "MX.* is a CNAME (illegal)" < checkconf.out$n > /dev/null || ret=1
grep "zone check-mx-cname/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -314,7 +342,7 @@ n=`expr $n + 1`
echo_i "check that check-srv-cname fails as configured ($n)"
ret=0
$CHECKCONF -z check-srv-cname-fail.conf > checkconf.out$n 2>&1 && ret=1
grep "SRV.* is a CNAME (illegal)" checkconf.out$n > /dev/null || ret=1
grep "SRV.* is a CNAME (illegal)" < checkconf.out$n > /dev/null || ret=1
grep "zone check-mx-cname/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -323,7 +351,7 @@ n=`expr $n + 1`
echo_i "check that named-checkconf -p properly print a port range ($n)"
ret=0
$CHECKCONF -p portrange-good.conf > checkconf.out$n 2>&1 || ret=1
grep "range 8610 8614;" checkconf.out$n > /dev/null || ret=1
grep "range 8610 8614;" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -339,7 +367,7 @@ n=`expr $n + 1`
echo_i "check that named-checkconf prints max-cache-size <percentage> correctly ($n)"
ret=0
$CHECKCONF -p max-cache-size-good.conf > checkconf.out$n 2>&1 || ret=1
grep "max-cache-size 60%;" checkconf.out$n > /dev/null || ret=1
grep "max-cache-size 60%;" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -350,7 +378,7 @@ $CHECKCONF -l good.conf |
grep -v "is not implemented" |
grep -v "no longer exists" |
grep -v "is obsolete" > checkconf.out$n || ret=1
diff good.zonelist checkconf.out$n > diff.out$n || ret=1
diff good.zonelist checkconf.out$n > diff.out$n || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -358,7 +386,7 @@ n=`expr $n + 1`
echo_i "check that 'dnssec-lookaside auto;' generates a warning ($n)"
ret=0
$CHECKCONF warn-dlv-auto.conf > checkconf.out$n 2>/dev/null || ret=1
grep "dnssec-lookaside 'auto' is no longer supported" checkconf.out$n > /dev/null || ret=1
grep "dnssec-lookaside 'auto' is no longer supported" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -366,7 +394,7 @@ n=`expr $n + 1`
echo_i "check that 'dnssec-lookaside . trust-anchor dlv.isc.org;' generates a warning ($n)"
ret=0
$CHECKCONF warn-dlv-dlv.isc.org.conf > checkconf.out$n 2>/dev/null || ret=1
grep "dlv.isc.org has been shut down" checkconf.out$n > /dev/null || ret=1
grep "dlv.isc.org has been shut down" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -383,11 +411,12 @@ echo_i "check that the 2010 ICANN ROOT KSK without the 2017 ICANN ROOT KSK gener
ret=0
$CHECKCONF check-root-ksk-2010.conf > checkconf.out$n 2>/dev/null || ret=1
[ -s checkconf.out$n ] || ret=1
grep "trusted-key for root from 2010 without updated" checkconf.out$n > /dev/null || ret=1
grep "trusted-key for root from 2010 without updated" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
echo_i "check that the 2010 ICANN ROOT KSK with the 2017 ICANN ROOT KSK does not warning ($n)"
n=`expr $n + 1`
echo_i "check that the 2010 ICANN ROOT KSK with the 2017 ICANN ROOT KSK does not generate a warning ($n)"
ret=0
$CHECKCONF check-root-ksk-both.conf > checkconf.out$n 2>/dev/null || ret=1
[ -s checkconf.out$n ] && ret=1
@@ -405,7 +434,7 @@ echo_i "check that the dlv.isc.org KSK generates a warning ($n)"
ret=0
$CHECKCONF check-dlv-ksk-key.conf > checkconf.out$n 2>/dev/null || ret=1
[ -s checkconf.out$n ] || ret=1
grep "trusted-key for dlv.isc.org still present" checkconf.out$n > /dev/null || ret=1
grep "trusted-key for dlv.isc.org still present" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -413,7 +442,7 @@ echo_i "check that 'geoip-use-ecs no' generates a warning ($n)"
ret=0
$CHECKCONF warn-geoip-use-ecs.conf > checkconf.out$n 2>/dev/null || ret=1
[ -s checkconf.out$n ] || ret=1
grep "'geoip-use-ecs' is obsolete" checkconf.out$n > /dev/null || ret=1
grep "'geoip-use-ecs' is obsolete" < checkconf.out$n > /dev/null || ret=1
if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
@@ -0,0 +1,34 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dnssec-validation yes;
};
managed-keys {
example. initial-key 257 3 8 "AwEAAawvFp8GlBx8Qt6yaIqXkDe+nMkSk2HkTAG7qlVBo++AQwZ1j3Xl
25IN4jsw0VTMbKUbafw9DYsVzztIwx1sNkKRLo6qP9SSkBL8RicQaafG
tURtsYI3oqte5qqLve1CUpRD8J06Pg1xkOxsDlz9sQAyiQrOyvMbykJY
kYrFYGLzYAgl/JtMyVVYlBl9pqxQuAPKYPOuO1axaad/wLN3+wTy/hcJ
fpvJpqzXlDF9bI5RmpoX/7geZ06vpcYJEoT0xkkmPlEl0ZjEDrm/WIaS
WG0/CEDpHcOXFz4OEczMVpY+lnuFfKybwF1WHFn2BwVEOS6cMM6ukIjI
NQyrszHhWUU=";
};
trusted-keys {
example. 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
6zqCkwuMmrU=";
};
@@ -0,0 +1,34 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dnssec-validation yes;
};
managed-keys {
. initial-key 257 3 8 "AwEAAawvFp8GlBx8Qt6yaIqXkDe+nMkSk2HkTAG7qlVBo++AQwZ1j3Xl
25IN4jsw0VTMbKUbafw9DYsVzztIwx1sNkKRLo6qP9SSkBL8RicQaafG
tURtsYI3oqte5qqLve1CUpRD8J06Pg1xkOxsDlz9sQAyiQrOyvMbykJY
kYrFYGLzYAgl/JtMyVVYlBl9pqxQuAPKYPOuO1axaad/wLN3+wTy/hcJ
fpvJpqzXlDF9bI5RmpoX/7geZ06vpcYJEoT0xkkmPlEl0ZjEDrm/WIaS
WG0/CEDpHcOXFz4OEczMVpY+lnuFfKybwF1WHFn2BwVEOS6cMM6ukIjI
NQyrszHhWUU=";
};
trusted-keys {
. 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
6zqCkwuMmrU=";
};
@@ -0,0 +1,24 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
options {
dnssec-validation auto;
};
trusted-keys {
. 257 3 8 "AwEAAZtP9+RAA+W33A97e+HnnH8WTXzCWiEICyWj1B6rvZ9hd50ysbod
y0NLx7b3vZ1bzMLxLSRAr/n3Wi0TDZ1fvCKZhennfW8Wlc7ulCvHntSQ
YfKHUP0YWEo84sQAqIi850N1aiddj6CidwFo9JNW/HQ+8yarfrnGMFhX
2STtkE0hNJ/R6JYKmD2EH7k1nyqJd08ibrEt55DuV4BiUjyyERdVbsuw
E60jVqAwCKyVBYXb2sI+zv1yPNDBIANd6KTgnq6YWzx5ZodQP3W4K7Z/
Bk3EKmVCvrTKZK/ADLAKaL0/6DD07+1jXA4BiNyoZTLTapkudkGad+Rn
6zqCkwuMmrU=";
};
+2 -1
View File
@@ -10,7 +10,8 @@
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
rm -f named-compilezone
$SHELL clean.sh
ln -s $CHECKZONE named-compilezone
./named-compilezone -D -F raw -o good1.db.raw example \
+147 -20
View File
@@ -21,10 +21,61 @@ else
TESTSOCK6=false
fi
TESTSOCK6="$TESTSOCK6"
export LANG=C
. ${TOP}/version
#
# Common lists of system tests to run.
#
# The "stress" test is not run by default since it creates enough
# load on the machine to make it unusable to other users.
# The "dialup", "delzone", and "dupsigs" tests are also not run by
# default because they take a very long time to complete.
#
# The following tests are hard-coded to use ports 5300 and 9953. For
# this reason, these must be run sequentially.
#
# Sequential tests that only run on unix/linux should be added to
# SEQUENTIAL_UNIX in conf.sh.in; those that only run on windows should
# be added to SEQUENTIAL_WINDOWS in conf.sh.win32.
#
SEQUENTIAL_COMMON="ecdsa eddsa tkey"
#
# These tests can use ports assigned by the caller (other than 5300
# and 9953). Because separate blocks of ports can be used for teach
# test, these tests can be run in parallel.
#
# Parallel tests that only run on unix/linux should be added to
# PARALLEL_UNIX in conf.sh.in; those that only run on windows should
# be added to PARALLEL_WINDOWS in conf.sh.win32.
#
# Note: some of the longer-running tests such as serve-stale and
# rpzrecurse are scheduled first, in order to get more benefit from
# parallelism.
#
PARALLEL_COMMON="dnssec rpzrecurse serve-stale \
acl additional addzone allow-query auth autosign \
builtin cacheclean case catz cds chain \
checkconf checknames checkzone \
cookie database digdelv dlv dlz dlzexternal \
dns64 dscp dsdigest dyndb \
ednscompliance emptyzones \
fetchlimit filter-aaaa formerr forward \
geoip geoip2 glue idna inline integrity ixfr \
keepalive legacy limits \
masterfile masterformat metadata mirror mkeys \
names notify nslookup nsupdate nzd2nzf \
padding pending pipelined qmin \
reclimit redirect resolver rndc rootkeysentinel rpz \
rrchecker rrl rrsetorder rsabigexponent runtime \
sfcache smartsign sortlist \
spf staticstub statistics statschannel stub synthfromdnssec \
tcp tools tsig tsiggss ttl \
unknown upforwd verify views wildcard \
xfer xferquota zero zonechecks"
#
# Set up color-coded test output
#
@@ -127,6 +178,29 @@ digcomp() {
return $result
}
#
# Useful variables in test scripts
#
# Default algorithm for testing.
DEFAULT_ALGORITHM=ECDSAP256SHA256
DEFAULT_ALGORITHM_NUMBER=13
DEFAULT_BITS=256
# This is an alternative algorithm for test cases that require more than
# one algorithm (for example algorithm rollover). Must be different from
# DEFAULT_ALGORITHM.
ALTERNATIVE_ALGORITHM=RSASHA256
ALTERNATIVE_ALGORITHM_NUMBER=8
ALTERNATIVE_BITS=1280
# This is an algorithm that is used for tests against the
# "disable-algorithms" configuration option. Must be different from above
# algorithms.
DISABLED_ALGORITHM=ECDSAP384SHA384
DISABLED_ALGORITHM_NUMBER=14
DISABLED_BITS=384
#
# Useful functions in test scripts
#
@@ -141,13 +215,13 @@ keyfile_to_keys_section() {
shift
echo "$section_name {"
for keyname in $*; do
awk '!/^; /{
printf "\t\""$1"\" "
printf "'"$key_prefix"'"
printf $4 " " $5 " " $6 " \""
for (i=7; i<=NF; i++) printf $i
printf "\";\n"
}' $keyname.key
awk '!/^; /{
printf "\t\""$1"\" "
printf "'"$key_prefix"'"
printf $4 " " $5 " " $6 " \""
for (i=7; i<=NF; i++) printf $i
printf "\";\n"
}' $keyname.key
done
echo "};"
}
@@ -166,6 +240,15 @@ keyfile_to_managed_keys() {
keyfile_to_keys_section "managed-keys" "initial-key " $*
}
# keyfile_to_key_id: convert a key file name to a key ID
#
# For a given key file name (e.g. "Kexample.+013+06160") provided as $1,
# print the key ID with leading zeros stripped ("6160" for the
# aforementioned example).
keyfile_to_key_id() {
echo "$1" | sed "s/.*+0\{0,4\}//"
}
# nextpart*() - functions for reading files incrementally
#
# These functions aim to facilitate looking for (or waiting for)
@@ -224,7 +307,7 @@ nextpartread() {
[ -f $1.prev ] || nextpartreset $1
prev=`cat $1.prev`
awk "NR > $prev "'{ print }
END { print NR > "/dev/stderr" }' $1
END { print NR > "/dev/stderr" }' $1
}
# nextpart: read everything that's been appended to a file since the
@@ -246,7 +329,7 @@ rndc_reload() {
# we need to wait for reload to finish
if [ -z "$3" ]; then
for __try in 0 1 2 3 4 5 6 7 8 9; do
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break
sleep 1
done
fi
@@ -255,7 +338,7 @@ rndc_reload() {
rndc_reconfig() {
echo_i "`$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} reconfig 2>&1 | sed 's/^/'$1' /'`"
for __try in 0 1 2 3 4 5 6 7 8 9; do
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break;
$RNDC -c ../common/rndc.conf -s $2 -p ${CONTROLPORT} status | grep "reload/reconfig in progress" > /dev/null || break
sleep 1
done
}
@@ -264,21 +347,65 @@ rndc_reconfig() {
# in $1, converting them to a format used by some system tests.
get_dig_xfer_stats() {
LOGFILE="$1"
echo "messages=`sed -n "s/^;; XFR size: .*messages \([0-9][0-9]*\).*/\1/p" "${LOGFILE}"`"
echo "records=`sed -n "s/^;; XFR size: \([0-9][0-9]*\) records.*/\1/p" "${LOGFILE}"`"
echo "bytes=`sed -n "s/^;; XFR size: .*bytes \([0-9][0-9]*\).*/\1/p" "${LOGFILE}"`"
sed -n "s/^;; XFR size: .*messages \([0-9][0-9]*\).*/messages=\1/p" "${LOGFILE}"
sed -n "s/^;; XFR size: \([0-9][0-9]*\) records.*/records=\1/p" "${LOGFILE}"
sed -n "s/^;; XFR size: .*bytes \([0-9][0-9]*\).*/bytes=\1/p" "${LOGFILE}"
}
# get_named_xfer_stats: from named log file $1, extract transfer
# statistics for the last transfer for peer $2 and zone $3, converting
# statistics for the last transfer for peer $2 and zone $3 (from a log
# message which has to contain the string provided in $4), converting
# them to a format used by some system tests.
get_named_xfer_stats() {
LOGFILE="$1"
PEER="$2"
ZONE="$3"
echo "messages=`grep "${PEER}" "${LOGFILE}" | sed -n "s/.*${ZONE}.* \([0-9][0-9]*\) messages.*/\1/p" | tail -1`"
echo "records=`grep "${PEER}" "${LOGFILE}" | sed -n "s/.*${ZONE}.* \([0-9][0-9]*\) records.*/\1/p" | tail -1`"
echo "bytes=`grep "${PEER}" "${LOGFILE}" | sed -n "s/.*${ZONE}.* \([0-9][0-9]*\) bytes.*/\1/p" | tail -1`"
PEER="`echo $2 | sed 's/\./\\\\./g'`"
ZONE="`echo $3 | sed 's/\./\\\\./g'`"
MESSAGE="$4"
grep " ${PEER}#.*${MESSAGE}:" "${LOGFILE}" | \
sed -n "s/.* '${ZONE}\/.* \([0-9][0-9]*\) messages.*/messages=\1/p" | tail -1
grep " ${PEER}#.*${MESSAGE}:" "${LOGFILE}" | \
sed -n "s/.* '${ZONE}\/.* \([0-9][0-9]*\) records.*/records=\1/p" | tail -1
grep " ${PEER}#.*${MESSAGE}:" "${LOGFILE}" | \
sed -n "s/.* '${ZONE}\/.* \([0-9][0-9]*\) bytes.*/bytes=\1/p" | tail -1
}
# copy_setports - Copy Configuration File and Replace Ports
#
# Convenience function to copy a configuration file, replacing the tokens
# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
# environment variables. (These values are set by "run.sh", which calls the
# scripts invoking this function.)
#
# Usage:
# copy_setports infile outfile
#
copy_setports() {
# The indirect method of handling the substitution of the PORT variables
# (defining "atsign" then substituting for it in the "sed" statement) is
# required to prevent the "Configure" script (in the win32utils/ directory)
# from replacing the <at>PORT<at> substitution tokens when it processes
# this file and produces conf.sh.
atsign="@"
sed -e "s/${atsign}PORT${atsign}/${PORT}/g" \
-e "s/${atsign}EXTRAPORT1${atsign}/${EXTRAPORT1}/g" \
-e "s/${atsign}EXTRAPORT2${atsign}/${EXTRAPORT2}/g" \
-e "s/${atsign}EXTRAPORT3${atsign}/${EXTRAPORT3}/g" \
-e "s/${atsign}EXTRAPORT4${atsign}/${EXTRAPORT4}/g" \
-e "s/${atsign}EXTRAPORT5${atsign}/${EXTRAPORT5}/g" \
-e "s/${atsign}EXTRAPORT6${atsign}/${EXTRAPORT6}/g" \
-e "s/${atsign}EXTRAPORT7${atsign}/${EXTRAPORT7}/g" \
-e "s/${atsign}EXTRAPORT8${atsign}/${EXTRAPORT8}/g" \
-e "s/${atsign}CONTROLPORT${atsign}/${CONTROLPORT}/g" \
-e "s/${atsign}DEFAULT_ALGORITHM${atsign}/${DEFAULT_ALGORITHM}/g" \
-e "s/${atsign}DEFAULT_ALGORITHM_NUMBER${atsign}/${DEFAULT_ALGORITHM_NUMBER}/g" \
-e "s/${atsign}DEFAULT_BITS${atsign}/${DEFAULT_BITS}/g" \
-e "s/${atsign}ALTERNATIVE_ALGORITHM${atsign}/${ALTERNATIVE_ALGORITHM}/g" \
-e "s/${atsign}ALTERNATIVE_ALGORITHM_NUMBER${atsign}/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \
-e "s/${atsign}ALTERNATIVE_BITS${atsign}/${ALTERNATIVE_BITS}/g" \
-e "s/${atsign}DISABLED_ALGORITHM${atsign}/${DISABLED_ALGORITHM}/g" \
-e "s/${atsign}DISABLED_ALGORITHM_NUMBER${atsign}/${DISABLED_ALGORITHM_NUMBER}/g" \
-e "s/${atsign}DISABLED_BITS${atsign}/${DISABLED_BITS}/g" \
$1 > $2
}
#
+13 -74
View File
@@ -17,15 +17,11 @@
# Find the top of the BIND9 tree.
TOP=@abs_top_builddir@
# Default algorithm for testing
DEFAULT_ALGORITHM=ECDSAP256SHA256
DEFAULT_ALGORITHM_NUMBER=13
DEFAULT_BITS=256
# This is not the windows build.
CYGWIN=""
# must be different from DEFAULT_ALGORITHM
ALTERNATIVE_ALGORITHM=RSASHA256
ALTERNATIVE_ALGORITHM_NUMBER=8
ALTERNATIVE_BITS=1280
# Load common values shared between windows and unix/linux.
. $TOP/bin/tests/system/conf.sh.common
ARPANAME=$TOP/bin/tools/arpaname
CDS=$TOP/bin/dnssec/dnssec-cds
@@ -76,40 +72,14 @@ SAMPLEUPDATE=$TOP/lib/samples/sample-update
# we don't want a KRB5_CONFIG setting breaking the tests
KRB5_CONFIG=/dev/null
# The "stress" test is not run by default since it creates enough
# load on the machine to make it unusable to other users.
# The "dialup", "delzone", and "dupsigs" tests are also not run by
# default because they take a very long time to complete.
#
# List of tests hard-coded to use ports 5300 and 9953. For this
# reason, these must be run sequentially.
SEQUENTIALDIRS="ecdsa eddsa @PKCS11_TEST@ tkey"
# Construct the lists of tests to run
#
SEQUENTIAL_UNIX="@PKCS11_TEST@"
SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_UNIX"
# List of tests that use ports assigned by caller (other than 5300
# and 9953). Because separate blocks of ports can be used for teach
# test, these tests can be run in parallel.
#
# This symbol must be kept in step with the PARALLEL macro in Makefile.in
PARALLELDIRS="acl additional addzone allow-query auth autosign \
builtin cacheclean case catz cds chain \
checkconf checknames checkzone \
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
cookie database digdelv dlv dlz dlzexternal \
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb \
ednscompliance emptyzones \
fetchlimit filter-aaaa formerr forward \
geoip glue idna inline integrity ixfr keepalive \
legacy limits logfileconfig \
masterfile masterformat metadata mirror mkeys \
names notify nslookup nsupdate nzd2nzf \
padding pending pipelined qmin \
reclimit redirect resolver rndc rootkeysentinel rpz rpzrecurse \
rrchecker rrl rrsetorder rsabigexponent runtime \
serve-stale sfcache smartsign sortlist \
spf staticstub statistics statschannel stub synthfromdnssec \
tcp tools tsig tsiggss ttl \
unknown upforwd verify views wildcard \
xfer xferquota zero zonechecks"
PARALLEL_UNIX="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@ logfileconfig"
PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_UNIX"
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
@@ -130,6 +100,9 @@ CURL=@CURL@
# XMLLINT will be empty if no program was found by configure
XMLLINT=@XMLLINT@
# XSLTPROC will be empty if no program was found by configure
XSLTPROC=@XSLTPROC@
# PERL will be an empty string if no perl interpreter was found.
PERL=@PERL@
@@ -145,37 +118,3 @@ HAVEXMLSTATS=@XMLSTATS@
HAVEJSONSTATS=@JSONSTATS@
ZLIB=@ZLIB@
NZD=@NZD_TOOLS@
# copy_setports - Copy Configuration File and Replace Ports
# Unfortunately it has to be different on Windows.
#
# Convenience function to copy a configuration file, replacing the tokens
# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
# environment variables. (These values are set by "run.sh", which calls the
# scripts invoking this function.)
#
# Usage:
# copy_setports infile outfile
copy_setports() {
sed -e "s/@PORT@/${PORT}/g" \
-e "s/@EXTRAPORT1@/${EXTRAPORT1}/g" \
-e "s/@EXTRAPORT2@/${EXTRAPORT2}/g" \
-e "s/@EXTRAPORT3@/${EXTRAPORT3}/g" \
-e "s/@EXTRAPORT4@/${EXTRAPORT4}/g" \
-e "s/@EXTRAPORT5@/${EXTRAPORT5}/g" \
-e "s/@EXTRAPORT6@/${EXTRAPORT6}/g" \
-e "s/@EXTRAPORT7@/${EXTRAPORT7}/g" \
-e "s/@EXTRAPORT8@/${EXTRAPORT8}/g" \
-e "s/@CONTROLPORT@/${CONTROLPORT}/g" \
-e "s/@DEFAULT_ALGORITHM@/${DEFAULT_ALGORITHM}/g" \
-e "s/@DEFAULT_ALGORITHM_NUMBER@/${DEFAULT_ALGORITHM_NUMBER}/g" \
-e "s/@DEFAULT_BITS@/${DEFAULT_BITS}/g" \
-e "s/@ALTERNATIVE_ALGORITHM@/${ALTERNATIVE_ALGORITHM}/g" \
-e "s/@ALTERNATIVE_ALGORITHM_NUMBER@/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \
-e "s/@ALTERNATIVE_BITS@/${ALTERNATIVE_BITS}/g" \
$1 > $2
}
# The rest is shared between Windows and Unices
. $TOP/bin/tests/system/conf.sh.common
+14 -86
View File
@@ -14,28 +14,22 @@
# other shell scripts.
#
# For specific stuff (currently kill HUP -> rdnc reload in notify)
CYGWIN=1
# Find the top of the BIND9 tree.
TOP=${SYSTEMTESTTOP:=.}/../../..
# Make it absolute so that it continues to work after we cd.
TOP=`cd $TOP && pwd`
# This is the windows build. This disables certain tests cases
# and changes some specific behaviors where necessary.
CYGWIN=1
# Load common values shared between windows and unix/linux.
. $TOP/bin/tests/system/conf.sh.common
# Visual Studio build configurations are Release and Debug
VSCONF=Debug
# Default algorithm for testing
DEFAULT_ALGORITHM=ECDSAP256SHA256
DEFAULT_ALGORITHM_NUMBER=13
DEFAULT_BITS=256
# must be different from DEFAULT_ALGORITHM
ALTERNATIVE_ALGORITHM=RSASHA256
ALTERNATIVE_ALGORITHM_NUMBER=8
ALTERNATIVE_BITS=1280
ARPANAME=$TOP/Build/$VSCONF/arpaname@EXEEXT@
CDS=$TOP/Build/$VSCONF/dnssec-cds@EXEEXT@
CHECKCONF=$TOP/Build/$VSCONF/named-checkconf@EXEEXT@
@@ -88,47 +82,18 @@ PIPEQUERIES=$TOP/Build/$VSCONF/pipequeries@EXEEXT@
# we don't want a KRB5_CONFIG setting breaking the tests
KRB5_CONFIG=NUL
# The "stress" test is not run by default since it creates enough
# load on the machine to make it unusable to other users.
# The "dialup", "delzone", and "dupsigs" tests are also not run by
# default because they take a very long time to complete.
#
# List of tests that use ports 5300 and 9953. For this reason, these must
# be run sequentially.
SEQUENTIALDIRS="ecdsa eddsa @PKCS11_TEST@ tkey"
# Construct the lists of tests to run
#
SEQUENTIAL_WINDOWS=""
SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_WINDOWS"
# List of tests that use unique ports (other than 5300 and 9953). These
# tests can be run in parallel.
#
# XXX: Note that tests are not currently run in parallel on Windows, so it
# isn't strictly necessary to maintain these as separate lists in this file,
# but using the same variable names as in conf.sh.in may simplify keeping the
# lists in sync.
#
# XXX: removed logfileconfig as it doesn't currently work on windows.
PARALLELDIRS="acl additional addzone allow-query auth autosign \
builtin cacheclean case catz cds chain \
checkconf checknames checkzone \
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
cookie database digdelv dlv dlz dlzexternal \
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb \
ednscompliance emptyzones \
fetchlimit filter-aaaa formerr forward \
geoip glue idna inline integrity ixfr keepalive \
legacy limits masterfile masterformat metadata mirror mkeys \
names notify nslookup nsupdate nzd2nzf \
padding pending pipelined qmin \
reclimit redirect resolver rndc rootkeysentinel rpz rpzrecurse \
rrchecker rrl rrsetorder rsabigexponent runtime \
serve-stale sfcache smartsign sortlist \
spf staticstub statistics statschannel stub synthfromdnssec \
tcp tools tsig tsiggss ttl \
unknown upforwd verify views wildcard \
xfer xferquota zero zonechecks"
PARALLEL_WINDOWS="@CHECKDS@ @COVERAGE@ @DNSTAP@ @KEYMGR@"
PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_WINDOWS"
SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
#Things that are different on Windows
# Things that are different on Windows
KILL="/bin/kill -f"
DIFF="diff --strip-trailing-cr"
DOS2UNIX=dos2unix
@@ -158,42 +123,5 @@ HAVEJSONSTATS=@JSONSTATS@
ZLIB=@ZLIB@
NZD=@NZD_TOOLS@
# copy_setports - Copy Configuration File and Replace Ports
# Unfortunately it has to be different on Windows.
#
# Convenience function to copy a configuration file, replacing the tokens
# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
# environment variables. (These values are set by "run.sh", which calls the
# scripts invoking this function.)
#
# Usage:
# copy_setports infile outfile
copy_setports() {
# The indirect method of handling the substitution of the PORT variables
# (defining "atsign" then substituting for it in the "sed" statement) is
# required because to prevent the "Configure" script (in the the
# bin9/win32utils directory) replacing the the <at>PORT<at> substitution
# tokens when it processes this file and produces conf.sh.
atsign="@"
sed -e "s/${atsign}PORT${atsign}/${PORT}/g" \
-e "s/${atsign}EXTRAPORT1${atsign}/${EXTRAPORT1}/g" \
-e "s/${atsign}EXTRAPORT2${atsign}/${EXTRAPORT2}/g" \
-e "s/${atsign}EXTRAPORT3${atsign}/${EXTRAPORT3}/g" \
-e "s/${atsign}EXTRAPORT4${atsign}/${EXTRAPORT4}/g" \
-e "s/${atsign}EXTRAPORT5${atsign}/${EXTRAPORT5}/g" \
-e "s/${atsign}EXTRAPORT6${atsign}/${EXTRAPORT6}/g" \
-e "s/${atsign}EXTRAPORT7${atsign}/${EXTRAPORT7}/g" \
-e "s/${atsign}EXTRAPORT8${atsign}/${EXTRAPORT8}/g" \
-e "s/${atsign}CONTROLPORT${atsign}/${CONTROLPORT}/g" \
-e "s/${atsign}DEFAULT_ALGORITHM${atsign}/${DEFAULT_ALGORITHM}/g" \
-e "s/${atsign}DEFAULT_ALGORITHM_NUMBER${atsign}/${DEFAULT_ALGORITHM_NUMBER}/g" \
-e "s/${atsign}DEFAULT_BITS${atsign}/${DEFAULT_BITS}/g" \
-e "s/${atsign}ALTERNATIVE_ALGORITHM${atsign}/${ALTERNATIVE_ALGORITHM}/g" \
-e "s/${atsign}ALTERNATIVE_ALGORITHM_NUMBER${atsign}/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \
-e "s/${atsign}ALTERNATIVE_BITS${atsign}/${ALTERNATIVE_BITS}/g" \
$1 > $2
}
# The rest is shared between Windows and Unices
. $TOP/bin/tests/system/conf.sh.common
-22
View File
@@ -18,8 +18,6 @@ ln -s $CHECKZONE named-compilezone
# Test 1: KSK goes inactive before successor is active
dir=01-ksk-inactive
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
@@ -28,8 +26,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 2: ZSK goes inactive before successor is active
dir=02-zsk-inactive
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
@@ -38,8 +34,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 3: KSK is unpublished before its successor is published
dir=03-ksk-unpublished
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
@@ -48,8 +42,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 4: ZSK is unpublished before its successor is published
dir=04-zsk-unpublished
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
@@ -59,8 +51,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 5: KSK deleted and successor published before KSK is deactivated
# and successor activated.
dir=05-ksk-unpub-active
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +8mo $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
@@ -69,8 +59,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 6: ZSK deleted and successor published before ZSK is deactivated
# and successor activated.
dir=06-zsk-unpub-active
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +8mo $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
@@ -78,8 +66,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 7: KSK rolled with insufficient delay after prepublication.
dir=07-ksk-ttl
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
@@ -89,8 +75,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 8: ZSK rolled with insufficient delay after prepublication.
dir=08-zsk-ttl
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
@@ -100,8 +84,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 9: KSK goes inactive before successor is active, but checking ZSKs
dir=09-check-zsk
rm -f $dir/K*.key
rm -f $dir/K*.private
ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
$SETTIME -K $dir -I +9mo -D +1y $ksk1 > /dev/null 2>&1
ksk2=`$KEYGEN -q -K $dir -S $ksk1`
@@ -110,8 +92,6 @@ zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
# Test 10: ZSK goes inactive before successor is active, but checking KSKs
dir=10-check-ksk
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +9mo -D +1y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
@@ -120,8 +100,6 @@ ksk1=`$KEYGEN -q -K $dir -a rsasha1 -3fk example.com`
# Test 11: ZSK goes inactive before successor is active, but after cutoff
dir=11-cutoff
rm -f $dir/K*.key
rm -f $dir/K*.private
zsk1=`$KEYGEN -q -K $dir -a rsasha1 -3 example.com`
$SETTIME -K $dir -I +18mo -D +2y $zsk1 > /dev/null 2>&1
zsk2=`$KEYGEN -q -K $dir -S $zsk1`
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
#
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
rm -f ns2/example.bk
rm -f ns3/example.bk
rm -f */named.memstats */named.run
+4 -2
View File
@@ -7,5 +7,7 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
rm -f ns2/example.bk
rm -f ns3/example.bk
# shellcheck source=conf.sh
. "$SYSTEMTESTTOP/conf.sh"
$SHELL clean.sh
+1 -1
View File
@@ -20,5 +20,5 @@ cp example.db.in example.db
cat "$keyname.key" >> example.db
echo "$keyname" | sed -e 's/.*[+]//' -e 's/^0*//' > keyid
keyfile_to_key_id "$keyname" > keyid
< "$keyname.key" grep -Ev '^;' | cut -f 7- -d ' ' > keydata
+123 -2
View File
@@ -30,9 +30,32 @@ mdig_with_opts() {
"$MDIG" -p "$PORT" "$@"
}
# Check if response in file $1 has the correct TTL range.
# The response record must have RRtype $2 and class IN (CLASS1).
# Maximum TTL is given by $3. This works in most cases where TTL is
# the second word on the line. TTL position can be adjusted with
# setting the position $4, but that requires updating this function.
check_ttl_range() {
file=$1
pos=$4
case "$pos" in
"3")
awk -v rrtype="$2" -v ttl="$3" '($4 == "IN" || $4 == "CLASS1" ) && $5 == rrtype { if ($3 <= ttl) { ok=1 } } END { exit(ok?0:1) }' < $file
;;
*)
awk -v rrtype="$2" -v ttl="$3" '($3 == "IN" || $3 == "CLASS1" ) && $4 == rrtype { if ($2 <= ttl) { ok=1 } } END { exit(ok?0:1) }' < $file
;;
esac
result=$?
[ $result -eq 0 ] || echo_i "ttl check failed"
return $result
}
# using delv insecure mode as not testing dnssec here
delv_with_opts() {
"$DELV" -i -p "$PORT" "$@"
"$DELV" +noroot +nodlv -p "$PORT" "$@"
}
KEYID="$(cat ns2/keyid)"
@@ -53,6 +76,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts @10.53.0.3 +split=4 -t sshfp foo.example > dig.out.test$n || ret=1
grep " 9ABC DEF6 7890 " < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "SSHFP" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -61,6 +85,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts @10.53.0.3 +unknownformat a a.example > dig.out.test$n || ret=1
grep "CLASS1[ ][ ]*TYPE1[ ][ ]*\\\\# 4 0A000001" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "TYPE1" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -70,6 +95,7 @@ if [ -x "$DIG" ] ; then
dig_with_opts @10.53.0.3 -x 127.0.0.1 > dig.out.test$n 2>&1 || ret=1
# doesn't matter if has answer
grep -i "127\\.in-addr\\.arpa\\." < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "SOA" 86400 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -78,6 +104,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts +tcp @10.53.0.3 a a.example > dig.out.test$n || ret=1
grep "10\\.0\\.0\\.1$" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -86,6 +113,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts +tcp @10.53.0.3 +multi +norrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < dig.out.test$n > /dev/null && ret=1
check_ttl_range dig.out.test$n "DNSKEY" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -94,6 +122,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts +tcp @10.53.0.3 +multi +norrcomments SOA example > dig.out.test$n || ret=1
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < dig.out.test$n > /dev/null && ret=1
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -102,6 +131,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts +tcp @10.53.0.3 +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "DNSKEY" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -144,6 +174,10 @@ if [ -x "$DIG" ] ; then
test "$lcmm" -ge "$lcmn" || ret=1
test "$lcnm" -ge "$lcnn" || ret=1
test "$lcmn" -ge "$lcnn" || ret=1
check_ttl_range dig.out.nn.$n "DNSKEY" 300 || ret=1
check_ttl_range dig.out.mn.$n "DNSKEY" 300 || ret=1
check_ttl_range dig.out.nm.$n "DNSKEY" 300 || ret=1
check_ttl_range dig.out.mm.$n "DNSKEY" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -152,6 +186,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts +tcp @10.53.0.3 +noheader-only A example > dig.out.test$n || ret=1
grep "Got answer:" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -178,6 +213,7 @@ if [ -x "$DIG" ] ; then
dig_with_opts +tcp @10.53.0.3 +raflag +qr example > dig.out.test$n || ret=1
grep "^;; flags: rd ra ad; QUERY: 1, ANSWER: 0," < dig.out.test$n > /dev/null || ret=1
grep "^;; flags: qr rd ra; QUERY: 1, ANSWER: 0," < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -187,6 +223,7 @@ if [ -x "$DIG" ] ; then
dig_with_opts +tcp @10.53.0.3 +tcflag +qr example > dig.out.test$n || ret=1
grep "^;; flags: tc rd ad; QUERY: 1, ANSWER: 0" < dig.out.test$n > /dev/null || ret=1
grep "^;; flags: qr rd ra; QUERY: 1, ANSWER: 0," < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -205,6 +242,7 @@ if [ -x "$DIG" ] ; then
dig_with_opts +tcp @10.53.0.3 +zflag +qr A example > dig.out.test$n || ret=1
sed -n '/Sending:/,/Got answer:/p' dig.out.test$n | grep "^;; flags: rd ad; MBZ: 0x4;" > /dev/null || ret=1
sed -n '/Got answer:/,/AUTHORITY SECTION:/p' dig.out.test$n | grep "^;; flags: qr rd ra; QUERY: 1" > /dev/null || ret=1
check_ttl_range dig.out.test$n "SOA" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -217,6 +255,7 @@ if [ -x "$DIG" ] ; then
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "checking dig +ttlunits works ($n)"
ret=0
dig_with_opts +tcp @10.53.0.2 +ttlunits A weeks.example > dig.out.test$n || ret=1
@@ -323,6 +362,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts +tcp @10.53.0.2 +subnet=127.0.0.1 A a.example > dig.out.test$n 2>&1 || ret=1
grep "CLIENT-SUBNET: 127.0.0.1/32/0" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -331,6 +371,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts +tcp @10.53.0.2 +subnet=127.0.0.0 +subnet=127.0.0.1 A a.example > dig.out.test$n 2>&1 || ret=1
grep "CLIENT-SUBNET: 127.0.0.1/32/0" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -356,6 +397,7 @@ if [ -x "$DIG" ] ; then
esac
grep "FORMERR" < dig.out.$i.test$n > /dev/null && ret=1
grep "CLIENT-SUBNET: $addr/$i/0" < dig.out.$i.test$n > /dev/null || ret=1
check_ttl_range dig.out.$i.test$n "A" 300 || ret=1
done
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -367,6 +409,7 @@ if [ -x "$DIG" ] ; then
grep "status: NOERROR" < dig.out.test$n > /dev/null || ret=1
grep "CLIENT-SUBNET: 0.0.0.0/0/0" < dig.out.test$n > /dev/null || ret=1
grep "10.0.0.1" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -377,6 +420,7 @@ if [ -x "$DIG" ] ; then
grep "status: NOERROR" < dig.out.test$n > /dev/null || ret=1
grep "CLIENT-SUBNET: 0.0.0.0/0/0" < dig.out.test$n > /dev/null || ret=1
grep "10.0.0.1" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -387,6 +431,7 @@ if [ -x "$DIG" ] ; then
grep "status: NOERROR" < dig.out.test$n > /dev/null || ret=1
grep "CLIENT-SUBNET: ::/0/0" < dig.out.test$n > /dev/null || ret=1
grep "10.0.0.1" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -397,6 +442,7 @@ if [ -x "$DIG" ] ; then
grep "status: NOERROR" < dig.out.test$n > /dev/null || ret=1
grep "CLIENT-SUBNET: 0/0/0" < dig.out.test$n > /dev/null || ret=1
grep "10.0.0.1" < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -417,6 +463,7 @@ if [ -x "$DIG" ] ; then
dig_with_opts +tcp @10.53.0.2 +subnet=10.53/$p A a.example > dig.out.test.$p.$n 2>&1 || ret=1
grep "FORMERR" < dig.out.test.$p.$n > /dev/null && ret=1
grep "CLIENT-SUBNET.*/$p/0" < dig.out.test.$p.$n > /dev/null || ret=1
check_ttl_range dig.out.test.$p.$n "A" 300 || ret=1
done
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -426,6 +473,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts @10.53.0.3 +sp=4 -t sshfp foo.example > dig.out.test$n || ret=1
grep " 9ABC DEF6 7890 " < dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "SSHFP" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -453,6 +501,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts @10.53.0.3 +ednsopt=3 a.example > dig.out.test$n 2>&1 || ret=1
grep 'NSID: .* ("ns3")' dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -461,6 +510,7 @@ if [ -x "$DIG" ] ; then
ret=0
dig_with_opts @10.53.0.3 +ednsopt=nsid a.example > dig.out.test$n 2>&1 || ret=1
grep 'NSID: .* ("ns3")' dig.out.test$n > /dev/null || ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -485,6 +535,7 @@ if [ -x "$DIG" ] ; then
dig_with_opts @10.53.0.3 +ednsopt=key-tag:00010002 a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; KEY-TAG: 1, 2$" dig.out.test$n > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
check_ttl_range dig.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -497,6 +548,54 @@ if [ -x "$DIG" ] ; then
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that dig processes +ednsopt=client-tag:value ($n)"
dig_with_opts @10.53.0.3 +ednsopt=client-tag:0001 a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; CLIENT-TAG: 1$" dig.out.test$n > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that FORMERR is returned for a too short client-tag ($n)"
dig_with_opts @10.53.0.3 +ednsopt=client-tag:01 a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; CLIENT-TAG" dig.out.test$n > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that FORMERR is returned for a too long client-tag ($n)"
dig_with_opts @10.53.0.3 +ednsopt=client-tag:000001 a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; CLIENT-TAG" dig.out.test$n > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that dig processes +ednsopt=server-tag:value ($n)"
dig_with_opts @10.53.0.3 +ednsopt=server-tag:0001 a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; SERVER-TAG: 1$" dig.out.test$n > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that FORMERR is returned for a too short server-tag ($n)"
dig_with_opts @10.53.0.3 +ednsopt=server-tag:01 a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; SERVER-TAG" dig.out.test$n > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that FORMERR is returned for a too long server-tag ($n)"
dig_with_opts @10.53.0.3 +ednsopt=server-tag:000001 a.example +qr > dig.out.test$n 2>&1 || ret=1
grep "; SERVER-TAG" dig.out.test$n > /dev/null || ret=1
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that dig handles malformed option '+ednsopt=:' gracefully ($n)"
ret=0
@@ -615,6 +714,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts @10.53.0.3 +split=4 -t sshfp foo.example > delv.out.test$n || ret=1
grep " 9ABC DEF6 7890 " < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n "SSHFP" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -623,6 +723,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts @10.53.0.3 +unknownformat a a.example > delv.out.test$n || ret=1
grep "CLASS1[ ][ ]*TYPE1[ ][ ]*\\\\# 4 0A000001" < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n "TYPE1" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -676,6 +777,7 @@ if [ -x "$DELV" ] ; then
delv_with_opts @10.53.0.3 -x 127.0.0.1 > delv.out.test$n 2>&1 || ret=1
# doesn't matter if has answer
grep -i "127\\.in-addr\\.arpa\\." < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n '\\-ANY' 10800 3 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -684,6 +786,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts +tcp @10.53.0.3 a a.example > delv.out.test$n || ret=1
grep "10\\.0\\.0\\.1$" < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -692,6 +795,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts +tcp @10.53.0.3 +multi +norrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < delv.out.test$n > /dev/null && ret=1
check_ttl_range delv.out.test$n "DNSKEY" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -700,6 +804,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts +tcp @10.53.0.3 +multi +norrcomments SOA example > delv.out.test$n || ret=1
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < delv.out.test$n > /dev/null && ret=1
check_ttl_range delv.out.test$n "SOA" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -708,6 +813,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts +tcp @10.53.0.3 +rrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
grep "; ZSK; alg = $DEFAULT_ALGORITHM ; key id = $KEYID" < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n "DNSKEY" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -752,6 +858,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts @10.53.0.3 +sp=4 -t sshfp foo.example > delv.out.test$n || ret=1
grep " 9ABC DEF6 7890 " < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n "SSHFP" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -768,6 +875,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts @10.53.0.3 -c IN -t a a.example > delv.out.test$n || ret=1
grep "a.example." < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -776,6 +884,7 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts @10.53.0.3 -c CH -t a a.example > delv.out.test$n || ret=1
grep "a.example." < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
@@ -784,16 +893,28 @@ if [ -x "$DELV" ] ; then
ret=0
delv_with_opts @10.53.0.3 -c CH -t a a.example > delv.out.test$n || ret=1
grep "a.example." < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n "A" 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that delv -q -m works ($n)"
ret=0
delv_with_opts @10.53.0.3 -q -m > delv.out.test$n 2>&1
delv_with_opts @10.53.0.3 -q -m > delv.out.test$n 2>&1 || ret=1
grep '^; -m\..*[0-9]*.*IN.*ANY.*;' delv.out.test$n > /dev/null || ret=1
grep "^add " delv.out.test$n > /dev/null && ret=1
grep "^del " delv.out.test$n > /dev/null && ret=1
check_ttl_range delv.out.test$n '\\-ANY' 300 3 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
n=$((n+1))
echo_i "check that delv -t ANY works ($n)"
ret=0
delv_with_opts @10.53.0.3 -t ANY example > delv.out.test$n 2>&1 || ret=1
grep "^example." < delv.out.test$n > /dev/null || ret=1
check_ttl_range delv.out.test$n NS 300 || ret=1
check_ttl_range delv.out.test$n SOA 300 || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status+ret))
else
+5 -3
View File
@@ -16,6 +16,7 @@ rm -f ns1/dsset-*
rm -f ns1/*.signed
rm -f ns1/signer.err
rm -f ns1/root.db
rm -f ns1/trusted.conf
rm -f ns2/K*
rm -f ns2/dlvset-*
rm -f ns2/dsset-*
@@ -25,18 +26,19 @@ rm -f ns2/signer.err
rm -f ns2/druz.db
rm -f ns3/K*
rm -f ns3/*.db
rm -f ns3/*.signed
rm -f ns3/*.signed ns3/*.signed.tmp
rm -f ns3/dlvset-*
rm -f ns3/dsset-*
rm -f ns3/keyset-*
rm -f ns1/trusted.conf ns5/trusted.conf
rm -f ns3/trusted-dlv.conf ns5/trusted-dlv.conf
rm -f ns3/trusted*.conf
rm -f ns3/signer.err
rm -f ns5/trusted*.conf
rm -f ns6/K*
rm -f ns6/*.db
rm -f ns6/*.signed
rm -f ns6/dsset-*
rm -f ns6/signer.err
rm -f ns7/trusted*.conf ns8/trusted*.conf
rm -f */named.memstats
rm -f dig.out.ns*.test*
rm -f ns*/named.lock

Some files were not shown because too many files have changed in this diff Show More