Compare commits

..
1671 Commits
Author SHA1 Message Date
Tinderbox User 28e45cd00e Merge branch 'prep-release' into v9_12_4_patch 2019-04-06 01:27:27 +00:00
Tinderbox User ee1b123223 doc rebuild 2019-04-06 01:26:49 +00:00
Tinderbox User 1d88eafa11 prep 9.12.4-P1 2019-04-06 01:26:33 +00:00
Evan Hunt 87367c41fd Merge branch 'security-tcp-client-crash-security-v9_12-v9_12_4_patch' into v9_12_4_patch 2019-04-05 18:22:03 -07:00
Evan Hunt 802600b19d CHANGES, release note
(cherry picked from commit ef15f7360784c5ec7341f3e4856a759cf1e2aedb)
2019-04-05 18:21:30 -07:00
Evan Hunt 785658728a 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 71fead4c3e03b178d6e6e3ff7592b45cf5f94069)
2019-04-05 18:21:23 -07:00
Evan Hunt 86a7d4c175 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 atomic

(cherry picked from commit 7e8222378ca24f1302a0c1c638565050ab04681b)
2019-04-05 15:52:42 -07:00
Evan Hunt 7d6518aa9c 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 c7394738b2445c16f728a88394864dd61baad900)
2019-04-05 15:52:42 -07:00
Michał KępieńandEvan Hunt 890dbb8200 use reference counter for pipeline groups (v3)
Track pipeline groups using a shared reference counter
instead of a linked list.

(cherry picked from commit 72eb9275ab8f97364c18abbc79671795f9cc1f23)
2019-04-05 15:52:41 -07:00
Witold KręcickiandEvan Hunt 7278b66cdf 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 a43fe7cd3f051f12bb544b6fa364135b1719c587)
2019-04-05 15:52:41 -07:00
Witold KręcickiandEvan Hunt 264384fbb9 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 9ef6eb4c37ed909c8e2a5508c3b3e510b7b13b85)
2019-04-05 15:52:41 -07:00
Evan Hunt 2af9844179 Merge branch '880-secure-asdfasdfasdf-abacadabra-crash-v9_12_4_patch' into 'v9_12_4_patch'
Fix nxdomain-redirect crash when recursive query results in ncache nxdomain

See merge request isc-private/bind9!83
2019-04-05 14:20:20 -07:00
Evan Hunt 82b03ce232 CHANGES, release note 2019-04-05 14:20:18 -07:00
Matthijs MekkingandEvan Hunt 4f00c86ece 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 3352270bdbbb39b167072aa282c6b310ffd96a7d)
(cherry picked from commit e2500c60a0a764f35116e57b8d22f3109e97f75b)
2019-04-05 14:19:58 -07:00
Matthijs MekkingandEvan Hunt 21c7c65b05 Add test for nxdomain-redirect ncachenxdomain
(cherry picked from commit 8dc43bc9fe934a0b4729cb1c467e62a73a11ebad)
(cherry picked from commit 6093cc063bfe06066c59fd4b84ae7c68cf683215)
2019-04-05 14:19:57 -07:00
Evan Hunt 5acc98e8c7 Merge branch '892-fix-redirect-name-v9_12_4_patch' into 'v9_12_4_patch'
use qname in redirect2

Closes #892

See merge request isc-projects/bind9!1561
2019-04-05 14:19:53 -07:00
Mark AndrewsandEvan Hunt 29b792a1a5 add CHANGES 2019-04-05 14:19:51 -07:00
Mark AndrewsandEvan Hunt 7c94f4b8f0 use client->query.qname
(cherry picked from commit 8758d36a5e)
(cherry picked from commit e7826648272b341a84e497a1e17756d359b64444)
2019-04-05 14:19:38 -07:00
Tinderbox User a953e08740 Merge branch 'prep-release' into v9_12 2019-02-27 23:42:04 +00:00
Tinderbox User 2920b4155f prep 9.12.4 2019-02-27 23:41:36 +00:00
Tinderbox User fdb01cd050 Merge branch 'prep-release' into v9_12 2019-02-21 04:11:49 +00:00
Tinderbox User 8e8ead807f rebuild configure 2019-02-21 04:11:20 +00:00
Evan Hunt d5c8108375 Merge branch 'broken-test' into v9_12 2019-02-20 19:45:43 -08:00
Evan Hunt b3dbbe4bd8 fixed an error in the mkeys system test 2019-02-20 19:45:43 -08:00
Tinderbox UserandEvan Hunt e9c931690a Merge branch 'prep-release' into v9_12 2019-02-20 19:45:42 -08:00
Tinderbox UserandEvan Hunt c798c983e0 doc rebuild 2019-02-20 19:45:41 -08:00
Tinderbox UserandEvan Hunt 1fb54b7bd6 prep 9.12.4rc1 2019-02-20 19:45:38 -08:00
Evan Hunt 50e0734a01 Merge branch 'security-dlz-axfr-deny-broken-security-v9_12' into 'security-v9_12'
denied axfr requests were not effective for writable DLZ zones

See merge request isc-private/bind9!57
2019-02-20 19:45:15 -08:00
Mark AndrewsandEvan Hunt 2656ad4bde add CHANGES and release notes entries
(cherry picked from commit 354ad18a12e84e5c660ce8e08e56382e529d8b2c)
2019-02-20 19:45:15 -08:00
Evan Hunt 7a0714e419 Merge 'keytag-memleak' into security-v9_12 2019-02-20 19:45:14 -08:00
Mark AndrewsandEvan Hunt e6bba06951 denied axfr requests were not effective for writable DLZ zones
(cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283)
2019-02-20 19:45:14 -08:00
Mark AndrewsandEvan Hunt 78928f17ee add CHANGES and release note entries
(cherry picked from commit 8134c9a3f3bf46455ce4d16f2bf01e086d20f69b)
2019-02-20 19:45:13 -08:00
Mark AndrewsandEvan Hunt 22018e332a check that multiple KEY-TAG trust-anchor-telemetry options don't leak memory
(cherry picked from commit 4b1dc4a5445e9561f2208f9388cf9f9e2cfcbe51)
2019-02-20 19:45:13 -08:00
Evan Hunt 6c72669909 Merge 'managed-key-assert' into security-v9_12 2019-02-20 19:45:12 -08:00
Mark AndrewsandEvan Hunt 3b88bc3d3b silently ignore additional keytag options
(cherry picked from commit 36158e6c96e982768bd33d4090cbe563718534f2)
2019-02-20 19:45:12 -08:00
Evan Hunt 066330fd29 use algorithm 255 for both unsupported keys 2019-02-20 19:45:11 -08:00
Matthijs MekkingandEvan Hunt 89536c5024 CHANGES, notes
(cherry picked from commit f0eefb06d488cc99e8b4a4b7238e4a556afb7586)
2019-02-20 19:45:11 -08:00
Matthijs MekkingandEvan Hunt 2f93529a53 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.

(cherry picked from commit b1d5411569ae10830b63f07560091193646cc739)
2019-02-20 19:45:10 -08:00
Matthijs MekkingandEvan Hunt fd6638e4c3 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.

(cherry picked from commit 144cb53d0ae3aa5e6e3123720b603f9ab2bd1fa9)
2019-02-20 19:45:10 -08:00
Matthijs MekkingandEvan Hunt 8d4741af21 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.

(cherry picked from commit 7a1ca39b950b7d5230b605ac60f15a1cb94e3d69)
2019-02-20 19:45:09 -08:00
Evan Hunt 70a1bc15b7 Merge branch '823-masterformat-test-fix-v9_12' into 'v9_12'
fix broken masterformat test

See merge request isc-projects/bind9!1554
2019-02-20 22:39:13 -05:00
Evan Hunt d15aed8325 fix broken masterformat test
- dig command had the @ parameter in the wrong place
- private-dnskey and private-cdnskey are queried in a separate
  loop, which strips 'private-' from the name to determine the qtype

(cherry picked from commit bc7b34d6ef)
2019-02-20 19:15:33 -08:00
Evan Hunt 4b331c4e75 Merge branch 'each-enable-threads' into 'v9_12'
enable threads by default on openbsd 6.2 and higher

See merge request isc-projects/bind9!1548
2019-02-20 21:58:04 -05:00
Evan Hunt 60125f1ecc CHANGES 2019-02-20 18:46:55 -08:00
Evan Hunt 95fff9538f enable threads by default on openbsd 6.2 and higher 2019-02-20 18:29:53 -08:00
Evan Hunt 2472a97072 Merge branch 'each-fix-timer-test' into 'v9_12'
timer_test failed to compile if cmocka was enabled but threads were not

See merge request isc-projects/bind9!1547
2019-02-20 21:22:27 -05:00
Evan Hunt c73e3175c7 timer_test failed to compile if cmocka was enabled but threads were not 2019-02-20 13:35:51 -08:00
Mark Andrews 4ac4806d71 Merge branch '884-patches-to-review-v9_12' into 'v9_12'
Correct errno to result translation

See merge request isc-projects/bind9!1540
2019-02-19 18:29:27 -05:00
Mark Andrews a13c6e9579 add CHANGES
(cherry picked from commit a0c0d76029)
2019-02-20 10:16:59 +11:00
Mark Andrews c0b14949be correct errno to result translation
(cherry picked from commit 218ce34e7d)
2019-02-20 10:16:59 +11:00
Mark Andrews 2b4d66c1c3 Merge branch '836-building-fails-in-build-subdirectory-when-dnstap-is-enabled-v9_12' into 'v9_12'
Resolve "Building fails in build subdirectory when dnstap is enabled"

See merge request isc-projects/bind9!1538
2019-02-19 17:58:38 -05:00
Mark Andrews ad3e5049c5 add CHANGES
(cherry picked from commit 3a21fdf884)
2019-02-20 09:45:45 +11:00
Mark Andrews 471a69abc2 teach proto_c to look in the source directory for out of tree builds
(cherry picked from commit c0d4ff5796)
2019-02-20 09:45:45 +11:00
Mark Andrews 54e2ccb232 Merge branch '877-clang-scan-build-redundant-assignments-detected-v9_12' into 'v9_12'
Remove redundant assignments

See merge request isc-projects/bind9!1536
2019-02-19 17:30:15 -05:00
Mark Andrews 65d78a3772 remove redundant assignment
(cherry picked from commit f475dc75b1)
2019-02-19 10:23:45 +11:00
Mark Andrews 2b96fe7c53 silence clang
(cherry picked from commit 7b60f6832e)
2019-02-19 10:23:45 +11:00
Mark Andrews 24336749f0 don't overwrite result
(cherry picked from commit 70fab477b1)
2019-02-19 10:21:48 +11:00
Mark Andrews 52ccbcd5a1 remove seen_dname
(cherry picked from commit 63c03cdb2d)
2019-02-19 10:18:19 +11:00
Mark Andrews 59b82cecc6 Merge branch '877-clang-scan-build-redundant-assignments-detected-2-v9_12' into 'v9_12'
decode_NegTokenInit failed to cleanup allocated memory on error.

See merge request isc-projects/bind9!1529
2019-02-18 17:51:02 -05:00
Mark Andrews ea232ab917 fix memory leak
(cherry picked from commit 7114d16098)
2019-02-19 09:37:48 +11:00
Mark Andrews 961f9c5557 Merge branch '877-clang-scan-build-redundant-assignments-detected-2-v9_12' into 'v9_12'
Add missing asserts to socket_test.c and dnstest.c

See merge request isc-projects/bind9!1524
2019-02-18 16:46:25 -05:00
Mark Andrews 48d49338a3 assert result is ISC_R_SUCCESS
(cherry picked from commit 76a1c1531a)
2019-02-19 08:00:13 +11:00
Mark Andrews 9daedd5482 Merge branch 'u/fanf2/dnssec-keymgr-man-v9_12' into 'v9_12'
Improve dnssec-keymgr manual

See merge request isc-projects/bind9!1520
2019-02-18 00:05:47 -05:00
Tony FinchandMark Andrews 66f60c1d2c Improve dnssec-keymgr manual
Illustrate the syntax for the policy options, with semicolons.

Explicitly mention the "default" policy.

Fix a few typos and remove some redundant wording.

(cherry picked from commit 7ee56e2abd)
2019-02-18 15:45:28 +11:00
Evan Hunt 8f8d7db50e Merge branch '879-dnssec-checkds-help-v9_12' into 'v9_12'
Correct path in dnssec-checkds help

See merge request isc-projects/bind9!1516
2019-02-14 16:06:10 -05:00
Petr MenšíkandEvan Hunt 87c3f93066 Correct path in dnssec-checkds help
(cherry picked from commit 7bd544e795)
2019-02-14 12:52:32 -08:00
Mark Andrews 2ab6d46f04 Merge branch '871-add-a-ci-check-for-missing-prereq.sh-scripts-v9_12' into 'v9_12'
Add a CI check for missing prereq.sh scripts

See merge request isc-projects/bind9!1508
2019-02-11 18:03:06 -05:00
Mark Andrews 6fd4532933 add util/check-ans-prereq to precheck
(cherry picked from commit 74c1c37563)
2019-02-12 09:03:29 +11:00
Mark Andrews da1b1286c9 add check-ans-prereq
(cherry picked from commit ec2ecffef1)
2019-02-12 09:03:29 +11:00
Evan Hunt 1986e117d1 Merge branch '872-dlz-ldap-dname-v9_12' into 'v9_12'
added DNAME support to DLZ LDAP schema, and fixed a DLZ compile error

See merge request isc-projects/bind9!1503
2019-02-10 17:24:04 -05:00
Evan Hunt 04f26338a8 added DNAME support to DLZ LDAP schema, and fixed a DLZ compile error
Thanks to Roland Gruber for the schema contribution.

(cherry picked from commit 2e3b5db195)
2019-02-10 14:09:29 -08:00
Evan Hunt 287da15438 Merge branch 'u/fanf2/zonemd-v9_12' into 'v9_12'
Correct ZONEMD expansion in ARM

See merge request isc-projects/bind9!1499
2019-02-08 16:18:51 -05:00
Tony FinchandEvan Hunt 65334e1df9 Correct ZONEMD expansion in ARM
(cherry picked from commit af74f18536)
2019-02-08 13:17:00 -08:00
Michał Kępień 15f660ca3a Merge branch '869-prereq-sh-needed-in-forward-test-v9_12' into 'v9_12'
[v9_12] Resolve "prereq.sh needed in forward test"

See merge request isc-projects/bind9!1495
2019-02-08 09:05:04 -05:00
Curtis BlackburnandMichał Kępień bfe8e7ea94 added prereq.sh to forward test to detect perl Net::DNS
(cherry picked from commit 8c929bd7c5)
2019-02-08 14:36:41 +01:00
Mark Andrews ab3066ef6d Merge branch '867-rrtypes-missing-from-named-v9_12' into 'v9_12'
Resolve "rrtypes missing from named"

See merge request isc-projects/bind9!1491
2019-02-07 22:30:56 -05:00
Mark Andrews 3e31e71b67 add AMTRELAY and ZONEMD to ARM
(cherry picked from commit b06c5f8cfd)
2019-02-08 14:10:17 +11:00
Mark Andrews 547bf4efd2 fix AMTRELAY name
(cherry picked from commit a9fadafecd)
2019-02-08 14:10:17 +11:00
Evan Hunt 7eb0486f73 Merge branch 'each-dnssec-coverage-dots-v9_12' into 'v9_12'
dnssec-coverage was improperly ignoring some zones

See merge request isc-projects/bind9!1488
2019-02-07 20:58:23 -05:00
Evan Hunt a9d79b6001 CHANGES
(cherry picked from commit a242c704f5)
2019-02-07 17:33:01 -08:00
Evan Hunt ddcd3b61be adjust style, match test to other tests
(cherry picked from commit 9949163936)
2019-02-07 17:33:00 -08:00
Tony FinchandEvan Hunt 8b4c9c3981 dnssec-coverage: fix handling of zones without trailing dots
After change 5143, zones listed on the command line without trailing
dots were ignored.

(cherry picked from commit a159675f44)
2019-02-07 17:33:00 -08:00
Mark Andrews ad8a5058e4 Merge branch '867-rrtypes-missing-from-named-v9_12' into 'v9_12'
Resolve "rrtypes missing from named"

See merge request isc-projects/bind9!1485
2019-02-07 18:42:25 -05:00
Mark Andrews 7fb8e80d52 add top of range checks
(cherry picked from commit 8d69e15988)
2019-02-08 10:27:41 +11:00
Mark Andrews 39c8e63f86 Merge branch '867-rrtypes-missing-from-named-v9_12' into 'v9_12'
Resolve "rrtypes missing from named"

See merge request isc-projects/bind9!1481
2019-02-07 17:01:53 -05:00
Evan HuntandMark Andrews c482142518 CHANGES
(cherry picked from commit 72f6fb0697)
2019-02-08 08:32:45 +11:00
Evan HuntandMark Andrews 079d86dd31 Add support for ZONEMD
(cherry picked from commit 3183663dd4)
2019-02-08 08:32:45 +11:00
Mark Andrews 93a8a99191 Add support for ATMRELAY
(cherry picked from commit 66922ee7af)
2019-02-08 08:32:44 +11:00
Mark Andrews 142b13da4d Merge branch '207-nslookup-takes-2-argvs-w-o-errors-uses-only-1st-and-last-v9_12' into 'v9_12'
Resolve "nslookup takes >2 argvs w/o errors, uses only 1st and last"

See merge request isc-projects/bind9!1476
2019-02-07 08:18:25 -05:00
Mark Andrews 42458336e4 error out if there are extra command line options
(cherry picked from commit f73816ff0f)
2019-02-07 23:44:53 +11:00
Mark Andrews 1080af1de4 Merge branch '857-inline-system-test-wasn-t-cleaning-k-files-on-restart-if-interrupted-v9_12' into 'v9_12'
Resolve "inline system test wasn't cleaning K* files on restart if interrupted."

See merge request isc-projects/bind9!1471
2019-02-06 02:05:03 -05:00
Ondřej SurýandMark Andrews bec6058ead Simplify the inline clean script
(cherry picked from commit 519152b191)
2019-02-06 17:51:50 +11:00
Mark Andrews a908c62b0c clean K* files in inline system test directory
(cherry picked from commit 1878efe661)
2019-02-06 17:20:22 +11:00
Evan Hunt 977ca062ae Merge branch 'u/fanf2/cleanup-cdnskey-to-ds-v9_12' into 'v9_12'
cleanup: allow building DS directly from CDNSKEY

See merge request isc-projects/bind9!1469
2019-02-06 00:48:39 -05:00
Tony FinchandEvan Hunt 1be4212eef cleanup: allow building DS directly from CDNSKEY
Relax an assertion in lib/dns/ds.c so that dnssec-cds does
not have to work around it. This will also be useful for
dnssec-dsfromkey.

(cherry picked from commit 2e173bbd24)
2019-02-05 21:22:54 -08:00
Evan Hunt eb8a188c4c Merge branch 'u/fanf2/cleanup-dnssec-revoke-help-v9_12' into 'v9_12'
cleanup: fix dnssec-revoke help text

See merge request isc-projects/bind9!1466
2019-02-06 00:21:10 -05:00
Tony FinchandEvan Hunt 12d3b27a82 cleanup: fix dnssec-revoke help text
Correct alignment and alphabetize

(cherry picked from commit f7b2bd304e)
2019-02-05 21:15:14 -08:00
Evan Hunt fd376f85a5 Merge branch 'u/fanf2/dsfromkey-man-v9_12' into 'v9_12'
cleanup: revamp the dnssec-dsfromkey man page and help output

See merge request isc-projects/bind9!1464
2019-02-05 23:18:29 -05:00
Tony FinchandEvan Hunt fb9bc8f871 cleanup: revamp the dnssec-dsfromkey man page and help output
* Alphabetize the option lists in the man page and help text

* Make the synopses more consistent between the man page and help
  text, in particular the number of different modes

* Group mutually exclusive options in the man page synopses, and order
  options so that it is more clear which are available in every mode

* Expand the DESCRIPTION to provide an overview of the output modes
  and input modes

* Improve cross-references between options

* Leave RFC citations to the SEE ALSO section, and clarify which RFC
  specifies what

* Clarify list of digest algorithms in dnssec-dsfromkey and dnssec-cds
  man pages

(cherry picked from commit 6ca8e130ac)
2019-02-05 20:10:44 -08:00
Mark Andrews bdc6039cae Merge branch '860-process_opt-could-be-called-multiple-times-on-the-same-message-in-dig-v9_12' into 'v9_12'
Resolve "process_opt() could be called multiple times on the same message in dig."

See merge request isc-projects/bind9!1460
2019-02-05 21:39:33 -05:00
Mark Andrews 200077efb2 add CHANGES
(cherry picked from commit 946d5c2c1e)
2019-02-06 13:13:46 +11:00
Mark Andrews 48fedfce69 send over and undersized cookie
(cherry picked from commit 0207199bb8)
2019-02-06 13:13:11 +11:00
Mark Andrews bb3a5986bb the condition test for checking the client cookie value was wrong; don't call process_opt multiple times
(cherry picked from commit d9c368eee0)
2019-02-06 13:13:11 +11:00
Michał Kępień 7b989a060d Merge branch '822-test-make-install-in-one-of-the-build-jobs-v9_12' into 'v9_12'
[v9_12] Test "make install" in one of the build jobs

See merge request isc-projects/bind9!1456
2019-02-05 15:37:31 -05:00
Michał Kępień 1f985580cc Test "make install" in one of the build jobs
Running "make install" in a separate job in the "test" phase of a CI
pipeline causes a lot of object files to be rebuilt due to the way
artifacts are passed between GitLab CI jobs (object files extracted from
the artifacts archive have older modification times than their
respective source files checked out using Git by the worker running the
"install" job).  Test "make install" in one of the build jobs instead,
in order to prevent object rebuilding.

Using 'after_script' for this purpose was not an option because its
failures are ignored.

Duplicating the build script in two places would be error-prone in the
long run and thus was rejected as a solution.  YAML anchors would also
not help in this case.

A "positive" test (`test -n "${RUN_MAKE_INSTALL}" && make install`)
would not work because:

  - it would cause the build script to fail for any job not supposed to
    run "make install",

  - appending `|| :` to the shell pipeline would prevent "make install"
    errors from causing a job failure.

Due to the above, a "negative" test is performed, so that:

  - jobs not supposed to run "make install" succeed immediately,

  - jobs supposed to run "make install" only succeed when "make install"
    succeeds.

(cherry picked from commit 2a231b6239)
2019-02-05 21:10:33 +01:00
Evan Hunt 7681057cd5 Merge branch 'each-win-tests-v9_12' into 'v9_12'
tests failing on windows due to false crash-on-shutdown reports

See merge request isc-projects/bind9!1447
2019-02-01 01:57:06 -05:00
Evan Hunt cd0b538e90 disable the check for crash on shutdown when running under cygwin
(cherry picked from commit 449842e1ce)
2019-01-31 22:56:17 -08:00
Evan Hunt 94969bd1cf Merge branch '623-rpz-logging-to-include-qclass-and-qtype-v9_12' into 'v9_12'
Resolve "RPZ logging to include QCLASS and QTYPE"

See merge request isc-projects/bind9!1444
2019-01-31 21:03:13 -05:00
Mark AndrewsandEvan Hunt fb731a4d4e add CHANGES note
(cherry picked from commit 505a1ceda4)
2019-01-31 17:40:31 -08:00
Mark AndrewsandEvan Hunt 5115d677de log RPZ type and class
(cherry picked from commit 28442f11f0)
2019-01-31 17:39:29 -08:00
Evan Hunt 767062da85 Merge branch 'each-silence-warning-v9_12' into 'v9_12'
silence a spurious dnssec-keygen warning in the dnssec system test

See merge request isc-projects/bind9!1442
2019-01-31 17:12:59 -05:00
Evan Hunt 47d1688078 silence a spurious dnssec-keygen warning in the dnssec system test
the occluded-key test creates both a KEY and a DNSKEY. the second
call to dnssec-keygen calls dns_dnssec_findmatchingkeys(), which causes
a spurious warning to be printed when it sees the type KEY record.
this should be fixed in dnssec.c, but the meantime this change silences
the warning by reversing the order in which the keys are created.

(cherry picked from commit 6661db9564)
2019-01-31 14:00:14 -08:00
Evan Hunt 0f1267822e Merge branch '101-dumpdb-stale-ttl-v9_12' into 'v9_12'
Resolve "[Support#12071] [RT#46548] Output stale/expired data with 'rndc dumpdb'"

See merge request isc-projects/bind9!1436
2019-01-31 13:45:59 -05:00
Matthijs MekkingandEvan Hunt 420c92f619 CHANGES 2019-01-31 10:30:12 -08:00
Matthijs MekkingandEvan Hunt cf235900d7 Add tests for dumpdb stale ttl
This adds a test for rndc dumpdb to ensure the correct "stale
comment" is printed.  It also adds a test for non-stale data to
ensure no "stale comment" is printed for active RRsets.

In addition, the serve-stale tests are hardened with more accurate
grep calls.
2019-01-31 10:30:11 -08:00
Matthijs MekkingandEvan Hunt 68e3472a62 Print in dump-file stale ttl
This change makes rndc dumpdb correctly print the "; stale" line.
It also provides extra information on how long this data may still
be served to clients (in other words how long the stale RRset may
still be used).
2019-01-31 10:30:11 -08:00
Evan Hunt 071d322e6d Merge branch '850-catch-shutdown-aborts-v9_12' into 'v9_12'
detect crash on shutdown in stop.pl

See merge request isc-projects/bind9!1440
2019-01-31 12:54:15 -05:00
Evan Hunt ab5feb57ef detect crash on shutdown in stop.pl
(cherry picked from commit 9bf37f4e48)
2019-01-31 09:42:49 -08:00
Evan Hunt 9f34e4e589 Merge branch '849-fix-tkey-leak-v9_12' into 'v9_12'
fix TKEY problems

See merge request isc-projects/bind9!1438
2019-01-31 12:40:18 -05:00
Evan Hunt 51589d0392 Change #4148 wasn't complete
- there was a memory leak when using negotiated TSIG keys.
- TKEY responses could only be signed when using a newly negotiated
  key; if an existent matching TSIG was found in in the keyring it
  would not be used.

(cherry picked from commit 73ba24fb36)
2019-01-31 09:28:51 -08:00
Evan Hunt 45500c0f91 Merge branch '821-matthijs-unsigned-gss-tsig-tkey-query-response-v9_12' into 'v9_12'
Resolve "Unsigned GSS-TSIG TKEY Query Response"

See merge request isc-projects/bind9!1430
2019-01-30 15:32:53 -05:00
Matthijs MekkingandEvan Hunt c82eb3b3ca Update CHANGES
(cherry picked from commit f1c6e01a0f)
2019-01-30 12:11:29 -08:00
Matthijs MekkingandEvan Hunt 879fc0285e allow TSIG key to be added to message structure after parsing
up until now, message->tsigkey could only be set during parsing
of the request, but gss-tsig allows one to be created afterward.
2019-01-30 12:11:23 -08:00
Matthijs MekkingandEvan Hunt b0b846a4bb Harden GSS-TSIG tests, verify signed TKEY response 2019-01-30 12:11:08 -08:00
Mark Andrews 421582dec4 Merge branch '848-keymgr-19-old-keys-failing-on-penguin-v9_12' into 'v9_12'
Resolve "keymgr 19-old-keys failing on penguin"

See merge request isc-projects/bind9!1425
2019-01-30 00:35:24 -05:00
Mark Andrews 8da77d9af3 add CHANGES
(cherry picked from commit b9d5a62bdc)
2019-01-30 16:00:52 +11:00
Mark Andrews e5cbb2e03c add 300 seconds of fudge
(cherry picked from commit acf0292da4)
2019-01-30 16:00:17 +11:00
Mark Andrews cb2d79b456 only use a single policy file when testing.
(cherry picked from commit 36ea9b8181)
2019-01-30 16:00:14 +11:00
Evan Hunt 5204f46f1e Merge branch '841-openssl-null-free' into 'v9_12'
Do not fail on NULL passed to OpenSSL_free

See merge request isc-projects/bind9!1422
2019-01-29 18:34:28 -05:00
Petr MenšíkandEvan Hunt a26673a088 Do not fail on NULL passed to OpenSSL_free
Some plugins might call it after deconstruction. Do not crash if there
is no reason for it.
2019-01-29 18:23:57 -05:00
Evan Hunt eaa762e64c Merge branch '766-querytrace-doc-v9_12' into 'v9_12'
Resolve "--enable-querytrace has negative performance impact - update the documentation to say this"

See merge request isc-projects/bind9!1419
2019-01-29 17:25:00 -05:00
Evan Hunt 87b0098b4e added querytrace documentation in README
also rearranged things a little, adding a "dependencies" section

(cherry picked from commit 51048ca06e)
2019-01-29 14:24:11 -08:00
Michał Kępień fed60762b2 Merge branch 'michal/add-fedora-29-to-ci-v9_12' into 'v9_12'
[v9_12] Add Fedora 29 to CI

See merge request isc-projects/bind9!1415
2019-01-29 07:53:17 -05:00
Michał Kępień 5598e75eff Add Fedora 29 to CI
Modify .gitlab-ci.yml so that every CI pipeline also builds and tests
BIND on Fedora 29.

(cherry picked from commit 38b6c5c444)
2019-01-29 13:32:23 +01:00
Evan Hunt af210be820 Merge branch '259-named-args-v9_12' into 'v9_12'
add properly-formatted -D options to named.args files

See merge request isc-projects/bind9!1411
2019-01-29 00:40:28 -05:00
Evan Hunt 96bf857b65 also add -D options for transient named processes started in tests.sh
(cherry picked from commit dd45831acc)
2019-01-28 21:19:28 -08:00
Evan Hunt e233f33fc3 add properly-formatted -D options to named.args files
this prevents servers that use arguments specified in named.args
from appearing different in 'ps' output from servers run with arguments
from start.pl

(cherry picked from commit 175d6e9bfb)
2019-01-28 21:19:25 -08:00
Evan Hunt b3bdb23190 Merge branch 'each-fix-logfileconfig-v9_12' into 'v9_12'
reset SYSTEMTESTTOP when changing directories

See merge request isc-projects/bind9!1409
2019-01-29 00:06:32 -05:00
Evan Hunt 2a53564d08 reset SYSTEMTESTTOP when changing directories
(cherry picked from commit 70f36a25e4)
2019-01-28 20:40:48 -08:00
Evan Hunt a2adf3ea69 Merge branch 'each-win32-tests-v9_12' into 'v9_12'
fix win32 tests (v9_12)

See merge request isc-projects/bind9!1399
2019-01-25 16:00:18 -05:00
Evan Hunt 29e89d08f7 fix rrl test
strip CR characters before using awk/sed
2019-01-25 11:24:11 -08:00
Evan Hunt 9d1b0f314d fix rpz test
- work around a CR newline problem
- use rndc to stop servers
2019-01-25 11:24:11 -08:00
Evan Hunt b322cc74ea fix rpzrecurse test
use rndc to stop servers
2019-01-25 11:24:11 -08:00
Evan Hunt e37a32276e fix dnssec test
- work around CR issues
- use UTC for time comparisons
- use $DIFF instead of cmp
2019-01-25 11:24:11 -08:00
Evan Hunt 7658ba4216 fix legacy test
use rndc rather than signals to stop the server
2019-01-25 11:24:11 -08:00
Evan Hunt 1e1f1d4ef7 fix fetchlimit test
use TCP for the test queries in between UDP bursts; this avoids
congestion issues that interfered with the test on windows
2019-01-25 11:24:11 -08:00
Evan Hunt 678c3211af fix sfcache test
use a lame server configuration to force SERVFAILs instead of killing ns2.
this prevents test failures that occurred due to a different behavior of
the netowrking stack in windows.
2019-01-25 11:24:10 -08:00
Evan Hunt d04e771dcf fix nsupdate test
rndc_reload was failing on windows
2019-01-25 11:24:10 -08:00
Evan Hunt b282b4dd5e fix rndc test
use regex instead of exact string matching to deal with CR at end of line
2019-01-25 11:24:10 -08:00
Evan Hunt 28f8899e21 fix statistics test
the active sockets test is supposed to be commented out on win32, but
only part of it was
2019-01-25 11:24:10 -08:00
Evan Hunt 0b0c110577 fix redirect test
strip CR characters before using sed
2019-01-25 11:24:10 -08:00
Evan Hunt 75278f0f54 fix notify test
test the average delay between notifies instead of the minimum delay;
this helps avoid unnecessary test failures on systems with bursty
network performance.
2019-01-25 11:24:10 -08:00
Evan Hunt bb256ea268 fix masterformat test
use stop.pl instead of rndc to stop server
2019-01-25 11:24:10 -08:00
Evan Hunt 95d2dff101 fix inline test
use regex instead of exact string matching, to deal with CR at end of ine
2019-01-25 11:24:10 -08:00
Evan Hunt 9dc3aac7a7 fix forward test
strip CR characters before using sed
2019-01-25 11:24:09 -08:00
Evan Hunt 659bc0d09d fix cookie test
strip CR characters before comparing files
2019-01-25 11:24:09 -08:00
Evan Hunt 0279793e03 fix cds test
- use $PERL instead of perl
- use $DIFF instead of cmp for windows portability; cmp doesn't
  handle CR characters properly
2019-01-25 11:24:09 -08:00
Evan Hunt 362eb56189 use $DIFF instead of diff 2019-01-25 11:24:09 -08:00
Evan Hunt bd9ffedbcf set and use SYSTEMTESTTOP consistently 2019-01-25 11:24:09 -08:00
Evan Hunt 2189f00e63 complete the set of tools available in windows tests
- dnssec-cds wasn't being built for windows
- nsec3hash was available, but the NSEC3HASH variable wasn't
  set in conf.sh.win32
2019-01-25 11:24:09 -08:00
Evan Hunt 3cf4ecf177 more reliable method for killing "ans" servers on windows
as perl and python are both native to cygwin, we don't want to use
the "kill -f" option to terminate them.
2019-01-25 10:43:10 -08:00
Evan Hunt b5f8d60565 update ifconfig.bat with current test interfaces
the addresses set up in ifconfig.bat were out of sync with the
ones in ifconfig.sh
2019-01-25 10:43:10 -08:00
Evan Hunt 47ef534511 update conf.sh.win32 test list
- the test lists in conf.sh.in and conf.sh.win32 were out of sync
2019-01-25 10:43:10 -08:00
Evan Hunt fe901beade Merge branch '560-dnssec-keymgr-root-v9_12' into 'v9_12'
improve handling of trailing dots in dnssec-keymgr and dnssec-coverage

See merge request isc-projects/bind9!1394
2019-01-24 17:23:36 -05:00
Evan Hunt 4f06d65e38 improve handling of trailing dots in dnssec-keymgr and dnssec-coverage
- mishandling of trailing dots caused bad behavior with the
  root zone or names like "example.com."
- fixing this exposed an error in dnssec-coverage caused the
  wrong return value if there were KSK errors but no ZSK errors
- incidentally silenced the dnssec-keygen output in the coverage
  system test

(cherry picked from commit 1ccf4e6c16)
2019-01-24 13:51:53 -08:00
Evan Hunt 0c2ba7d303 Merge branch 'each-dead-code-cleanup-v9_12' into 'v9_12'
remove dead RPZ code

See merge request isc-projects/bind9!1393
2019-01-24 15:05:12 -05:00
Matthijs MekkingandEvan Hunt a5c834b49b Remove dead code
(cherry picked from commit 7c13f1779e)
2019-01-24 12:04:32 -08:00
Evan Hunt 166a3aad4d Merge branch 'each-set-magic-last-v9_12' into 'v9_12'
set the magic number at the end of dns_dt_create()

See merge request isc-projects/bind9!1386
2019-01-23 14:15:04 -05:00
Evan Hunt 950023d36e set the magic number at the end of dns_dt_create()
(cherry picked from commit c29abd307c)
2019-01-23 11:13:32 -08:00
Evan Hunt 4c0460f143 Merge branch '117-running-dnssec-keymgr-with-old-keys-inactivates-deletes-them-immediately-v9_12' into 'v9_12'
Resolve "Running dnssec-keymgr with old keys inactivates/deletes them immediately"

See merge request isc-projects/bind9!1379
2019-01-22 13:44:42 -05:00
Mark AndrewsandEvan Hunt 15b4240764 introducing keymgr need to preserve functionality
(cherry picked from commit 083b730ec7)
2019-01-22 10:22:10 -08:00
Evan Hunt b8cb9077e2 Merge branch '630-dont-enable-fips-mode-on-windows-v9_12' into 'v9_12'
Disable FIPS mode on Windows

See merge request isc-projects/bind9!1375
2019-01-21 17:01:46 -05:00
Ondřej SurýandEvan Hunt 8633be8269 Disable FIPS mode on Windows
(cherry picked from commit 6aae193ded)
2019-01-21 14:01:24 -08:00
Mark Andrews 1ef4bc4dd1 Merge branch 'each-remove-fprintf-v9_12' into 'v9_12'
clean up debugging fprintf

See merge request isc-projects/bind9!1369
2019-01-21 01:12:44 -05:00
Evan HuntandMark Andrews bc912227d6 removed a debugging fprintf
(cherry picked from commit 6c478a3dae)
2019-01-21 17:00:57 +11:00
Michał Kępień d1727a02a2 Merge branch 'michal/gitlab-ci-cleanup-v9_12' into 'v9_12'
[v9_12] GitLab CI cleanup

See merge request isc-projects/bind9!1361
2019-01-18 09:42:38 -05:00
Michał Kępień cb400e5a76 Add comments
(cherry picked from commit a27b9dff18)
2019-01-18 15:26:50 +01:00
Michał Kępień c62a3f85ac Unify YAML style used throughout .gitlab-ci.yml
(cherry picked from commit a61bf39688)
2019-01-18 15:26:50 +01:00
Michał Kępień dfa5759b41 Tweak pipeline triggering settings
In an attempt to ensure that:

  - all important changes to repository contents are tested,
  - pipelines are not automatically created for every single push,
  - some flexibility is allowed for corner cases,

change pipeline triggering settings so that:

  - full build & test pipelines are only automatically created for merge
    requests and tags (both for creation and updates),

  - pipelines for other repository changes (e.g. pushes to arbitrary
    branches) can only be created manually, using GitLab's web
    interface,

  - merging a merge request only causes jobs pushing the updated ARM to
    GitLab Pages to be run (as semi-linear Git history is enforced and
    thus testing a MR is identical to testing the target branch
    post-merge in terms of code),

  - repository synchronization does not trigger duplicate pipelines in
    projects which are set as mirroring targets.

(cherry picked from commit 1c8c1815e4)
2019-01-18 15:26:50 +01:00
Michał Kępień 7b8a5b4c00 Reorder job definitions
Group jobs by build type and operating system to make the layout of
.gitlab-ci.yml more consistent and improve locality of YAML references.

(cherry picked from commit a1dbec3b08)
2019-01-18 15:26:49 +01:00
Michał Kępień 8c72ed35bc Use a common naming pattern for all jobs
Make sure all jobs are named using the following pattern:

    [<job-type>:]<build-type>:<system>:<architecture>

where specifying <job-type> is optional for "precheck" and "build" jobs.

This should make it easier to quickly recognize:

  - what kind of actions are performed by each job,
  - which BIND build flavor is used by each job,
  - which operating system image is used by each job.

(cherry picked from commit 1fe432c6c3)
2019-01-18 15:26:49 +01:00
Michał Kępień bba30accad Define a template for precheck jobs
(cherry picked from commit e0b5dd67a1)
2019-01-18 15:26:49 +01:00
Michał Kępień 30e5f81a10 Merge install_test_job template into the job definition as it is only used once
(cherry picked from commit de1948398d)
2019-01-18 15:26:49 +01:00
Michał Kępień 82ba1f577f Shorten Docker image definitions by using YAML anchors for runner tags
While we are at it, drop use of the "docker" tag since all BIND CI jobs
are currently run inside Docker containers.

(cherry picked from commit 7dd329d385)
2019-01-18 15:26:49 +01:00
Michał Kępień c15e6fdb71 Build ARM in the build stage
There is no need to build BIND binaries before building docs and thus
the job building the current version of the ARM can be moved to the
build stage of CI.

(cherry picked from commit 41a67147fe)
2019-01-18 15:26:49 +01:00
Michał Kępień 1920b8234e Replace double colon with a single colon
(cherry picked from commit 75b26d3f50)
2019-01-18 15:26:49 +01:00
Michał Kępień 0a9b7014a3 Remove unused parts of .gitlab-ci.yml
Remove the following from .gitlab-ci.yml:

  - unused variable definitions,
  - unused Docker image definitions,
  - commands which have no effect,
  - sections which were commented out.

(cherry picked from commit 9893bd3246)
2019-01-18 15:26:49 +01:00
Michał Kępień 5b67bd4855 Merge branch '781-fix-python-check-in-configure-script-v9_12' into 'v9_12'
[v9_12] Resolve "configure script in BIND 9.13.5 release fails to detect python"

See merge request isc-projects/bind9!1362
2019-01-18 09:22:47 -05:00
Ondřej SurýandMichał Kępień 33873abe16 Add some combinations of --with-python=<path>/--with-python/--without-python to GitLab CI
(cherry picked from commit 99cf0faec0)
2019-01-18 15:15:38 +01:00
Ondřej SurýandMichał Kępień 597e3d0b36 When --with-python is given to configure, use default search list for python binaries instead of 'yes'
(cherry picked from commit 3951cb053b)
2019-01-18 15:14:43 +01:00
Evan Hunt 41c30d7934 Merge branch '752-disable-forwarders-when-priming-v9_12' into 'v9_12'
If possible don't use forwarders when priming the resolver.

See merge request isc-projects/bind9!1356
2019-01-16 20:16:25 -05:00
Witold KręcickiandEvan Hunt f8963ad70e If possible don't use forwarders when priming the resolver.
If we try to fetch a record from cache and need to look into
hints database we assume that the resolver is not primed and
start dns_resolver_prime(). Priming query is supposed to return
NSes for "." in ANSWER section and glue records for them in
ADDITIONAL section, so that we can fill that info in 'regular'
cache and not use hints db anymore.
However, if we're using a forwarder the priming query goes through
it, and if it's configured to return minimal answers we won't get
the addresses of root servers in ADDITIONAL section. Since the
only records for root servers we have are in hints database we'll
try to prime the resolver with every single query.

This patch adds a DNS_FETCHOPT_NOFORWARD flag which avoids using
forwarders if possible (that is if we have forward-first policy).
Using this flag on priming fetch fixes the problem as we get the
proper glue. With forward-only policy the problem is non-existent,
as we'll never ask for root server addresses because we'll never
have a need to query them.

Also added a test to confirm priming queries are not forwarded.

(cherry picked from commit b49310ac06)
2019-01-16 16:32:43 -08:00
Mark Andrews be7ba5fbe2 Merge branch 'pkcs11-pubattr-check-v9_12' into 'v9_12'
Make sure null atributes are never used

See merge request isc-projects/bind9!1354
2019-01-16 19:09:02 -05:00
Petr MenšíkandMark Andrews f1fe423aaa Make sure null atributes are never used
Add INSIST to pubattr fetching where null might occur in therory. Make
sure null is never dereferenced.

(cherry picked from commit fe9ef0d9f5)
2019-01-17 09:00:27 +11:00
Evan Hunt 505528204e Merge branch '792-bind9-doesn-t-tcp-retransmit-v9_12' into 'v9_12'
Resolve "bind9 doesn't tcp retransmit"

See merge request isc-projects/bind9!1348
2019-01-15 20:45:00 -05:00
Mark AndrewsandEvan Hunt a9ceb01fde adjust timeout to allow for ECN negotiation failures
(cherry picked from commit dadb924be7)
2019-01-15 17:29:48 -08:00
Ondřej Surý 212a05f8c0 Merge branch 'ondrej/fix-race-condition-in-dnstap-v9_12' into 'v9_12'
(v9_12) Fix race condition in cleanup part of dns_dt_create()

See merge request isc-projects/bind9!1344
2019-01-15 04:03:13 -05:00
Witold KręcickiandOndřej Surý 51276f1c36 Add CHANGES entry for GL!1323
(cherry picked from commit 4b5337e06b)
2019-01-15 09:44:14 +01:00
Ondřej Surý e92bca0222 Fix race condition in cleanup part of dns_dt_create()
(cherry picked from commit 482dd7eed3)
2019-01-15 09:43:10 +01:00
Mark Andrews af26282fa4 Merge branch '590-win32-sample-gai-c-should-call-wsastartup-v9_12' into 'v9_12'
Resolve "[Win32] sample-gai.c should call WSAStartup()"

See merge request isc-projects/bind9!1342
2019-01-15 00:51:12 -05:00
Mark Andrews e9025653a3 add CHANGES
(cherry picked from commit 4500d9e91a)
2019-01-15 16:29:05 +11:00
Mark Andrews 6cb48b7a41 ensure that WSAStartup is called before getservbyname
(cherry picked from commit ac01359871)
2019-01-15 16:29:04 +11:00
Evan Hunt c780320e81 Merge branch 'u/fanf2/rndc-managed-keys-v9_12' into 'v9_12'
Fix a few cosmetic issues with `rndc managed-keys`

See merge request isc-projects/bind9!1339
2019-01-14 20:10:43 -05:00
Mark AndrewsandEvan Hunt 22b77f45b7 add multi-view server and tests
(cherry picked from commit 7122b5786d)
2019-01-14 16:59:02 -08:00
Mark AndrewsandEvan Hunt 2d3f159707 add CHANGES note 2019-01-14 16:17:10 -08:00
Tony FinchandEvan Hunt bc984ace12 Fix a few cosmetic issues with rndc managed-keys
The handling of class and view arguments was broken, because the code
didn't realise that next_token() would overwrite the class name when
it parsed the view name. The code was trying to implement a syntax
like `refresh [[class] view]`, but it was documented to have a syntax
like `refresh [class [view]]`. The latter is consistent with other rndc
commands, so that is how I have fixed it.

Before:

$ rndc managed-keys refresh in rec
rndc: 'managed-keys' failed: unknown class/type
unknown class 'rec'

After:

$ rndc managed-keys refresh in rec
refreshing managed keys for 'rec'

There were missing newlines in the output from `rndc managed-keys
refresh` and `rndc managed-keys destroy`.

Before:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'refreshing managed keys for 'auth'

After:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'
refreshing managed keys for 'auth'

(cherry picked from commit 6a3b851f72)
2019-01-14 16:16:29 -08:00
Evan Hunt f21d6327dd Merge branch 'fix-dnssec-test-v9_12' into 'v9_12'
b/t/s/dnssec/tests.sh: Cleanup showprivate() function

See merge request isc-projects/bind9!1336
2019-01-14 16:06:28 -05:00
Evan Hunt b241dc58ec b/t/s/dnssec/tests.sh: Cleanup showprivate() function 2019-01-14 12:30:49 -08:00
Evan Hunt cb142d39eb Merge branch 'each-fix-dnssec-test-error-v9_12' into 'v9_12'
DNSSEC test error

See merge request isc-projects/bind9!1333
2019-01-13 21:32:43 -05:00
Evan Hunt 0b4dca553d fix testing errors
- the checkprivate function in the dnssec test set ret=0, erasing
  results from previous tests and making the test appear to have passed
  when it shouldn't have
- checkprivate needed a delay loop to ensure there was time for all
  private signing records to be updated before the test

(cherry picked from commit 82e83d5dc7)
2019-01-13 18:22:44 -08:00
Mark Andrews 24b89bb1dc Merge branch 'u/fanf2/rndc-alphabetize-v9_12' into 'v9_12'
cleanup: alphabetize rndc command dispatch

See merge request isc-projects/bind9!1331
2019-01-13 21:08:45 -05:00
Tony FinchandMark Andrews 1ba69a02ff cleanup: alphabetize rndc command dispatch
(cherry picked from commit 66be4108bf)
2019-01-14 12:28:26 +11:00
Mark Andrews 1f06fa067b Merge branch '784-bind-9-12-3-p1-fatal-error-v9_12' into 'v9_12'
Resolve "bind 9.12.3-P1 fatal error"

See merge request isc-projects/bind9!1326
2019-01-09 04:28:25 -05:00
Mark Andrews df9cdb88c8 add CHANGES
(cherry picked from commit 9dd39d5385)
2019-01-09 19:50:59 +11:00
Mark Andrews 2c3d353d57 update refreshkeytime
(cherry picked from commit ca977e3976)
2019-01-09 19:50:59 +11:00
Mark Andrews f140588cf7 Merge branch 'marka-maybe_numeric-and-nul-v9_12' into 'v9_12'
maybe_numeric failed to handle NUL in text region.

See merge request isc-projects/bind9!1324
2019-01-09 03:49:23 -05:00
Mark Andrews e216ee68ef maybe_numeric failed to handle NUL in text region.
(cherry picked from commit ee23780246)
2019-01-09 19:22:38 +11:00
Mark Andrews cc85e7fbde Merge branch 'marka-fail-when-required-field-is-missing-v9_12' into 'v9_12'
Ensure base64/base32/hex fields in DNS records that should be non-empty are.

See merge request isc-projects/bind9!1320
2019-01-09 03:18:24 -05:00
Mark Andrews 0b8d530c84 Ensure base64/base32/hex fields in DNS records that should be non-empty are.
(cherry picked from commit 5e8b772ad1)
2019-01-09 18:53:29 +11:00
Evan Hunt 83ce05b97b Merge branch '804-large-nsec3-responses-cause-failure-in-adding-records-to-ncache-and-eventually-formerr-instead-of-nxdomain-v9_12' into 'v9_12'
Resolve "Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)"

See merge request isc-projects/bind9!1317
2019-01-09 00:47:23 -05:00
Mark AndrewsandEvan Hunt 0537fe2a5a add CHANGES entry
(cherry picked from commit 3328116b57)
2019-01-08 21:27:36 -08:00
Mark AndrewsandEvan Hunt 019b12fc09 allow for up 100 records or 64K of data to be in a ncache entry
(cherry picked from commit 604889e627)
2019-01-08 21:27:36 -08:00
Evan Hunt d1dfccd8e9 Merge branch '804-large-nsec3-responses-cause-failure-in-adding-records-to-ncache-and-eventually-formerr-instead-of-nxdomain-2-v9_12' into 'v9_12'
Resolve "Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)"

See merge request isc-projects/bind9!1314
2019-01-09 00:26:27 -05:00
Mark AndrewsandEvan Hunt 72f406a50f add CHANGES
(cherry picked from commit 188c184381)
2019-01-08 20:50:36 -08:00
Mark AndrewsandEvan Hunt 3d76dae6d7 explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove from dns_result_torcode
(cherry picked from commit 0c42a9c0ab)
2019-01-08 20:50:35 -08:00
Evan Hunt 66d2db70c9 Merge branch '812-cookie-test-failed-v9_12' into 'v9_12'
Resolve "cookie test failed."

See merge request isc-projects/bind9!1312
2019-01-08 23:47:18 -05:00
Mark AndrewsandEvan Hunt 675d75e0bc wait longer for dump to complete
(cherry picked from commit 8a8d378def)
2019-01-08 20:17:06 -08:00
Ondřej Surý e6148f0175 Merge branch 'ondrej/disable-CI-in-release-branches-v9_12' into 'v9_12'
(v9_12) Run the regular pipelines only for merge requests, and run only the Debian sid...

See merge request isc-projects/bind9!1310
2019-01-08 09:13:35 -05:00
Ondřej Surý 66033a716b Run the regular pipelines only for merge requests, and run only the Debian sid build for release branches
(cherry picked from commit 24961f6068)
2019-01-08 14:58:29 +01:00
Michał Kępień 9905d2ef7e Merge branch '692-dig-fix-cleanup-upon-an-error-before-tcp-socket-creation-v9_12' into 'v9_12'
[v9_12] Fix cleanup upon an error before TCP socket creation

See merge request isc-projects/bind9!1307
2019-01-08 05:57:11 -05:00
Michał Kępień e2653c47ab Add CHANGES entry
5123.	[bug]		dig could hang indefinitely after encountering an error
			before creating a TCP socket. [GL #692]

(cherry picked from commit 3242cb53ec)
2019-01-08 11:22:57 +01:00
Michał Kępień f63a1fca3e Fix cleanup upon an error before TCP socket creation
When a query times out after a socket is created and associated with a
given dig_query_t structure, calling isc_socket_cancel() causes
connect_done() to be run, which in turn takes care of all necessary
cleanups.  However, certain errors (e.g. get_address() returning
ISC_R_FAMILYNOSUPPORT) may prevent a TCP socket from being created in
the first place.  Since force_timeout() may be used in code handling
such errors, connect_timeout() needs to properly clean up a TCP query
which is not associated with any socket.  Call clear_query() from
connect_timeout() after attempting to send a TCP query to the next
available server if the timed out query does not have a socket
associated with it, in order to prevent dig from hanging indefinitely
due to the dig_query_t structure not being detached from its parent
dig_lookup_t structure.

(cherry picked from commit 13975b32c6)
2019-01-08 11:22:57 +01:00
Michał Kępień c05c1f1b65 Refactor code sending a query to the next server upon a timeout
When a query times out and another server is available for querying
within the same lookup, the timeout handler - connect_timeout() - is
responsible for sending the query to the next server.  Extract the
relevant part of connect_timeout() to a separate function in order to
improve code readability.

(cherry picked from commit c108fc5c6e)
2019-01-08 11:22:57 +01:00
Michał Kępień 1d0319fd0c Remove dead code handling address family mismatches for TCP sockets
Before commit c2ec022f57, using the "-b"
command line switch for dig did not disable use of the other address
family than the one to which the address supplied to that option
belonged to.  Thus, bind9_getaddresses() could e.g. prepare an
isc_sockaddr_t structure for an IPv6 address when an IPv4 address has
been passed to the "-b" command line option.  To avoid attempting the
impossible (e.g. querying an IPv6 address from a socket bound to an IPv4
address), a certain code block in send_tcp_connect() checked whether the
address family of the server to be queried was the same as the address
family of the socket set up for sending that query; if there was a
mismatch, that particular server address was skipped.

Commit c2ec022f57 made
bind9_getaddresses() fail upon an address family mismatch between the
address the hostname passed to it resolved to and the address supplied
to the "-b" command line option.  Such failures were fatal to dig back
then.

Commit 7f65860391 made
bind9_getaddresses() failures non-fatal, but also ensured that a
get_address() failure in send_tcp_connect() still causes the given query
address to be skipped (and also made such failures trigger an early
return from send_tcp_connect()).

Summing up, the code block handling address family mismatches in
send_tcp_connect() has been redundant since commit
c2ec022f57.  Remove it.

(cherry picked from commit ef1da8731b)
2019-01-08 11:22:57 +01:00
Michał Kępień 6245991460 Merge branch '315-track-forwarder-timeouts-in-fetch-contexts-v9_12' into 'v9_12'
[v9_12] Track forwarder timeouts in fetch contexts

See merge request isc-projects/bind9!1305
2019-01-08 05:00:04 -05:00
Michał Kępień ee226e589c Add CHANGES entry
5122.	[bug]		In a "forward first;" configuration, a forwarder
			timeout did not prevent that forwarder from being
			queried again after falling back to full recursive
			resolution. [GL #315]

(cherry picked from commit 1df9ca9e6a)
2019-01-08 08:31:17 +01:00
Michał Kępień 82103796af Track forwarder timeouts in fetch contexts
Since following a delegation resets most fetch context state, address
marks (FCTX_ADDRINFO_MARK) set inside lib/dns/resolver.c are not
preserved when a delegation is followed.  This is fine for full
recursive resolution but when named is configured with "forward first;"
and one of the specified forwarders times out, triggering a fallback to
full recursive resolution, that forwarder should no longer be consulted
at each delegation point subsequently reached within a given fetch
context.

Add a new badnstype_t enum value, badns_forwarder, and use it to mark a
forwarder as bad when it times out in a "forward first;" configuration.
Since the bad server list is not cleaned when a fetch context follows a
delegation, this prevents a forwarder from being queried again after
falling back to full recursive resolution.  Yet, as each fetch context
maintains its own list of bad servers, this change does not cause a
forwarder timeout to prevent that forwarder from being used by other
fetch contexts.

(cherry picked from commit 33350626f9)
2019-01-08 08:31:16 +01:00
Mark Andrews 08c8a750c1 Merge branch 'marka-fix-stub_dlz_allowzonexfr-v9_12' into 'v9_12'
return ISC_R_NOTFOUND when name does not match the zone name

See merge request isc-projects/bind9!1301
2019-01-06 23:41:48 -05:00
Mark Andrews 001a0a0077 add CHANGES
(cherry picked from commit bb57c7f775)
2019-01-07 15:22:15 +11:00
Mark Andrews 299761127a return ISC_R_NOTFOUND when name does not match the zone name
(cherry picked from commit 402190df18)
2019-01-07 15:21:31 +11:00
Mark Andrews cce1d1d5f5 Merge branch 'indenting-v9_12' into 'v9_12'
indenting

See merge request isc-projects/bind9!1290
2019-01-01 20:12:21 -05:00
Mark Andrews 3ea05e59ce indenting
(cherry picked from commit c69ad95238)
2019-01-02 11:51:19 +11:00
Mark Andrews 59281a378e Merge branch 'copyrights-v9_12' into 'v9_12'
Copyrights v9 12

See merge request isc-projects/bind9!1288
2019-01-01 18:28:39 -05:00
Mark Andrews ee0c468141 update copyrights 2019-01-02 10:25:47 +11:00
Ondřej Surý 804bf9fcf0 Merge branch '674-abort-when-memory-allocation-fails-v9_12' into 'v9_12'
(v9_12) Resolve "abort when memory allocation fails"

See merge request isc-projects/bind9!1273
2018-12-21 03:45:26 -05:00
Ondřej Surý b09ecda8a2 Add CHANGES entry for GL #674
(cherry picked from commit 37ff7f635b)
2018-12-21 09:22:17 +01:00
Ondřej Surý 179867290f Abort on allocation failure only if the memory functions are used internally in BIND 9 2018-12-21 09:22:17 +01:00
Ondřej Surý 1543df6b4e Abort on memory allocation failure
(cherry picked from commit 8de2451756)
2018-12-21 09:22:17 +01:00
Matthijs Mekking 5ebd68b54b Merge branch '783-dnssec-signzone-unsupported-algorithms-v9_12' into 'v9_12'
(v9_12) Resolve "Allow unsupported algorithms in zone when not used for signing"

See merge request isc-projects/bind9!1270
2018-12-20 10:32:51 -05:00
Matthijs Mekking 8a67d9d64a Remove dig_with_opts 2018-12-20 15:49:06 +01:00
Matthijs MekkingandMatthijs Mekking 32c69ed6e4 Update changefile
(cherry picked from commit 6afa8a77d3)
2018-12-20 15:49:06 +01:00
Matthijs MekkingandMatthijs Mekking 25c0e3dde9 Replace DSA with Reserved algorithm
(cherry picked from commit 17cdde1e56)
2018-12-20 15:49:06 +01:00
Matthijs MekkingandMatthijs Mekking ed6674c9fd Move REQUIRE outside comment unsupported alg
(cherry picked from commit 5ca649967e)
2018-12-20 15:49:06 +01:00
Matthijs MekkingandMatthijs Mekking c0701e7ff2 Allow unsupported alg in zone /w dnssec-signzone
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.  Current behavior is that it will
fail, hitting a fatal error.  The fix detects unsupported algorithms
and will not try to add it to the keylist.

Also when determining the maximum iterations for NSEC3, don't take
into account DNSKEY records in the zonefile with an unsupported
algorithm.

(cherry picked from commit 1dd11fc754)
2018-12-20 15:49:06 +01:00
Matthijs MekkingandMatthijs Mekking 82806d855c Add dnssec-signzone tests with unsupported alg
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.

(cherry picked from commit 6d976b37c1)
2018-12-20 15:49:06 +01:00
Ondřej Surý ff9771c6cd Merge branch '768-add-description-to-ldap-schema-v9_12' into 'v9_12'
(v9_12) Add optional description field to LDAP schema

See merge request isc-projects/bind9!1268
2018-12-20 05:07:19 -05:00
Roland GruberandOndřej Surý c07855485e Add optional description field to LDAP schema
(cherry picked from commit 83903f6f5e)
2018-12-20 10:32:52 +01:00
Ondřej Surý 2c979e6b7e Merge branch '787-set-the-clang-define-to-1-v9_12' into 'v9_12'
(v9_12) __SANITIZE_ADDRESS__ needs to be defined to 1

See merge request isc-projects/bind9!1265
2018-12-19 18:16:21 -05:00
Ondřej Surý bdc09e455e __SANITIZE_ADDRESS__ needs to be defined to 1
(cherry picked from commit ff7c868f25)
2018-12-20 00:14:58 +01:00
Ondřej Surý dd3efd812b Merge branch '782-add-support-for-msys2-in-stop.pl-script-v9_12' into 'v9_12'
(v9_12) Properly detect msys/msys2 environment in the stop.pl script.

See merge request isc-projects/bind9!1260
2018-12-19 15:44:15 -05:00
Ondřej Surý 39644e4d34 Properly detect msys/msys2 environment in the stop.pl script.
(cherry picked from commit 808dac0760)
2018-12-19 21:31:16 +01:00
Ondřej Surý 3e0a87f41b Merge branch '787-use-correct-define-v9_12' into 'v9_12'
gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define

See merge request isc-projects/bind9!1256
2018-12-19 06:46:49 -05:00
Ondřej Surý e055809c6f gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define
(cherry picked from commit 8903d68d69)
2018-12-19 12:44:51 +01:00
Ondřej Surý 3b5590f6fe Merge branch '787-disable-rtld_deepbind-when-compiled-under-asan-v9_12' into 'v9_12'
(v9_12) Resolve "RTLD_DEEPBIND and AddressSanitizer aren't compatible"

See merge request isc-projects/bind9!1253
2018-12-19 06:10:56 -05:00
Ondřej Surý aeb6b97dad Disable RTLD_DEEPBIND when compiled under AddressSanitizer
(cherry picked from commit cad6b39cab)
2018-12-19 10:49:56 +01:00
Ondřej Surý afddfcb3f5 Define __ADDRESS_SANITIZER__ if compiling under clang's AddressSanitizer
(cherry picked from commit e1ce3a3d42)
2018-12-19 10:49:44 +01:00
Ondřej Surý 1ca8b35c86 Merge branch '782-revert-cygwin-grep-CRLF-issue-v9_12' into 'v9_12'
Revert "Merge branch '782-cygwin-grep-CRLF-issue-v9_12' into 'v9_12'"

See merge request isc-projects/bind9!1244
2018-12-17 07:47:14 -05:00
Ondřej Surý 2e81ab696a Revert "Merge branch '782-cygwin-grep-CRLF-issue-v9_12' into 'v9_12'"
This reverts commit f35df99f1d, reversing
changes made to ccc3be8156.
2018-12-17 12:41:14 +01:00
Mark Andrews 2b3de31c89 Merge branch '779-named-checkconf-crashes-in-parser-c-v9_12' into 'v9_12'
Resolve "named-checkconf crashes in parser.c"

See merge request isc-projects/bind9!1236
2018-12-16 19:46:09 -05:00
Mark Andrews 0c19967532 pass the correct object to cfg_obj_log
(cherry picked from commit 53a33f7365)
2018-12-16 19:21:47 -05:00
Evan Hunt f35df99f1d Merge branch '782-cygwin-grep-CRLF-issue-v9_12' into 'v9_12'
Resolve "current version of cygwin grep causes tests to fail when grepping for end of line character"

See merge request isc-projects/bind9!1239
2018-12-14 22:29:50 -05:00
Curtis BlackburnandEvan Hunt 9599679d31 minor fixes to dns64 and rndc CRLF fix. rpzrecurse failure
will be addressed in a separate issue

(cherry picked from commit 2ec746dafe)
2018-12-14 19:00:15 -08:00
Curtis BlackburnandEvan Hunt bb731398e0 more CRLF fixes (dns64, rndc, rpzrecurse)
(cherry picked from commit 9fc68285ef)
2018-12-14 19:00:15 -08:00
Curtis BlackburnandEvan Hunt 66fdedfd7b missed one in the digdelv test
(cherry picked from commit bdbf6ede3a)
2018-12-14 19:00:13 -08:00
Curtis BlackburnandEvan Hunt 06cae98368 digdelv test fixed for CRLF issue
(cherry picked from commit ba1b9ca4d4)
2018-12-14 18:59:32 -08:00
Curtis BlackburnandEvan Hunt e0ab5603f7 windows CRLF issues fixed in builtin test
(cherry picked from commit 18e8835044)
2018-12-14 18:50:47 -08:00
Ondřej Surý ccc3be8156 Merge branch 'ondrej/sync-gitlab-ci-with-master-v9_12' into 'v9_12'
[v9_12] Sync GitLab CI configuration with master + needed misc fixes to the code

See merge request isc-projects/bind9!1229
2018-12-14 03:47:48 -05:00
Ondřej Surý 868e02a9ee Fix the stdatomic #ifdefs to work with older compilers 2018-12-14 09:00:13 +01:00
Ondřej Surý 9ae1c97b21 Add better EMPTY_TRANSLATION_UNIT to isc/util.h 2018-12-14 09:00:13 +01:00
Ondřej Surý a69f38e478 Fix ECC algorithms unused constants in PKCS#11 build 2018-12-14 09:00:12 +01:00
Ondřej Surý 53f12b6ca4 Add Ubuntu Xenial and Bionic to GitLab CI jobs 2018-12-14 09:00:12 +01:00
Ondřej Surý c42db3f692 SoftHSM 2.4.0 only supports softhsm2.conf now, rewrite GitLab CI commands to properly support that 2018-12-14 09:00:12 +01:00
Ondřej Surý c596d2d87a Add unreachable.spatch coccinelle recipe and run it in precheck CI phase 2018-12-14 09:00:12 +01:00
Ondřej Surý 771a866180 Sync GitLab CI jobs with master branch 2018-12-14 09:00:12 +01:00
Mark Andrews a1b17f5977 Merge branch '742-isc-support-13767-nsec3-typemap-improperly-includes-dnskey-rrset-instead-of-ignoring-it-as-out-of-zone-v9_12' into 'v9_12'
Resolve "[ISC-support

See merge request isc-projects/bind9!1232
2018-12-13 22:41:57 -05:00
Mark Andrews e0ad9dd301 add CHANGES
(cherry picked from commit 85da986d68)
2018-12-14 14:28:16 +11:00
Mark Andrews be038493b9 add unit tests for dns_rdatatype_atcname, dns_rdatatype_atparent and iszonecutauth
(cherry picked from commit f2f7711977)
2018-12-14 14:27:53 +11:00
Mark Andrews 1f404e35b6 check that DNSKEY and other occluded data are excluded from the delegating bitmap
(cherry picked from commit 7e4b82103b)
2018-12-14 14:27:50 +11:00
Mark Andrews 0eaa9a02b7 create dns_rdatatype_atcname to split records that can appear along side CNAME from DNSSEC; dns_rdatatype_iszonecutauth allowed too many types
(cherry picked from commit f4ceb12b69)
2018-12-14 14:12:31 +11:00
Evan Hunt de0646de7f Merge branch 'marka-tabify-changes-precheck-v9_12' into 'v9_12'
tabify changes precheck

See merge request isc-projects/bind9!1226
2018-12-13 01:02:58 -05:00
Mark AndrewsandEvan Hunt 56ad8243fe white space
(cherry picked from commit 730015f33e)
2018-12-12 21:41:49 -08:00
Mark AndrewsandEvan Hunt f4f3e65722 tabify-changes precheck
(cherry picked from commit 87b3b46096)
2018-12-12 21:41:48 -08:00
Ondřej Surý 46c0bc835c Merge branch 'ondrej/rename-the-envvar-to-BUILD_PARALLEL_JOBS-v9_12' into 'v9_12'
(v9_12) Rename the GitLab CI environment variable to BUILD_PARALLEL_JOBS

See merge request isc-projects/bind9!1224
2018-12-12 17:25:22 -05:00
Ondřej Surý 7a11a1ab02 Rename the GitLab CI environment variable to BUILD_PARALLEL_JOBS
(cherry picked from commit e20d5e4dd2)
2018-12-12 23:07:27 +01:00
Mark Andrews e164489565 Merge branch '760-the-notify-system-test-incorrectly-detects-startup-notify-rate-error-v9_12' into 'v9_12'
Resolve "The notify system test incorrectly detects startup notify rate error."

See merge request isc-projects/bind9!1218
2018-12-11 18:39:23 -05:00
Mark Andrews 58f8ec2b36 check that the time between notify messages is not too small
(cherry picked from commit 47a4e0eeaa)
2018-12-12 10:23:16 +11:00
Evan Hunt 4798c98e4c Merge branch '756-dyndb-system-test-failing-intermittently-v9_12' into 'v9_12'
Resolve "dyndb system test failing intermittently."

See merge request isc-projects/bind9!1213
2018-12-10 12:20:41 -05:00
Mark AndrewsandEvan Hunt c955498688 allow a small about of time for the syncptr event to be processed
(cherry picked from commit 3bca52ca07)
2018-12-10 09:07:04 -08:00
Mark Andrews 24519a233a Merge branch 'michal-extend-dname-dnssec-tests-v9_12' into 'v9_12'
Extend DNAME DNSSEC tests

See merge request isc-projects/bind9!1211
2018-12-10 02:03:07 -05:00
Michał KępieńandMark Andrews 4c23d84285 Check that DNAME is not treated as a delegation when signing
(cherry picked from commit adbca54079)
2018-12-10 17:49:38 +11:00
Mark Andrews acc8b89720 verify that auto-dnssec maintain generates and signs NSEC3 records with DNAME at the apex
(cherry picked from commit 6b470bbf42)
2018-12-10 17:49:38 +11:00
Mark Andrews da5d139973 verify that dnssec-signzone generates NSEC3 records with DNAME at the apex
(cherry picked from commit 06e218c421)
2018-12-10 17:12:09 +11:00
Mark Andrews 923c0b922c Merge branch 'michal-zone_sign-error-logging-v9_12' into 'v9_12'
Log CHECK() errors in zone_sign()

See merge request isc-projects/bind9!1208
2018-12-09 23:33:14 -05:00
Mark Andrews e05c1a7236 log a error if we don't explicitly know that a error has been logged in zone_sign
(cherry picked from commit b108376a10)
2018-12-10 15:13:35 +11:00
Evan Hunt 01ee1d3e3d Merge branch 'each-check-cfg-v9_12' into 'v9_12'
checklibs needs to grep for the cfg_* prefix in lib/isccfg

See merge request isc-projects/bind9!1203
2018-12-06 21:26:57 -05:00
Evan Hunt fde004b2fe checklibs needs to grep for the cfg_* prefix in lib/isccfg
(cherry picked from commit ab7356a7de)
2018-12-06 18:08:18 -08:00
Mark Andrews 2a6d571555 Merge branch 'michal-befix-squashed-v9_12' into 'v9_12'
Fix bottom of zone determination.

See merge request isc-projects/bind9!1199
2018-12-06 20:02:38 -05:00
Mark Andrews 74a66f7add add CHANGES and release notes entries.
(cherry picked from commit c8e92d3e45)
2018-12-07 11:48:03 +11:00
Mark Andrews 2a6a3aa0e7 Properly detect bottom of zone when sign_a_node() is not called
(cherry picked from commit 9eec02a81f)
2018-12-07 11:48:03 +11:00
Mark Andrews 24294d8cfd Merge branch '769-host-u-documented-in-manpage-but-disabled-in-code-v9_12' into 'v9_12'
Resolve ""host -U" documented in manpage, but disabled in code"

See merge request isc-projects/bind9!1195
2018-12-06 16:54:25 -05:00
Mark Andrews c013d2eedf add CHANGES
(cherry picked from commit 9586c3a696)
2018-12-07 08:40:10 +11:00
Andreas HasenackandMark Andrews 54242e8e1f add -U to preparse and usage
(cherry picked from commit 665618698e)
2018-12-07 08:39:32 +11:00
Mark Andrews 2a56471991 Merge branch '756-dyndb-system-test-failing-intermittently-v9_12' into 'v9_12'
Add additional logging to driver.

See merge request isc-projects/bind9!1185
2018-12-05 19:50:22 -05:00
Mark Andrews 5338d9d4b7 add more error logging; add event processing logging
(cherry picked from commit 6a5c8ec2ea)
2018-12-06 11:32:09 +11:00
Ondřej Surý 68d01ba5cd Merge branch '628-refactor-masterformat-system-test-v9_12' into 'v9_12'
(v9_12) Refactor masterformat system test

See merge request isc-projects/bind9!1182
2018-12-05 16:19:21 -05:00
Ondřej Surý 39b02e8538 Change the default algorithm to RSASHA256 and the alternative algorithm to RSASHA1 as those are always supported 2018-12-05 21:55:31 +01:00
Ondřej Surý f99c69b435 Add DNSKEY and CDNSKEY with unknown algorithm number (PRIVATEDNS) and \0 as content
(cherry picked from commit 00cc0b236a)
2018-12-05 21:14:06 +01:00
Ondřej Surý b86789ef27 Refactor masterformat to be shellcheck clean and don't use RSAMD5 algorithm in the tests
(cherry picked from commit b13c7ca402)
2018-12-05 21:14:05 +01:00
Ondřej Surý 7426cf9469 Merge branch '745-start.pl-and-stop.pl-cygwin-fixes-v9_12' into 'v9_12'
(v9_12) Make the start.pl and stop.pl more Cygwin friendly

See merge request isc-projects/bind9!1176
2018-12-04 09:43:19 -05:00
Ondřej Surý c996dcfee1 Make the start.pl and stop.pl more Cygwin friendly
(cherry picked from commit 835bad2c5c)
2018-12-04 15:30:41 +01:00
Ondřej Surý cd440f08a6 Merge branch '745-fix-missing-realpath-on-centos6-v9_12' into 'v9_12'
Replace realpath with cd&pwd shell magic

See merge request isc-projects/bind9!1173
2018-12-03 14:57:47 -05:00
Ondřej Surý b7c79f6c0f Replace realpath with cd&pwd shell magic 2018-12-03 20:42:01 +01:00
Ondřej Surý b9f35ac19e Merge branch '745-start.pl-refactoring-v9_12' into 'v9_12'
(v9_12) start.pl - wait for server to say 'running', refactor

See merge request isc-projects/bind9!1170
2018-12-03 11:24:51 -05:00
Ondřej Surý 73e26ec1d6 Make calls to the stop.pl always use the test name instead of '.'
(cherry picked from commit e227815af5)
2018-12-03 17:11:15 +01:00
Ondřej Surý 70cbdf3528 stop.pl - refactor
(cherry picked from commit 27ee629e6b)
2018-12-03 17:10:40 +01:00
Ondřej Surý e8f38da2df Make calls to the start.pl always use the test name instead of '.'
(cherry picked from commit 16b95157e8)
2018-12-03 17:10:26 +01:00
Brian ConryandOndřej Surý 1ae7ca6606 start.pl - refactor
(cherry picked from commit 0fc8bfef13)
2018-12-03 17:09:48 +01:00
Brian ConryandOndřej Surý ee737c8328 start.pl - wait for server to say 'running'
(cherry picked from commit 597049461d)
2018-12-03 17:09:05 +01:00
Ondřej Surý 60bb1b4e04 Merge branch '628-improvements-to-system-tests-v9_12' into 'v9_12'
(v9_12) Tiny small improvements to system test scripts.

See merge request isc-projects/bind9!1167
2018-12-03 03:51:28 -05:00
Ondřej Surý e3379c44cb Add ALTERNATIVE_ALGORITHM to conf.sh
(cherry picked from commit b2c4c35493)
2018-12-03 09:30:44 +01:00
Ondřej Surý d1dffe2fd3 Export SYSTEMTESTTOP from run.sh (so, it doesn't have to be defined in each script) and scrub / from the test names
(cherry picked from commit 1b2a3a0ea6)
2018-12-03 09:02:14 +01:00
Mark Andrews b0a3640185 Merge branch '754-silence-warning-about-first-half-of-conditional-always-being-true-v9_12' into 'v9_12'
Resolve "Silence warning about first half of conditional always being true."

See merge request isc-projects/bind9!1164
2018-12-03 01:18:47 -05:00
Mark Andrews 05785b4902 only test for prefixlen <= 63
(cherry picked from commit 5744415a75)
2018-12-03 17:06:02 +11:00
Mark Andrews 02f2e291e3 Merge branch 'u/fanf2/catz-logging-v9_12' into 'v9_12'
U/fanf2/catz logging v9 12

See merge request isc-projects/bind9!1161
2018-12-03 00:15:36 -05:00
Mark Andrews 9e68b93f01 add CHANGES note
(cherry picked from commit e6c5ad37a4)
2018-12-03 15:52:15 +11:00
Tony FinchandMark Andrews 7ac356688c catz: improved log message when a zone is overridden
If you have a catalog zone containing 10.in-addr.arpa and an
explicitly-configured version which overrides the catz version,
`named` used to log:

catz: error "success" while trying to add zone "10.in-addr.arpa"

After this patch it logs:

catz: zone "10.in-addr.arpa" is overridden by explicitly configured zone
(cherry picked from commit 16eb35187a)
2018-12-03 15:52:14 +11:00
Mark Andrews 56109ac061 Merge branch '585-dnssec-coverage-fails-with-typeerror-for-ksk-with-a-deletion-date-set-v9_12' into 'v9_12'
Resolve "dnssec-coverage fails with TypeError for KSK with a Deletion date set"

See merge request isc-projects/bind9!1158
2018-11-29 19:26:45 -05:00
Mark Andrews 1813c9d5e0 add CHANGES note
(cherry picked from commit 02d20a2f53)
2018-11-30 11:14:01 +11:00
Mark Andrews 5ee79f833e use documented default key ttl
(cherry picked from commit 6499bdfd8b)
2018-11-30 11:12:51 +11:00
Mark Andrews 096caccf1d add reproducer for [GL #585]
(cherry picked from commit 0ac2a868bb)
2018-11-30 11:12:51 +11:00
Evan Hunt e2891f18d9 Merge branch 'each-export-dynamic-v9_12' into 'v9_12'
set the export-dynamic linker flag on linux

See merge request isc-projects/bind9!1155
2018-11-29 02:37:33 -05:00
Evan Hunt 4ae085a066 set the export-dynamic linker flag on linux 2018-11-28 23:22:00 -08:00
Mark Andrews b312523265 Merge branch '748-dns_catz_-are-missing-lots-of-dbc-checks-v9_12' into 'v9_12'
Resolve "dns_catz_* are missing lots of DBC checks."

See merge request isc-projects/bind9!1152
2018-11-28 22:55:16 -05:00
Mark Andrews 17d9fa3cc7 add missing DBC checks for catz and add isc_magic checks; add DBC checks to ht.c
(cherry picked from commit a487473fc5)
2018-11-29 14:41:41 +11:00
Mark Andrews 91f9c5691e Merge branch '731-catalog-zone-incorrect-logging-v9_12' into 'v9_12'
Resolve "Catalog zone incorrect logging"

See merge request isc-projects/bind9!1146
2018-11-28 07:59:39 -05:00
Mark Andrews b559bd1ebb update zname with the current zone anme
(cherry picked from commit 0708e43d3f)
2018-11-28 23:34:26 +11:00
Michał Kępień d70430424c Merge branch '730-fix-build-time-python-configuration-v9_12' into 'v9_12'
[v9_12] Fix build-time Python configuration

See merge request isc-projects/bind9!1139
2018-11-27 10:25:22 -05:00
Michał Kępień 13da99a80c Add CHANGES entry
5101.	[bug]		Fix default installation path for Python modules.
			[GL #730]

(cherry picked from commit b94293f591)
2018-11-27 15:44:43 +01:00
Ondřej SurýandMichał Kępień ed4c700c33 Fix build-time Python configuration
Apply various fixes and tweaks to Python configuration logic implemented
in the "configure" script:

  - Prevent PYTHON_INSTALL_DIR, which holds the value passed to the
    --with-python-install-dir option, from being set to "unspec" by
    default as this breaks installing Python modules when the
    --with-python-install-dir option is not used.

  - Make the --with-python-install-dir option also work when the Python
    interpreter is specified explicitly (using --with-python=<...>).

  - Improve contents and placement of error messages.

  - Reduce duplication of code checking Python dependencies.

  - Use Autoconf macros AS_CASE() and AS_IF() instead of plain shell
    code.

  - Update comments.  Capitalize the word "Python" when referring to the
    language itself rather than a specific executable.

(cherry picked from commit d75602406e)
2018-11-27 15:43:49 +01:00
Ondřej Surý eab8d3f9c8 Merge branch 'ondrej-add-python-3.6-and-3.7-to-configure.ac-v9_12' into 'v9_12'
(v9_12) Add python3.6 and python3.7 to the search list of python versions

See merge request isc-projects/bind9!1137
2018-11-27 06:30:02 -05:00
Ondřej Surý 81cf925147 Add python3.6 and python3.7 to the search list of python versions
(cherry picked from commit da9038e9a0)
2018-11-27 10:32:53 +01:00
Mark Andrews 5f383955e7 Merge branch '715-side-effect-in-assertion-in-name_test-c-v9_12' into 'v9_12'
Resolve "side effect in assertion in name_test.c"

See merge request isc-projects/bind9!1124
2018-11-22 19:07:49 -05:00
Mark Andrews 35efc053b4 address coverity side effect in assert warning
(cherry picked from commit 2156a5b610)
2018-11-23 10:21:38 +11:00
Mark Andrews 521cf75c6a Merge branch '710-fix-socket-test-v9_12' into 'v9_12'
Use proper casting in socket unit test

See merge request isc-projects/bind9!1120
2018-11-22 01:18:10 -05:00
Mark Andrews edcb378845 replace strncpy + setting end of array to NUL with strlcpy 2018-11-22 16:43:43 +11:00
Witold KręcickiandMark Andrews 7eb17b968a Use proper casting in socket unit test
(cherry picked from commit 5f81aa10bc)
2018-11-22 16:43:43 +11:00
Ondřej SurýandMark Andrews 01d3142920 Disable internal malloc for AddressSanitizer build
(cherry picked from commit 4f7177c794)
2018-11-22 16:43:43 +11:00
Ondřej SurýandMark Andrews 5e21c945ff Add AddressSanitizer enabled build to GitLab CI
(cherry picked from commit a8649cc299)
2018-11-22 16:43:43 +11:00
Mark Andrews a1c36d5efb Merge branch '712-memleak-in-delv-v9_12' into 'v9_12'
Fix a small memleak in delv

See merge request isc-projects/bind9!1115
2018-11-22 00:42:00 -05:00
Witold KręcickiandMark Andrews 0db061aef9 Fix a small memleak in delv
(cherry picked from commit d00b3f47ba)
2018-11-22 08:22:34 +11:00
Mark Andrews f1ad5bcc2e Merge branch 'ondrej/use-strlcpy-in-wks_11.c-v9_12' into 'v9_12'
Use strlcpy in place where strncpy(s, ...) + s[sizeof(s)-1] = \0; was used

See merge request isc-projects/bind9!1113
2018-11-21 16:19:10 -05:00
Ondřej SurýandMark Andrews e839d4b978 Use strlcpy in place where strncpy(s, ...) + s[sizeof(s)-1] = \0; was used
(cherry picked from commit 175f06949f)
2018-11-22 08:10:41 +11:00
Mark Andrews dcca5934d6 Merge branch '711-fix-memory-leak-in-lex_test-v9_12' into 'v9_12'
Fix memory leak in lex_test.c

See merge request isc-projects/bind9!1111
2018-11-21 15:51:34 -05:00
Ondřej SurýandMark Andrews f9b96e6de0 Fix memory leak in lex_test.c
(cherry picked from commit 7a3eb391fa)
2018-11-21 15:03:26 -05:00
Mark Andrews 0be191f866 Merge branch '702-unchecked-returns-in-server-c-v9_12' into 'v9_12'
Resolve "unchecked returns in server.c"

See merge request isc-projects/bind9!1109
2018-11-21 14:58:59 -05:00
Mark Andrews e9be58edc9 address unchecked return values
(cherry picked from commit ccfd577715)
2018-11-22 06:50:32 +11:00
Evan Hunt 2babbb0add Merge branch 'systest-entropy' into 'v9_12'
increase pseudorandom data in system tests

See merge request isc-projects/bind9!1091
2018-11-17 02:53:05 -05:00
Evan Hunt 19aaecafeb better system test entropy
- use /dev/urandom in gitlab CI
- use genrandom to get 4k of data instead of 800 bytes
- set this value as RANDOMSIZE in conf.sh
2018-11-17 01:27:06 +00:00
Evan Hunt aa2f71e3a5 Merge branch '703-resource-leak-in-dlz_filesystem_driver-c-v9_12' into 'v9_12'
Resolve "resource leak in dlz_filesystem_driver.c"

See merge request isc-projects/bind9!1089
2018-11-16 20:00:10 -05:00
Mark AndrewsandEvan Hunt 422559fbc0 cleanup allocated memory on error
(cherry picked from commit 4979d5f31f)
2018-11-16 16:51:46 -08:00
Evan Hunt d9cc728ed4 Merge branch 'cmocka-silence-v9_12' into 'v9_12'
remove (or hide behind a 'verbose' flag) extra output from unit tests

See merge request isc-projects/bind9!1087
2018-11-16 16:10:50 -05:00
Evan Hunt a305008346 remove (or hide behind a 'verbose' flag) extra output from system tests
(cherry picked from commit 8f15219f36)
2018-11-16 12:59:11 -08:00
Evan Hunt 58a93e7211 Merge branch '4-warn-not-fail-v9_12' into 'v9_12'
warn, rather than failing, if kyua is not present

See merge request isc-projects/bind9!1085
2018-11-16 15:55:58 -05:00
Evan Hunt 3ff49fa614 warn, rather than failing, if kyua is not present
(cherry picked from commit 6cfb2249e1)
2018-11-16 12:42:21 -08:00
Evan Hunt 7121d711ad Merge branch 'fix-debug-output-v9_12' into 'v9_12'
echo debug output (D:text) the same as informational (I:text)

See merge request isc-projects/bind9!1083
2018-11-16 14:44:35 -05:00
Evan Hunt cdfac9b1bf echo debug output (D:text) the same as informational (I:text)
(cherry picked from commit dfa1589975)
2018-11-16 11:41:25 -08:00
Evan Hunt a830358a32 Merge branch '4-remove-embedded-atf-v9_12' into 'v9_12'
Remove embedded ATF and required ATF >= 0.20 + Kyua to run unittests

See merge request isc-projects/bind9!1079
2018-11-16 12:23:12 -05:00
Ondřej SurýandEvan Hunt 334ae4f21d Add CHANGES entry for GL !875
(cherry picked from commit 9b0501635b)
2018-11-16 09:14:42 -08:00
Ondřej SurýandEvan Hunt f61f0a61bf Remove the traces of ATF from documentation
(cherry picked from commit fa33b4ee23)
2018-11-16 09:14:25 -08:00
Ondřej SurýandEvan Hunt 6f98d4d108 Remove the atf_tc coverity model
(cherry picked from commit ed4a49122b)
2018-11-16 09:14:25 -08:00
Ondřej SurýandEvan Hunt 713d158e6d Remove embedded atf-src and enforce atf >= 0.20 + kyua as execution engine
(cherry picked from commit de219b8555)
2018-11-16 09:14:20 -08:00
Mark Andrews 715d471599 Merge branch '698-cmoka-atomic_store-and-atomic_storeq-tests-are-broken' into 'v9_12'
Resolve "cmoka atomic_store and atomic_storeq tests are broken"

See merge request isc-projects/bind9!1071
2018-11-15 19:10:29 -05:00
Mark Andrews 18d80450e0 wait for tasks to complete 2018-11-16 11:07:17 +11:00
Mark Andrews 2b885a1b34 Merge branch '694-checklibs-libs-isc-printf-h-check-is-incomplete' into 'v9_12'
Resolve "checklibs libs isc/printf.h check is incomplete"

See merge request isc-projects/bind9!1068
2018-11-15 19:04:38 -05:00
Mark Andrews 07317db2ca update the list of functions that are triggers for requiring #include <isc/print.h> or "print_p.h" 2018-11-16 09:45:16 +11:00
Mark Andrews efaa12bd57 add #include <isc/print.h> 2018-11-16 09:45:16 +11:00
Evan Hunt d191947321 Merge branch '620-cmocka-conversions-v9_12' into 'v9_12'
Resolve "CMOCKA conversions"

See merge request isc-projects/bind9!1062
2018-11-15 04:18:05 -05:00
Evan Hunt 7565a18583 CHANGES
(cherry picked from commit 32503f3b52)
2018-11-15 01:09:17 -08:00
Evan Hunt 4ad7f875b0 remove --with-atf from gitlab CI
(cherry picked from commit a2013231a3)
2018-11-15 01:09:17 -08:00
Evan Hunt 33f428efda remove ATF source code and Atffiles
(cherry picked from commit 8c4d50c6bc)
2018-11-15 01:09:17 -08:00
Evan Hunt 4f3073de7c remove ATF from configure
(cherry picked from commit efe3c038b1)
2018-11-15 01:09:17 -08:00
Evan Hunt df0c67ba26 remove atf-run from unittest.sh.in
(cherry picked from commit d534ae5c12)
2018-11-15 01:09:17 -08:00
JoeyandEvan Hunt 4beba42654 convert update_test; remove ATF from lib/dns/tests
(cherry picked from commit 336d5a5374)
2018-11-15 01:09:17 -08:00
Evan Hunt 28296fc57c convert gost_test 2018-11-15 01:09:16 -08:00
Evan Hunt 93e9b0261c convert dstrandom_test 2018-11-15 01:05:14 -08:00
JoeyandEvan Hunt ea300146a8 convert tsig_test
(cherry picked from commit 92a3762cb6)
2018-11-15 01:05:14 -08:00
JoeyandEvan Hunt 132bdcb954 convert time_test
(cherry picked from commit 2c7e6947fa)
2018-11-15 01:05:14 -08:00
JoeyandEvan Hunt 34855ec13b convert sigs_test
(cherry picked from commit eda6281f98)
2018-11-15 01:05:14 -08:00
JoeyandEvan Hunt c00f2c9434 convert rsa_test
(cherry picked from commit b915cdbf0b)
2018-11-15 01:05:14 -08:00
JoeyandEvan Hunt bd3bb7cb89 convert resolver_test
(cherry picked from commit 2837a821e8)
2018-11-15 01:05:14 -08:00
JoeyandEvan Hunt 5e44278871 convert rbt_serialize_test
(cherry picked from commit dfd90dbb82)
2018-11-15 01:05:14 -08:00
JoeyandEvan Hunt c9c1d244e1 convert name_test
(cherry picked from commit 1b48e710d5)
2018-11-15 01:05:14 -08:00
JoeyandEvan Hunt 34291ae2be convert master_test
(cherry picked from commit 4ba08bb119)
2018-11-15 01:05:13 -08:00
JoeyandEvan Hunt ff26c1e014 convert keytable_test
(cherry picked from commit e38901154d)
2018-11-15 01:05:13 -08:00
JoeyandEvan Hunt ade81f29d6 convert private_test
(cherry picked from commit 9a464ef869)
2018-11-15 01:05:13 -08:00
Evan Hunt 3d396d1eb8 convert dbversion_test
(cherry picked from commit 98d5abb73c)
2018-11-15 01:05:13 -08:00
JoeyandEvan Hunt b902454460 convert dst_test
(cherry picked from commit ad923f82b1)
2018-11-15 01:05:13 -08:00
JoeyandEvan Hunt e8f61dd315 convert db_test
(cherry picked from commit 005e19ad3f)
2018-11-15 01:05:13 -08:00
Evan Hunt a554ae3dcc convert dispatch_test
(cherry picked from commit 8d347788b0)
2018-11-15 01:05:13 -08:00
Evan Hunt 503869db64 convert zonemgr_test
(cherry picked from commit 01a193ff6c)
2018-11-15 01:05:13 -08:00
Evan Hunt ff07929977 convert zt_test
(cherry picked from commit 0a4f6122de)
2018-11-15 01:05:13 -08:00
Evan Hunt 87d702aaa6 convert rdata_test
- also added code to dnstest.c to optionally suppress printing of errors
  from dns_rdata_fromtxt()

(cherry picked from commit bb5ed5a4ac)
2018-11-15 01:05:12 -08:00
Evan Hunt 7a57323bbf convert rbt_test
(cherry picked from commit 55465517c7)
2018-11-15 01:05:12 -08:00
Evan Hunt d51d4febf9 convert dnstap_test
(cherry picked from commit 9f83d31e42)
2018-11-15 01:05:12 -08:00
Evan Hunt 80172ae24d convert geoip_test
(cherry picked from commit 06b4ff5fe2)
2018-11-15 01:05:12 -08:00
Evan Hunt 5a13cf0543 convert nsec3_test
(cherry picked from commit 015fda0bb4)
2018-11-15 01:05:12 -08:00
Evan Hunt 37c6711376 convert rdatasetstats_test
(cherry picked from commit 28121c248e)
2018-11-15 01:05:12 -08:00
Evan Hunt 7e7818b91a convert dbiterator_test
(cherry picked from commit 79cd093cd7)
2018-11-15 01:05:12 -08:00
Evan Hunt af60c53303 convert dbdiff_test
(cherry picked from commit 6dfc868fba)
2018-11-15 01:05:12 -08:00
Evan Hunt f082972814 convert peer_test
(cherry picked from commit db5eece106)
2018-11-15 01:05:11 -08:00
Evan Hunt 80705c7c81 convert rdataset_test
(cherry picked from commit cca16eccd7)
2018-11-15 01:05:11 -08:00
Evan Hunt 1f3f9c0323 convert acl_test
(cherry picked from commit a33bca5d55)
2018-11-15 01:05:11 -08:00
Evan Hunt e779fa3014 convert dh_test
(cherry picked from commit dcf65c82ad)
2018-11-15 01:05:11 -08:00
JoeyandEvan Hunt 37ce8f1021 convert socket_test; remove ATF from lib/isc/tests
(cherry picked from commit 9eea00cd3c)
2018-11-15 01:05:11 -08:00
Evan Hunt 7abdd9e87a convert atomic_test 2018-11-15 00:38:16 -08:00
Evan Hunt b0309ae739 convert isc_ntop_test 2018-11-15 00:24:14 -08:00
Evan Hunt 7bbe60ada1 convert print_test 2018-11-15 00:20:22 -08:00
Evan Hunt 6182c94334 convert regex_test
(cherry picked from commit bd009b34a6)
2018-11-15 00:06:23 -08:00
Evan Hunt 13a6d71e88 convert random_test
(cherry picked from commit 6ad7acd787)
2018-11-15 00:03:52 -08:00
JoeyandEvan Hunt 15f7486d7b convert mem_test
(cherry picked from commit 683094e308)
2018-11-14 22:38:15 -08:00
Evan Hunt 7c4ed64665 convert timer_test
(cherry picked from commit 20cef35ece)
2018-11-14 22:36:45 -08:00
Evan Hunt f524cc713e convert task_test 2018-11-14 22:35:03 -08:00
JoeyandEvan Hunt bdf9ea7de7 convert hash_test
(cherry picked from commit 72f60bdd84)
2018-11-14 22:30:05 -08:00
Evan Hunt 360d7d3d72 convert ht_test
(cherry picked from commit c701f036ea)
2018-11-14 22:15:53 -08:00
Evan Hunt 8d0396737c convert time_test
(cherry picked from commit 3bf9a1e567)
2018-11-14 22:14:54 -08:00
Evan Hunt 98bff81bae convert taskpool_test
(cherry picked from commit c9ff174dce)
2018-11-14 22:14:54 -08:00
Evan Hunt 16d2d27b04 convert pool_test
(cherry picked from commit 4f84acb788)
2018-11-14 22:14:52 -08:00
Evan Hunt be41574a20 convert sockaddr_test
(cherry picked from commit 231436039d)
2018-11-14 22:14:34 -08:00
Evan Hunt ba2262910a convert netaddr_test
(cherry picked from commit 7ab8c5b583)
2018-11-14 22:13:56 -08:00
Evan Hunt 7b2288483f convert symtab_test
(cherry picked from commit 5f377136be)
2018-11-14 22:13:56 -08:00
Evan Hunt b59107e687 convert queue_test
(cherry picked from commit b3db0266cb)
2018-11-14 22:13:54 -08:00
Evan Hunt 3b95658020 convert file_test
(cherry picked from commit 8161be27db)
2018-11-14 22:13:24 -08:00
Evan Hunt 0e08dc2e2b convert lex_test
(cherry picked from commit 4133fd86f1)
2018-11-14 22:13:21 -08:00
Evan Hunt df41c2668f convert errno_test
(cherry picked from commit 049a3a7c0e)
2018-11-14 22:12:50 -08:00
Evan Hunt 5f3ba36436 convert safe_test
(cherry picked from commit c1c8d8846f)
2018-11-14 22:12:47 -08:00
Evan Hunt 5640841732 convert radix_test
(cherry picked from commit 718ca3166c)
2018-11-14 22:10:33 -08:00
Evan Hunt 57d78a76e5 convert heap_test
(cherry picked from commit cc6ab2416b)
2018-11-14 22:10:14 -08:00
Evan Hunt f29a9d5bc5 convert parse_test
(cherry picked from commit a7c308df9c)
2018-11-14 22:08:50 -08:00
Evan Hunt 856add745a convert counter_test
(cherry picked from commit 52b86f0abe)
2018-11-14 22:08:50 -08:00
Evan Hunt 3095574c1c convert buffer_test
(cherry picked from commit 02a5db7631)
2018-11-14 22:08:49 -08:00
Evan Hunt c679b85424 convert aes_test
(cherry picked from commit dc88db015b)
2018-11-14 22:08:26 -08:00
Evan Hunt 8db9794322 convert listenlist_test; remove ATF from lib/ns/tests
(cherry picked from commit 79ac715763)
2018-11-14 22:04:39 -08:00
Evan Hunt fe4619b886 convert notify_test
(cherry picked from commit 48dc2831d7)
2018-11-14 22:04:38 -08:00
Evan Hunt 5b473f87b2 convert query_test
- also fixed a bug in openssldh_link.c that turned up in the process

(cherry picked from commit 318b340f5e)
2018-11-14 22:04:38 -08:00
Evan Hunt 1d76da4943 convert resconf_test; remove ATF from lib/irs/tests
(cherry picked from commit cec8c52cbe)
2018-11-14 22:04:38 -08:00
Evan Hunt 66fa5b9af6 convert parser_test; remove ATF from lib/isccfg/tests
(cherry picked from commit 7ec945bd41)
2018-11-14 22:04:38 -08:00
Evan Hunt 41831a7d24 assert if {isc,dns,ns}_test_begin() is called when a prior test is running
(cherry picked from commit d8766293ab)
2018-11-14 22:04:35 -08:00
Evan Hunt 03c7a096c6 remove .NOTPARALLEL so unit tests can build faster
(cherry picked from commit b434b0a4b6)
2018-11-14 21:54:43 -08:00
Evan Hunt cd5855378e add cmocka support to remaining unit test makefiles
- also cleaned up some existing test code

(cherry picked from commit 2afd18a2ce)
2018-11-14 21:53:50 -08:00
Mark Andrews f8b49df8d7 Merge branch 'u/fanf2/optionally-disable-digrc-v9_12' into 'v9_12'
U/fanf2/optionally disable digrc v9 12

See merge request isc-projects/bind9!1060
2018-11-14 21:08:01 -05:00
Mark Andrews 5d0426208b add CHANGES
(cherry picked from commit a5524b5fe2)
2018-11-15 12:59:58 +11:00
Tony FinchandMark Andrews 2d7969e0a4 dig: a -r option to disable .digrc
(cherry picked from commit fdb74fed9e)
2018-11-15 12:59:29 +11:00
Evan Hunt e322c3ab4a Merge branch '347-various-bind-9-bugs-in-cleanup-after-fail-scenarios-v9_12' into 'v9_12'
Resolve "Various BIND 9 bugs in cleanup-after-fail scenarios"

See merge request isc-projects/bind9!1058
2018-11-14 19:25:16 -05:00
Mark AndrewsandEvan Hunt 5c47dd82ac uninitalize memory read on error path
(cherry picked from commit 4eadebe2b2)
2018-11-15 00:15:33 +00:00
Mark AndrewsandEvan Hunt 6b409b89cd errors initalizing badcaches were not caught or cleaned up on error paths
(cherry picked from commit 93776c4c81)
2018-11-15 00:15:29 +00:00
Mark Andrews b163281917 Merge branch '688-prefer-kyua-over-aft-run-v9_12' into 'v9_12'
Resolve "prefer kyua over aft-run"

See merge request isc-projects/bind9!1051
2018-11-14 16:05:23 -05:00
Mark Andrews ecf8ede7ea prefer kyua over atf
(cherry picked from commit 590d391bbb)
2018-11-14 15:32:13 -05:00
Evan Hunt 0401840cb1 Merge branch '558-nsupdate-leaks-memory-when-using-gss-tsig-and-receiving-sigterm-at-a-right-time-v9_12' into 'v9_12'
Resolve "nsupdate leaks memory when using GSS-TSIG and receiving SIGTERM at a "right" time"

See merge request isc-projects/bind9!1055
2018-11-14 15:00:55 -05:00
Mark AndrewsandEvan Hunt d7c484ac7a free tmpzonename and restart_master
(cherry picked from commit 50714a9b35)
2018-11-14 11:41:48 -08:00
Evan Hunt d33cc6e985 Merge branch '675-don-t-use-typename-v9_12' into 'v9_12'
Resolve "Don't use 'typename'"

See merge request isc-projects/bind9!1053
2018-11-14 14:17:07 -05:00
Mark AndrewsandEvan Hunt 5f9fde54cc don't use 'typename' as it is reserved in C++ 2018-11-14 11:08:44 -08:00
Mark Andrews 73e9dc7e99 Merge branch '584-dig-treats-4-6-m-after-q-argument-as-an-option-but-not-a-domain-name-v9_12' into 'v9_12'
Resolve "dig treats -4/-6/-m after -q argument as an option but not a domain name"

See merge request isc-projects/bind9!1046
2018-11-13 20:52:34 -05:00
Evan HuntandMark Andrews 1b5f73a25b style
(cherry picked from commit e356d93175)
2018-11-14 11:55:21 +11:00
Mark Andrews ba5726ec2f check that delv -q -m works
(cherry picked from commit 77128c867c)
2018-11-14 11:55:21 +11:00
Mark Andrews b9b8782144 check that dig -q -m works
(cherry picked from commit f6f07fb41e)
2018-11-14 11:55:21 +11:00
Mark Andrews 46d80fe979 add -q to dash_opts
(cherry picked from commit ba5d28dcfe)
2018-11-14 11:55:21 +11:00
Mark Andrews 999163cd77 dig and mdig failed to properly preparse dash value pairs when value was a seperate argument and started with a dash.
(cherry picked from commit 75fa84b67b)
2018-11-14 11:55:20 +11:00
Evan Hunt ac0eff46e7 Merge branch '587-statistics-channels-xml-v2-is-removed-but-still-documented-v9_12' into 'v9_12'
Resolve "statistics-channels /xml/v2 is removed but still documented"

See merge request isc-projects/bind9!1043
2018-11-13 14:09:26 -05:00
Mark AndrewsandEvan Hunt b7d61f8cf7 remove reference to obsolete xml/v2 schema
(cherry picked from commit 9e1af0cef1)
2018-11-13 11:08:39 -08:00
Michał Kępień 53d8c91de3 Merge branch '433-restore-localhost-fallback-in-bin-dig-dighost.c-v9_12' into 'v9_12'
[v9_12] Restore localhost fallback in bin/dig/dighost.c

See merge request isc-projects/bind9!1041
2018-11-13 08:52:45 -05:00
Michał Kępień 127f6c7d06 Add CHANGES entry
5089.	[bug]		Restore localhost fallback in dig and host which is
			used when no nameserver addresses present in
			/etc/resolv.conf are usable due to the requested
			address family restrictions. [GL #433]

(cherry picked from commit 867bc3399b)
2018-11-13 14:32:51 +01:00
Michał Kępień 8181ffefe7 Restore localhost fallback in bin/dig/dighost.c
In BIND 9.11 and earlier, dig and similar tools used liblwres for
parsing /etc/resolv.conf.  After getting a list of servers from
liblwres, a tool would check the address family of each server found and
reject those unusable.  When the resulting list of usable servers was
empty, localhost addresses were queried as a fallback.

When liblwres was removed in BIND 9.12, dig and similar tools were
updated to parse /etc/resolv.conf using libirs instead.  As part of that
process, the localhost fallback was removed from bin/dig/dighost.c since
the localhost fallback built into libirs was deemed to be sufficient.
However, libirs only falls back to localhost if it does not find any
name servers at all; if it does find any valid nameserver entry in
/etc/resolv.conf, it just returns it to the caller because it is
oblivious to whether the caller supports IPv4 and/or IPv6 or not.  The
code in bin/dig/dighost.c subsequently filters the returned list of
servers in get_server_list() according to the requested address family
restrictions.  This may result in none of the addresses returned by
libirs being usable, in which case a tool will attempt to work with an
empty server list, causing a hang and subsequently a crash upon user
interruption.

Restore the localhost fallback in bin/dig/dighost.c to prevent the
aforementioned hangs and crashes and ensure recent BIND versions behave
identically to the older ones in the circumstances described above.

(cherry picked from commit 18758392da)
2018-11-13 14:32:51 +01:00
Michał Kępień 14b8bf9d87 Merge branch '599-fix-a-shutdown-race-in-diagnostic-tools-v9_12' into 'v9_12'
[v9_12] Fix a shutdown race in bin/dig/dighost.c

See merge request isc-projects/bind9!1039
2018-11-13 08:25:13 -05:00
Michał Kępień e206bf8836 Add CHANGES entry
5088.	[bug]		dig/host/nslookup could crash when interrupted close to
			a query timeout. [GL #599]

(cherry picked from commit ae40e8039b)
2018-11-13 13:52:21 +01:00
Michał Kępień 9c963ed606 Fix a shutdown race in bin/dig/dighost.c
If a tool using the routines defined in bin/dig/dighost.c is sent an
interruption signal around the time a connection timeout is scheduled to
fire, connect_timeout() may be executed after destroy_libs() detaches
from the global task (setting 'global_task' to NULL), which results in a
crash upon a UDP retry due to bringup_timer() attempting to create a
timer with 'task' set to NULL.  Fix by preventing connect_timeout() from
attempting a retry when shutdown is in progress.

(cherry picked from commit 4621756596)
2018-11-13 13:52:21 +01:00
Evan Hunt 9186dba02d Merge branch 'fix-rules-typo-v9_12' into 'v9_12'
fix rules.in typo

See merge request isc-projects/bind9!1037
2018-11-13 03:33:57 -05:00
Evan Hunt 4357852699 fix typo
(cherry picked from commit 9671909289)
2018-11-13 00:24:24 -08:00
Mark Andrews 1e871d6904 Merge branch 'autoheader-v9_12' into 'v9_12'
autoheader

See merge request isc-projects/bind9!1032
2018-11-12 18:17:09 -05:00
Mark Andrews 7579f1fb22 autoheader 2018-11-13 10:07:57 +11:00
Mark Andrews dc14cafe7e Merge branch 'fix-test-linkages-v9_12' into 'v9_12'
Fix test linkages

See merge request isc-projects/bind9!1028
2018-11-12 15:58:59 -05:00
Mark Andrews 97a108f00d remove lib/isc/tests/result_test as it is now cmocka
(cherry picked from commit 9024cf0c15)
2018-11-13 07:50:13 +11:00
Mark Andrews 4dc0d7eadd fixup
(cherry picked from commit ba0e5ffc09)
2018-11-13 07:50:11 +11:00
Mark Andrews 433f77a5ef link in lib/isccc/tests/Kyuafile
(cherry picked from commit 9a59352b4c)
2018-11-13 07:49:11 +11:00
Mark Andrews e4831a81ba Merge branch 'backport-require-cmocka-greater-than-or-equal-1.0.0' into 'v9_12'
require cmocka >= 1.0.0

See merge request isc-projects/bind9!1023
2018-11-12 02:41:22 -05:00
Mark Andrews 1e8cdc20f3 define CMOCKA_CFLAGS and CMOCKA_LIBS 2018-11-12 18:31:02 +11:00
Mark Andrews f3ff5f63ac require cmocka >= 1.0.0 2018-11-12 18:00:55 +11:00
Mark Andrews 76960ad3ae Merge branch '351-fix-with-cmocka=path-build-v9_12' into 'v9_12'
Resolve "configure fails unless --enable-developer is specified"

See merge request isc-projects/bind9!1020
2018-11-12 01:34:07 -05:00
Ondřej SurýandMark Andrews 28a6c9e2a5 Use cmocka_set_message_output as test function for cmocka presence
(cherry picked from commit 0158c1a4ea)
2018-11-12 17:25:13 +11:00
Mark Andrews 4e002e9e02 Merge branch '351-disable-cmocka-by-default-v9_12' into 'v9_12'
Resolve "configure fails unless --enable-developer is specified"

See merge request isc-projects/bind9!1019
2018-11-12 00:12:41 -05:00
Ondřej SurýandMark Andrews a765151465 Set with_cmocka=no by default
(cherry picked from commit ed8000f333)
2018-11-12 00:01:55 -05:00
Mark Andrews fef2f618f7 Merge branch '676-isc_result_toid-tables-not-complete-v9_12' into 'v9_12'
Resolve "isc_result_toid tables not complete"

See merge request isc-projects/bind9!1016
2018-11-11 23:20:16 -05:00
Evan HuntandMark Andrews 0a2706b288 convert result tests to use CMocka instead of ATF
(cherry picked from commit 471110933a)
2018-11-12 15:10:52 +11:00
Mark Andrews 3bc66aa712 check result tables are complete
(cherry picked from commit 4f04a79250)
2018-11-12 15:09:37 +11:00
Mark Andrews 39fe368c4f Merge branch '250-integrate-cmocka-into-our-build-scripts-v9_12' into 'v9_12'
Add cmocka support to infrastructure (build) files

See merge request isc-projects/bind9!1014
2018-11-11 20:40:27 -05:00
Ondřej SurýandMark Andrews 3223b1b540 Add support for cmocka assert testing by overriding REQUIRE/INSIST/... macros when UNIT_TESTING is defined
(cherry picked from commit 52731c000d)
2018-11-12 12:31:45 +11:00
Ondřej SurýandMark Andrews f2243e5f18 Add --wrap linker option detection
(cherry picked from commit 10535d1c79)
2018-11-12 12:22:37 +11:00
Ondřej SurýandMark Andrews f28f971eca Enforce TAP output from cmocka based unit tests
(cherry picked from commit bd2ddec58f)
2018-11-12 12:22:37 +11:00
Ondřej SurýandMark Andrews 3b2f9ceec6 Integrate cmocka unit testing framework to kyua
(cherry picked from commit 07910f0153)
2018-11-12 12:22:33 +11:00
Mark Andrews a9c162d2e5 Merge branch '186-bind-9-12-x-potential-bug-with-dig-when-tools-installed-on-windows-v9_12' into 'v9_12'
Resolve "Bind 9.12.x: Potential bug with Dig when Tools installed on Windows"

See merge request isc-projects/bind9!1009
2018-11-09 00:47:47 -05:00
Mark Andrews 990743181b add CHANGES note
(cherry picked from commit 4f7deb348b)
2018-11-09 16:26:43 +11:00
Mark Andrews 4cc245abdc look in windows registry for nameservers, domainname and search list
(cherry picked from commit 6ead8c7be8)
2018-11-09 16:22:52 +11:00
Mark Andrews 2266b6e0fa Merge branch '673-fix-windows-build-resource-discover-v9_12' into 'v9_12'
Resolve "fix windows build resource discover"

See merge request isc-projects/bind9!1006
2018-11-08 20:51:23 -05:00
Mark Andrews 818e6822c4 isc_resource_getlimit under windows only supports isc_resource_openfiles
(cherry picked from commit 896fb585b3)
2018-11-09 12:42:33 +11:00
Ondřej Surý 63f620ed43 Merge branch '451-fix-atomic-int-lock-free-usage-v9_12' into 'v9_12'
Properly use ATOMIC_*_LOCK_FREE preprocessor constants

See merge request isc-projects/bind9!997
2018-11-08 16:54:15 -05:00
Ondřej Surý a5e7901eb9 Properly use ATOMIC_*_LOCK_FREE preprocessor constants
The ATOMIC_*_LOCK_FREE can evalutate either 0, 1, or 2 which indicate the
lock-free property of the corresponding atomic types (both signed and unsigned).

	Value	Explanation
	-----	--------------------------------------
	  0	The atomic type is never lock-free
	  1	The atomic type is sometimes lock-free
	  2	The atomic type is always lock-free
	-----	--------------------------------------
2018-11-09 04:50:50 +07:00
Ondřej Surý f914cd93b8 Merge branch '449-isc_stdtime_t-post-stdint-cleanup-v9_12' into 'v9_12'
(v9_12) Resolve "Follow-up from "Redefine ISC's int and boolean types to use <stdint.h> and <stdbool.h> types""

See merge request isc-projects/bind9!1001
2018-11-08 15:07:20 -05:00
Ondřej Surý 956d1bda02 isc_stdtime_t is always 32-bit now, so remove the always true macro STDTIME_ON_32BITS
(cherry picked from commit 6f5fe11f5a)
2018-11-09 02:56:49 +07:00
Ondřej Surý 15a4f74b28 Print isc_stdtime_t with PRIu32
(cherry picked from commit c355e1f38f)
2018-11-09 02:56:48 +07:00
Ondřej Surý 7b083a4958 Merge branch '224-remove-isc-hmax-fixup-exe-bnff-from-win32utils-configure-v9_12' into 'v9_12'
Remove isc-hmac-fixup.exe remains from win32util/Configure

See merge request isc-projects/bind9!999
2018-11-08 13:58:51 -05:00
Ondřej Surý fe4b48b694 Remove isc-hmac-fixup.exe remains from win32util/Configure 2018-11-09 01:50:22 +07:00
Ondřej Surý a0a6fc8b85 Merge branch '656-add-support-for-utimaco-hsm-v9_11-v9_12' into 'v9_12'
(v9_12) Resolve "Add support for Utimaco HSM"

See merge request isc-projects/bind9!996
2018-11-08 12:44:08 -05:00
Ondřej Surý 039cef9235 Add CHANGES entry for GL #656
(cherry picked from commit ebe63fd316)
2018-11-09 00:35:05 +07:00
Ondřej Surý 8ffcef8435 Disable runtime detection of md5 and sha1 support for Utimaco HSM.
Utimaco HSM requires user to be logged in before executing DigestUpdate, thus
breaking dst_lib_init2 that ran isc_md5_check and isc_sha1_check before sending
PIN to the HSM.  Therefore isc_*_check needs to be disabled when Utimaco HSM is
being used as PKCS#11 library.

(cherry picked from commit 52784fc3cc)
2018-11-09 00:35:05 +07:00
Ondřej Surý 6610da90d1 Define PK11_UTIMACO_FLAVOR and add detection code to configure.ac
(cherry picked from commit 2079e44fb9)
2018-11-09 00:35:05 +07:00
Ondřej Surý 12a2b25612 Merge branch '305-misc-fixes-v9_12' into 'v9_12'
(v9_12) Miscellaneous style fixes - implicit casts to bool and uninitialized variables fixes

See merge request isc-projects/bind9!993
2018-11-08 09:33:51 -05:00
Ondřej Surý 03c7bb9ab3 Disable Ed448 algorithm, the implementation in BIND 9 is incomplete and broken 2018-11-08 19:53:05 +07:00
Ondřej Surý bc7a1b00e9 fixup! Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 19:45:37 +07:00
Ondřej Surý 5ad72603a8 Remove dummy ISLOCKED macro
(cherry picked from commit 68ca987792)
2018-11-08 15:09:12 +07:00
Ondřej Surý 4568669807 Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached
(cherry picked from commit 23fff6c569)
2018-11-08 15:09:12 +07:00
Ondřej Surý ce6ef5b50e Modify the dbversion_test.c to detect disabled assertions
(cherry picked from commit b992b5b811)
2018-11-08 14:37:14 +07:00
Ondřej Surý 2a26189256 Add extra return failure after INSIST(0) in default branch
(cherry picked from commit 29c45200e7)
2018-11-08 14:37:14 +07:00
Ondřej Surý 65536fb10b Use larger buffers on snprintf buffer overflow false positives
(cherry picked from commit 4eaf927571)
2018-11-08 14:37:14 +07:00
Ondřej Surý 1e6329038b Don't assert on failed getrlimit call to allow called to handle this gracefully as it already does, just abort where we need to know the numbers
(cherry picked from commit e2e138a801)
2018-11-08 14:37:14 +07:00
Ondřej Surý 3d834566f1 When ISC assertions are disabled, still execute the condition to prevent unused variable warnings/errors from the compiler
(cherry picked from commit a831e0f72d)
2018-11-08 14:37:14 +07:00
Ondřej Surý c5825eba40 Add a GitLab CI job that runs with all assertions disabled
(cherry picked from commit 461ffead1f)
2018-11-08 14:37:14 +07:00
Ondřej Surý fcd1569e2b Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool
(cherry picked from commit b2b43fd235)
2018-11-08 14:37:14 +07:00
Ondřej Surý b222783ae9 Add small tweaks to the code to fix compilation when ISC assertions are disabled
While implementing the new unit testing framework cmocka, it was found that the
BIND 9 code doesn't compile when assertions are disabled or replaced with any
function (such as mock_assert() from cmocka unit testing framework) that's not
directly recognized as assertion by the compiler.

This made the compiler to complain about blocks of code that was recognized as
unreachable before, but now it isn't.

The changes in this commit include:

* assigns default values to couple of local variables,
* moves some return statements around INSIST assertions,
* adds __builtin_unreachable(); annotations after some INSIST assertions,
* fixes one broken assertion (= instead of ==)

(cherry picked from commit fbd2e47f51)
2018-11-08 14:05:23 +07:00
Mark Andrews f8620738e5 Merge branch 'wpk-get-rid-of-bashism-in-CDS-test-v9_12' into 'v9_12'
Small system tests fixes for Solaris

See merge request isc-projects/bind9!991
2018-11-07 20:32:50 -05:00
Witold KrecickiandMark Andrews 070e4135c4 Remove unnecessary sed from autosign test
(cherry picked from commit 82dfb77328)
2018-11-08 12:19:57 +11:00
Witold KrecickiandMark Andrews f49bd1e77f Use 'local' variable in echo functions in tests
(cherry picked from commit 0949b1fe2c)
2018-11-08 12:19:51 +11:00
Witold KręcickiandMark Andrews 5d4074c4e4 Get rid of bashism in CDS test
(cherry picked from commit dbf2e7928e)
2018-11-08 12:14:31 +11:00
Mark Andrews b7b668b463 Merge branch '653-idnout-only-on-tty-v9_12' into 'v9_12'
Enable idnout output only on tty, disable it when the stdout is not a tty

See merge request isc-projects/bind9!983
2018-11-06 19:40:43 -05:00
Ondřej SurýandMark Andrews 71ae7caf56 Add CHANGES entry for GL #653
(cherry picked from commit 9c0c44405c)
2018-11-07 11:32:56 +11:00
Ondřej SurýandMark Andrews e484721209 Add release notes for IDN processing update
(cherry picked from commit 2a11a7dd29)
2018-11-07 11:32:56 +11:00
Ondřej SurýandMark Andrews 9fe7963ec3 Update the IDN documentation for nslookup
(cherry picked from commit b659765869)
2018-11-07 11:32:56 +11:00
Ondřej SurýandMark Andrews a148af6728 Change the dig documentation
(cherry picked from commit 7697923eab)
2018-11-07 11:32:56 +11:00
Ondřej SurýandMark Andrews bee5674283 Update the idna tests for the new non-tty defaults
(cherry picked from commit e8c57a78aa)
2018-11-07 11:32:56 +11:00
Ondřej SurýandMark Andrews cd83fb94c6 Enable IDN processing (both idnin and idnout) only on tty, disable it when the stdout is not a tty
(cherry picked from commit 0e1bf7d017)
2018-11-06 17:10:09 +11:00
Mark Andrews 8dcaf90874 Merge branch '601-build-option-with-python-should-default-to-yes-v9_12' into 'v9_12'
Resolve "Build option --with-python should default to yes"

See merge request isc-projects/bind9!981
2018-11-06 00:51:44 -05:00
Mark Andrews 7e32115c12 require python to be explicitly disabled
(cherry picked from commit bf8746126c)
2018-11-06 16:42:45 +11:00
Mark Andrews 5252e38acd Merge branch '617-if-rrl-is-configured-the-require-server-cookie-yes-is-ignored-v9_12' into 'v9_12'
Resolve "If RRL is configured the "require-server-cookie yes;" is ignored."

See merge request isc-projects/bind9!977
2018-11-05 18:35:26 -05:00
Mark Andrews 48c6914639 add CHANGES note
(cherry picked from commit a868f335d2)
2018-11-06 10:22:32 +11:00
Mark Andrews ce80d59e97 test require-server-cookie with rate-limit
(cherry picked from commit 164370102a)
2018-11-06 10:20:43 +11:00
Mark Andrews 5d1244a831 check requireservercookie even if rrl is configured
(cherry picked from commit d6f6eeda9d)
2018-11-06 10:20:43 +11:00
Michał Kępień 97e58eb233 Merge branch '611-extend-serve-stale-tests-v9_12' into 'v9_12'
[v9_12] Extend serve-stale tests

See merge request isc-projects/bind9!964
2018-10-31 09:26:46 -04:00
Michał Kępień a0c5c01fe5 Check serve-stale behavior with a cold cache
Ensure that serve-stale works as expected when returning stale answers
is enabled, the authoritative server does not respond, and there is no
cached answer available.

(cherry picked from commit 27cfe83a38)
2018-10-31 14:08:44 +01:00
Michał Kępień 9fe44e48b2 Check TTL of stale answers
Make sure that stale answers returned when the serve-stale feature is
enabled have a TTL matching the value of the stale-answer-ttl setting.

(cherry picked from commit 893ab37ce7)
2018-10-31 14:08:43 +01:00
Mark Andrews 0cd60f604c Merge branch '649-resolver-test-failing-v9_12' into 'v9_12'
Resolve "resolver test failing"

See merge request isc-projects/bind9!960
2018-10-31 01:49:41 -04:00
Mark Andrews 86176a9153 use new packet for response; rename variable to request and response
(cherry picked from commit 280d0ca507)
2018-10-31 16:36:34 +11:00
Evan Hunt 806a781638 Merge branch 'silence-warning-v9_12' into 'v9_12'
silence warning from missing print.h

See merge request isc-projects/bind9!956
2018-10-30 11:09:57 -04:00
Evan Hunt d99a9db93a silence warning from missing print.h
(cherry picked from commit a0de6707c0)
2018-10-30 08:09:28 -07:00
Michał Kępień 4b26b9fe74 Merge branch '644-fix-isc_buffer_copyregion-for-auto-reallocated-buffers-v9_12' into 'v9_12'
[v9_12] Fix isc_buffer_copyregion() for auto-reallocated buffers

See merge request isc-projects/bind9!950
2018-10-30 08:52:27 -04:00
Michał Kępień 4447d5e317 Add CHANGES entry
5072.	[bug]		Add unit tests for isc_buffer_copyregion() and fix its
			behavior for auto-reallocated buffers. [GL #644]

(cherry picked from commit 07050fb49a)
2018-10-30 13:33:43 +01:00
Michał Kępień a21c1aacdf Fix isc_buffer_copyregion() for auto-reallocated buffers
While isc_buffer_copyregion() calls isc_buffer_reserve() to ensure the
target buffer will have enough available space to append the contents of
the source region to it, the variables used for subsequently checking
available space are not updated accordingly after that call.  This
prevents isc_buffer_copyregion() from working as expected for
auto-reallocated buffers: ISC_R_NOSPACE will be returned if enough space
is not already available in the target buffer before it is reallocated.
Fix by calling isc_buffer_used() and isc_buffer_availablelength()
directly instead of assigning their return values to local variables.

(cherry picked from commit e1f0aed034)
2018-10-30 13:33:42 +01:00
Michał Kępień 72caf33ffb Add unit tests for isc_buffer_copyregion()
Add some basic checks for isc_buffer_copyregion() to ensure it behaves
as expected for both fixed-size buffers and buffers which can be
automatically reallocated.  Adjust the list of headers included by
lib/isc/tests/buffer_test.c so that it matches what that test program
really uses.

(cherry picked from commit 15440d8027)
2018-10-30 13:33:42 +01:00
Ondřej Surý bc5d26a8fe Merge branch 'ondrej/cleanup-leftover-fatal-v9_12' into 'v9_12'
(v9_12) Remove double result check leftover

See merge request isc-projects/bind9!947
2018-10-30 08:08:30 -04:00
Ondřej Surý 6062d370b6 Remove double result check leftover
(cherry picked from commit 065ff16e40)
2018-10-30 12:59:21 +01:00
Witold Krecicki 2bbdf344e4 Merge branch 'wpk-fix-race-in-rpz-with-min-update-interval-0-v9_12' into 'v9_12'
Fix race in rpz with min update interval 0 v9 12

See merge request isc-projects/bind9!943
2018-10-30 02:59:45 -04:00
Witold Kręcicki c209bb1400 <stdlib.h> include in rpz.c for strtoul
(cherry picked from commit 8283cbabdc)
2018-10-30 06:51:47 +00:00
Michał KępieńandWitold Kręcicki 7258535655 Release all resources when shutting down an RPZ zone during an update
If an RPZ zone is to be freed during an update, canceling the
update_quantum() event is not enough because the resources released when
an update completes also need to be accounted for.  Failure to do this
results in a hang upon shutdown.  Fix by copying cleanup code from the
end of update_quantum() to rpz_detach().

(cherry picked from commit 139bc2c6ab)
2018-10-30 06:51:47 +00:00
Witold Kręcicki 384b3ef596 Fix a race in RPZ with min-update-interval set to 0
If another RPZ update is pending when processing the previous one nears
completion and min-update-interval is set to 0, isc_timer_reset() gets
called with 'interval' set to 0, which triggers an assertion failure.
To prevent such a scenario from causing a crash, queue the update event
directly instead of asking the timer thread to do it.

(cherry picked from commit faf2c7711a)
2018-10-30 06:51:40 +00:00
Mark Andrews b79602e923 Merge branch '631-dns_rdata_compare-for-nxt-performs-case-sensitive-name-comparison-v9_12' into 'v9_12'
Resolve "dns_rdata_compare() for NXT performs case sensitive name comparison"

See merge request isc-projects/bind9!941
2018-10-30 00:17:34 -04:00
Mark Andrews 22feff0b62 add CHANGES note
(cherry picked from commit 921bc89f59)
2018-10-30 15:09:48 +11:00
Mark Andrews 7074cbdacd compare_nxt compared records with identical next fields case insensitively
(cherry picked from commit cf83016682)
2018-10-30 15:09:45 +11:00
Mark Andrews a0ae166058 Merge branch 'move-declaration-of-pending' into 'v9_12'
move declaration of pending

See merge request isc-projects/bind9!939
2018-10-29 20:53:54 -04:00
Mark Andrews bc53e5e5d4 move declaration of pending 2018-10-30 11:51:38 +11:00
Mark Andrews 6768053022 Merge branch '638-record-types-with-empty-rdata-fields-were-not-being-handled-correctly-v9_12' into 'v9_12'
Resolve "Record types with empty rdata fields were not being handled correctly."

See merge request isc-projects/bind9!937
2018-10-29 20:25:19 -04:00
Mark Andrews d09955736a document eol
(cherry picked from commit 97a680e5ce)
2018-10-30 11:16:49 +11:00
Mark Andrews dce7bb3f82 Record types which support a empty rdata field were not handling the empty rdata field case.
(cherry picked from commit 2ff57d8a39)
2018-10-30 11:16:43 +11:00
Evan Hunt 17e574293d Merge branch '641-unquoted-rpz-v9_12' into 'v9_12'
allow unquoted response-policy zone names

See merge request isc-projects/bind9!934
2018-10-29 13:07:23 -04:00
Evan Hunt aa797579ef allow unquoted response-policy zone names
(cherry picked from commit 507230aa88)
2018-10-29 09:59:44 -07:00
Mark Andrews 8da6a31497 Merge branch '635-unchecked-return-in-query-c-v9_12' into 'v9_12'
Resolve "unchecked return in query.c"

See merge request isc-projects/bind9!930
2018-10-29 03:33:41 -04:00
Mark Andrews 18e7934959 always call RUNTIME_CHECK(result == ISC_R_SUCCESS); for dns_rdata_tostruct
(cherry picked from commit e11cfafff2)
2018-10-29 18:25:57 +11:00
Mark Andrews d8485aeee3 Merge branch '553-socket-c-2171-unexpected-error-v9_12' into 'v9_12'
Only set IPV6_USE_MIN_MTU on IPv6.

See merge request isc-projects/bind9!928
2018-10-29 02:39:18 -04:00
Mark Andrews 7ccca052c0 Only set IPV6_USE_MIN_MTU on IPv6.
(cherry picked from commit 561b780ba0)
2018-10-29 17:28:57 +11:00
Mark Andrews f6e5fe1848 Merge branch '624-lib-dns-dnstap_test-totext-does-not-work-well-with-softhsm-pkcs11-v9_12' into 'v9_12'
Resolve "lib/dns/dnstap_test:totext does not work well with SoftHSM PKCS11"

See merge request isc-projects/bind9!922
2018-10-29 01:42:43 -04:00
Mark Andrews c8276a29e6 Initalize TZ environment variable before calling dns_test_begin in dnstap_test.
(cherry picked from commit 1cf1254051)
2018-10-29 16:35:06 +11:00
Evan Hunt a907cb5918 Merge branch '626-implement-eid-and-nimloc-v9_12' into 'v9_12'
Resolve "Implement EID and NIMLOC"

See merge request isc-projects/bind9!913
2018-10-25 18:40:30 -04:00
Mark AndrewsandEvan Hunt b4b006a686 Add support for EID and NIMLOC
(cherry picked from commit fbab100426)
2018-10-25 15:30:58 -07:00
Evan Hunt bf523e9a4b Merge branch '627-check-that-gid-uid-and-uinfo-can-be-loaded-using-unknown-record-format-v9_12' into 'v9_12'
Resolve "Check that GID, UID and UINFO can be loaded using unknown record format."

See merge request isc-projects/bind9!911
2018-10-25 16:43:43 -04:00
Mark AndrewsandEvan Hunt f569c8ad26 GID, UID and UINFO could not be loaded using unknown record format.
(cherry picked from commit eb7ca65b78)
2018-10-25 13:34:49 -07:00
Michał Kępień 2ca5978086 Merge branch 'prep-release-v9_12_3' into 'v9_12'
prep 9.12.3

See merge request isc-projects/bind9!903
2018-10-25 08:30:40 -04:00
Tinderbox UserandMichał Kępień 04d53f446e prep 9.12.3 2018-10-25 14:00:59 +02:00
Michał Kępień 25f679757d Merge branch '427-list-zones-in-the-web-interface-v9_12' into 'v9_12'
[v9_12] Display a per-view list of zones in the web interface

See merge request isc-projects/bind9!899
2018-10-25 04:39:27 -04:00
Michał Kępień a873d93f14 Add CHANGES entry
5059.	[bug]		Display a per-view list of zones in the web interface.
			[GL #427]

(cherry picked from commit d9c4068cc3)
2018-10-25 10:25:25 +02:00
Michał Kępień 9dc1b43f3c Display a per-view list of zones in the web interface
The XSL stylesheet used by the web interface does not currently include
any element which would cause a list of zones configured in each view to
be displayed, making the "Zones" section of the web interface empty
unless some zone has been configured with "zone-statistics full;" and
queried.  Since this can be confusing, modify the XSL stylesheet so that
a list of zones configured in each view is displayed in the web
interface.

(cherry picked from commit aeda3f389e)
2018-10-25 10:21:26 +02:00
Michał Kępień 043445db8b Merge branch '582-fix-server-addresses-configuration-type-v9_12' into 'v9_12'
[v9_12] Fix the configuration type used by the "server-addresses" option

See merge request isc-projects/bind9!897
2018-10-25 03:22:25 -04:00
Michał Kępień 963a441921 Add CHANGES entry
5051.	[doc]		Documentation incorrectly stated that the
			"server-addresses" static-stub zone option accepts
			custom port numbers. [GL #582]

(cherry picked from commit 6b1c0a8e6f)
2018-10-25 09:00:46 +02:00
Michał Kępień 7b9a5ed7d5 Fix the configuration type used by the "server-addresses" option
Contrary to what the documentation states, the "server-addresses"
static-stub zone option does not accept custom port numbers.  Fix the
configuration type used by the "server-addresses" option to ensure
documentation matches source code.  Remove a check_zoneconf() test which
is unnecessary with this fix in place.

(cherry picked from commit b324576858)
2018-10-25 08:58:56 +02:00
Mark Andrews ae7e59c268 Merge branch '619-implement-atma-v9_12' into 'v9_12'
Resolve "Implement ATMA"

See merge request isc-projects/bind9!893
2018-10-24 23:18:30 -04:00
Mark Andrews f6515be8f6 Add support for ATMA
(cherry picked from commit f9ceddd8ca)
2018-10-25 14:08:42 +11:00
Mark Andrews efa5eeeb51 Merge branch '609-address-memory-leak-on-error-v9_12' into 'v9_12'
Resolve "Address memory leak on error"

See merge request isc-projects/bind9!891
2018-10-24 23:05:36 -04:00
Mark Andrews 7f07a0bb5d expand the pool then copy over the old entries so we that failures do not break the old pool; also don't leak the new pool on error
(cherry picked from commit afde30fe9b)
2018-10-25 13:20:03 +11:00
Mark Andrews 7796546fb2 Merge branch '610-address-memory-leak-on-error-v9_12' into 'v9_12'
Resolve "Address memory leak on error"

See merge request isc-projects/bind9!883
2018-10-23 21:05:47 -04:00
Mark Andrews e388288322 free key on error
(cherry picked from commit 607c2d7441)
2018-10-24 11:57:46 +11:00
Evan Hunt 1b276bdb14 Merge branch 'cleanup-changes-v9_12' into 'v9_12'
minor CHANGES edits

See merge request isc-projects/bind9!881
2018-10-23 16:32:17 -04:00
Evan Hunt 512cdf8344 minor edits 2018-10-23 13:31:48 -07:00
Michał Kępień 4cd0ee8fab Merge branch '187-libirs-handle-scoped-ipv6-addresses-in-etc-resolv.conf-v9_12' into 'v9_12'
[v9_12] libirs: handle scoped IPv6 addresses in /etc/resolv.conf

See merge request isc-projects/bind9!879
2018-10-23 09:13:16 -04:00
Michał Kępień 9b802174f6 Add CHANGES entry
5050.	[bug]		The libirs version of getaddrinfo() was unable to parse
			scoped IPv6 addresses present in /etc/resolv.conf.
			[GL #187]

(cherry picked from commit b7564cc898)
2018-10-23 14:54:18 +02:00
Michał Kępień 97c7021e24 libirs: handle scoped IPv6 addresses in /etc/resolv.conf
Commonly used network configuration tools write scoped IPv6 nameserver
addresses to /etc/resolv.conf.  libirs only handles these when it is
compiled with -DIRS_HAVE_SIN6_SCOPE_ID, which is not the default, and
only handles numeric scopes, which is not what network configuration
tools typically use.  This causes dig to be practically unable to handle
scoped IPv6 nameserver addresses in /etc/resolv.conf.

Fix the problem by:

  - not requiring a custom compile-time flag to be set in order for
    scoped IPv6 addresses to be processed by getaddrinfo(),

  - parsing non-numeric scope identifiers using if_nametoindex(),

  - setting the sin6_scope_id field in struct sockaddr_in6 structures
    returned by getaddrinfo() even if the AI_CANONNAME flag is not set.

(cherry picked from commit 76d49c05be)
2018-10-23 14:54:07 +02:00
Michał Kępień f6c677c100 Merge branch 'wpk-servfail-on-upstream-formerr-v9_12' into 'v9_12'
[v9_12] Set result to SERVFAIL if upstream responded with FORMERR

See merge request isc-projects/bind9!877
2018-10-23 08:12:28 -04:00
Witold KręcickiandMichał Kępień 886cc5f64d Set result to SERVFAIL if upstream responded with FORMERR
Commit 2bc4c92ed4 causes the resolver to
respond to a client query with FORMERR when all upstream queries sent to
the servers authoritative for QNAME elicit FORMERR responses.  This
happens because resolver code returns DNS_R_FORMERR in such a case and
dns_result_torcode() acts as a pass-through for all arguments which are
already a valid RCODE.

The correct RCODE to set in the response returned to the client in the
case described above is SERVFAIL.  Make sure this happens by overriding
the RCODE in query_gotanswer(), on the grounds that any format errors in
the client query itself should be caught long before execution reaches
that point.  This change should not reduce query error logging accuracy
as the resolver code itself reports the exact reason for returning a
DNS_R_FORMERR result using log_formerr().

(cherry picked from commit b5c9a8caad)
2018-10-23 14:00:12 +02:00
Ondřej Surý 75e9a98df8 Merge branch '4-rename-configure.in-to-configure.ac-v9_12' into 'v9_12'
[v9_12] Rename configure.in to configure.ac

See merge request isc-projects/bind9!873
2018-10-23 04:11:00 -04:00
Ondřej Surý 704ae93e47 Rename configure.in to configure.ac 2018-10-23 09:59:16 +02:00
Ondřej Surý 5a2b525abf Merge branch '506-print-fips-mode-v9_12-fix' into 'v9_12'
Fix the FIPS mode merge

See merge request isc-projects/bind9!871
2018-10-22 15:56:13 -04:00
Ondřej Surý a5116a777c Fix missing enable_fips_mode merged in wrong place 2018-10-22 21:34:16 +02:00
Ondřej Surý cf30a5221b Merge branch '506-print-fips-mode-v9_12' into 'v9_12'
(v9_12) Add configure option to enable FIPS mode if OpenSSL provides the option

See merge request isc-projects/bind9!870
2018-10-22 15:29:03 -04:00
Ondřej Surý cca0507fed Add CHANGES note.
XXXX.	[feature]	Add configure option to enabled and enforce FIPS mode
			in BIND 9. [GL #506]

(cherry picked from commit 9d29f73b79)
2018-10-22 21:28:38 +02:00
Ondřej Surý c1bb094621 Add release notes for the FIPS mode feature
(cherry picked from commit 60862c5769)
2018-10-22 21:28:38 +02:00
Ondřej Surý 38777de529 Add support for enabling and enforcing FIPS mode in OpenSSL:
* Add configure option --enable-fips-mode that detects and enables FIPS mode
* Add a function to enable FIPS mode and call it on crypto init
* Log an OpenSSL error when FIPS_mode_set() fails and exit
* Report FIPS mode status in a separate log message from named

(cherry picked from commit c4cee27f9b)
2018-10-22 21:28:34 +02:00
Michał Kępień b28af25241 Merge branch '565-automatically-trigger-gitlab-pages-pipelines-v9_12' into 'v9_12'
[v9_12] Automatically trigger GitLab Pages pipelines

See merge request isc-projects/bind9!867
2018-10-20 18:01:53 -04:00
Michał Kępień e172da365d Automatically trigger GitLab Pages pipelines
Whenever master or one for the v9_* branches gets updated, the current
ARM should be published on GitLab Pages.  Add a pipeline stage which
takes care of triggering GitLab Pages pipelines.  Extend the lifetime of
artifact archives containing the ARM to prevent GitLab Pages pipelines
from failing due to artifacts being unavailable.

(cherry picked from commit 31bde118db)
2018-10-20 23:29:41 +02:00
Michał Kępień 423ae551c5 Merge branch '565-generate-the-arm-during-ci-v9_12' into 'v9_12'
[v9_12] Generate the ARM during CI

See merge request isc-projects/bind9!864
2018-10-20 06:17:13 -04:00
Michał Kępień b28fc8c936 Generate the ARM during CI
Add a CI job which generates the HTML version of the ARM and makes it
available for download.  Since this is expected to be a quick process,
the new job is enabled for all pipelines.

(cherry picked from commit 3f443468e0)
2018-10-19 22:42:58 +02:00
Michał Kępień f5ae26616a Merge branch 'fix-ci-v9_12' into 'v9_12'
[v9_12] Fix CI

See merge request isc-projects/bind9!861
2018-10-19 16:41:22 -04:00
Michał Kępień e5ebc13989 Fix CI
Use GitLab Registry for CI purposes.  Disable EdDSA support for Debian
sid since the OpenSSL version shipped with it has broken Ed448 support.
2018-10-19 22:22:10 +02:00
Michał Kępień f5074c12e8 Merge branch '572-improve-accuracy-of-query-error-logging-v9_12' into 'v9_12'
[v9_12] Improve accuracy of query error logging

See merge request isc-projects/bind9!850
2018-10-08 07:01:45 -04:00
Michał Kępień 8053e6fa95 Add CHANGES entry
5047.	[bug]		Messages logged for certain query processing failures
			now include a more specific error description if it is
			available. [GL #572]

(cherry picked from commit dc531dc340)
2018-10-08 12:50:14 +02:00
Michał Kępień 2bc4c92ed4 Do not set qctx->result to DNS_R_SERVFAIL unless necessary
In some cases, setting qctx->result to DNS_R_SERVFAIL causes the value
of a 'result' variable containing a more specific failure reason to be
effectively discarded.  This may cause certain query error log messages
to lack specificity despite a more accurate problem cause being
determined during query processing.

In other cases, qctx->result is set to DNS_R_SERVFAIL even though a more
specific error (e.g. ISC_R_NOMEMORY) could be explicitly indicated.

Since the response message's RCODE is derived from qctx->result using
dns_result_torcode(), which handles a number of possible isc_result_t
values and returns SERVFAIL for anything not explicitly listed, it is
fine to set qctx->result to something more specific than DNS_R_SERVFAIL
(in fact, this is already being done in a few cases).  Modify most
QUERY_ERROR() calls so that qctx->result is set to a more specific error
code when possible.  Adjust query_error() so that statistics are still
calculated properly.  Remove the RECURSE_ERROR() macro which was
introduced exactly because qctx->result could be set to DNS_R_SERVFAIL
instead of DNS_R_DUPLICATE or DNS_R_DROP, which need special handling.
Modify dns_sdlz_putrr() so that it returns DNS_R_SERVFAIL when a DLZ
driver returns invalid RDATA, in order to prevent setting RCODE to
FORMERR (which is what dns_result_torcode() translates e.g. DNS_R_SYNTAX
to) while responding authoritatively.

(cherry picked from commit ba91243542)
2018-10-08 12:50:14 +02:00
Michał Kępień 3d0cde3fe8 Remove the 'want_stale' field from struct query_ctx
As the previous commit makes the 'want_stale' field of struct query_ctx
redundant, remove it.

(cherry picked from commit b3cd868c4b)
2018-10-08 12:50:14 +02:00
Michał Kępień 6736b08c13 Set up stale response lookup before query_done() is called
When something goes wrong while recursing for an answer to a query,
query_gotanswer() sets a flag (qctx->want_stale) in the query context.
query_done() is subsequently called and it can either set up a stale
response lookup (if serve-stale is enabled) or conclude that a SERVFAIL
response should be sent.  This may cause confusion when looking at query
error logs since the QUERY_ERROR() line responsible for setting the
response's RCODE to SERVFAIL is not in a catch-all branch of a switch
statement inside query_gotanswer() (like it is for authoritative
responses) but rather in a code branch which appears to have something
to do with serve-stale, even when the latter is not enabled.

Extract the part of query_done() responsible for checking serve-stale
configuration and optionally setting up a stale response lookup into a
separate function, query_usestale(), shifting the responsibility for
setting the response's RCODE to SERVFAIL to the same QUERY_ERROR() line
in query_gotanswer() which is evaluated for authoritative responses.

(cherry picked from commit cb48d410d8)
2018-10-08 12:50:14 +02:00
Evan Hunt e34900f6e9 Merge branch 'rpz-shutdown-crash-v9_12' into 'v9_12'
Fix crash at shutdown during an RPZ reload. [RT

See merge request isc-projects/bind9!848
2018-10-05 14:21:29 -04:00
Tony FinchandEvan Hunt b895e7eaaf Fix crash at shutdown during an RPZ reload. [RT #46210]
(cherry picked from commit 7a2b0ac92a)
2018-10-05 11:12:17 -07:00
Mark Andrews 6d028f0f75 Merge branch '578-make-the-chained-delegations-in-reclimit-behave-like-they-would-in-a-regular-name-server-v9_12' into 'v9_12'
Resolve "Make the chained delegations in reclimit behave like they would in a regular name server."

See merge request isc-projects/bind9!841
2018-10-03 23:32:01 -04:00
Mark Andrews 466f550c5c add CHANGES
(cherry picked from commit f1308ef186)
2018-10-04 13:22:06 +10:00
Mark Andrews 2a54fefea8 add bin/tests/system/reclimit/ans4/ans.pl
(cherry picked from commit ae77468e63)
2018-10-04 13:22:06 +10:00
Mark Andrews 39914dd221 reclimit: delegate to ans4 so that ans2 can behave like a real name server
(cherry picked from commit a216135a15)
2018-10-04 13:22:06 +10:00
Mark Andrews 7dbae0246c Merge branch '568-the-chain-system-test-is-missing-a-delegation-v9_12' into 'v9_12'
Resolve "the chain system test is missing a delegation."

See merge request isc-projects/bind9!838
2018-10-03 22:38:42 -04:00
Mark Andrews c3899d9b73 add CHANGES note
(cherry picked from commit e97199b0d0)
2018-10-04 12:29:35 +10:00
Mark Andrews 732521e993 chain: change nameserver name so that the delegation matches
(cherry picked from commit 848e42227e)
2018-10-04 12:29:15 +10:00
Mark Andrews 298db257c2 chain: add 'start test' messages to named.run
(cherry picked from commit 524c1317f7)
2018-10-04 12:29:15 +10:00
Mark Andrews 7b49de3a79 Merge branch 'update-log-fix-v9_12' into 'v9_12'
make update_log() work if zone is not set

See merge request isc-projects/bind9!834
2018-10-03 03:00:36 -04:00
Evan HuntandMark Andrews d67b5cd65b make update_log() work if zone is not set
- update_log() is called to log update errors, but if those errors
  occur before the zone is set (for example, when returning NOTAUTH)
  it returns without logging anything.

(cherry picked from commit 395f6a1474)
2018-10-03 02:39:02 -04:00
Mark Andrews f0cedee039 Merge branch 'irs_buflen_socklen' into 'v9_12'
Fix arch-dependent getnameinfo types

See merge request isc-projects/bind9!787
2018-10-03 02:32:52 -04:00
Petr MenšíkandMark Andrews b427dcce83 Fix arch-dependent getnameinfo types
getnameinfo() parameters are detected by configure. Current glibc uses
socklen_t for BUFLEN and int for flags. Because that parameters are
tested only as fallback, it does detect it different way on 32-bit
system. socklen_t is compatible with size_t type on these systems.
Try all variants with int flags, use unsigned flags as last resort.
2018-10-03 02:16:41 -04:00
Mark Andrews e18bb6f569 Merge branch '569-zero-system-test-failed-to-set-ret-0-and-send-output-to-dev-null-v9_12' into 'v9_12'
Resolve "zero system test failed to set ret=0 and send output to /dev/null"

See merge request isc-projects/bind9!832
2018-10-03 01:48:13 -04:00
Mark Andrews 8a0ccb54cd zero: send grep output to /dev/null; set ret=0 at start of 'check repeated recursive lookups of non recurring TTL=0 responses get new values' test so the failed subtest count is correct
(cherry picked from commit a6507af9e3)
2018-10-03 15:38:37 +10:00
Evan Hunt ff67ad06dd Merge branch '543-couple-more-windows-build-fixes-v9_12' into 'v9_12'
Couple additional Windows build fixes in VCX files

See merge request isc-projects/bind9!827
2018-10-02 13:38:59 -04:00
Thomas JachandEvan Hunt b39bd2816e Couple additional Windows build fixes in VCX files
(cherry picked from commit f2d6b1b859)
2018-10-02 13:37:03 -04:00
Mark Andrews d794576f11 Merge branch '420-reading-from-master-files-could-sometime-fail-to-preserve-the-case-of-the-owner-name-v9_12' into 'v9_12'
Resolve "reading from master files could sometime fail to preserve the case of the owner name."

See merge request isc-projects/bind9!822
2018-10-02 01:46:02 -04:00
Mark Andrews 2fc1411bfd Add CHANGES note.
(cherry picked from commit 4fcdad292d)
2018-10-02 15:22:29 +10:00
Mark Andrews 90fdf40bda improve case presevation
(cherry picked from commit 0fc1b1bffa)
2018-10-02 15:21:22 +10:00
Tinderbox User 75193660a0 Merge branch 'prep-release' into v9_12 2018-09-29 04:21:37 +00:00
Tinderbox User 7f5e4faed8 prep 9.12.3rc1 2018-09-29 04:21:11 +00:00
Evan Hunt 63d61454a9 Merge branch 'example-domain-v9_12' into 'v9_12'
use an example domain

See merge request isc-projects/bind9!820
2018-09-28 12:59:52 -04:00
Evan Hunt 1bce1f052a use an example domain
(cherry picked from commit b026663c62)
2018-09-28 09:59:28 -07:00
Evan Hunt b5e5c4b0cb Merge branch '562-chaos-addresses-v9_12' into 'v9_12'
fix chaosnet address comparison

See merge request isc-projects/bind9!817
2018-09-28 12:06:12 -04:00
Evan Hunt 6452c017f5 fix chaosnet address comparison
(cherry picked from commit b4dca44ad2)
2018-09-28 08:58:45 -07:00
Evan Hunt 7b6202dd85 Merge branch 'rpz-synth-dnssec-v9_12' into 'v9_12'
RPZ now treats covering NSEC records the same as negative answers

See merge request isc-projects/bind9!812
2018-09-27 18:31:47 -04:00
Tony FinchandEvan Hunt 98f9c5fb26 RPZ now treats covering NSEC records the same as negative answers
(cherry picked from commit 9407d9e266)
2018-09-27 15:22:43 -07:00
Evan Hunt b78cd6ed17 Merge branch '540-tsig-has-two-consecutive-spaces-when-maclen-is-0-v9_12' into 'v9_12'
Resolve "TSIG has two consecutive spaces when MACLEN is 0"

See merge request isc-projects/bind9!809
2018-09-27 17:36:51 -04:00
Mark AndrewsandEvan Hunt 3992a37c06 only emit a single space between mac length and the orginal id if the mac length is zero
(cherry picked from commit ac1c3aaa27)
2018-09-27 14:28:47 -07:00
Evan Hunt 382c3c20b3 Merge branch '503-fix-rpz-test-v9_12' into 'v9_12'
Resolve "dnsrps test no longer runs"

See merge request isc-projects/bind9!808
2018-09-27 16:40:43 -04:00
Evan Hunt 258fea16a2 CHANGES note
(cherry picked from commit b04c7bbd60)
2018-09-27 13:33:08 -07:00
Evan Hunt bd7084909b fix problems running dnsrps tests in rpz and rpzrecurse
- set up server correctly when running the second test pass
- reset stats counters before the second pass
- clean up test output

(cherry picked from commit 6d05ec7dc1)
2018-09-27 13:33:05 -07:00
Evan Hunt f181957c23 Merge branch '556-race-condition-in-timer-creation-v9_12' into 'v9_12'
Fix crash caused by race condition in timer creation

See merge request isc-projects/bind9!806
2018-09-27 16:09:03 -04:00
Zhaolong ZhangandEvan Hunt 811c5ebf92 Fix crash caused by race condition in timer creation
The race condition is the timer elapses before isc__timer_create()
returns the pointer to the caller.  Assigning the return pointer before
enabling the timer will fix it.

(cherry picked from commit 21966423cd)
2018-09-27 12:59:51 -07:00
Evan Hunt cb7420f48f Merge branch '542-prevent-a-race-after-zone-load-v9_12' into 'v9_12'
Prevent a race after zone load

See merge request isc-projects/bind9!803
2018-09-26 22:56:11 -04:00
Michał KępieńandEvan Hunt 725397cc8b Add CHANGES entry
5034.	[bug]		A race between threads could prevent zone maintenance
			scheduled immediately after zone load from being
			performed. [GL #542]

(cherry picked from commit feb2a41b7c)
2018-09-26 19:46:10 -07:00
Michał KępieńandEvan Hunt 3c43ba5fec Prevent a race after zone load
Zone loading happens in a different task (zone->loadtask) than other
zone actions (zone->task).  Thus, when zone_postload() is called in the
context of zone->loadtask, it may cause zone maintenance to be queued in
zone->task and another thread can then execute zone_maintenance() before
zone_postload() gets a chance to finish its work in the first thread.
This would not be a problem if zone_maintenance() accounted for this
possibility by locking the zone before checking the state of its
DNS_ZONEFLG_LOADPENDING flag.  However, the zone is currently not locked
before the state of that flag is checked, which may prevent zone
maintenance from happening despite zone_postload() scheduling it.  Fix
by locking the zone in zone_maintenance() before checking the state of
the zone's DNS_ZONEFLG_LOADPENDING flag.

(cherry picked from commit 56003e9f9f)
2018-09-26 19:46:09 -07:00
Evan Hunt 68ec582265 Merge branch 'fix-typo-v9_12' into 'v9_12'
fix a typo in usage output

See merge request isc-projects/bind9!797
2018-09-24 18:41:23 -04:00
Evan Hunt 5bf0e4f52d fix a typo in usage output
(cherry picked from commit e7c99e42f3)
2018-09-24 15:32:10 -07:00
Evan Hunt 974a7ccf39 Merge branch '539-shell-style-fixes-v9_12' into 'v9_12'
Resolve "rrsetorder test not portable"

See merge request isc-projects/bind9!785
2018-09-11 16:11:09 -04:00
Evan Hunt 9967c9d2b4 don't use $() in system tests
(cherry picked from commit bf9c60078a)
2018-09-11 13:03:34 -07:00
Evan Hunt 3baa05e818 Merge branch '105-nta-all-v9_12' into 'v9_12'
Resolve "[RT#44623] RNDC NTA option to add NTA to all views"

See merge request isc-projects/bind9!781
2018-09-10 16:25:28 -04:00
Evan Hunt d06a1eed7a CHANGES, release notes
(cherry picked from commit 2f6ba87ab9)
2018-09-10 13:17:19 -07:00
Evan Hunt 990f0f8a73 add -class option to rndc nta
(cherry picked from commit cc0abf62a1)
2018-09-10 13:14:21 -07:00
Evan Hunt 3b3fc63b2e report when NTAs added to multiple views
- the text returned by "rndc nta" when adding NTAs to multiple views
  was incorrectly terminated after the first line, so users only saw
  on NTA added unless they checked the logs.

(cherry picked from commit 83dc5a704a)
2018-09-10 13:14:18 -07:00
Evan Hunt a2a5e37ae6 Merge branch 'report-compiler-version-v9_12' into 'v9_12'
report "$CC --version" output as part of the configure summary

See merge request isc-projects/bind9!779
2018-09-10 13:11:35 -04:00
Evan Hunt 564209fc70 report "$CC --version" output as part of the configure summary
(cherry picked from commit a6f43574a0)
2018-09-10 10:03:19 -07:00
Mark Andrews 64aa3dcc3d Merge branch '511-add-ms-selfsub-and-krb5-selfsub-v9_12' into 'v9_12'
Resolve "add ms-selfsub and krb5-selfsub"

See merge request isc-projects/bind9!777
2018-09-10 03:57:47 -04:00
Mark Andrews d9c450b00d add CHANGES and release notes documentation
(cherry picked from commit f924c89f97)
2018-09-10 17:47:59 +10:00
Mark Andrews 4003403533 update util/copyrights
(cherry picked from commit 4aa6a118de)
2018-09-10 17:47:59 +10:00
Mark Andrews 995a8401b0 add more missing name in update rule checks
(cherry picked from commit d1f8e116db)
2018-09-10 17:47:59 +10:00
Mark Andrews 8baca39f00 add krb5-* tests to nsupdate system test.
(cherry picked from commit 54c4db569b)
2018-09-10 17:47:59 +10:00
Mark Andrews f926d28a17 add test addresses 10.53.0.{9,10} and fd92:7065:b8e:ffff::{9,10} 2018-09-10 17:47:59 +10:00
Mark Andrews c827981de2 add krb5-selfsub and ms-selfsub
(cherry picked from commit fbeefd4990)
2018-09-10 17:18:38 +10:00
Mark Andrews eae8d858e5 check that name field is not a valid type
(cherry picked from commit 5fb75a3d75)
2018-09-10 17:16:10 +10:00
Mark Andrews 4375370ba6 fix dns_ssumatchtype_subdomainms dns_ssumatchtype_subdomainkrb5 as they don't require the name field to be '.'
(cherry picked from commit 156d86e673)
2018-09-10 17:16:10 +10:00
Mark Andrews a1f1c01563 Merge branch '532-master-doesn-t-build-on-macos-due-to-class-of-align-macros-v9_12' into 'v9_12'
Resolve "master doesn't build on MacOS due to class of ALIGN macros"

See merge request isc-projects/bind9!775
2018-09-09 19:39:26 -04:00
Mark Andrews 9a14141676 avoid macro name collision with system defined macro
(cherry picked from commit 81b133d963)
2018-09-10 09:30:38 +10:00
Evan Hunt aa313bfe33 Merge branch 'patch-2-v9_12' into 'v9_12'
Replace isc-logo.pdf. The one in here is obsolete. If we need a different size…

See merge request isc-projects/bind9!772
2018-09-07 19:12:05 -04:00
Evan Hunt e8647ed4a0 update isc-logo.pdf to current logo version, remove isc-logo.eps
(cherry picked from commit ad9bf4c662)
2018-09-07 16:01:15 -07:00
Ondřej Surý fd2b4c2d84 Merge branch '521-align-cmsg-buffers-v9_12' into 'v9_12'
Resolve "BIND 9.11.4 terminates with SIGBUS error when compiled with Oracle Developer Studio 12.6"

See merge request isc-projects/bind9!768
2018-09-07 04:35:51 -04:00
Witold KręcickiandOndřej Surý 0f6dee2a45 Align CMSG buffers to a void* boundary, fixes crash on architectures with strict alignment
CHANGES entry

(cherry picked from commit 17212cf996)
2018-09-07 10:27:20 +02:00
Mark Andrews 93732bd362 Merge branch 'cplusplusize_dns_fixedname_h-v9_12' into 'v9_12'
Add C++ declarations to dns/fixedname.h

See merge request isc-projects/bind9!763
2018-09-05 18:20:04 -04:00
Ondřej SurýandMark Andrews f24af7deac Add C++ declarations to dns/fixedname.h
(cherry picked from commit 94a1c85366)
2018-09-06 08:11:04 +10:00
Ondřej Surý 5f85c72bc7 Merge branch 'fail-on-failed-install-v9_12' into 'v9_12'
[v9_12] Fail on failed install inside for loops

See merge request isc-projects/bind9!752
2018-09-03 07:39:16 -04:00
Ondřej Surý 3fbceba0a8 Bail-out early in the for install loops instead of continuing because for masks the error in the middle
(cherry picked from commit 25248eb097)
2018-09-03 13:31:17 +02:00
Evan Hunt d8cb0ff012 Merge branch 'solaris-fixes-v9_12' into 'v9_12'
Silence some warnings and errors

See merge request isc-projects/bind9!748
2018-08-31 20:41:38 -04:00
Witold KrecickiandEvan Hunt 0f0dfc7f86 Silence some warnings and errors 2018-08-31 17:33:03 -07:00
Mark Andrews 98ed1ea56e Merge branch '510-resolver-test-was-failing-v9_12' into 'v9_12'
Resolve "Resolver test was failing"

See merge request isc-projects/bind9!741
2018-08-31 04:48:51 -04:00
Mark Andrews 259e0b0544 use pack to construct the reply as Net::DNS just get it wrong
(cherry picked from commit feaf381adb)
2018-08-31 18:39:46 +10:00
Mark Andrews c0699b93f9 Merge branch '418-bind-in-auto-dnssec-mode-should-support-signature-expiration-jitter-v9_12' into 'v9_12'
Resolve "BIND in auto-dnssec mode should support signature expiration jitter"

See merge request isc-projects/bind9!739
2018-08-30 23:17:21 -04:00
Mark Andrews 6b1e8d5860 add changes note
(cherry picked from commit d68499e1f7)
2018-08-31 13:08:28 +10:00
Mark Andrews 827ef21bb4 report initial RRSIG expiry field values
(cherry picked from commit 8e5abc6cdf)
2018-08-31 13:07:49 +10:00
Mark Andrews 2289ba8b48 increase jitter to cover the entire potential steady state expire range when initially signing the zone
(cherry picked from commit 050fca2139)
2018-08-31 13:07:45 +10:00
Mark Andrews bb9d376c13 Merge branch '519-unclosed-files-in-lib-dns-tests-zt_test-c-v9_12' into 'v9_12'
Resolve "unclosed files in lib/dns/tests/zt_test.c"

See merge request isc-projects/bind9!737
2018-08-30 22:35:01 -04:00
Mark Andrews 3b9a6f0db8 fclose origfile and zonefile
(cherry picked from commit 455bb23236)
2018-08-31 12:24:46 +10:00
Evan Hunt 66e81f726a Merge branch 'silence-warning-v9_12' into 'v9_12'
silence "missing print.h" warning

See merge request isc-projects/bind9!724
2018-08-28 19:32:09 -04:00
Evan Hunt 3bd113ddd1 silence "missing print.h" warning
(cherry picked from commit 3c18b7d3fd)
2018-08-28 16:22:05 -07:00
Witold Krecicki 0091f2abe6 Merge branch '276-rndc-reconfig-fixes-v911-v9_12' into 'v9_12'
Resolve "rndc reconfig now performs stat() for all zones"

See merge request isc-projects/bind9!719
2018-08-28 11:16:52 -04:00
Witold Kręcicki 1bc7934867 CHANGES note 2018-08-28 17:07:44 +02:00
Witold Kręcicki 90b75d94ff rndc reconfig should not stat on existing zones, just load new ones.
(cherry picked from commit 80a025d1a7)
2018-08-28 17:03:10 +02:00
Ondřej Surý d8ca61072c Merge branch 'gitlab-ci-dont-run-make-clean-v9_12' into 'v9_12'
Disable make clean at the end of configure step in GitLab CI

See merge request isc-projects/bind9!715
2018-08-28 01:41:41 -04:00
Ondřej Surý 6ccc609ca4 Disable make clean at the end of configure step in GitLab CI
(cherry picked from commit a1d783bbe2)
2018-08-28 07:27:16 +02:00
Mark Andrews 2669905f2d Merge branch 'update-documentation-for-ms-and-krb5-rules-v9_12' into 'v9_12'
update {krb5,ms}-{self,subdomain} descriptions

See merge request isc-projects/bind9!709
2018-08-27 03:09:46 -04:00
Mark Andrews e69291e76d add CHANGES note
(cherry picked from commit a3c5c2c29c)
2018-08-27 17:01:00 +10:00
Mark Andrews c8581bb03a update {krb5,ms}-{self,subdomain} descriptions
(cherry picked from commit 0370d13667)
2018-08-27 17:00:59 +10:00
Mark Andrews 68c58a1e73 Merge branch '487-reset-dig-exit-code-after-a-tcp-connection-is-established-v9_12' into 'v9_12'
Reset dig exit code after a TCP connection is established

See merge request isc-projects/bind9!706
2018-08-27 00:39:13 -04:00
Michał KępieńandMark Andrews c0bbd57303 Add CHANGES entry
5020.	[bug]		dig returned a non-zero exit code when it received a
			reply over TCP after a retry. [GL #487]

(cherry picked from commit 59057bee5b)
2018-08-27 14:30:32 +10:00
Michał KępieńandMark Andrews 5cc841fa53 Reset dig exit code after a TCP connection is established
The "exitcode" variable is set to 9 if a TCP connection fails, but is
not reset to 0 if a subsequent TCP connection succeeds.  This causes dig
to return a non-zero exit code if it succeeds in getting a TCP response
after a retry.  Fix by resetting "exitcode" to 0 if connect_done()
receives an event with the "result" field set to ISC_R_SUCCESS.

(cherry picked from commit deb3b85cb2)
2018-08-27 14:30:06 +10:00
Ondřej Surý 6021b95451 Merge branch 'run-update_copyrights-v9_12' into 'v9_12'
Run update copyrights in precheck stage

See merge request isc-projects/bind9!701
2018-08-24 08:42:59 -04:00
Ondřej SurýandOndřej Surý a8d5dd1878 Check update_copyright results in precheck stage
(cherry picked from commit 4016369212)
2018-08-24 08:34:44 -04:00
Ondřej SurýandOndřej Surý 791663dd60 Whitespace fixes
(cherry picked from commit 31b5360943)
2018-08-24 08:34:44 -04:00
Ondřej SurýandOndřej Surý bb10ea3f7a Cleanup cruft in util/copyrights
(cherry picked from commit 65de91f512)
2018-08-24 08:34:44 -04:00
Ondřej SurýandOndřej Surý 017968d90b Make update_copyrights return error code when error is encountered during processing the files
(cherry picked from commit db3d69263d)
2018-08-24 08:34:44 -04:00
Michał Kępień 6ef408d28f Merge branch '470-log-a-message-when-ixfr-from-differences-is-set-for-an-inline-signed-zone-v9_12' into 'v9_12'
[v9_12] Log a message when "ixfr-from-differences" is set for an inline-signed zone

See merge request isc-projects/bind9!695
2018-08-24 04:35:32 -04:00
Michał Kępień 5ea91c5a43 Add CHANGES entry
5019.	[cleanup]	A message is now logged when ixfr-from-differences is
			set at zone level for an inline-signed zone. [GL #470]

(cherry picked from commit 4fb5d072c2)
2018-08-24 10:21:28 +02:00
Michał Kępień e0b9bb1d2c Log a message when "ixfr-from-differences" is set for an inline-signed zone
For inline-signed zones, the value of "ixfr-from-differences" is
hardcoded to:

  - "yes" for the raw version of the zone,
  - "no" for the signed version of the zone.

In other words, any user-provided "ixfr-from-differences" setting is
effectively ignored for an inline-signed zone.  Ensure the user is aware
of that by adding a note to the ARM and logging a message when an
"ixfr-from-differences" option is found at the zone level.

(cherry picked from commit 087157d14f)
2018-08-24 10:21:27 +02:00
Michał Kępień a6e79d7ce4 Merge branch '477-fix-intermittent-mkeys-system-test-failures' into 'v9_12'
Fix intermittent "mkeys" system test failures

See merge request isc-projects/bind9!684
2018-08-24 04:10:42 -04:00
Michał Kępień c12388f5e8 Do not call bin/tools/genrandom unconditionally in system tests
$RANDFILE, i.e. bin/tests/system/random.data, should only be written to
if a system test requires support for cryptography and that file does
not already exist.  Otherwise, when multiple system tests are run in
parallel, that file might get truncated due to bin/tools/genrandom.c
using fopen() with mode "w" when writing the destination file.  With
unfortunate timing, this may cause system tests employing BIND tools
which need entropy (e.g. dnssec-keygen) to fail.

Make sure bin/tests/system/metadata/tests.sh no longer calls
bin/tools/genrandom since $RANDFILE is guaranteed to already be created
by the time bin/tools/genrandom is currently called because
bin/tests/system/metadata/prereq.sh uses bin/tests/system/testcrypto.sh.

Make sure bin/tests/system/sfcache/prereq.sh only writes to $RANDFILE if
it does not already exist.
2018-08-24 09:57:15 +02:00
Michał Kępień 262c9e8aab Merge branch '491-prevent-a-race-in-the-inline-system-test-v9_12' into 'v9_12'
[v9_12] Prevent a race in the "inline" system test

See merge request isc-projects/bind9!692
2018-08-24 03:55:14 -04:00
Michał Kępień 56da51da7b Prevent a race in the "inline" system test
A short time window exists between logging the addition of an NSEC3PARAM
record to a zone and committing it to the current version of the zone
database.  If a query arrives during such a time window, an unsigned
response will be returned.  One of the checks in the "inline" system
test requires NSEC3 records to be present in an answer - that check
would fail in the case described above.  Use rndc instead of log
watching for checking whether zone signing and NSEC3 chain modifications
are complete in order to prevent intermittent "inline" system test
failures.

(cherry picked from commit e36c869e85)
2018-08-24 09:38:22 +02:00
Mark Andrews d347b4227a Merge branch 'fix-non-portable-v9_12' into 'v9_12'
use sizeof(CK_SLOT_ID)

See merge request isc-projects/bind9!689
2018-08-23 21:44:28 -04:00
Mark Andrews fef6fc20e1 add CHANGES note
(cherry picked from commit 42b16771db)
2018-08-24 11:32:18 +10:00
Mark Andrews 072069f1d5 use sizeof(CK_SLOT_ID)
(cherry picked from commit 2c1d8b2e99)
2018-08-24 11:32:11 +10:00
Mark Andrews 661d2628c5 Merge branch 'value-not-updated-atomically-v9_12' into 'v9_12'
unlink before unlock

See merge request isc-projects/bind9!687
2018-08-23 21:12:53 -04:00
Mark Andrews 7a0bd7f04c add CHANGES note
(cherry picked from commit 05531d3a86)
2018-08-24 10:58:20 +10:00
Mark Andrews 59ce0f2620 unlink before unlock
(cherry picked from commit 4742f4ecba)
2018-08-24 10:58:20 +10:00
Mark Andrews 08efcd0662 Merge branch '445-filter-aaaa-and-dns64-can-both-attempt-to-recurse-for-a-records-at-the-same-time-v9_12' into 'v9_12'
Resolve "filter-aaaa and dns64 can both attempt to recurse for A records at the same time"

See merge request isc-projects/bind9!685
2018-08-23 19:55:12 -04:00
Mark Andrews 69f7460395 add CHANGES note
(cherry picked from commit c1bc3baf7f)
2018-08-24 09:47:17 +10:00
Mark Andrews 68138381b4 when filter-aaaa and dns64 are both configured a assertion failure could occur
(cherry picked from commit 1056376d10)
2018-08-24 09:47:17 +10:00
Michał Kępień 070b679104 Merge branch '435-fix-reloading-inline-signed-zones-v9_12' into 'v9_12'
[v9_12] Fix reloading inline-signed zones

See merge request isc-projects/bind9!674
2018-08-22 06:00:58 -04:00
Michał Kępień 61a71f82c5 Add CHANGES entry
5015.	[bug]		Reloading all zones caused zone maintenance to cease
			for inline-signed zones. [GL #435]

(cherry picked from commit f9931f1d22)
2018-08-22 11:45:30 +02:00
Michał Kępień 7680c7d1cf Fix reloading inline-signed zones
While "rndc reload" causes dns_zone_asyncload() to be called for the
signed version of an inline-signed zone, the subsequent zone_load() call
causes the raw version to be reloaded from storage.  This means that
DNS_ZONEFLG_LOADPENDING gets set for the signed version of the zone by
dns_zone_asyncload() before the reload is attempted, but zone_postload()
is only called for the raw version and thus DNS_ZONEFLG_LOADPENDING is
cleared for the raw version, but not for the signed version.  This in
turn prevents zone maintenance from happening for the signed version of
the zone.

Until commit 7c64547d95, this problem
remained dormant because DNS_ZONEFLG_LOADPENDING was previously
immediately, unconditionally cleared after zone loading was started
(whereas it should only be cleared when zone loading is finished or an
error occurs).  This behavior caused other issues [1] and thus had to be
changed.

Fix reloading inline-signed zones by clearing DNS_ZONEFLG_LOADPENDING
for the signed version of the zone once the raw version reload
completes.  Take care not to clear it prematurely during initial zone
load.  Also make sure that DNS_ZONEFLG_LOADPENDING gets cleared when
zone_postload() encounters an error or returns early, to prevent other
scenarios from resulting in the same problem.  Add comments aiming to
help explain code flow.

[1] see RT #47076

(cherry picked from commit 5431583971)
2018-08-22 11:45:24 +02:00
Michał Kępień 057cedc818 Merge branch '482-fix-secure-journal-loading-for-inline-signed-zones-v9_12' into 'v9_12'
[v9_12] Set DNS_JOURNALOPT_RESIGN when loading the secure journal for an inline-signed zone

See merge request isc-projects/bind9!672
2018-08-22 05:21:23 -04:00
Michał Kępień 3a269081df Add CHANGES entry
5014.	[bug]		Signatures loaded from the journal for the signed
			version of an inline-signed zone were not scheduled for
			refresh. [GL #482]

(cherry picked from commit b3b1a9081b)
2018-08-22 10:51:48 +02:00
Michał Kępień 8d468a4f60 Set DNS_JOURNALOPT_RESIGN when loading the secure journal for an inline-signed zone
When an inline-signed zone is loaded, the master file for its signed
version is loaded and then a rollforward of the journal for the signed
version of the zone is performed.  If DNS_JOURNALOPT_RESIGN is not set
during the latter phase, signatures loaded from the journal for the
signed version of the zone will not be scheduled for refresh.  Fix the
conditional expression determining which flags should be used for the
dns_journal_rollforward() call so that DNS_JOURNALOPT_RESIGN is set when
zone_postload() is called for the signed version of an inline-signed
zone.

Extend bin/tests/system/stop.pl so that it can use "rndc halt" instead
of "rndc stop" as the former allows master file flushing upon shutdown
to be suppressed.

(cherry picked from commit 8db550c42f)
2018-08-22 10:51:42 +02:00
Michał Kępień ab084b866e Merge branch '390-do-not-treat-a-referral-with-a-non-empty-answer-section-as-an-error-v9_12' into 'v9_12'
[v9_12] Do not treat a referral with a non-empty ANSWER section as an error

See merge request isc-projects/bind9!671
2018-08-22 04:43:56 -04:00
Michał Kępień 899ea537b5 Add CHANGES entry
5013.	[bug]		A referral response with a non-empty ANSWER section was
			inadvertently being treated as an error. [GL #390]

(cherry picked from commit 2923ab4945)
2018-08-22 10:16:11 +02:00
Michał Kępień 367b973835 Do not treat a referral with a non-empty ANSWER section as an error
As part of resquery_response() refactoring [1], a goto statement was
replaced [2] with a call to a new function - originally called
rctx_delegation(), now folded into rctx_answer_none() - extracted from
existing code.  However, one call site of that refactored function does
not reset the "result" variable, causing a referral with a non-empty
ANSWER section to be inadvertently treated as an error, which prevents
resolution of names reliant on servers sending such responses.  Fix by
resetting the "result" variable to ISC_R_SUCCESS when a response
containing a non-empty ANSWER section can be treated as a delegation.

[1] see RT #45362

[2] see commit e1380a16741a3b4a57e54d7a9ce09dd12691522f

(cherry picked from commit 24b9ec555a)
2018-08-22 10:16:08 +02:00
Ondřej Surý 50b838b405 Merge branch '488-install-compatibility-int-and-boolean-shim-headers' into 'v9_12'
Install isc/boolean.h and isc/int.h shim headers

See merge request isc-projects/bind9!670
2018-08-22 03:30:31 -04:00
Ondřej Surý 9257d3542e Add install test job 2018-08-22 09:22:45 +02:00
Ondřej Surý e66fdc5738 We want to install compatibility shim isc/int.h and isc/boolean.h headers 2018-08-22 09:22:35 +02:00
Mark Andrews a544caec90 Merge branch 'fix-lock-order-reversal-v9_12' into 'v9_12'
fix lock order reversal

See merge request isc-projects/bind9!666
2018-08-20 23:40:28 -04:00
Mark Andrews f00e73874d add CHANGES note
(cherry picked from commit 083007e930)
2018-08-21 13:31:16 +10:00
Mark Andrews 2dd18e9f60 fix lock order reversal
(cherry picked from commit 2bb4392bb3)
2018-08-21 13:30:47 +10:00
Mark Andrews cd75073105 Merge branch '9-use-C99-integer-types-fix-install-v9_12' into 'v9_12'
Resolve "Replace custom datatypes (isc_<foo>_t) with C11 equivalents"

See merge request isc-projects/bind9!634
2018-08-14 20:17:38 -04:00
Ondřej SurýandMark Andrews e897ec66e6 Don't install removed int.h and boolean.h headers 2018-08-14 20:10:14 -04:00
Evan Hunt 6925485c04 Merge branch '465-missing-check-in-acl_test-c-unit-test-v9_12' into 'v9_12'
Resolve "Missing check in acl_test.c unit test"

See merge request isc-projects/bind9!651
2018-08-14 12:25:07 -04:00
Mark AndrewsandEvan Hunt 75a39614cc add missing ATF_REQUIRE
(cherry picked from commit 0ce82e9d5f)
2018-08-14 09:15:52 -07:00
Evan Hunt 0e3c9d5080 Merge branch '474-mempool-is-broken-if-object-size-is-below-the-alignment-size-v9_12' into 'v9_12'
Resolve "mempool is broken if object size is below the alignment size"

See merge request isc-projects/bind9!649
2018-08-14 12:08:28 -04:00
Mark AndrewsandEvan Hunt cbccec86f7 mempool didn't work for sizes less than sizeof(void*)
(cherry picked from commit 5dd1beec8e)
2018-08-14 09:00:05 -07:00
Michał Kępień aa0e39f05f Merge branch '476-fix-openssl-error-logging-v9_12' into 'v9_12'
[v9_12] Fix OpenSSL error logging

See merge request isc-projects/bind9!645
2018-08-14 07:11:50 -04:00
Michał Kępień 218166acf8 Add CHANGES entry
5009.	[bug]		Upon an OpenSSL failure, the first error in the OpenSSL
			error queue was not logged. [GL #476]

(cherry picked from commit cab7c34fbd)
2018-08-14 12:53:20 +02:00
Michał Kępień 36436268b5 Do not remove errors from the OpenSSL error queue in toresult()
dst__openssl_toresult3() first calls toresult() and subsequently uses
ERR_get_error_line_data() in a loop.  Given this, it is a mistake to use
ERR_get_error() in toresult() because it causes the retrieved error to
be removed from the OpenSSL error queue, thus preventing it from being
retrieved by the subsequent ERR_get_error_line_data() calls.  Fix by
using ERR_peek_error() instead of ERR_get_error() in toresult().

(cherry picked from commit fe20f8fe25)
2018-08-14 12:53:18 +02:00
Michał Kępień 8e64812293 Merge branch '471-fix-rbt_insert_and_remove-unit-test-v9_12' into 'v9_12'
[v9_12] Prevent rare rbt_insert_and_remove unit test failures

See merge request isc-projects/bind9!642
2018-08-14 05:11:18 -04:00
Michał Kępień 1a341e15e8 Prevent rare rbt_insert_and_remove unit test failures
When two or more absolute, two-label names are added to a completely
empty RBT, an extra, empty node for the root name will be created due to
node splitting.  check_tree() expects that, but the extra node will not
be created when just one name is added to a completely empty RBT.  This
problem could be handled inside check_tree(), but that would introduce
unnecessary complexity into it since adding a single name will result in
a different node count for a completely empty RBT (node count will be 1)
and an RBT containing only an empty node for the root name, created due
to prior node splitting (node count will be 2).  Thus, first explicitly
create a node for the root name to prevent rare check_tree() failures
caused by a single name being added in the first iteration of the
insert/remove loop.

(cherry picked from commit 13fe763798)
2018-08-14 10:44:49 +02:00
Michał Kępień a635b242ab Merge branch '285-make-the-inline-system-test-more-lightweight-v9_12' into 'v9_12'
[v9_12] Make the "inline" system test more lightweight

See merge request isc-projects/bind9!640
2018-08-14 04:39:00 -04:00
Michał Kępień a0dbee8418 Make the "inline" system test more lightweight
Each zone used in the "inline" system test contains a few dozen records.
Over a dozen of these zones are used in the test.  Most records present
in these zones are not subsequently used in the test itself, but all of
them need to be signed by the named instances launched by the test,
which puts quite a bit of strain on lower-end machines, leading to
intermittent failures of the "inline" system test.  Remove all redundant
records from the zones used in the "inline" system test in order to
stabilize it.

(cherry picked from commit 24dd865b97)
2018-08-14 10:16:30 +02:00
Michał Kępień f86b0f128b Merge branch '468-queue-rndc-signing-nsec3param-requests-if-needed-v9_12' into 'v9_12'
[v9_12] Queue "rndc signing -nsec3param ..." requests if needed

See merge request isc-projects/bind9!637
2018-08-14 03:44:56 -04:00
Michał Kępień bab3db9eee Add CHANGES entry
5008.	[bug]		"rndc signing -nsec3param ..." requests were silently
			ignored for zones which were not yet loaded or
			transferred. [GL #468]

(cherry picked from commit eed6778be4)
2018-08-14 09:26:38 +02:00
Michał Kępień cb5f86d99e Queue "rndc signing -nsec3param ..." requests if needed
If "rndc signing -nsec3param ..." is ran for a zone which has not yet
been loaded or transferred (i.e. its "db" field is NULL), it will be
silently ignored by named despite rndc logging an "nsec3param request
queued" message, which is misleading.  Prevent this by keeping a
per-zone queue of NSEC3PARAM change requests which arrive before a zone
is loaded or transferred and processing that queue once the raw version
of an inline-signed zone becomes available.

(cherry picked from commit cb40c5229a)
2018-08-14 09:26:38 +02:00
Ondřej Surý b815273642 Merge branch '462-full-recv-queue-on-netbsd-v9_12' into 'v9_12'
Resolve "Full Recv-Queue"

See merge request isc-projects/bind9!630
2018-08-13 13:31:34 -04:00
Ondřej Surý cee556c4dd Make ENOBUFS a soft error
(cherry picked from commit ebf3083e08)
2018-08-13 19:22:56 +02:00
Ondřej Surý 5a5e2f6e51 Merge branch '223-fix-vcredist-path' into 'v9_12'
[v9_12]: Resolve "Fix for Configure to find the path to VC++ redistributables under Visual Studio 2017"

See merge request isc-projects/bind9!618
2018-08-11 06:06:18 -04:00
Ondřej SurýandOndřej Surý 08a962545d Fix various build failures on Windows (Courtesy of rockerinthelocker) 2018-08-11 05:57:42 -04:00
Ondřej SurýandOndřej Surý ce8b6f22bd Remove non-existant GUIDs from bind9.sln.in 2018-08-11 05:57:42 -04:00
Ondřej Surý 51ae74af5f Merge branch 'fix-missing-config.h-v9_12' into 'v9_12'
[v9_12] Fix missing config.h includes

See merge request isc-projects/bind9!623
2018-08-11 04:52:56 -04:00
Ondřej SurýandOndřej Surý d87c1a120d Fix missing config.h in win32/socket.c and replace config.h with <config.h> 2018-08-11 04:45:37 -04:00
Ondřej Surý 80f9512468 Merge branch '469-typo-in-validate-glue-branch-v9_12' into 'v9_12'
Resolve "Typo in validate-glue branch"

See merge request isc-projects/bind9!621
2018-08-11 04:37:12 -04:00
Ondřej Surý 3f5db28568 Fix !!validate typo to -> !validate
(cherry picked from commit bdc9860262)
2018-08-11 10:28:27 +02:00
Evan Hunt 8afef1f823 Merge branch 'fix-ns-log-mismatch-v9_12' into 'v9_12'
mismatch between defined log modules and ns_modules[] in lib/ns/log.c

See merge request isc-projects/bind9!620
2018-08-10 15:29:50 -04:00
Evan Hunt e8e7c597f8 mismatch between defined log modules and ns_modules[] in lib/ns/log.c
(cherry picked from commit b865fb77de)
2018-08-10 12:22:04 -07:00
Ondřej Surý a95dd5b3a9 Merge branch '9-use-C99-integer-types-v9_12' into 'v9_12'
Redefine ISC's int and boolean types to use <stdint.h> and <stdbool.h> types

See merge request isc-projects/bind9!606
2018-08-10 05:27:41 -04:00
Ondřej Surý 0dad73aafa Add compatibility isc/boolean.h and isc/int.h headers 2018-08-10 11:17:51 +02:00
Ondřej Surý b6c281ee7c Add CHANGES entry
5007.   [cleanup]       Replace custom ISC boolean and integer data types
                        with C99 stdint.h and stdbool.h types. [GL #9]

(cherry picked from commit 75c2356f42)
2018-08-10 11:17:51 +02:00
Ondřej Surý 2844f6529d Remove duplicate config.h
(cherry picked from commit 7351c505a0)
2018-08-10 11:17:51 +02:00
Ondřej Surý 884929400c Replace custom isc_boolean_t with C standard bool type
(cherry picked from commit 994e656977)
2018-08-10 11:17:51 +02:00
Ondřej Surý d61e6a3111 Replace custom isc_u?intNN_t types with C99 u?intNN_t types
(cherry picked from commit cb6a185c69)
2018-08-09 18:30:20 +02:00
Ondřej Surý 3523850065 Get rid of extra UINT64_MAX definition in lib/isc/win32/time.c
(cherry picked from commit 055278c936)
2018-08-09 18:30:20 +02:00
Ondřej Surý c863a076ae Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants
(cherry picked from commit 64fe6bbaf2)
2018-08-09 18:30:20 +02:00
Ondřej Surý ee22f606ae Check for C99 compatible compiler
(cherry picked from commit 9e493798c6)
2018-08-09 18:30:20 +02:00
Evan Hunt 3e5ab73cbc Merge branch 'security-v9_12' into 'v9_12'
Merge CVE-2018-5740 fix

See merge request isc-projects/bind9!608
2018-08-08 18:35:21 -04:00
Evan Hunt d97001a37c caclulate nlabels and set *chainingp correctly 2018-08-08 14:24:15 -07:00
Tinderbox UserandEvan Hunt a7213875ff prep 9.12.2-P1 2018-08-08 14:24:15 -07:00
Evan Hunt 3fa62f19d5 CHANGES, release note
(cherry picked from commit 9c492aba65c178f30baafeb5502013f95a9d5b9a)
2018-08-08 14:23:56 -07:00
Evan Hunt 7c50ab65fc test case
(cherry picked from commit 73486c13f743407a50d5bbadde90c949a696506f)
2018-08-08 14:23:26 -07:00
Evan Hunt 45da24f272 explicit DNAME query could trigger a crash if deny-answer-aliases was set
(cherry picked from commit a21c3810d3453548cc05ae19995125dabea9ca9c)
2018-08-08 14:23:26 -07:00
Ondřej Surý ca97a36ce6 Merge branch 'silence-openbsd-warning-v9_12' into 'v9_12'
Silence a compiler warning on openbsd and fix windows build

See merge request isc-projects/bind9!605
2018-08-08 03:53:01 -04:00
Evan HuntandOndřej Surý 2f611cf600 Silence a compiler warning on openbsd and fix windows build
(cherry picked from commit b55338e447)
2018-08-08 09:36:02 +02:00
Michał Kępień ab6d3e758d Merge branch '431-refactor-code-preparing-a-delegation-response-v9_12' into 'v9_12'
[v9_12] Refactor code preparing a delegation response

See merge request isc-projects/bind9!604
2018-08-08 02:26:42 -04:00
Michał Kępień 7ef5192cae Add CHANGES entry
5006.	[cleanup]	Code preparing a delegation response was extracted from
			query_delegation() and query_zone_delegation() into a
			separate function in order to decrease code
			duplication. [GL #431]

(cherry picked from commit 1d9c37876b)
2018-08-08 08:09:30 +02:00
Michał Kępień fe526c3e57 Extract code preparing a delegation response to a separate function
Changes introduced by the previous two commits make the parts of
query_delegation() and query_zone_delegation() which prepare a
delegation response functionally equivalent.  Extract this code into a
separate function, query_prepare_delegation_response(), and then call
the latter from both query_delegation() and query_zone_delegation() in
order to reduce code duplication.  Add a comment describing the purpose
of the extracted code.  Fix coding style issues.

(cherry picked from commit 8e3fc5725f)
2018-08-08 08:09:30 +02:00
Michał Kępień 252b154371 Remove unused NS_QUERYATTR_CACHEGLUEOK query attribute
The NS_QUERYATTR_CACHEGLUEOK query attribute has no influence on query
processing.  Remove it.

(cherry picked from commit 7db4dedf6b)
2018-08-08 08:09:30 +02:00
Michał Kępień 7c58cbd31a Restore zone database and zone node if cache search results are to be ignored
When query processing hits a delegation from a locally configured zone,
an attempt may be made to look for a better answer in the cache.  In
such a case, the zone-sourced delegation data is set aside and the
lookup is retried using the cache database.  When that lookup is
completed, a decision is made whether the answer found in the cache is
better than the answer found in the zone.

Currently, if the zone-sourced answer turns out to be better than the
one found in the cache:

  - qctx->zdb is not restored into qctx->db,
  - qctx->node, holding the zone database node found, is not even saved.

Thus, in such a case both qctx->db and qctx->node will point at cache
data.  This is not an issue for BIND versions which do not support
mirror zones because in these versions non-recursive queries always
cause the zone-sourced delegation to be returned and thus the
non-recursive part of query_delegation() is never reached if the
delegation is coming from a zone.  With mirror zones, however,
non-recursive queries may cause cache lookups even after a zone
delegation is found.  Leaving qctx->db assigned to the cache database
when query_delegation() determines that the zone-sourced delegation is
the best answer to the client's query prevents DS records from being
added to delegations coming from mirror zones.  Fix this issue by
keeping the zone database and zone node in qctx while the cache is
searched for an answer and then restoring them into qctx->db and
qctx->node, respectively, if the zone-sourced delegation turns out to be
the best answer.  Since this change means that qctx->zdb cannot be used
as the glue database any more as it will be reset to NULL by RESTORE(),
ensure that qctx->db is not a cache database before attaching it to
qctx->client->query.gluedb.

If qctx->zdb is not NULL, qctx->zfname will also not be NULL;
qctx->zsigrdataset may be NULL in such a case, but query_putrdataset()
handles pointers to NULL pointers gracefully.  Remove redundant
conditional expressions to make the cleanup code in query_freedata()
match the corresponding sequences of SAVE() / RESTORE() macros more
closely.

(cherry picked from commit b6c77202cb)
2018-08-08 08:09:25 +02:00
Ondřej Surý 56ad915e63 Merge branch '440-root-zone-performance-regression-v9_12' into 'v9_12'
Resolve "Root zone performance regression since 9.12.2rc2 and 9.13.1"

See merge request isc-projects/bind9!598
2018-08-06 10:25:44 -04:00
Ondřej Surý d96765377c Update ARM on the default ordering
(cherry picked from commit 9e11b54bbc)
2018-08-06 13:03:28 +02:00
Ondřej Surý c9094cd8e8 Define and use new DNS_RDATASET_COUNT_UNDEFINED equals ISC_UINT32_MAX to make the code more readable
(cherry picked from commit e80c26b22e)
2018-08-06 13:03:28 +02:00
Ondřej Surý ad09426b99 Modify the rrsetorder test to cope with the rrset order randomization (only four orders are now possible)
(cherry picked from commit afddc2781e)
2018-08-06 13:03:28 +02:00
Ondřej Surý f74ee45e5e Refactor code around random/cyclic/fixed to reduce code duplication
(cherry picked from commit 41a68425ea)
2018-08-06 13:03:28 +02:00
Mark AndrewsandOndřej Surý bf7db87d52 Only get one random number per response when order == random
(cherry picked from commit f7986c8d1a)
2018-08-06 13:03:28 +02:00
Ondřej Surý 8ecc87df6e Merge branch '543-revert-!553-v9.12' into 'v9_12'
Revert "Use make automatic variables to install updated manuals"

See merge request isc-projects/bind9!599
2018-08-06 06:59:49 -04:00
Ondřej Surý e552ea1275 Revert "Use make automatic variables to install updated manuals"
This reverts commit 85deed805b.
2018-08-06 12:51:07 +02:00
Mark Andrews 45d453b043 Merge branch 'remove-dead-code-v9_12' into 'v9_12'
Remove dead code

See merge request isc-projects/bind9!596
2018-08-02 19:58:53 -04:00
Mark Andrews 70d39a86ed remove dead code
(cherry picked from commit 83a1e87dd2)
2018-08-03 09:50:25 +10:00
Mark Andrews c46bc5cfd5 Merge branch '442-dnssec-verify-fails-on-case-sensitivity-of-owner-names-in-nsec-bitmap-v9_12' into 'v9_12'
Resolve "dnssec-verify fails on case-sensitivity of owner names in NSEC bitmap"

See merge request isc-projects/bind9!594
2018-08-02 18:59:47 -04:00
Mark Andrews 65b017829e add CHANGES
(cherry picked from commit 49cd3aac9c)
2018-08-03 08:50:59 +10:00
Mark Andrews 092b739535 only check the bit map
(cherry picked from commit a94db46631)
2018-08-03 08:50:56 +10:00
Mark Andrews f9af68d442 Merge branch '439-the-signed-instance-of-a-in-line-zone-should-be-treated-as-dynamic-v9_12' into 'v9_12'
Resolve "The signed instance of a in-line zone should be treated as dynamic."

See merge request isc-projects/bind9!585
2018-08-02 00:39:04 -04:00
Mark Andrews 9d26a11c6f add CHANGES
(cherry picked from commit d6d9fd1c71)
2018-08-02 14:27:21 +10:00
Mark Andrews 6382cc61ed treat the signed instance of a inline zone as dynamic
(cherry picked from commit 9130f055f4)
2018-08-02 14:27:21 +10:00
Mark Andrews 3f12f4d4ec turn off ixfr-from-differences on signed instance of in-line zone
(cherry picked from commit cfccd8d246)
2018-08-02 14:27:21 +10:00
Mark Andrews 252aa79fe4 rename zone to mayberaw
(cherry picked from commit 3ea9861e7a)
2018-08-02 14:27:20 +10:00
Mark Andrews 2f64e4e11e Merge branch '453-master-build-broken-in-documentation-tree-v9_12' into 'v9_12'
add /opt/local/share/xsl/docbook-xsl-nons to the places to look for manpages/docbook.xsl under macports

See merge request isc-projects/bind9!583
2018-08-02 00:18:33 -04:00
Mark Andrews 06dcf1ac31 add /opt/local/share/xsl/docbook-xsl-nons to the places to look for manpages/docbook.xsl under macports
(cherry picked from commit 7425252207)
2018-08-02 14:09:09 +10:00
Mark Andrews d5aa5eeb4d Merge branch '359-question-about-using-hashtable-size-log-messages-for-rpzs-v9_12' into 'v9_12'
Resolve "Question about 'using hashtable size' log messages for RPZs"

See merge request isc-projects/bind9!582
2018-08-01 23:59:05 -04:00
Mark Andrews bcbe414861 lower log level to debug(1)
(cherry picked from commit 12d45c5cd1)
2018-08-01 23:25:58 -04:00
Mark Andrews 3f32afeff9 Merge branch '424-nsupdate-tests-fail-intermittently-v9_12' into 'v9_12'
Resolve "nsupdate tests fail intermittently"

See merge request isc-projects/bind9!580
2018-08-01 23:25:36 -04:00
Mark Andrews eb506cf14e use guard values for testing unixtime serial
(cherry picked from commit abe41ba011)
2018-08-02 11:29:04 +10:00
Mark Andrews 8e12e6f7ce save SOA values
(cherry picked from commit 6b30bc73c0)
2018-08-02 11:29:04 +10:00
Mark Andrews 4935fde60c Merge branch '406-dns_acl_isinsecure-does-not-handle-geoip-elements-v9_12' into 'v9_12'
Resolve "dns_acl_isinsecure does not handle geoip elements."

See merge request isc-projects/bind9!578
2018-08-01 20:03:33 -04:00
Mark Andrews 3447493505 add CHANGES note
(cherry picked from commit b0b76d259f)
2018-08-02 09:55:13 +10:00
Mark Andrews 56e7e43230 handle dns_aclelementtype_geoip
(cherry picked from commit 57eadf4d4f)
2018-08-02 09:55:13 +10:00
Mark Andrews 6ac1507f4f test dns_acl_isinsecure with geoip element
(cherry picked from commit fb8bb4e306)
2018-08-02 09:55:13 +10:00
Mark Andrews 5a6bda87ca Merge branch '410-missing-sanity-check-for-call-to-next_token-in-file-mdig-c-for-bind-9-12-1-p2-v9_12' into 'v9_12'
Resolve "Missing Sanity Check for call to next_token() in file 'mdig.c' for BIND 9.12.1-P2"

See merge request isc-projects/bind9!576
2018-08-01 19:51:14 -04:00
Mark Andrews 0a5d85df9f add CHANGES note
(cherry picked from commit 84f1d9a204)
2018-08-02 09:43:05 +10:00
Mark Andrews 3d40bc4e1a test mdig '+ednsopt=:' handling
(cherry picked from commit 2e688488f7)
2018-08-02 09:42:13 +10:00
Mark Andrews 3f7a651d3a fix handling of '+ednsopt=:'; support 100 ednsopts per query rather than 100 total
(cherry picked from commit d2943440a0)
2018-08-02 09:42:09 +10:00
Mark Andrews 8e3c67b345 Merge branch '372-smimea-and-tlsa-methods-incorrectly-use-txt-type-v9_12' into 'v9_12'
Resolve "smimea and tlsa methods incorrectly use txt type"

See merge request isc-projects/bind9!574
2018-08-01 19:01:28 -04:00
Mark Andrews 06bfd671b5 use tlsa and smime structs to set common values
(cherry picked from commit 63c9ec367f)
2018-08-02 08:52:17 +10:00
Ondřej Surý 40027d3035 Merge branch '443-isc_buffer_printf-fixes-v9_12' into 'v9_12'
Resolve "isc_buffer_printf() grows buffer without autorealloc being set + nit in isc_buffer_realloc()"

See merge request isc-projects/bind9!569
2018-08-01 02:51:10 -04:00
Ondřej Surý 38a6d1d44d Change isc_buffer_reallocate() into a static functions as it is not used outside of isc_buffer_reserve()
(cherry picked from commit 20faf4652a)
2018-08-01 08:41:25 +02:00
Ondřej Surý 56117f9799 Remove illogical condition from isc_buffer_reallocate that would return ISC_R_NOSPACE when requested size is less than available size
(cherry picked from commit 7785f644c3)
2018-08-01 08:41:25 +02:00
Ondřej Surý 7d2c0859d5 Forbid isc_buffer_printf from growing the buffer unless auto reallocation is enabled
(cherry picked from commit 519bfe4c97)
2018-08-01 08:41:25 +02:00
Mark Andrews 0cdac350e0 Merge branch 'modified-manual-install-oot-v9_12' into 'v9_12'
Use make automatic variables to install correct manual version.

See merge request isc-projects/bind9!567
2018-08-01 02:29:56 -04:00
Petr MenšíkandMark Andrews 85deed805b Use make automatic variables to install updated manuals
Make will choose modified manual from build directory or original from source
directory automagically. Take advantage of install tool feature.
Install all files in single command instead of iterating on each of them.

(cherry picked from commit 88f913ac81)
2018-08-01 16:22:01 +10:00
Mark Andrews fada7a9583 Merge branch 'misc-onerror-refcount-fixes-v9_12' into 'v9_12'
refcount errors on error paths

See merge request isc-projects/bind9!564
2018-07-31 16:18:02 -04:00
Mark Andrews a43f28064b add CHANGES
(cherry picked from commit 63aaff50df)
2018-07-31 18:42:39 +10:00
Mark Andrews 3a06cea708 refcount errors on error paths
(cherry picked from commit 4093efc900)
2018-07-31 18:42:38 +10:00
Evan Hunt 7d0050f4f3 Merge branch '441-ns_server_servestale-can-leave-the-server-in-exclusive-mode-on-error-v9_12' into 'v9_12'
Resolve "ns_server_servestale can leave the server in exclusive mode on error."

See merge request isc-projects/bind9!558
2018-07-27 02:10:00 -04:00
Mark AndrewsandEvan Hunt ab5c03c507 named_server_servestale could leave the server in exclusive mode if a error occurs.
(cherry picked from commit c8b07932e4)
2018-07-26 22:58:03 -07:00
Michał Kępień a9de81dc1e Merge branch '423-fix-handling-of-tat-sending-failures-v9_12' into 'v9_12'
[v9_12] Fix handling of TAT sending failures

See merge request isc-projects/bind9!541
2018-07-19 12:15:22 -04:00
Michał Kępień f4b403e8b2 Fix handling of TAT sending failures
dns_view_zonecut() may associate the dns_rdataset_t structure passed to
it even if it returns a result different then ISC_R_SUCCESS.  Not
handling this properly may cause a reference leak.  Fix by ensuring
'nameservers' is cleaned up in all relevant failure modes.

(cherry picked from commit 8666f8d28f)
2018-07-19 18:04:01 +02:00
Michał Kępień 78965b3dcc Merge branch '419-do-not-replace-lo0-address-on-solaris-v9_12' into 'v9_12'
[v9_12] Do not replace lo0 address on Solaris

See merge request isc-projects/bind9!537
2018-07-17 02:28:37 -04:00
Michał Kępień f8ff854888 Do not replace lo0 address on Solaris
lo0 and lo0:0 are the same interface on Solaris.  Make sure
bin/tests/system/ifconfig.sh does not touch lo0:0 in order to prevent it
from changing the address of the loopback interface on Solaris.

(cherry picked from commit 618921902a)
2018-07-17 08:19:58 +02:00
Michał Kępień e050792f13 Merge branch '365-add-centos-to-ci-v9_12' into 'v9_12'
[v9_12] Add CentOS/RHEL 6 to GitLab CI

See merge request isc-projects/bind9!532
2018-07-13 06:25:52 -04:00
Michał Kępień de00137f42 Add CentOS 6/7 to CI
Modify .gitlab-ci.yml so that every CI pipeline also builds and tests
BIND on CentOS versions 6 and 7.  Use --disable-warn-error on CentOS 6
since it uses GCC 4.4.7 which suffers from bugs causing bogus warnings
to be generated, e.g.:

    sigs_test.c: In function 'compare_tuples':
    sigs_test.c:75: warning: declaration of 'index' shadows a global declaration
    /usr/include/string.h:489: warning: shadowed declaration is here
    sigs_test.c: In function 'updatesigs_test':
    sigs_test.c:193: warning: declaration of 'index' shadows a global declaration
    /usr/include/string.h:489: warning: shadowed declaration is here

(cherry picked from commit f0966d1485)
2018-07-13 12:14:46 +02:00
Michał Kępień e56a528c70 Do not spam console if "git status --ignored" fails during tests
The "git status" command in Git versions before 1.7.2 does not support
the "--ignored" option.  Prevent spamming the console when running
system tests from a Git repository on a host with an ancient Git version
installed.

(cherry picked from commit 2be97feb46)
2018-07-13 12:14:46 +02:00
Michał Kępień 106b56d7c9 Remove IDN subtest from the "digdelv" system test
The output of certain "dig +idnout" invocations may be locale-dependent.
Remove the "dig +idnout" subtest from the "digdelv" system test as IDN
support is already thoroughly tested by the "idna" system test.

(cherry picked from commit fd30a03f2b)
2018-07-13 12:14:46 +02:00
Michał Kępień 7fe0f00a3b Improve error handling in idn_ace_to_locale()
While idn2_to_unicode_8zlz() takes a 'flags' argument, it is ignored and
thus cannot be used to perform IDN checks on the output string.

The bug in libidn2 versions before 2.0.5 was not that a call to
idn2_to_unicode_8zlz() with certain flags set did not cause IDN checks
to be performed.  The bug was that idn2_to_unicode_8zlz() did not check
whether a conversion can be performed between UTF-8 and the current
locale's character encoding.  In other words, with libidn2 version
2.0.5+, if the current locale's character encoding is ASCII, then
idn2_to_unicode_8zlz() will fail when it is passed any Punycode string
which decodes to a non-ASCII string, even if it is a valid IDNA2008
name.

Rework idn_ace_to_locale() so that invalid IDNA2008 names are properly
and consistently detected for all libidn2 versions and locales.

Update the "idna" system test accordingly.  Add checks for processing a
server response containing Punycode which decodes to an invalid IDNA2008
name.  Fix invalid subtest description.

(cherry picked from commit b896fc4972)
2018-07-13 12:14:14 +02:00
Michał Kępień 4c7eea4437 Include conf.sh from all prereq.sh scripts
Every prereq.sh script must include bin/tests/system/conf.sh, otherwise
if some prerequisite is not met, errors about echo_i not being found
will be printed instead of actual error messages.

(cherry picked from commit cc0e8cda71)
2018-07-13 08:23:15 +02:00
Michał Kępień 0561d6bb0c Update ATF path in the ./configure invocation used during CI
The Docker images used for CI install ATF to /usr, not /usr/local.
Update the ./configure invocation in .gitlab-ci.yml accordingly in order
to prevent confusion.

(cherry picked from commit 12df6829d1)
2018-07-13 08:23:09 +02:00
Michał Kępień 82b03e949f Add "-f" to command line arguments for autoreconf in autogen.sh
Depending on tool versions being used, "autoreconf -i" may not update
all Autoconf-generated files, which in turn may result in build errors.
Make autogen.sh call autoreconf with the "-f" command line argument to
ensure all Autoconf-generated files are updated when autogen.sh is run.

(cherry picked from commit 45e77a3680)
2018-07-13 08:23:03 +02:00
Ondřej Surý 12772c743e Merge branch 'fix-last-USE_ENGINE-usage-v9_12' into 'v9_12'
Replace the last missed usage of USE_ENGINE with OPENSSL_NO_ENGINE

See merge request isc-projects/bind9!529
2018-07-12 06:45:29 -04:00
Ondřej Surý 0b93c77024 Replace the last missed usage of USE_ENGINE with OPENSSL_NO_ENGINE 2018-07-12 06:33:54 -04:00
Mark Andrews bac8cab38d Merge branch '373-generic_tostruct_tlsa-incorrectly-initialises-common-structure-v9_12' into 'v9_12'
Resolve "generic_tostruct_tlsa incorrectly initialises common structure."

See merge request isc-projects/bind9!525
2018-07-11 19:54:43 -04:00
Mark Andrews 26a2ab4152 remove re-initalisation of common structure
(cherry picked from commit 6e06d3e7c6)
2018-07-12 09:48:03 +10:00
Evan Hunt c677a1a987 Merge branch '403-missing-sanity-check-for-call-to-next_token-in-file-dig-c-v9_12' into 'v9_12'
Resolve "Missing Sanity Check for call to next_token() in file 'dig.c'"

See merge request isc-projects/bind9!523
2018-07-11 15:06:26 -04:00
Evan Hunt 6fc6b3ab69 CHANGES
(cherry picked from commit 8ae1774089)
2018-07-11 11:58:52 -07:00
Mark AndrewsandEvan Hunt 9f126bac32 add test for bad dig option '+ednsopt=:' being handled gracefully
(cherry picked from commit ad86878d61)
2018-07-11 11:58:52 -07:00
Bill ParkerandEvan Hunt 62d047658a check code is non NULL
(cherry picked from commit 408bcf9c07)
2018-07-11 11:58:49 -07:00
Evan Hunt f6fce682c9 Merge branch '235-enhance-denied-logging-for-dynamic-updates-v9_12' into 'v9_12'
Add tcp-self policy tests.

See merge request isc-projects/bind9!521
2018-07-11 14:15:31 -04:00
Mukund SivaramanandEvan Hunt d54a38d733 Add system tests for "tcp-self" update-policy
(cherry picked from commit a7e6a584ea)
2018-07-11 11:05:37 -07:00
Michał Kępień 73f653c243 Merge branch '392-send-upstream-tat-queries-for-locally-served-zones-v9_12' into 'v9_12'
[v9_12] Trust anchor telemetry queries are not sent for locally served zones

See merge request isc-projects/bind9!516
2018-07-11 03:15:47 -04:00
Michał Kępień e54cddc0c1 Add CHANGES entry
4994.	[bug]		Trust anchor telemetry queries were not being sent
			upstream for locally served zones. [GL #392]

(cherry picked from commit a64750e428)
2018-07-11 08:59:29 +02:00
Michał Kępień 873c091408 Send upstream TAT queries for locally served zones
Trying to resolve a trust anchor telemetry query for a locally served
zone does not cause upstream queries to be sent as the response is
determined just by consulting local data.  Work around this issue by
calling dns_view_findzonecut() first in order to determine the NS RRset
for a given domain name and then passing the zone cut found to
dns_resolver_createfetch().

Note that this change only applies to TAT queries generated by the
resolver itself, not to ones received from downstream resolvers.

(cherry picked from commit a7657dc150)
2018-07-11 08:59:29 +02:00
Michał Kępień 2e7dd0d61f Extract TAT QNAME preparation to a separate function
Extract the part of dotat() reponsible for preparing the QNAME for a TAT
query to a separate function in order to limit the number of local
variables used by each function and improve code readability.

Rename 'name' to 'origin' to better convey the purpose of that variable.
Also mark it with the const qualifier.

(cherry picked from commit 127810e512)
2018-07-11 08:59:29 +02:00
Ondřej Surý ec786f42bd Merge branch 'pkcs11-missing-gitignore-v9_12' into 'v9_12'
PKCS#11 build missing some .gitignore files and ignore .gitignore files

See merge request isc-projects/bind9!514
2018-07-11 02:19:58 -04:00
Ondřej Surý 8a143b1582 Don't check copyrights on .gitignore files
(cherry picked from commit 718c527e1d)
2018-07-11 08:12:48 +02:00
Ondřej Surý bbd82796bd Add .gitignore for PKCS#11 test files
(cherry picked from commit 96907d636d)
2018-07-11 08:11:21 +02:00
Evan Hunt 363dee7e0c Merge branch 'git-replay-merge-no-push-option-v9_12' into 'v9_12'
Add --no-push and --push options and DONT_PUSH environment variable

See merge request isc-projects/bind9!510
2018-07-11 00:03:55 -04:00
Evan Hunt 458f273444 fixed an argument counting bug 2018-07-10 20:59:49 -07:00
Ondřej SurýandEvan Hunt e50988255c Add --no-push and --push options and DONT_PUSH environment as default to control what happens after merge
(cherry picked from commit 23f69e5626)
2018-07-10 20:58:19 -07:00
Evan Hunt c87c42acb5 Merge branch 'ci-check-libs' into 'v9_12'
check correctness of win32 .def files in CI 'precheck' step

See merge request isc-projects/bind9!505
2018-07-10 23:38:24 -04:00
Evan Hunt f74fc06ede add checklibs to precheck CI step 2018-07-10 20:31:21 -07:00
Evan Hunt 4e657c1430 Merge branch 'remove-redundant-test-v9_12' into 'v9_12'
remove redundant test

See merge request isc-projects/bind9!502
2018-07-10 22:11:45 -04:00
Mark AndrewsandEvan Hunt 85d7298387 remove redundant test
(cherry picked from commit 6eec7fe092)
2018-07-10 19:05:01 -07:00
Evan Hunt 70c7e02c53 Merge branch '379-trust-anchor-telemetry-log-should-include-client-ip-address-v9_12' into 'v9_12'
Resolve "trust anchor telemetry log should include client IP address"

See merge request isc-projects/bind9!500
2018-07-10 21:36:37 -04:00
Mark AndrewsandEvan Hunt 0f180d976a add CHANGES note 2018-07-10 18:29:13 -07:00
Mark AndrewsandEvan Hunt d1539d991a fix spelling of 'telemetry'
(cherry picked from commit 4f18b6a09a)
2018-07-10 18:28:51 -07:00
Mark AndrewsandEvan Hunt 0ed6214375 use extracted netaddr rather than client->destaddr
(cherry picked from commit 69fd3f5ba4)
2018-07-10 18:28:50 -07:00
Evan Hunt e42ec0531b Merge branch '378-run-xmllint-on-xml-and-docbook-in-precheck-v9_12' into 'v9_12'
Check correctness of *.xml, *.docbook, and *.html during precheck

See merge request isc-projects/bind9!498
2018-07-10 20:57:27 -04:00
Mark AndrewsandEvan Hunt 01003dd321 Resolve "run xmllint on *.xml and *.docbook in precheck"
(cherry picked from commit bb1937aaec)
2018-07-10 17:50:06 -07:00
Evan Hunt ed12266e64 Merge branch '401-null-pointer-de-reference-found-in-bind-9-12-1-p2-v9_12' into 'v9_12'
Resolve "NULL Pointer de-reference found in BIND 9.12.1-P2"

See merge request isc-projects/bind9!495
2018-07-10 17:45:24 -04:00
Evan Hunt ed3febd737 CHANGES 2018-07-10 14:38:45 -07:00
Bill ParkerandEvan Hunt 05669a987a check param_template[i].pValue is non NULL
(cherry picked from commit 8ac0152651)
2018-07-10 14:38:23 -07:00
Michał Kępień 8195ee7ac5 Merge branch '399-do-not-use-net-dns-nameserver-in-the-serve-stale-system-test-v9_12' into 'v9_12'
[v9_12] Do not use Net::DNS::Nameserver in the "serve-stale" system test

See merge request isc-projects/bind9!494
2018-07-10 09:22:25 -04:00
Michał Kępień 77929046ec Do not use Net::DNS::Nameserver in the "serve-stale" system test
Net::DNS versions older than 0.67 respond to queries sent to a
Net::DNS::Nameserver even if its ReplyHandler returns undef.  This makes
the "serve-stale" system test fail as it takes advantage of the newer
behavior.  Since the latest Net::DNS version available with stock
RHEL/CentOS 6 packages is 0.65 and we officially support that operating
system, bin/tests/system/serve-stale/ans2/ans.pl should behave
consistently for various Net::DNS versions.  Ensure that by reworking it
so that it does not use Net::DNS::Nameserver.

(cherry picked from commit c4209418a5)
2018-07-10 15:15:18 +02:00
Michał Kępień a20495b8bf Merge branch '393-fix-a-net-dns-version-quirk-in-the-resolver-system-test-v9_12' into 'v9_12'
[v9_12] Fix a Net::DNS version quirk in the "resolver" system test

See merge request isc-projects/bind9!492
2018-07-10 09:14:41 -04:00
Michał Kępień 655dccf4ea Fix a Net::DNS version quirk in the "resolver" system test
Net::DNS versions older than 0.68 insert a ./ANY RR into the QUESTION
section if the latter is empty.  Since the latest Net::DNS version
available with stock RHEL/CentOS 6 packages is 0.65 and we officially
support that operating system, bin/tests/system/resolver/ans8/ans.pl
should behave consistently for various Net::DNS versions.  Ensure that
by making handleUDP() return the query ID and flags generated by
Net::DNS with 8 zero bytes appended.

(cherry picked from commit 6c3c6aea37)
2018-07-10 15:07:38 +02:00
Witold Krecicki df69b89f21 Merge branch 'fix-synth-from-dnssec-dname-handling-v9_12' into 'v9_12'
Don't synthesize NXDOMAIN from NSEC for records under a DNAME.

See merge request isc-projects/bind9!491
2018-07-10 04:04:29 -04:00
Mark AndrewsandWitold Kręcicki 687ca4412a the presence of a DNAME record proves that the name does not exist in the zone but as we don't want to use that for NXDMOMAIN return DNS_R_DNAME from dns_nsec_noexistnodata
(cherry picked from commit 8ef23f9fb0)
2018-07-10 09:50:35 +02:00
Witold Kręcicki e263fe91c0 Don't synthesize NXDOMAIN from NSEC for records under a DNAME
(cherry picked from commit 7f60bb39df)
2018-07-10 09:50:30 +02:00
Mark Andrews 8561c61013 Merge branch '402-memory-leak-found-in-file-fuzz-c-in-bind-9-12-1-p2-v9_12' into 'v9_12'
Resolve "Memory Leak found in file 'fuzz.c' in BIND-9.12.1-P2"

See merge request isc-projects/bind9!489
2018-07-10 01:14:12 -04:00
Mark Andrews 22327b4cdf free rbuf
(cherry picked from commit ecb2f20324)
2018-07-10 14:37:52 +10:00
Evan Hunt 3631aeb070 Merge branch 'prep-release-v9_12_2' into 'v9_12'
prep 9.12.2

See merge request isc-projects/bind9!472
2018-07-03 03:08:14 -04:00
Tinderbox User 355c8f0e55 prep 9.12.2 2018-07-03 06:57:10 +00:00
Evan Hunt 3a84d617bf Merge branch 'fix-readme-v9_12' into 'v9_12'
Fix README

See merge request isc-projects/bind9!465
2018-07-02 20:23:13 -04:00
Evan Hunt ec9e85260f fix version ordering 2018-07-02 17:19:05 -07:00
Evan Hunt 56cf466766 Merge branch 'prep-release-v9_12_2rc2' into 'v9_12'
prep 9.12.2rc2

See merge request isc-projects/bind9!450
2018-06-28 00:55:59 -04:00
Tinderbox User bbf35634c0 prep 9.12.2rc2 2018-06-28 04:42:37 +00:00
Evan Hunt 17b51354f1 Merge branch '339-issues-with-large-journal-entries-v9_12' into 'v9_12'
Fix handling of large journal entries.

See merge request isc-projects/bind9!444
2018-06-27 21:33:46 -04:00
Evan Hunt ded4119b36 CHANGES, release note
(cherry picked from commit 2aee33f412)
2018-06-27 18:26:53 -07:00
Witold KręcickiandEvan Hunt cbb73df1f9 Fallback to normal procedure if creating of ixfr-from-differences fails
(cherry picked from commit b1254430df)
2018-06-27 18:25:14 -07:00
Witold KręcickiandEvan Hunt 1a5cba631e Fix some issues with large journal entries
(cherry picked from commit 0db7130f2b)
2018-06-27 18:25:13 -07:00
Mark Andrews cebcdadad1 Merge branch '366-missing-dereference-in-require-statement-v9_12' into 'v9_12'
Resolve "Missing dereference in REQUIRE statement?"

See merge request isc-projects/bind9!440
2018-06-27 03:43:57 -04:00
Mark Andrews df6951a2bb cfg_parse_boolean's REQUIRE test for ret was incomplete.
(cherry picked from commit f1ee5e4a16)
2018-06-27 17:37:00 +10:00
Evan Hunt 89f7c7230d Merge branch '275-add-permanent-option-to-disable-server-side-cookies-v9_12' into 'v9_12'
[v9_12]: Resolve "Provide a mechanism (build or runtime) to turn off server-side support for RFC7873"

See merge request isc-projects/bind9!415
2018-06-26 18:23:39 -04:00
Ondřej SurýandEvan Hunt a7c5fad628 Un-deprecate the answer-cookie option 2018-06-26 15:16:40 -07:00
Evan Hunt 41e2423d37 Merge branch '260-queries-with-empty-question-section-return-noerror-v9_12' into 'v9_12'
Resolve "Queries with empty question section (and otherwise query message of undetermined RDCLASS) return NOERROR instead of FORMERR"

See merge request isc-projects/bind9!435
2018-06-26 17:43:09 -04:00
Evan Hunt 07a0638c94 CHANGES
(cherry picked from commit 2b075c2881)
2018-06-26 14:36:36 -07:00
Mukund SivaramanandEvan Hunt ed29b84e16 return FORMERR when question section is empty if COOKIE is not present
(cherry picked from commit 06d3106002)
2018-06-26 14:36:34 -07:00
Ondřej Surý fbd85297eb Merge branch 'add-git-replay-merge-v9_12' into 'v9_12'
Add git replay merge to v9_12

See merge request isc-projects/bind9!429
2018-06-26 15:19:37 -04:00
Ondřej Surý 65144c4bf7 Add git-replay-merge.sh script to v9_12 2018-06-26 20:29:07 +02:00
Witold Krecicki 0d2172eeba Merge branch '180-fix-cmsgbuf-usage-v9_12' into 'v9_12'
Resolve "Intermittent recursive resolver issues [socket.c:2135]"

See merge request isc-projects/bind9!427
2018-06-26 14:25:39 -04:00
Witold Kręcicki 4007a9d020 Use completely static-sized buffers
(cherry picked from commit 49f90025a0)
2018-06-26 20:18:59 +02:00
Witold Kręcicki da63e95612 Fix socket cmsg buffer usage
(cherry picked from commit d79be7dd5e)
2018-06-26 20:12:58 +02:00
Evan Hunt 9e85d16004 Merge branch '288-named-checkconf-does-not-recognize-errors-related-to-in-view-zones-v9_12' into 'v9_12'
Resolve "named-checkconf does not recognize errors related to in-view zones"

See merge request isc-projects/bind9!423
2018-06-26 12:53:55 -04:00
Mark AndrewsandEvan Hunt 7f31e67c16 CHANGES, copyright
(cherry picked from commit f7d346357e)
2018-06-26 09:04:48 -07:00
Mark AndrewsandEvan Hunt 665f9093d2 construct a symtab of valid in-view targets then check that the target exists
(cherry picked from commit e01a4bcb20)
2018-06-26 09:03:47 -07:00
Michał Kępień 7d993ffb0b Merge branch '321-only-request-permitted-capabilities-in-non-libcap-builds-v9_12' into 'v9_12'
[v9_12] Only request permitted capabilities in non-libcap builds

See merge request isc-projects/bind9!417
2018-06-26 08:03:26 -04:00
Michał Kępień 731b003854 Add CHANGES entry
4979.	[bug]		Non-libcap builds were not checking whether all
			requested capabilities are present in the permitted
			capability set. [GL #321]
2018-06-26 13:18:00 +02:00
Michał Kępień 8c66f32e53 Only request permitted capabilities in non-libcap builds
While libcap-enabled builds check whether any capability named requests
is within the permitted capability set, non-libcap builds just try
requesting them, which potentially causes a misleading error message to
be output ("Operation not permitted: please ensure that the capset
kernel module is loaded").  Ensure non-libcap builds also check whether
any requested capability is within the permitted capability set.
2018-06-26 13:18:00 +02:00
Michał Kępień b7200143f4 Merge branch '312-fix-rpz-system-test-v9_12' into 'v9_12'
[v9_12] Fix rpz system test

See merge request isc-projects/bind9!416
2018-06-26 06:52:06 -04:00
Michał Kępień 80e8f4c366 Add CHANGES entry
4978.	[test]		Fix error handling and resolver configuration in the
			"rpz" system test. [GL #312]

(cherry picked from commit 51522a2b84)
2018-06-26 12:43:47 +02:00
Michał Kępień 6a2c606690 Do not use IANA DNSSEC keys in the "rpz" system test
With "dnssec-validation" now defaulting to "auto", it needs to be
explicitly set to "yes" (the previous default value) for all validating
resolvers used in system tests.  Ensure that requirement is satisfied by
the resolvers used in the "rpz" system test.

(cherry picked from commit ff6b717955)
2018-06-26 12:43:47 +02:00
Michał Kępień cee0c23d0a Determine "rpz" system test mode based on $mode rather than $DNSRPS_TEST_MODE
Change 4897 modified the way the $DNSRPS_TEST_MODE variable is used in
bin/tests/system/rpz/tests.sh without updating all references to it,
which i.a. causes the $native and $dnsrps variables to not be set in the
default testing mode, effectively preventing failed checks from being
propagated to the final result of the test.  Use $mode instead of
$DNSRPS_TEST_MODE where appropriate to fix error handling in the "rpz"
system test.

(cherry picked from commit 730c6651a0)
2018-06-26 12:43:47 +02:00
Evan Hunt 90e762a1cf Merge branch '247-log-the-remaining-v-info-at-startup' into 'v9_12'
Resolve "Log the remaining -V info at startup"

Closes #247

See merge request isc-projects/bind9!249
2018-06-25 15:02:33 -07:00
Mark AndrewsandEvan Hunt 74bfd11a5f log the remaining -V info at startup
(cherry picked from commit 33ff03db58)
2018-06-25 15:02:31 -07:00
Mark Andrews 9eb2ff6367 Merge branch '254-invalid-rpz-prefix-length-log-message-improperly-displays-the-prefix-labels-not-length-v9_12' into 'v9_12'
Resolve ""invalid RPZ prefix length" log message improperly displays the prefix labels, not length"

See merge request isc-projects/bind9!408
2018-06-25 03:39:54 -04:00
Mukund SivaramanandMark Andrews a769e80796 Add CHANGES entry
(cherry picked from commit 90e886cfc0)
2018-06-25 17:33:15 +10:00
Mukund SivaramanandMark Andrews 19bad5a7f3 Add system test
(cherry picked from commit 2bf388a31b)
2018-06-25 17:33:15 +10:00
Mukund SivaramanandMark Andrews 82d5a44dfd Patch in trailing nul character to print just the length label (for various cases below)
(cherry picked from commit 6a756ab654)
2018-06-25 17:33:15 +10:00
Mark Andrews e9f7ef733d Merge branch '343-casecompare-of-ninfo-tkey-txt-have-wrong-return-type-v9_12' into 'v9_12'
Resolve "casecompare of NINFO, TKEY, TXT have wrong return type"

See merge request isc-projects/bind9!404
2018-06-24 23:19:40 -04:00
Mark Andrews 537e3a0a14 fix casecompare return type for ninfo, tkey, txt
(cherry picked from commit 3ba1d1e43b)
2018-06-25 13:08:47 +10:00
Mark Andrews 393b974ed3 Merge branch '356-client-cookie-is-being-hashed-twice-when-computing-the-dns-server-cookie-v9_12' into 'v9_12'
Resolve "Client cookie is being hashed twice when computing the DNS server cookie."

See merge request isc-projects/bind9!401
2018-06-22 03:51:53 -04:00
Mark Andrews cd1169b605 4975. [bug] The server cookie computation for sha1 and sha256 did
not match the method described in RFC 7873. [GL #356]

(cherry picked from commit 8755a249bc)
2018-06-22 17:45:02 +10:00
Mark Andrews 77496f0b88 the client cookie was being hashed twice when computing the server cookie for sha1 and sha256
(cherry picked from commit 4795f0ca89)
2018-06-22 17:45:02 +10:00
Ondřej Surý e1dc8b39d3 Merge branch 'release-v9_12_2rc1' into 'v9_12'
Merge 9.12.1rc1 release into v9_12

See merge request isc-projects/bind9!395
2018-06-21 13:13:13 -04:00
Evan HuntandOndřej Surý 87344e3493 prepare 9.12.1rc1 2018-06-21 18:46:32 +02:00
Mark Andrews e684a72f54 Merge branch '336-default-of-rrset-order-silently-changed-to-be-sorted-rather-than-random-v9_12' into 'v9_12'
Resolve "Default of rrset-order silently changed to be sorted (rather than random)"

See merge request isc-projects/bind9!387
2018-06-18 21:43:44 -04:00
Mark Andrews 4f332dc936 Restore default rrset-order to random.
(cherry picked from commit e8154b50d4)
2018-06-19 11:18:19 +10:00
Michał Kępień b4c0a99f22 Merge branch '341-constify-dns_rdata_tostruct-v9_12' into 'v9_12'
[v9_12] constify dns_rdata_tostruct

See merge request isc-projects/bind9!380
2018-06-15 03:34:48 -04:00
Mark AndrewsandMichał Kępień d4c55dae8e Declare the 'rdata' argument for dns_rdata_tostruct() to be const
(cherry picked from commit abb2fd1027)
2018-06-15 08:52:28 +02:00
Ondřej Surý d370125e67 Merge branch '309-fix-default-recursion-v9_12' into 'v9_12'
Resolve "Recursion improperly allowed by default"

See merge request isc-projects/bind9!373
2018-06-14 08:53:10 -04:00
Evan HuntandOndřej Surý be145bc8b6 add a regression test for default allow-recursion settings 2018-06-14 14:45:56 +02:00
Evan HuntandOndřej Surý be02bf6571 allow-recursion could incorrectly inherit from the default allow-query 2018-06-14 14:45:56 +02:00
Michał Kępień 22192a4566 Merge branch '298-fix-dname-handling-in-dnssec-tools-v9_12' into 'v9_12'
[v9_12] Fix DNAME handling in DNSSEC tools

See merge request isc-projects/bind9!363
2018-06-13 07:29:22 -04:00
Michał Kępień f9637ae0e5 Add CHANGES entry
4971.	[bug]		dnssec-signzone and dnssec-verify did not treat records
			below a DNAME as out-of-zone data. [GL #298]

(cherry picked from commit f467ba8e1f)
2018-06-13 12:57:47 +02:00
Mark AndrewsandMichał Kępień 899e56068e Pull out the saving of the zone cut into a separate function
(cherry picked from commit 7be900a98f)
2018-06-13 12:57:41 +02:00
Michał Kępień ff7015a0f8 Treat records below a DNAME as out-of-zone data
DNAME records indicate bottom of zone and thus no records below a DNAME
should be DNSSEC-signed or included in NSEC(3) chains.  Add a helper
function, has_dname(), for detecting DNAME records at a given node.
Prevent signing DNAME-obscured records.  Check that DNAME-obscured
records are not signed.

(cherry picked from commit 75c0d85fc4)
2018-06-13 12:57:03 +02:00
Michał Kępień f3b5550c2c Merge branch '284-unify-keyfile-to-configuration-conversions-in-system-tests-v9_12' into 'v9_12'
[v9_12] Unify keyfile-to-configuration conversions in system tests

See merge request isc-projects/bind9!360
2018-06-13 02:10:50 -04:00
Michał Kępień 2cad382552 Add helper variables in mkeys system test
The keyfile and key ID for the original managed key do not change
throughout the mkeys system test.  Keep them in helper variables to
prevent calling "cat" multiple times and improve code readability.

(cherry picked from commit 68f056b2a0)
2018-06-13 07:59:07 +02:00
Michał Kępień dce66f7635 Replace duplicated code snippet with calls to helper functions
Reduce code duplication by replacing a code snippet repeated throughout
system tests using "trusted-keys" and/or "managed-keys" configuration
sections with calls to keyfile_to_{managed,trusted}_keys() helper
functions.

(cherry picked from commit 120af964ce)
2018-06-13 07:58:39 +02:00
Michał Kępień 21d3658bcb Add helper functions for converting keyfile data into configuration sections
Add a set of helper functions for system test scripts which enable
converting key data from a set of keyfiles to either a "trusted-keys"
section or a "managed-keys" section suitable for including in a
resolver's configuration file.

(cherry picked from commit 2392b8bc7d)
2018-06-13 07:58:10 +02:00
Michał Kępień b5478f1281 Merge branch '269-refactor-zone-logging-functions-v9_12' into 'v9_12'
[v9_12] Refactor zone logging functions

See merge request isc-projects/bind9!357
2018-06-11 07:06:04 -04:00
Michał Kępień 056e8acc0e Add CHANGES entry
4969.	[cleanup]	Refactor zone logging functions. [GL #269]

(cherry picked from commit c8de677eae)
2018-06-11 12:50:11 +02:00
Michał Kępień b39edab59b Reimplement all zone logging functions using dns_zone_logv()
In order to decrease code duplication, express the logic contained in
all zone logging functions using dns_zone_logv() calls.

(cherry picked from commit 5c03cd339e)
2018-06-11 12:50:11 +02:00
Michał Kępień 75959cb369 Add dns_zone_logv()
Add a new libdns function, dns_zone_logv(), which takes a single va_list
argument rather than a variable number of arguments and can be used as a
base for implementing more specific zone logging functions.

(cherry picked from commit bb2dfb3f49)
2018-06-11 12:50:11 +02:00
Evan Hunt 1df48d82d2 Merge branch 'fix-strtok' into v9_12 2018-06-09 23:04:00 -07:00
Evan Hunt 74c3b9d3b2 complete strtok fix 2018-06-09 23:03:38 -07:00
Evan Hunt 545b5d1f58 Merge branch 'fix-strtok' into v9_12 2018-06-09 22:31:41 -07:00
Evan Hunt 1734f1b3b9 use strtok() instead of strtok_r() in command line processing 2018-06-09 22:29:31 -07:00
Evan Hunt 3c12722080 Merge branch '293-cleanup-radix' into v9_12 2018-06-08 12:10:50 -07:00
Evan Hunt f7f20b1202 improve readability of radix code
- use RADIX_V4, RADIX_V6, RADIX_V4_ECS, and RADIX_V6_ECS as array
  indices instead of 0 through 3.
- remove some unused macros
2018-06-08 11:55:53 -07:00
Evan Hunt f11181c255 Merge branch 'validate-glue-v9_12' into 'v9_12'
ensure that we attempt to validate glue if it's signed

See merge request isc-projects/bind9!300
2018-06-08 11:50:03 -07:00
Evan Hunt 4afe50f546 CHANGES
(cherry picked from commit bde9c2ec39)
2018-06-08 11:50:00 -07:00
Evan Hunt 86787d0ad1 ensure that we attempt to validate glue if it's signed
- incidentally fixed a bug in the dnssec system test where TTLs in the
  answer section rather than the additional section were being checked

(cherry picked from commit 8d923a05a9)
2018-06-08 11:49:34 -07:00
Mark Andrews 701548eaad Merge branch '325-add-cfg_parse_buffer4-v9_12' into 'v9_12'
Resolve "add cfg_parse_buffer4"

Closes #325

See merge request isc-projects/bind9!353
2018-06-08 17:40:17 +10:00
Mark Andrews 323a2edfc2 add cfg_parse_buffer4
(cherry picked from commit b313084af2)
2018-06-08 17:40:16 +10:00
Mark Andrews 4976d24bcb Merge branch '173-option-to-disable-responding-with-cookies-isc-support-12614' into 'v9_12'
Resolve "option to disable responding with cookies [ISC-Support #12614]"

See merge request isc-projects/bind9!154
2018-06-08 02:51:21 -04:00
Mark Andrews 5f7a6232d6 add CHANGES and release notes 2018-06-08 16:44:42 +10:00
Mukund SivaramanandMark Andrews b5265a8cfa Update ARM documentation 2018-06-08 16:37:38 +10:00
Mukund SivaramanandMark Andrews a5933fa2bb Add system test 2018-06-08 16:34:29 +10:00
Mukund SivaramanandMark Andrews 2930507357 Add a answer-cookie named config option 2018-06-08 16:34:29 +10:00
Mark Andrews 2836d8e952 Merge branch '322-add-support-for-marking-options-as-deprecated-v9_12' into 'v9_12'
Resolve "add support for marking options as deprecated."

Closes #322

See merge request isc-projects/bind9!351
2018-06-08 15:55:56 +10:00
Mark Andrews 60a703550e Add support for marking a option as deprecated.
(cherry picked from commit befff9452c)
2018-06-08 15:55:56 +10:00
Witold Krecicki 3b191620bb Merge branch 'XX-dont-fetch-keys-when-fuzzing-v9_12' into 'v9_12'
Don't fetch DNSKEY when fuzzing resolver

See merge request isc-projects/bind9!350
2018-06-06 09:57:10 -04:00
Witold Kręcicki 2e1a704378 Don't fetch DNSKEY when fuzzing resolver
(cherry picked from commit cb3208aa43)
2018-06-06 15:50:33 +02:00
Mark Andrews ae20d1d215 Merge branch '240-multiple-rrsigs-on-some-records-in-signed-zone-even-though-only-one-key-is-ever-active-at-a-time-v9_12' into 'v9_12'
Resolve "Multiple RRSIGs on some records in signed zone even though only one key is ever active at a time"

Closes #240

See merge request isc-projects/bind9!231
2018-06-06 17:09:00 +10:00
Mark Andrews 00f1956c9e add CHANGES note
(cherry picked from commit ba7a343156)
2018-06-06 17:05:47 +10:00
Mark Andrews 1783fa5aba add duplicate signature test
(cherry picked from commit 0db5b087ed)
2018-06-06 17:05:47 +10:00
Mark Andrews 69340b5ac5 add support -T sigvalinsecs
(cherry picked from commit 87a3dc8ab9)
2018-06-06 17:05:43 +10:00
Mark Andrews c1e342cedb only sign with other keys when deleting a key if there are not already existing signature for the deleted algorithm
(cherry picked from commit 0667bf7ae7)
2018-06-06 16:54:03 +10:00
Evan Hunt d636534ea8 Merge branch 'v9_12' of gitlab.isc.org:isc-projects/bind9 into v9_12 2018-06-05 21:53:06 -07:00
Mark Andrews ace0af0fd8 Merge branch '316-move-named-t-processing-to-its-own-function-v9_12' into 'v9_12'
Resolve "move named -T processing to its own function"

Closes #316

See merge request isc-projects/bind9!343
2018-06-06 14:48:41 +10:00
Mark Andrews 937e700bd5 add CHANGES
(cherry picked from commit ef7401e4a7)
2018-06-06 14:48:21 +10:00
Mark Andrews 475bb0e332 move -T parsing to its own function
(cherry picked from commit b491ceeb50)
2018-06-06 14:47:54 +10:00
Evan Hunt 4be2773736 Merge branch '302-use-ip-for-ifconfig' into 'v9_12'
Resolve "ifconfig.sh doesn't work on centos7"

Closes #302

See merge request isc-projects/bind9!330
2018-06-05 21:45:21 -07:00
Evan Hunt 7f16672ab8 CHANGES
(cherry picked from commit 71f2335f5a)
2018-06-05 21:45:12 -07:00
Evan Hunt 3e1a0c2b62 use "ip" on linux, falling back to "ifconfig" when it isn't available
(cherry picked from commit d7c5400798)
2018-06-05 21:44:45 -07:00
Evan Hunt e4487b160c expand address range in ifconfig.sh to include more than one subnet
(cherry picked from commit 41b29a436b)
2018-06-05 21:44:45 -07:00
Evan Hunt f448be27c5 clean up CHANGES numbers 2018-06-04 19:44:59 -07:00
Evan Hunt 3911b187e3 Merge branch '310-check-changes-needs-to-be-called-for-v9_12' into 'v9_12'
Resolve "check-changes needs to be called for v9_12"

See merge request isc-projects/bind9!337
2018-06-04 19:26:16 -07:00
Mark AndrewsandEvan Hunt 022b2b481f call util/check-changes in setup
(cherry picked from commit c0e69cc406)
2018-06-04 19:26:08 -07:00
Mark Andrews 0111295ff0 Merge branch '281-dont-insert-extra-space-between-nsec3-nexthash-and-typemap-v9_12' into 'v9_12'
Resolve "9.11.3-S1 totext_nsec3 inserts a redundant white space between next hash and type map [ISC-support #12887]"

See merge request isc-projects/bind9!313
2018-06-04 13:02:19 +10:00
Mark Andrews 6640898fa9 Add CHANGES note
(cherry picked from commit f98d8115e3)
2018-06-04 13:02:09 +10:00
Mukund SivaramanandMark Andrews 8af1d5916f Add NSEC3 fromtext/totext unittests
(cherry picked from commit b0d9198e03)
2018-06-04 13:01:18 +10:00
Mukund SivaramanandMark Andrews ac7c74425e Don't insert 2nd space between NSEC3 nexthash and typemap fields
(cherry picked from commit d4ea1edd2c)
2018-06-04 13:01:18 +10:00
Evan Hunt fb9e5221bc Merge branch 'serve-stale-doc-and-logging' into 'v9_12'
Serve stale doc and logging

See merge request isc-projects/bind9!323
2018-05-28 17:26:22 -07:00
Evan Hunt 876d544a1c CHANGES
(cherry picked from commit 049777d6c5)
2018-05-28 17:26:07 -07:00
Tony FinchandEvan Hunt c4494458ae Move serve-stale logging to its own category, so that its verbosity can be curtailed.
(cherry picked from commit 4b442c309d)
2018-05-28 17:25:38 -07:00
Evan Hunt 3d2de8e776 clarify serve-stale documentation, and add a floor for max-stale-ttl
- added a 1-second floor to max-stale-ttl similar to stale-answer-ttl;
  if set to 0, it will be silently updated to 1.
- fixed the ARM entry on max-stale-ttl, which incorrectly suggested that
  the default was 0 instead of 1 week.
- clarified rndc serve-stale documentation.

(cherry picked from commit d1ca21d50a)
2018-05-28 17:25:37 -07:00
Mark Andrews bb7c075cbe Merge branch '286-new-cppcheck-detected-errors-v9_12' into 'v9_12'
Resolve "New cppcheck-detected errors"

See merge request isc-projects/bind9!324
2018-05-29 09:44:48 +10:00
Mark Andrews 9fc2eb9554 add CHANGES note
(cherry picked from commit e9134b15eb)
2018-05-29 09:44:41 +10:00
Mark Andrews 3bbcba405b work around cppcheck false positive
(cherry picked from commit cb5802e854)
2018-05-29 09:44:02 +10:00
Evan Hunt 35488bec21 Merge branch '245-fix-test-color' into 'v9_12'
Resolve "rpz test fails to launch ns2 on openbsd"

Closes #245

See merge request isc-projects/bind9!321
2018-05-25 13:01:31 -07:00
Evan Hunt 59715255cf fix openbsd color-display problem in system test output
(cherry picked from commit 1e31fdb76d)
2018-05-25 13:01:25 -07:00
Mark Andrews cc443821e6 Merge branch '290-documentation-error-missing-v9_12' into 'v9_12'
Resolve "Documentation error - missing "};""

Closes #290

See merge request isc-projects/bind9!318
2018-05-25 13:11:43 +10:00
Mark Andrews 2e9f0fb026 add closing '};'
(cherry picked from commit ab22160a1c)
2018-05-25 13:11:43 +10:00
Evan Hunt 6acdb87b3b Merge branch 'fix-catz-test' into 'v9_12'
fix catz test

See merge request isc-projects/bind9!317
2018-05-24 16:18:29 -07:00
Evan Hunt 3e57b352be files were left in place after catz run because of non-portable bracket use
(cherry picked from commit af73e16c9c)
2018-05-24 16:18:24 -07:00
Evan Hunt fc407f3f94 Merge branch 'fix-copyrights' into v9_12 2018-05-23 18:08:20 -07:00
Evan Hunt 5875dda277 restore accidentally deleted copyright lines 2018-05-23 18:07:50 -07:00
Evan Hunt 8bfcb03ae5 Merge branch '283-ensure-there-is-a-blank-line-before-a-changes-entry-and-a-release-marker' into 'v9_12'
Resolve "ensure there is a blank line before a changes entry and a release marker."

Closes #283

See merge request isc-projects/bind9!311
2018-05-23 17:58:17 -07:00
Mark AndrewsandEvan Hunt d87eb5804d ensure there is a blank line before a changes entry and a release marker
(cherry picked from commit c91770549f)
2018-05-23 17:57:32 -07:00
Evan Hunt 9a08b1f912 Merge branch 'generate-notes-txt' into 'v9_12'
use w3m to generate notes.txt as part of the doc build

See merge request isc-projects/bind9!310
2018-05-23 09:54:07 -07:00
Evan Hunt 61de568197 copyrights 2018-05-23 09:52:09 -07:00
Evan Hunt 5b2390e016 use w3m to generate notes.txt as part of the doc build
(cherry picked from commit 7c955e0eb8)
2018-05-23 09:50:10 -07:00
Mark Andrews b847410f3a Merge branch '273-add-home-arpa-to-list-of-empty-zones-rfc-8375-v9_12' into 'v9_12'
Resolve "Add "HOME.ARPA" to list of empty zones (RFC 8375)"

Closes #273

See merge request isc-projects/bind9!297
2018-05-23 11:13:25 +10:00
Mark Andrews 8ad96c7a76 add HOME.ARPA to the list of empty zones
(cherry picked from commit 10dd0b3efe)
2018-05-23 11:13:10 +10:00
Mark Andrews a14ecc9e46 fix handling of failed tests
(cherry picked from commit 4283f9552f)
2018-05-23 11:08:14 +10:00
Evan Hunt 175062a8ba Merge branch 'fix-kit-v9_12' into 'v9_12'
use the correct repository, and get archive by tag not hash

See merge request isc-projects/bind9!304
2018-05-21 13:57:11 -07:00
Evan Hunt 988d4ac1a5 use the correct repository, and get archive by tag not hash
(cherry picked from commit 999e3233f3)
2018-05-21 13:57:10 -07:00
Evan Hunt 6cf0a45228 Merge branch '185-fix-changes-entry-v9_12' into v9_12 2018-05-21 10:36:06 -07:00
Evan Hunt af047f39c9 Fix CHANGES entry 2018-05-21 10:35:48 -07:00
Evan Hunt 6b5853dd34 Merge branch '185-security-fix' into v9_12 2018-05-21 10:00:30 -07:00
Evan Hunt 1b1b8e6d41 update CHANGES
(cherry picked from commit 4b67376e42)
2018-05-21 10:00:09 -07:00
Evan Hunt 3de0910bc7 Detect recursion loops during query processing
Interrupt query processing when query_recurse() attempts to ask the same
name servers for the same QNAME/QTYPE tuple for two times in a row as
this indicates that query processing may be stuck for an indeterminate
period of time, e.g. due to interactions between features able to
restart query_lookup().

(cherry picked from commit d1de99bc587480eb51a38b23c8aaf4d34c0c92d2)
2018-05-21 09:59:41 -07:00
Evan Hunt f6884e0ca5 Prevent check_stale_header() from leaking rdataset headers
check_stale_header() fails to update the pointer to the previous header
while processing rdataset headers eligible for serve-stale, thus
enabling rdataset headers to be leaked (i.e. disassociated from a node
and left on the relevant TTL heap) while iterating through a node.  This
can lead to several different assertion failures.  Add the missing
pointer update.

(cherry picked from commit cf9cb7cd0013610c8978808aab9d6bae9fe57a4b)
2018-05-21 09:58:44 -07:00
Mark Andrews 0083ce2c52 Merge branch '238-isc_net_recvoverflow-support-is-broken-v9_12' into 'v9_12'
Resolve "ISC_NET_RECVOVERFLOW support is broken."

Closes #238

See merge request isc-projects/bind9!226
2018-05-18 15:59:23 +10:00
Mark Andrews 24bb79f9fc ISC_SOCKEVENTATTR_TRUNC was not be set
(cherry picked from commit 6bff1768cf)
2018-05-18 15:59:14 +10:00
Evan Hunt d66c548295 Merge branch '251-documentation-of-rpz-min-update-interval-is-inconsistent-with-implementation' into 'v9_12'
Resolve "Documentation of RPZ min-update-interval is inconsistent with implementation"

Closes #251

See merge request isc-projects/bind9!277
2018-05-17 20:23:18 -07:00
Mukund SivaramanandEvan Hunt 84640d2e04 Fix ARM about min-update-interval default for RPZ zones
Also, use variable names consistent with catz for rpz configuration functions

(cherry picked from commit 975afc508d)
2018-05-17 20:23:08 -07:00
Mark Andrews ab570e7953 Merge branch '274-print-c-9-12-and-earlier' into 'v9_12'
Resolve "print.c 9.12 and earlier"

See merge request isc-projects/bind9!298
2018-05-17 22:42:16 -04:00
Mark Andrews 3f3d424a70 add CHANGES note 2018-05-18 12:19:26 +10:00
Mark Andrews d03a81c265 look for '\0' 2018-05-18 12:17:31 +10:00
Mark Andrews f5233ba5de add some %f format tests 2018-05-18 12:17:31 +10:00
Mark Andrews 800012de23 don't produce a false negative for %z with CFLAGS=-Werror 2018-05-18 12:17:31 +10:00
Mark Andrews 906565a274 Merge branch '267-iscpk11libs-is-not-defined-anywhere-resulting-in-dstrandom_test-not-being-built-v9_12' into 'v9_12'
Resolve "ISCPK11LIBS is not defined anywhere resulting in dstrandom_test not being built"

See merge request isc-projects/bind9!294
2018-05-17 02:39:31 -04:00
Mark Andrews de2d23db2a alphabetize and remove ISCPK11LIBS 2018-05-17 16:32:43 +10:00
Ondřej Surý 3fffd5de63 Merge branch '209-glue-is-no-longer-included-v9_12' into 'v9_12'
Resolve "Glue is no longer included for non-DNSSEC-signed zones since CHANGE 4596"

See merge request isc-projects/bind9!285
2018-05-16 03:11:25 -04:00
Mukund SivaramanandOndřej Surý e661831199 Add CHANGES entry
(cherry picked from commit dfd73d7e16)
2018-05-16 08:30:07 +02:00
Mukund SivaramanandOndřej Surý d6a4760031 Add system test
(cherry picked from commit 303391ea41)
2018-05-16 08:29:25 +02:00
Mukund SivaramanandOndřej Surý 753d0aee03 Don't validate non-pending glue when adding to the additional section
(cherry picked from commit 31bd3147d1)
2018-05-16 08:29:25 +02:00
Evan Hunt dcf0d95ee5 Merge branch '233-clarify-documentation-of-update-policy-tcp-self-and-6to4-self' into 'v9_12'
Resolve "Clarify documentation of update-policy tcp-self and 6to4-self"

Closes #233

See merge request isc-projects/bind9!227
2018-05-15 13:20:01 -07:00
Evan Hunt 117ad14ddb rewrite the update-policy documentation
- clarify the behavior of the name and identity fields for various
  rule types, particularly tcp-self and 6to4-self.

(cherry picked from commit dea89f2a52)
2018-05-15 13:19:55 -07:00
Michał Kępień db909bcb58 Merge branch '258-address-ubsan-warnings-v9_12' into 'v9_12'
[v9_12] Address issues found by ubsan

See merge request isc-projects/bind9!280
2018-05-15 03:51:23 -04:00
Michał Kępień 18824a084b isc_buffer_*(): if source can be NULL, only call memmove() when length is non-zero
Certain isc_buffer_*() functions might call memmove() with the second
argument (source) set to NULL and the third argument (length) set to 0.
While harmless, it triggers an ubsan warning:

    runtime error: null pointer passed as argument 2, which is declared to never be null

Modify all memmove() call sites in lib/isc/include/isc/buffer.h and
lib/isc/buffer.c which may potentially use NULL as the second argument
(source) so that memmove() is only called if the third argument (length)
is non-zero.

(cherry picked from commit 6ddbca6f2b)
2018-05-15 09:28:17 +02:00
Michał Kępień 046f10ae99 dns_rdataslab_merge(): use dns_rdata_compare() instead of compare_rdata()
compare_rdata() was meant to be used as a qsort() callback.  Meanwhile,
dns_rdataslab_merge() calls compare_rdata() for a pair of dns_rdata_t
structures rather than a pair of struct xrdata structures, which is
harmless, but triggers an ubsan warning:

    rdataslab.c:84:33: runtime error: member access within address <address> with insufficient space for an object of type 'const struct xrdata'

Use dns_rdata_compare() instead of compare_rdata() to prevent the
warning from being triggered.

(cherry picked from commit 9bc6ba0be9)
2018-05-15 09:28:17 +02:00
Michał Kępień 7c272294b6 Merge branch '252-9-9-sigs_test-updatesigs-is-failing-v9_12' into 'v9_12'
[v9_12] Skip lib/dns/tests/sigs_test for builds without DNSSEC support

See merge request isc-projects/bind9!273
2018-05-14 03:38:35 -04:00
Michał Kępień f26ae1ea9f Extend the list of headers included by lib/dns/tests/sigs_test.c
(cherry picked from commit f98e145c5b)
2018-05-14 09:31:18 +02:00
Mark AndrewsandMichał Kępień 8d93b77c31 return untested if not built with OPENSSL or PKCS11CRYPTO
(cherry picked from commit 2420320b96)
2018-05-14 09:31:18 +02:00
Ondřej Surý 95757c842f Merge branch '9-remove-dolar-ids-and-other-cruft-v9_12' into 'v9_12'
Remove $Id$s and other cruft as a batch operation

See merge request isc-projects/bind9!267
2018-05-11 08:29:41 -04:00
Ondřej Surý c35de9b383 Remove $Id markers, Principal Author and Reviewed tags from the full source tree
(cherry picked from commit 55a10b7acd)
2018-05-11 14:19:35 +02:00
Ondřej Surý 8ab1551a3a Merge branch 'redirect-stderr-to-dev-null-v9_12' into 'v9_12'
Update tests to not use '>&-' that closes file descriptor, but instead use…

See merge request isc-projects/bind9!264
2018-05-11 07:18:10 -04:00
Ondřej Surý 1c003f1230 Update tests to not use '>&-' that closes file descriptor, but instead use correct redirection to '>/dev/null'
(cherry picked from commit 3f66b8acb0)
2018-05-11 13:11:10 +02:00
Michał Kępień ef3fae305c Merge branch '239-don-t-use-null-as-a-argument-to-a-varargs-function-as-it-may-not-be-promoted-properly-v9_12' into 'v9_12'
[v9_12] don't use NULL as a argument to a varargs function as it may not be promoted properly

See merge request isc-projects/bind9!261
2018-05-11 02:41:53 -04:00
Mark AndrewsandMichał Kępień 438395086c silence cppcheck portability warning
(cherry picked from commit 6aae115d15)
2018-05-11 08:30:13 +02:00
Mark Andrews f30e93853c Merge branch '248-named-9-12-uses-too-much-memory-with-tuning-large-regression-vs-9-11-v9_12' into 'v9_12'
Resolve "named 9.12 uses too much memory with `--tuning=large` (regression vs. 9.11)"

Closes #248

See merge request isc-projects/bind9!251
2018-05-11 11:31:27 +10:00
Mark Andrews 6e88bbde2d add CHANGES note
(cherry picked from commit 30e58374a3)
2018-05-11 11:31:18 +10:00
Mukund SivaramanandMark Andrews 224244227c Don't keep around debuglist structs when done
(cherry picked from commit 3adcc033f6)
2018-05-11 11:29:58 +10:00
Mukund SivaramanandMark Andrews 36277f7a63 Reduce number of buckets in tracklines debuglink table
With 1044 res contexts, each with 65536 debuglink structs of 16 bytes
each, the debuglink table itself was consuming 1GB+ of memory.

(cherry picked from commit b9886abd86)
2018-05-11 11:29:58 +10:00
Michał Kępień 091d0f1041 Merge branch '249-address-gcc-8-compilation-warnings-v9_12' into 'v9_12'
[v9_12] Address GCC 8 compilation warnings

See merge request isc-projects/bind9!259
2018-05-10 04:59:53 -04:00
Ondřej SurýandMichał Kępień fa846bbed0 Address GCC 8 -Wstringop-truncation warning
(cherry picked from commit 9845c4c4a7)
2018-05-10 10:52:00 +02:00
Michał Kępień 6e26fab6b8 Address GCC 8 -Wformat-truncation warnings
(cherry picked from commit 172d0c401e)
2018-05-10 10:52:00 +02:00
Ondřej Surý 3593360928 Merge branch 'gitlab-ci-amd64-v9_12' into 'v9_12'
Tag docker images with appropriate architectures

See merge request isc-projects/bind9!255
2018-05-10 03:36:54 -04:00
Ondřej Surý 9b795c34b9 Tag docker images with appropriate architectures
(cherry picked from commit ab112d2c4f)
2018-05-10 09:27:23 +02:00
Evan Hunt b1ef7d8ecd Merge branch '135-add-basic-unit-tests-for-update_sigs' into 'v9_12'
Add basic unit tests for update_sigs()

Closes #135

See merge request isc-projects/bind9!112
2018-05-10 00:02:06 -07:00
Michał KępieńandEvan Hunt 1f9b0cbc63 Add CHANGES entry
4939.	[test]		Add basic unit tests for update_sigs(). [GL #135]

(cherry picked from commit 4885809eb9)
2018-05-10 00:01:56 -07:00
Michał KępieńandEvan Hunt 3e93e4bb62 Define basic test cases for dns__zone_updatesigs()
Add some basic test cases ensuring dns__zone_updatesigs() behaves as
expected.

(cherry picked from commit 8b9d2c27b4)
2018-05-10 00:01:41 -07:00
Michał KępieńandEvan Hunt 3dde7c42db Add a framework for dns__zone_updatesigs() unit tests
Add a new ATF test, sigs_test, containing everything required to start
defining test cases for dns__zone_updatesigs().  The framework is
written in a way which ensures that changes to zone database applied by
any dns__zone_updatesigs() invocation are preserved between subsequent
checks.

(cherry picked from commit 1f10186476)
2018-05-10 00:01:41 -07:00
Michał KępieńandEvan Hunt fc0e99c7d7 Move find_zone_keys() to lib/dns/zone_p.h
Rename find_zone_keys() to dns__zone_findkeys() and move it to
lib/dns/zone_p.h, so that it can be used in unit tests.  Add a comment
describing the purpose of this function.

(cherry picked from commit d7143986b1)
2018-05-10 00:01:41 -07:00
Michał KępieńandEvan Hunt 4d06f50ba8 Move update_sigs() to lib/dns/zone_p.h
Rename update_sigs() to dns__zone_updatesigs() and move it to
lib/dns/zone_p.h, so that it can be unit tested.  Add a comment
describing the purpose of this function.

(cherry picked from commit b1947cee82)
2018-05-10 00:01:38 -07:00
Michał KępieńandEvan Hunt ea15c54d8a Move zonediff_t to lib/dns/zone_p.h
Rename zonediff_t to dns__zonediff_t and move it to lib/dns/zone_p.h, so
that unit tests can be written for functions taking pointers to
structures of this type as arguments.

(cherry picked from commit ace465a9f9)
2018-05-10 00:00:31 -07:00
Michał KępieńandEvan Hunt 2b0add6d1a Add lib/dns/zone_p.h
Add a new private header file, lib/dns/zone_p.h, which will hold type
definitions and function prototypes not meant to be exported by libdns,
but required by zone-related unit tests.

(cherry picked from commit c1bc3be806)
2018-05-10 00:00:31 -07:00
Michał KępieńandEvan Hunt d4c603eb8a Add a helper function to facilitate preparing dns_diff_t structures
Implement dns_test_difffromchanges(), a function which enables preparing
a dns_diff_t structure from a mostly-textual representation of zone
database changes to be applied.  This will improve readability of test
case definitions by allowing contents of a dns_diff_t structure, passed
e.g. to update_sigs(), to be represented in a human-friendly manner.

(cherry picked from commit 3c22af0d35)
2018-05-10 00:00:31 -07:00
Michał KępieńandEvan Hunt 107102d333 Rename dns_test_rdata_fromstring() to dns_test_rdatafromstring()
Remove the underscore from "rdata_fromstring" so that all helper
functions for libdns tests use a common naming covention.

(cherry picked from commit 2980cbd55f)
2018-05-10 00:00:31 -07:00
Michał KępieńandEvan Hunt f70c02d2c2 Rework dns_test_makezone()
The dns_test_makezone() helper function always assigns the created zone
to some view, which is not always necessary and complicates cleanup of
non-managed zones as they are required not to be assigned to any view.

Rework dns_test_makezone() in order to make it easier to use in unit
tests operating on non-managed zones.  Use dns_name_fromstring() instead
of dns_name_fromtext() to simplify code.  Do not use the CHECK() macro
and add comments to make code flow simpler to follow.  Use
dns_test_makeview() instead of dns_view_create().

Adjust existing unit tests using this function so that they still pass.

(cherry picked from commit bfbeef3609)
2018-05-10 00:00:31 -07:00
Ondřej Surý 420e00ffa9 Merge branch '191-misc-improvements-v9_12' into 'v9_12'
[v9_12] Miscelaneous improvements found when working on #191

See merge request isc-projects/bind9!244
2018-05-03 15:44:06 -04:00
Ondřej Surý 311fbf3f5b Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define
(cherry picked from commit 8d648e7a8a)
2018-05-03 21:36:46 +02:00
Ondřej Surý 5af60f69fd Use BN_hex2bn instead of custom BN_fromhex function
(cherry picked from commit 8bf192b4d1)
2018-05-03 21:35:21 +02:00
Ondřej Surý 30b308e2e3 Fix extra ] in configure.in
(cherry picked from commit 35d2dbb9f5)
2018-05-03 21:35:21 +02:00
Ondřej Surý da5186cdd6 Merge branch '236-silence-cppcheck-issues-in-lib-dns-dst_parse-c-v9_12' into 'v9_12'
[v9_12] Resolve "silence cppcheck issues in lib/dns/dst_parse.c"

See merge request isc-projects/bind9!240
2018-05-03 11:22:03 -04:00
Mark AndrewsandOndřej Surý 9b20819dd6 simplify mask construction
(cherry picked from commit 22fab3199f)
2018-05-03 17:13:42 +02:00
Ondřej Surý 9f15463752 Merge branch '234-add-prerequisite-check-to-rootkeysentinel-for-dnssec-support-v9_12' into 'v9_12'
Resolve "add prerequisite check to rootkeysentinel for dnssec support"

See merge request isc-projects/bind9!239
2018-05-03 10:51:32 -04:00
Mark AndrewsandOndřej Surý 390a1d3988 add bin/tests/system/rootkeysentinel/prereq.sh
(cherry picked from commit 0fedfcafb5)
2018-05-03 16:42:47 +02:00
Mark AndrewsandOndřej Surý 03e4dc4c6b add dnssec prerequisite test to rootkeysentinel
(cherry picked from commit e713f83064)
2018-05-03 16:42:47 +02:00
Ondřej Surý 6f07572ef7 Merge branch 'random-test-improvement-v9_12' into 'v9_12'
[v9_12] Improve random_test to also test the high bound of the confidence interval

See merge request isc-projects/bind9!237
2018-05-03 09:12:53 -04:00
Ondřej Surý 36efa304e6 Also test the higher part of the confidence interval
(cherry picked from commit 8d3220643c)
2018-05-03 15:04:15 +02:00
Ondřej Surý b329a7e674 Merge branch '191-add-LibreSSL-2.7-support-v9_12' into 'v9_12'
[v9_12] Add LibreSSL 2.7.0 support

See merge request isc-projects/bind9!234
2018-05-03 08:34:55 -04:00
Ondřej Surý 0b54e46c79 Add CHANGES entry
4935.   [func]          Add support for LibreSSL >= 2.7.0 (some OpenSSL 1.1.0
                        call were added). [GL #191]

(cherry picked from commit 30488dddf0)
2018-05-03 14:27:10 +02:00
Ondřej Surý e3a318e8d3 Workaround LibreSSL 2.7.0-2.7.2 quirk in DH_set0_key
(cherry picked from commit 6b9e3b7b06)
2018-05-03 14:26:40 +02:00
Ondřej Surý 1e64b869b5 Add support for LibreSSL 2.7
(cherry picked from commit 29ff62a149)
2018-05-03 14:26:40 +02:00
Evan Hunt 1f3124d76c Merge branch '208-dig-doc' into 'v9_12'
Resolve "Added -t TYPEnn description to dig"

Closes #208

See merge request isc-projects/bind9!221
2018-04-26 23:59:03 -07:00
Paul HoffmanandEvan Hunt cd09144b17 add -t type### description to the dig man page
(cherry picked from commit 2d957c6b9f)
2018-04-26 23:58:58 -07:00
Evan Hunt ed985bea41 Merge branch '159-improve-handling-of-inline-signed-zones-with-missing-signing-keys' into 'v9_12'
Improve handling of inline signed zones with missing signing keys

Closes #159

See merge request isc-projects/bind9!133
2018-04-25 12:09:38 -07:00
Michał KępieńandEvan Hunt e4995efe24 Add CHANGES entries
4916.	[bug]		Not creating signing keys for an inline signed zone
			prevented changes applied to the raw zone from being
			reflected in the secure zone until signing keys were
			made available. [GL #159]

4915.	[bug]		Bumped signed serial of an inline signed zone was
			logged even when an error occurred while updating
			signatures. [GL #159]

(cherry picked from commit 7d2c09c905)
2018-04-25 12:09:22 -07:00
Michał KępieńandEvan Hunt 8a58a60772 Apply raw zone deltas to yet unsigned secure zones
When inline signing is enabled for a zone without creating signing keys
for it, changes subsequently applied to the raw zone will not be
reflected in the secure zone due to the dns_update_signaturesinc() call
inside receive_secure_serial() failing.  Given that an inline zone will
be served (without any signatures) even with no associated signing keys
being present, keep applying raw zone deltas to the secure zone until
keys become available in an attempt to follow the principle of least
astonishment.

(cherry picked from commit 6acf326969)
2018-04-25 12:09:04 -07:00
Michał KępieńandEvan Hunt cdc7ab42b1 Only log bumped signed serial after a successful secure zone update
If a raw zone is modified, but the dns_update_signaturesinc() call in
receive_secure_serial() fails, the corresponding secure zone's database
will not be modified, even though by that time a message containing the
bumped signed serial will already have been logged.  This creates
confusion, because a different secure zone version will be served than
the one announced in the logs.  Move the relevant dns_zone_log() call so
that it is only performed if the secure zone's database is modified.

(cherry picked from commit cfbc8e264d)
2018-04-25 12:09:03 -07:00
Evan Hunt 5cef06f8d0 Merge branch '171-lgtm-issues-v9_12' into 'v9_12'
Resolve "problems detected by LGTM static analyzer"

Closes #171

See merge request isc-projects/bind9!213
2018-04-22 12:57:52 -07:00
Evan Hunt 493a8b53ed remove unnecessary comparison
(cherry picked from commit 8b1baa10ee)
2018-04-22 12:57:52 -07:00
Evan Hunt fe27dfa9fd silence warnings about unnecessary comparisons
- these are cases where result has been explicitly set, so
  if (result != ISC_R_SUCCESS) is unnecessary

(cherry picked from commit e00eb55cd2)
2018-04-22 12:57:52 -07:00
Evan Hunt 19be8866d8 add header guards in files that were missing them
(cherry picked from commit 4247477b61)
2018-04-22 12:57:52 -07:00
Evan Hunt b8aec550c4 add header guard when generating bind.keys.h
(cherry picked from commit bfbe6925df)
2018-04-22 12:57:52 -07:00
Evan Hunt 982ddf4012 change "key" to "tsigkey" to silence "short global name" warning
(cherry picked from commit 0cc7aa250e)
2018-04-22 12:57:52 -07:00
Evan Hunt 97cbc27ed7 fix shadowed global variables
(cherry picked from commit 9ca3ab1168)
2018-04-22 12:57:52 -07:00
Evan Hunt 62c64cfe85 fix duplicate include guard in dnsconf.h
- IMHO we should consider removing dnsconf.c and deprecating the
  /etc/dns.conf file, though, as I don't think it's likely anyone
  is using it

(cherry picked from commit a08ba418ef)
2018-04-22 12:57:52 -07:00
Evan Hunt d44d594219 Merge branch '37-implement-geoff-huston-s-trusted-key-sentinel-feature-v9_12' into 'v9_12'
Implement Geoff Huston's trusted key sentinel feature

Closes #37

See merge request isc-projects/bind9!123
2018-04-22 12:48:12 -07:00
Mark AndrewsandEvan Hunt af267c4da9 CHANGES entry for root-key-sentinel
(cherry picked from commit 2845d7160e)
2018-04-22 12:48:10 -07:00
Mark AndrewsandEvan Hunt edb761b08c add release note for root-key-sentinel
(cherry picked from commit e20790c956)
2018-04-22 12:47:31 -07:00
Mark AndrewsandEvan Hunt b9e6b124aa add system test for root-key-sentinel
(cherry picked from commit a23b305e6b)
2018-04-22 12:46:03 -07:00
Mark AndrewsandEvan Hunt ee763ef281 add named.conf option root-key-sentinel
(cherry picked from commit 68e9315c7d)
2018-04-22 12:46:03 -07:00
Mark AndrewsandEvan Hunt 7111eff80c detect and processes root-key-sentinel labels.
(cherry picked from commit 8fc9f64df9)
2018-04-22 12:46:03 -07:00
Ondřej Surý 0071c0400f Merge branch '202-cppcheck-reporting-miscellaneous-issues-v9_12' into 'v9_12'
Resolve "cppcheck reporting miscellaneous issues"

See merge request isc-projects/bind9!216
2018-04-20 18:20:11 -04:00
Mark AndrewsandOndřej Surý 77643775c5 remove exit calls after FATAL_ERROR
(cherry picked from commit f8d2a46daa)
2018-04-20 15:13:12 -07:00
Mark AndrewsandOndřej Surý 53e39ca0ea remove dead code
(cherry picked from commit 686edad5c5)
2018-04-20 15:13:12 -07:00
Mark AndrewsandOndřej Surý ba238ab374 use %u instead of %d for unsigned int arguments
(cherry picked from commit 49f8e9571c)
2018-04-20 15:13:12 -07:00
Ondřej Surý 5e11b261f4 Merge branch '206-nslookup-accepts-any-bogus-option-interpret-it-as-vc-v9_12' into 'v9_12'
Resolve "nslookup accepts any -bogus -option, interpret it as -vc"

See merge request isc-projects/bind9!214
2018-04-20 18:01:02 -04:00
Mukund SivaramanandOndřej Surý a36f89341f Remove bogus comparison
(cherry picked from commit 89cf503880)
2018-04-20 14:51:26 -07:00
Ondřej Surý 7c830940b9 Merge branch '189-fix-win32-build-v9_12' into 'v9_12'
[v9_12] Fix runtime assertion on Windows due isc_file_template being out-of-sync

See merge request isc-projects/bind9!194
2018-04-12 03:00:44 -04:00
Ondřej Surý 6171037403 Sync isc_file_template functions between unix and win32, so they are same
(cherry picked from commit 8c99d104e3)
2018-04-12 08:47:11 +02:00
Ondřej Surý c4a7fbcc36 Merge branch '189-fix-tsig-dump-keyfile-name-generation-issues-v9_12' into 'v9_12'
[v9_12] Fix TSIG dump keyfile name generation issues

See merge request isc-projects/bind9!191
2018-04-11 08:45:17 -04:00
Mukund SivaramanandOndřej Surý c932fd2d49 Fix TSIG dump keyfile name buffer size issues
(cherry picked from commit 44b84cb5a6)
2018-04-11 14:37:46 +02:00
Ondřej Surý e052e7f427 Define PATH_MAX on Windows as _MAX_PATH, so we can use it everywhere
(cherry picked from commit 7467735258)
2018-04-11 14:37:46 +02:00
Evan Hunt 5ce20e4928 Merge branch '193-fix-variable-definitions-in-bin-tests-Makefile.in-v9_12' into 'v9_12'
Fix variable definitions in bin/tests/Makefile.in

Closes #193

See merge request isc-projects/bind9!183
2018-04-10 20:04:31 -07:00
Evan Hunt a6cbac45eb Alter distclean rule to prevent recursing into the same directory twice
Commit f87e0c03ee removed the "system" directory from the TESTDIRS
variable in bin/tests/Makefile.in in an attempt to fix "make distclean"
which was broken since commit 0d784de16a.  However, this change
prevented any system tests from being run when "make test" is invoked.

We now put it back into both SUBDIRS and TESTDIRS, but with a modified
rule to check for the existence of a Makefile in each subdirectory before
trying to run make there. This prevents "make distclean" from trying to
run again in a directory where it's already been run.

(cherry picked from commit 93ee6b8a22)
2018-04-10 20:04:31 -07:00
Michał KępieńandEvan Hunt a7f8268833 Fail CI pipeline when "make test" does not run any system tests
Apart from ensuring "make test" returns 0, also check whether any system
test output was generated as a result of running it.  This prevents the
CI job running system tests from succeeding unless it actually tests
something.

(cherry picked from commit 80ab2c0f22)
2018-04-10 20:04:31 -07:00
Evan Hunt b26a269b42 Merge branch '197-dnstap-sockaddr-v9_12' into 'v9_12'
Resolve "dnstap: log actual local IPv6 address, not :: listening address"

Closes #197

See merge request isc-projects/bind9!188
2018-04-10 17:21:08 -07:00
Evan Hunt fde64f3fe4 CHANGES note
(cherry picked from commit 330b26c9df)
2018-04-10 17:21:08 -07:00
Tony FinchandEvan Hunt 58aac41b7e dnstap: log actual local IPv6 address, not :: listening address
(cherry picked from commit ccff953c25)
2018-04-10 17:21:08 -07:00
Evan Hunt 011968a6d4 Merge branch '183-add-dns_fixedname_initname-v9_12' into 'v9_12'
Add and use dns_fixedname_initname()

Closes #183

See merge request isc-projects/bind9!161
2018-04-10 13:10:29 -07:00
Mukund SivaramanandEvan Hunt d7676d0fa8 Add CHANGES entry:
4921.   [cleanup]       Add dns_fixedname_initname() and refactor the caller
                        code to make usage of the new function, as a part of
                        refactoring dns_fixedname_*() macros were turned into
                        functions. [GL #183]

(cherry picked from commit d7faee2566)
2018-04-10 13:10:23 -07:00
Michał KępieńandEvan Hunt 706f865a20 Do not access dns_fixedname_t fields directly
Employ dns_fixedname_name() and dns_fixedname_initname() to no longer
directly access dns_fixedname_t fields.

(cherry picked from commit 39ddf9991f)
2018-04-10 13:09:37 -07:00
Michał KępieńandEvan Hunt 0041aeb751 Use dns_fixedname_initname() where possible
Replace dns_fixedname_init() calls followed by dns_fixedname_name()
calls with calls to dns_fixedname_initname() where it is possible
without affecting current behavior and/or performance.

This patch was mostly prepared using Coccinelle and the following
semantic patch:

    @@
    expression fixedname, name;
    @@
    -	dns_fixedname_init(&fixedname);
    	...
    -	name = dns_fixedname_name(&fixedname);
    +	name = dns_fixedname_initname(&fixedname);

The resulting set of changes was then manually reviewed to exclude false
positives and apply minor tweaks.

It is likely that more occurrences of this pattern can be refactored in
an identical way.  This commit only takes care of the low-hanging fruit.

(cherry picked from commit 4df4a8e731)
2018-04-10 13:09:24 -07:00
Mukund SivaramanandEvan Hunt cee4fef7c5 Add a dns_fixedname_initname() helper function
This also turns the dns_fixedname macros into functions.

(cherry picked from commit 0d2a03c290)
2018-04-10 13:06:43 -07:00
Mark Andrews 38d5e47881 Merge branch 'ssl-double-free-v9_12' into 'v9_12'
Fix double free after keygen error in dnssec-keygen

Closes #109

See merge request isc-projects/bind9!70
2018-04-06 14:23:01 +10:00
Ondřej SurýandMark Andrews 24ea156f9e Add CHANGES entry
(cherry picked from commit ef2b2a6c92)
2018-04-06 14:22:46 +10:00
Ondřej SurýandMark Andrews cd6d3fbf07 A couple of more cleanups after free in opensslrsa_generate()
(cherry picked from commit d2b3188c61)
2018-04-06 14:21:11 +10:00
Petr MensikandMark Andrews d27c7940d9 Do not assign NULL conditionally in OpenSSL < 1.1, make it always explicit.
(cherry picked from commit edaafacf36)
2018-04-06 14:21:11 +10:00
Petr MensikandMark Andrews 587452f830 Fix double free on RSA_generate_key_ex failure
(cherry picked from commit 01cc622e7b)
2018-04-06 14:21:11 +10:00
Mark Andrews 342e146fe3 system should only be in SUBDIRS 2018-04-06 13:04:15 +10:00
Ondřej SurýandMark Andrews 9cf1468b77 Update libtool files to 2.4.6
(cherry picked from commit fe06778be7)
2018-04-06 12:36:39 +10:00
Ondřej Surý c2f32eba34 Merge branch 'pemensik/bind9-no-idn2-export-v9_12' into 'v9_12'
Don't include -lidn2 in isc-config.sh output

See merge request isc-projects/bind9!179
2018-04-05 06:15:41 -04:00
Ondřej Surý 40e5ba9cc5 Print information about LIBIDN2 in Configuration summary (Closes: #163)
(cherry picked from commit 8da5e5290f)
2018-04-05 12:07:53 +02:00
Petr MenšíkandOndřej Surý 8e8c195f94 Remove -lidn2 from exported LIBS. Do not propagate it from isc-config.sh --libs isc.
(cherry picked from commit 21c2871667)
2018-04-05 12:07:51 +02:00
Ondřej Surý 2c1fdbbb36 Merge branch 'kchen/bind9-test-prereqs-v9_12' into 'v9_12'
Add a Net::DNS prereq for couple of tests

See merge request isc-projects/bind9!176
2018-04-04 17:07:36 -04:00
Kevin ChenandOndřej Surý a8d7b3a12b Add a Net::DNS prereq for digdelv, fetchlimit, rpzrecurse, and zero
tests to avoid failed tests when Net::DNS is not present.

(cherry picked from commit 8b1b809ab4)
2018-04-04 23:00:56 +02:00
Stephen Morris 5fafa7303c Merge branch '139-tests-for-idna2008-libidn2-merge-v9_12' into 'v9_12'
Resolve "Tests for IDNA2008 (libidn2)" - Merge into 9.12

See merge request isc-projects/bind9!174
2018-04-04 10:05:05 -04:00
Stephen Morris 7f6d484d76 Check libidn2 version before proceding with one of the tests.
A known issue in libidn2 causes one of the tests of a fake A-label
to fail.  The problem should be corrected in version 2.0.5 of
libidn2.
2018-04-04 09:47:53 -04:00
Ondřej SurýandStephen Morris 5b9975e38f Use C.UTF-8 if available, and en_US.UTF-8 is available, otherwise do nothing and let the test break 2018-04-04 09:47:53 -04:00
Stephen Morris 5633f8afda Set known locale prior to running tests. 2018-04-04 09:47:53 -04:00
Stephen Morris 38fe1ce60f Fix check for the presence of IDNA. 2018-04-04 09:47:53 -04:00
Stephen Morris 5f00b9dad7 Added additional tests for invalid punycode strings. 2018-04-04 09:47:53 -04:00
Stephen Morris 2df1a2ef20 Initial set of IDNA tests. 2018-04-04 09:47:53 -04:00
Michał Kępień 286cad891a Merge branch '188-remove-duplicate-named_g_conffile-init-v9_12' into 'v9_12'
Remove redundant named_g_conffile initialization

Closes #188

See merge request isc-projects/bind9!166
2018-04-04 12:33:09 +02:00
Ondřej SurýandMichał Kępień 2301f0562e Remove redundant named_g_conffile initialization from bin/named/win32/os.c
(cherry picked from commit c727f0797b)
2018-04-04 12:33:09 +02:00
Ondřej Surý 505b8a2931 Merge branch '26-fix-normalization-for-non-IDN-v9_12' into 'v9_12'
Don't use the IDN translated name if no conversion took a place

See merge request isc-projects/bind9!156
2018-03-22 10:03:50 -04:00
Ondřej Surý 722152db8b Don't use the IDN traslated name if no conversion took a place
(cherry picked from commit 08f66d8509)
2018-03-22 13:54:30 +00:00
Mark Andrews cf8787b6ac Merge branch '167-coverity-dereferencing-a-null-pointer-in-lib-dns-tests-rbt_test-c-v9_12' into 'v9_12'
Resolve "coverity: Dereferencing a null pointer in lib/dns/tests/rbt_test.c"

Closes #167

See merge request isc-projects/bind9!150
2018-03-20 09:54:08 +11:00
Mukund SivaramanandMark Andrews d2dea05356 Check return value of isc_mem_get()
(cherry picked from commit de3a4af1bf)
2018-03-20 09:54:08 +11:00
Mark Andrews da23698286 fix temporary file name to have subtest number
(cherry picked from commit e12453f43c88bac722fb511b62f12303735b788c)
2018-03-19 23:13:44 +11:00
Mark Andrews 10f04106fb Merge branch 'fixtypo-v9_12' into 'v9_12'
fix typo

See merge request isc-projects/bind9!148
2018-03-19 22:51:14 +11:00
Mark Andrews a296346e48 fix typo
(cherry picked from commit 6e4b5f2345)
2018-03-19 22:51:13 +11:00
Mark Andrews 987e31cc3e Merge branch '166-statistics-system-test-numbering-is-bad-v9_12' into 'v9_12'
Resolve "statistics system test numbering is bad"

Closes #166

See merge request isc-projects/bind9!146
2018-03-19 20:19:08 +11:00
Mark Andrews d4978012c2 fix numbering of tests and make consistent
(cherry picked from commit dd5dff3096)
2018-03-19 20:19:07 +11:00
Ondřej Surý 9a1cfc88a7 Merge branch '164-remove-openssl-warning-v9_12' into 'v9_12'
[v9_12] Remove useless OpenSSL warning from configure script

See merge request isc-projects/bind9!140
2018-03-17 10:50:24 -04:00
Ondřej Surý 285e30b1e1 Remove obsolete OpenSSL version check
(cherry picked from commit e9571d29af)
2018-03-17 14:31:02 +00:00
Ondřej Surý 74ff9065f2 Merge branch '26-switch-to-IDNA2008-non-transitional-processing-v9_12' into 'v9_12'
Resolve "Switch to IDNA2008 non-transitional processing (and use libidn2 for that)"

Closes #26

See merge request isc-projects/bind9!124
2018-03-17 13:29:15 +00:00
Ondřej Surý a6afebe852 Add release notes for IDNA2008
(cherry picked from commit e7590c7528)
2018-03-17 13:29:11 +00:00
Ondřej Surý 895f54e5f3 Add CHANGES for idn2 support
(cherry picked from commit 8f44ef7d59)
2018-03-17 13:26:05 +00:00
Ondřej Surý 5c62e0bcf9 Enable --with-libidn2 in GitLab CI checks
(cherry picked from commit 1c075646f5)
2018-03-17 13:26:05 +00:00
Ondřej Surý 52b09a6e78 Simplify the libidn2 configure checks
(cherry picked from commit 76c05a71fc)
2018-03-17 13:26:05 +00:00
Petr MenšíkandOndřej Surý 3ed7706fde Sanitize IDN initialization
Signed-off-by: Petr Menšík <pemensik@redhat.com>
(cherry picked from commit 29b94bbb04)
2018-03-17 13:26:05 +00:00
Petr MenšíkandOndřej Surý 8e2629d4be Remove support for libidn (IDN 2003)
Signed-off-by: Petr Menšík <pemensik@redhat.com>
(cherry picked from commit 8254cf69d3)
2018-03-17 13:26:05 +00:00
Petr MenšíkandOndřej Surý 01daa72ab3 Remove conversion from locale to utf8 from public API
Emit fatal failures on locale to ACE encoding

Separate idnout support, disable it for libidn2 < 2.0

Add custom path to libidn. Leave default path for multilib support.

Allow turning off IDN input processing by dig option

Improve documentation, fix support in host

Fix configure changes to adjust help text

Use strlcpy with size guard

Improve IDN variants choosing. Fix idn2 function name.

Remove immediate idn_locale_to_ace and idn_ace_to_locale.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
(cherry picked from commit 94757c1545)
2018-03-17 13:26:05 +00:00
Tomas HozzaandOndřej Surý cce358c2e0 Add support for libidn2
Added two new configure options:
--with-libidn2 - to enable IDN using GNU libidn2

idnkit, libidn and libidn2 support can not be used at the same time.

NOTE: libidn2 does not support punycode back to Unicode
characters, so support for this is missing.

Signed-off-by: Tomas Hozza <thozza@redhat.com>

Removed iconv, convert directly from locale to ACE

Fix libidn2 and idnkit origin appending

Make IDN options in help less different

Signed-off-by: Petr Menšík <pemensik@redhat.com>
(cherry picked from commit 505f673451)
2018-03-17 13:26:05 +00:00
Tomas HozzaandOndřej Surý 32dc52571d Add support for GNU libidn
Added new configure option:
--with-libidn - to enable IDN using GNU libidn

Renamed configure option:
--with-idn to --with-idnkit to make the option usage more clear

idnkit and libidn support can not be used at the same time.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
(cherry picked from commit 2320443f63)
2018-03-17 13:26:04 +00:00
Evan Hunt 2c24af2c85 Merge branch 'copyrights' into v9_12 2018-03-15 18:40:51 -07:00
Evan Hunt 19b5249028 update file headers 2018-03-15 18:40:21 -07:00
Evan Hunt d698d64713 ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:40:09 -07:00
Evan Hunt ca221d3dd3 Merge branch '157-cleanup-win-libtests-v9_12' into 'v9_12'
Resolve "Windows build fails"

Closes #157

See merge request isc-projects/bind9!131
2018-03-15 13:47:16 -07:00
Evan Hunt 439b968972 remove references to lib/tests in the windows build
(cherry picked from commit e2bb9824f8)
2018-03-15 13:47:16 -07:00
Evan Hunt 221a06b3a0 Merge branch '154-fix-atomic-test-v9_12' into 'v9_12'
Resolve "Build failure on OSX with --disable-atomic --enable-developer"

Closes #154

See merge request isc-projects/bind9!130
2018-03-15 12:09:34 -07:00
Evan Hunt a61afa750f add an 'untested' case when none of the atomic operations are available
- this fixes a build failure introduced in change 4913 when
  compiling with ATF and --disable-atomic

(cherry picked from commit 1b3eac926e)
2018-03-15 12:09:33 -07:00
Ondřej Surý 661364c8cf Fix whitespace 2018-03-15 00:14:23 +01:00
Evan Hunt ef4f433c37 Merge branch 'branchsync' into 'v9_12'
update branchsync to deal with merge commits

See merge request isc-projects/bind9!127
2018-03-14 14:42:53 -07:00
Evan Hunt b1d52fa1b5 updated branchsync to deal with merge commits
(cherry picked from commit fccf8ca2f6)
2018-03-14 14:42:15 -07:00
Ondřej Surý c0a760ac3e [v9_12] Enable GitLab CI 2018-03-14 12:37:17 +01:00
Evan Hunt 77a59b1b4d Merge branch '134-fix-zone-db-reference-counting' into 'v9_12'
Fix a zone database reference counting bug in dump_done()

Closes #134

See merge request isc-projects/bind9!122
2018-03-13 10:52:14 -07:00
Michał KępieńandEvan Hunt e000efa6fd Add CHANGES entry
4914.	[bug]		A bug in zone database reference counting could lead to
			a crash when multiple versions of a slave zone were
			transferred from a master in close succession.
			[GL #134]

(cherry picked from commit 6f3cc75364)
2018-03-13 10:52:01 -07:00
Michał KępieńandEvan Hunt f2838e68e8 Fix a zone database reference counting bug in dump_done()
A typo in commit d39ab7440e introduced a bug in zone database reference
counting which leads to a crash if dumping one version of a slave zone
is not finished by the time transferring a newer version from a master
completes.  Correct the typo to fix reference counting, thus preventing
crashes.

(cherry picked from commit fbd5658db7)
2018-03-13 10:52:01 -07:00
Evan Hunt 165bcaf1a3 Merge branch 'clean-xfer' into 'v9_12'
clean up dig.out files that were left behind after xfer test

See merge request isc-projects/bind9!120
2018-03-10 13:12:26 -08:00
Evan Hunt b52199271a clean up dig.out files that were left behind after xfer test
(cherry picked from commit 733086cc67)
2018-03-10 13:12:20 -08:00
Evan Hunt b337c62aaa Merge branch 'nothreads-fix' into 'v9_12'
Fix compiler warnings and test failures when building without threads

See merge request isc-projects/bind9!119
2018-03-10 10:37:32 -08:00
Evan Hunt 09fade72a0 Fix compiler warnings and test failures when building without threads
(cherry picked from commit 56353aaf42)
2018-03-10 10:37:12 -08:00
Evan Hunt 674ec1d566 Merge branch 'missing-print-h' into 'v9_12' 2018-03-09 16:56:30 -08:00
Evan Hunt 07e2e20868 add missing includes
(cherry picked from commit a173c9c18f)
2018-03-09 16:55:56 -08:00
Evan Hunt 3cf91223b3 Merge branch 'copyrights' into v9_12 2018-03-09 16:53:20 -08:00
Evan Hunt 11ab3146e7 fix copyrights 2018-03-09 16:52:56 -08:00
Evan Hunt 7bc7557df9 Merge branch 'clean-bin-tests-v9_12' into 'v9_12'
clean up bin/tests, convert unit tests to ATF

Closes #115

See merge request isc-projects/bind9!93
2018-03-09 14:40:12 -08:00
Evan Hunt 80834b5b90 final cleanup
- update Kyuafiles to match Atffiles
- copyrights
- CHANGES note

(cherry picked from commit 86e00cbb71)
2018-03-09 14:40:12 -08:00
Evan Hunt 7f4e62d902 reduce race risk in parallel builds
(cherry picked from commit 74347f4a55)
2018-03-09 14:40:10 -08:00
Evan Hunt d35f62434a remove lib/tests as nothing uses it anymore
(cherry picked from commit d132f73497)
2018-03-09 14:39:57 -08:00
Evan Hunt 289836a066 shorten ht_test and random_test
(cherry picked from commit 9b753aa154)
2018-03-09 14:39:56 -08:00
Evan Hunt 4439c471d1 migrate t_dst signature test to lib/dns/tests/dst_test
(cherry picked from commit a4ebe83cdb)
2018-03-09 14:39:56 -08:00
Evan Hunt 56da937399 migrate t_db to lib/dns/tests/db_test
(cherry picked from commit f58ac8ada3)
2018-03-09 14:39:56 -08:00
Evan Hunt aefad99e1e migrate t_names to lib/dns/tests/name_test
(cherry picked from commit 8ecf69ef7b)
2018-03-09 14:39:56 -08:00
Evan Hunt c505afd183 migrate t_rbt to lib/dns/tests/rbt_test
(cherry picked from commit 109546cbda)
2018-03-09 14:39:56 -08:00
Evan Hunt 88bfe56876 migrate t_tasks to lib/isc/tests/task_test
(cherry picked from commit c6c1e99252)
2018-03-09 14:39:56 -08:00
Evan Hunt 30e157f6e4 migrate t_resolver to lib/dns/tests/resolver_test
(cherry picked from commit d80825c40b)
2018-03-09 14:39:56 -08:00
Evan Hunt efccdad0ea migrate t_timers to lib/isc/tests/timer_test
(cherry picked from commit e2b8699df9)
2018-03-09 14:39:56 -08:00
Evan Hunt c7fa56e8db migrate t_atomic to lib/isc/tests/atomic_test
(cherry picked from commit 874e2fc70c)
2018-03-09 14:39:55 -08:00
Evan Hunt af48544b75 migrate t_mem to lib/isc/tests/mem_test
(cherry picked from commit 979f054702)
2018-03-09 14:39:55 -08:00
Evan Hunt af0c9b2cee migrate t_net to lib/isc/tests
(cherry picked from commit 05b7251d51)
2018-03-09 14:39:55 -08:00
Evan Hunt fadb93cf43 migrate t_sockaddr to lib/isc/tests
(cherry picked from commit 62f650078a)
2018-03-09 14:39:55 -08:00
Evan Hunt e686b9c297 remove hashes test (duplicates lib/isc/tests/hash_test)
(cherry picked from commit 6ad1a042bc)
2018-03-09 14:39:55 -08:00
Evan Hunt 36d08442bc remove master test (duplicates lib/isc/tests/master_test)
(cherry picked from commit 6717f31e10)
2018-03-09 14:39:55 -08:00
Evan Hunt d8f8eee381 migrate tests from bin/tests/dnssec-signzone to bin/tests/system/dnssec
- added tests to the dnssec system test that duplicate the ones
  from bin/tests/dnssec-signzone
- changed cleanall.sh so it doesn't automatically remove all
  key files, because there are now some of those that are part of the
  distribution

(cherry picked from commit ccfe778c01)
2018-03-09 14:39:55 -08:00
Evan Hunt dafdf2c09b move all optional tests from bin/tests to bin/tests/optional
- some of these tests are obsolete and should be cleared up,
  others overlap with ATF tests and may be removed later.
  for now, let's just tidy up the bin/tests directory by
  moving these files down a level.

(cherry picked from commit 344ab0eb7d)
2018-03-09 14:39:54 -08:00
Evan Hunt 10efb4ff07 remove some old and obsolete test files
(cherry picked from commit a633f6c5dd)
2018-03-09 14:39:54 -08:00
Evan Hunt d66e66ff95 Merge branch 'parallel-unit-tests' into 'v9_12'
capture more info from unit tests, run in parallel

See merge request isc-projects/bind9!117
2018-03-09 14:37:10 -08:00
Evan Hunt 787c5d1394 allow ATF tests to run in parallel
(cherry picked from commit ef0b4c91bc)
2018-03-09 14:36:06 -08:00
Evan Hunt 81c23fecda capture more information from unit tests
- preserve kyua results database when using kyua
2018-03-09 14:35:21 -08:00
Evan Hunt c54e379267 Merge branch 'v9_12_1_patch' into v9_12 2018-03-08 14:26:15 -08:00
Evan Hunt b523f7dae6 Merge branch 'rm-contrib-md' into v9_12 2018-03-08 12:58:41 -08:00
Evan Hunt 3d06eedf87 remove doc/dev/contrib.md now that CONTRIBUTING.md exists 2018-03-08 12:58:06 -08:00
Evan Hunt b2307b2546 Merge branch 'remove-bind9-bugs-references' into 'v9_12_1_patch'
Update documentation to remove obsolete bind9-bugs@isc.org email address

See merge request isc-projects/bind9!111
2018-03-08 12:56:40 -08:00
Ondřej SurýandEvan Hunt b6a5a9b29e Update documentation to remove obsolete bind9-bugs@isc.org email address
(cherry picked from commit efc9bc5d8d)
(cherry picked from commit 486e79050f)
2018-03-08 12:51:19 -08:00
Michał Kępień 707e538a42 Merge branch '136-tweak-timestamp-checking-in-the-cds-system-test-v9_12' into 'v9_12'
Tweak timestamp checking in the cds system test

Closes #136

See merge request isc-projects/bind9!114
2018-03-08 21:00:57 +01:00
Michał Kępień 1eae5f544b Add CHANGES entry
4912.	[test]		Improved the reliability of the 'cds' system test.
			[GL #136]

(cherry picked from commit c92bacec63)
2018-03-08 21:00:57 +01:00
Michał Kępień be1262c066 Tweak timestamp checking in the cds system test
Given the characteristics of the three timestamps involved in file
modification time checks in the cds system test (each one is an hour
apart from the next), reduce the resolution of these checks to 1 minute.
This will prevent intermittent false negatives caused by exceeding the
currently allowed difference of 9 seconds between file modification
times without making the test moot.

Also note that by using abs(), checkmtime.pl allows the cds system test
to pass when the modification time of the checked file is less than an
hour (or two hours for the second check) in the past.  This should never
happen, so remove abs() from the condition checked by checkmtime.pl.

(cherry picked from commit ab2913a29f)
2018-03-08 21:00:56 +01:00
Evan Hunt d45f656d82 Merge branch 'remove-bind9-bugs-references' into 'v9_12'
Update documentation to remove obsolete bind9-bugs@isc.org email address

See merge request isc-projects/bind9!111
2018-03-08 10:40:44 -08:00
Ondřej SurýandEvan Hunt 486e79050f Update documentation to remove obsolete bind9-bugs@isc.org email address
(cherry picked from commit efc9bc5d8d)
2018-03-08 10:39:36 -08:00
Michał Kępień e205025ace Merge branch '128-fix-mkeys-system-test-race-v9_12' into 'v9_12'
Fix a race in the mkeys system test

Closes #128

See merge request isc-projects/bind9!103
2018-03-08 13:35:34 +01:00
Michał Kępień 508b35fcbc Add CHANGES entry
4911.	[test]		Improved the reliability of the 'mkeys' system test.
			[GL #128]

(cherry picked from commit 32f875f9fc)
2018-03-08 13:35:33 +01:00
Michał Kępień 8e01609014 Fix a race between "rndc reconfig" and waiting for a ./DNSKEY fetch to complete
Calling nextpart() after reconfiguring ns1 is not safe, because the
expected log message may appear in ns5/named.run before nextpart() is
run.  With the TTL for ./DNSKEY set to 20 seconds, ns5 will refresh it
after 10 seconds, by which time wait_for_log() will already have failed.
This results in a false negative.

However, just calling nextpart() before reconfiguring ns1 would
introduce a different problem: if ns5 refreshed ./DNSKEY between these
two steps, the subsequent wait_for_log() call would return immediately
as it would come across the log message about a failure while refreshing
./DNSKEY instead of the expected success.  This in turn would result in
a different false negative as the root key would still be uninitialized
by the time "rndc secroots" is called.

Prevent both kinds of false negatives by:

  - calling nextpart() before reconfiguring ns1, in order to prevent the
    first case described above,

  - looking for a more specific log message, in order to prevent the
    second case described above.

Also look for a more specific log message in the first part of the
relevant check, not to fix any problem, but just to emphasize that a
different fetch result is expected in that case.

With these tweaks in place, if a (failed) ./DNSKEY refresh is scheduled
between nextpart() and reconfiguring ns1, wait_for_log() will just wait
for two more seconds (one "hour"), at which point another refresh
attempt will be made that will succeed.

(cherry picked from commit 012ca0a27d)
2018-03-08 13:35:33 +01:00
Mark Andrews 2145e72644 Merge branch '133-update-util-check-changes-to-work-on-release-branches-v9_12' into 'v9_12'
Resolve "Update util/check-changes to work on release branches."

Closes #133

See merge request isc-projects/bind9!110
2018-03-08 16:18:37 +11:00
Mark Andrews b8d8f846fa update util/check-changes to handle non master branched (util/check-changes master=0 CHANGES)
(cherry picked from commit 88a2202093)
2018-03-08 16:18:36 +11:00
Mark Andrews 586b547a7d fix changes number 2018-03-08 12:40:28 +11:00
Mark Andrews 802f41db30 Merge branch '125-in-view-duplicate-zone-not-detected-by-named-checkconf-v9_12' into 'v9_12'
Resolve "in-view duplicate zone not detected by named-checkconf"

Closes #125

See merge request isc-projects/bind9!97
2018-03-08 12:15:50 +11:00
Mark Andrews 9c056b8fda add changes note for 'named-checkconf did not detect in-view zone collisions'
(cherry picked from commit 83f85817aa)
2018-03-08 12:15:34 +11:00
Mark Andrews a395ee02d3 check for in-view zones colliding with other zone definitions; also check the syntax of the in-view zone name
(cherry picked from commit 3e7e280040)
2018-03-08 12:15:29 +11:00
Mark Andrews 119f626ffa add test configuration where a in-view zone collides with a existing zone
(cherry picked from commit ca55c672b0)
2018-03-08 12:09:03 +11:00
Tinderbox User 77a22353b2 Merge branch 'prep-release' into v9_12_1_patch 2018-03-08 00:55:33 +00:00
Tinderbox User 71f67a0bf6 prep 9.12.1 2018-03-08 00:51:07 +00:00
Evan Hunt 033c1767aa Merge branch 'test-names-v9_12' into 'v9_12'
use the test name in the -D string for each name server

See merge request isc-projects/bind9!107
2018-03-07 14:51:06 -08:00
Evan Hunt 105c8a8cd3 use the test name in the -D string for each name server
(cherry picked from commit 1eff695f33)
2018-03-07 14:51:06 -08:00
Evan Hunt fcea5b8870 Merge branch 'longopts-v9_12' into 'v9_12'
restore long options for run.sh

See merge request isc-projects/bind9!104
2018-03-07 14:35:24 -08:00
Evan Hunt 602533aace restore long options for run.sh
(cherry picked from commit 4a714bffbc)
2018-03-07 14:35:24 -08:00
Evan Hunt f8d096ec3c Merge branch 'allow-query' into 'v9_12'
speed up allow_query test

Closes #81

See merge request isc-projects/bind9!76
2018-03-07 14:20:05 -08:00
Evan Hunt bbbf2418e9 eliminate unnecessary waiting in allow-query test
- grep in the log to see if configuration is finished rather
  than sleeping for 5 seconds

(cherry picked from commit a9b6bed6af)
2018-03-07 13:59:32 -08:00
Evan Hunt f6f6a80c4a rename allow_query to allow-query
(cherry picked from commit ffc3e73c36)
2018-03-07 13:59:32 -08:00
Evan Hunt 18d2368f98 Merge branch '116-dnsrpz-enable-log-message-appears-to-be-broken-v9_12' into 'v9_12'
Resolve "dnsrpz-enable log message appears to be broken"

Closes #116

See merge request isc-projects/bind9!98
2018-03-07 12:56:07 -08:00
Mark AndrewsandEvan Hunt 9354d3443b fix log message about 'dnsrps-enable yes;' when not configured (this will only ever be emitted if the parser is incorrectly updated as the error is normally caught there)
(cherry picked from commit d24fb6b032)
2018-03-07 12:56:07 -08:00
Evan Hunt 229c5b169e Merge branch '119-remove-unnecessary-insist-in-code-v9_12' into 'v9_12'
Remove unnecessary INSIST

Closes #119

See merge request isc-projects/bind9!101
2018-03-07 12:32:17 -08:00
Mark AndrewsandEvan Hunt 573b33b6c2 check insist on every call; make conditional block constistent with rest of code
(cherry picked from commit f1def91625)
2018-03-07 12:32:17 -08:00
Evan Hunt 8bd3a1c737 Merge branch 'fix-notify-v9_12' into 'v9_12'
fix notify test

See merge request isc-projects/bind9!77
2018-03-06 11:46:15 -08:00
Evan Hunt ad32553c1d address a possible notify test failure
- wait for the transfer completion message to apear in the log instead
  of the notify message. this ensures we don't check for the presense of
  transfered records during the time between the notify and the
  transfer.
2018-03-06 11:45:43 -08:00
Michał Kępień b09cbb3954 Merge branch '110-libirs-do-not-ignore-resolv.conf-syntax-errors-v9_12' into 'v9_12'
libirs: Do not ignore resolv.conf syntax errors

Closes #110

See merge request isc-projects/bind9!78
2018-03-06 09:24:13 +01:00
Michał Kępień ecc0d5d10c Add CHANGES entry
4905.	[bug]		irs_resconf_load() ignored resolv.conf syntax errors
			when "domain" or "search" options were present in that
			file. [GL #110]

(cherry picked from commit 1f18d33804)
2018-03-06 09:24:09 +01:00
Michał Kępień b873806cae Remove duplicate irs_resconf_load() unit test
The "sortlist-v4.conf" unit test for irs_resconf_load() is always run
twice due to a duplicate entry in the "tests" table.  Remove one of them
to prevent this.

(cherry picked from commit 6c09f305ae)
2018-03-06 09:23:49 +01:00
Michał Kępień c437451566 Do not ignore resolv.conf syntax errors
irs_resconf_load() stores the value returned by add_search() into ret
without consulting its current value first.  This causes any previous
errors raised while parsing resolv.conf to be ignored as long as any
"domain" or "search" statement is present in the file.

Prevent this by returning early in case an error is detected while
parsing resolv.conf.  Ensure that "searchlist" and "magic" members of
the created irs_resconf_t structure are always initialized before
isc_resconf_destroy() is called.

(cherry picked from commit 1f400b68a8)
2018-03-06 09:23:48 +01:00
Mark Andrews d798b092ef Merge branch '126-make-distclean-fail-v9_12' into 'v9_12'
Resolve ""make distclean" fail."

Closes #126

See merge request isc-projects/bind9!102
2018-03-06 16:11:12 +11:00
Mark Andrews e9969b6d9d don't allow a macro to end in '\'
(cherry picked from commit 57f7cf211c)
2018-03-06 16:11:12 +11:00
Tinderbox User 44f2796dd6 Merge branch 'prep-release' into v9_12_1_patch 2018-03-02 21:57:33 +00:00
Tinderbox User 38be7f6d9b prep 9.12.1rc2 2018-03-02 21:53:26 +00:00
Evan Hunt f8efc9c0a4 Merge branch '124-revert-deadlock-check' into 'v9_12_1_patch'
revert cname loop test due to effects on apex CNAMEs under insecure delegations

See merge request isc-projects/bind9!95
2018-03-02 12:18:50 -08:00
Evan Hunt 06b52cc939 temporarily revert change #4859 2018-03-02 12:14:20 -08:00
Evan Hunt 31ea795d08 Merge branch '124-revert-deadlock-check-v9_12' into 'v9_12'
revert cname loop test due to effects on apex CNAMEs under insecure delegations

See merge request isc-projects/bind9!95
2018-03-02 12:02:18 -08:00
Evan Hunt 84ec07999f temporarily revert change #4859 2018-03-02 12:01:55 -08:00
Michał Kępień cb2fd43e46 Merge branch 'fix-fetchlimit-v9_12' into 'v9_12'
Improve failure logging in fetchlimit system test

See merge request isc-projects/bind9!81
2018-03-01 15:40:50 +01:00
Evan HuntandMichał Kępień 8011165d76 revise soft limit test
- don't bail out of the loop if clients are exceeded, just count incidents
- verbosely describe expectations and results

(cherry picked from commit 86838b2a02)
2018-03-01 15:40:50 +01:00
Michał Kępień e088d7aac5 Merge branch '121-views-system-test-has-wrong-test-strings-for-reload-completion-v9_12' into 'v9_12'
Resolve "views system test has wrong test strings for reload completion."

Closes #121

See merge request isc-projects/bind9!88
2018-02-28 14:55:47 +01:00
Mark AndrewsandMichał Kępień dd1579877f wait for 'all zones loaded' rather than 'reloading zones succeeded' which just indicates that everything kicked off ok
(cherry picked from commit 4cb0873a0a)
2018-02-28 14:55:47 +01:00
Evan Hunt c406a8182b Merge branch '113-minor-testsummary.sh-improvements-v9_12' into 'v9_12'
Minor testsummary.sh improvements (handling colored output, failure summary)

Closes #113

See merge request isc-projects/bind9!80
2018-02-27 10:04:14 -08:00
Evan Hunt fe8bec4b31 Do not destroy systests.output if there are no test.output files
(cherry picked from commit 38940619c6)
2018-02-27 10:04:13 -08:00
Michał KępieńandEvan Hunt 791f26b2c9 Use echoinfo for printing test summary
This ensures testsummary.sh is consistent with other scripts belonging
to the test framework.

(cherry picked from commit 642e20db8a)
2018-02-27 10:04:13 -08:00
Michał KępieńandEvan Hunt 3bd658f561 Make testsummary.sh print a list of failed system tests
Print a list of failed system tests, if any, below the system test
summary to avoid the need to manually search through the test log.

(cherry picked from commit 28068857e7)
2018-02-27 10:04:13 -08:00
Michał KępieńandEvan Hunt 4a5754705d Tweak the regular expression used for extracting system test results
The current regular expression used for extracting system test results
from systests.output, "^R:", is anchored at the start of a line, which
prevents colored system test output from being properly processed.  As
just "R:" would arguably be too general, extend the pattern a bit to
ensure it will only match lines containing system test results.

(cherry picked from commit 9006d6dbbd)
2018-02-27 10:04:13 -08:00
Evan Hunt a699e68e75 Merge branch 'test-output-v9_12' into 'v9_12'
Clean up test output

See merge request isc-projects/bind9!66
2018-02-27 09:41:38 -08:00
Evan Hunt 5053a56072 clean up test output
- removed a few remaing places where output wasn't being passed
  through echo_i or cat_i
- added a "digcomp" function to conf.sh.in to send digcomp.pl output
  through cat_i and return the correct exit value
- set SYSTESTDIR when calling echo_i from nsX directories, so that
  the test name will always be printed correctly
- fixed a test name typo in conf.sh.in

(cherry picked from commit 0e52fbd0b3)
2018-02-27 09:41:38 -08:00
Michał Kępień 173907df58 Merge branch '98-add-util-git-replay-merge.sh-v9_12' into 'v9_12'
Put git-replay-merge in source tree

Closes #98

See merge request isc-projects/bind9!83
2018-02-27 10:42:58 +01:00
Michał Kępień 61d02465cb Add util/git-replay-merge.sh
git-replay-merge.sh is a script whose purpose is to make backporting
merge requests more convenient by automating the process as much as
possible.

For more information, including usage examples, see:

    https://gitlab.isc.org/isc-projects/bind9/wikis/Backporting-a-Merge-Request

(cherry picked from commit f7fe1e3098)
2018-02-27 10:42:58 +01:00
Evan Hunt 4ead1640e3 Merge branch '112-fix-mx-checks-for-dynamic-updates-v9_12' into 'v9_12'
Fix MX checks for dynamic updates

Closes #112

See merge request isc-projects/bind9!79
2018-02-26 15:16:33 -08:00
Michał KępieńandEvan Hunt 71a35bc8e5 Add CHANGES entry
4903.	[bug]		"check-mx fail;" did not prevent MX records containing
			IP addresses from being added to a zone by a dynamic
			update. [GL #112]

(cherry picked from commit 1d403f9d3c)
2018-02-26 15:15:56 -08:00
Michał KępieńandEvan Hunt 590f092e00 Fix MX checks for dynamic updates
The check_mx() function in lib/ns/update.c incorrectly tests whether the
DNS_RDATA_CHECKMX/DNS_RDATA_CHECKMXFAIL flags are set for each applied
MX record update as these flags are never set in code paths related to
dynamic updates; they can only be set when loading a zone from a master
file (DNS_ZONEOPT_CHECKMX -> DNS_MASTER_CHECKMX -> DNS_RDATA_CHECKMX).
This flaw allows MX records containing IP addresses to be added to a
zone even when "check-mx fail;" is used.

Ensure correct behavior by modifying the relevant tests in check_mx() so
that they use DNS_ZONEOPT_CHECKMX/DNS_ZONEOPT_CHECKMXFAIL instead.

(cherry picked from commit 857a40c87b)
2018-02-26 15:15:27 -08:00
Evan Hunt 537d5cc191 Merge branch 'check-for-test-interfaces-before-running-system-tests-v9_12' into 'v9_12'
Check for test interfaces before running system tests

See merge request isc-projects/bind9!19
2018-02-26 15:10:18 -08:00
Evan Hunt bf4c798819 test interfaces directly in runall.sh and parallel.mk
(cherry picked from commit a8b583e78b)
2018-02-26 15:10:18 -08:00
Michał KępieńandEvan Hunt 9cd1a41f31 Check for test interfaces before running system tests
Prevent runall.sh and "make test" from even attempting to run system
tests when "ifconfig.sh up" has not been run beforehand.  This ensures
the user is not flooded with error messages in such a case.

(cherry picked from commit e0221f2d25)
2018-02-26 15:10:18 -08:00
Evan Hunt a11b44e17e Merge branch '66-ixfr-system-test-fails-intermittently-v9_12' into 'v9_12'
chg: dev: Improved the reliability of the 'ixfr' system test. [GL #66]

Closes #66

See merge request isc-projects/bind9!67
2018-02-26 14:59:17 -08:00
Evan Hunt 70f37ce833 wait for synchronization; re-notify slave if the transfer doesn't happen
(cherry picked from commit 67a8b5ec17)
2018-02-26 14:59:09 -08:00
Mark Andrews 660c307a97 Merge branch '51-fix-cppcheck-detected-source-code-errors-v9_12' into 'v9_12'
Resolve "Fix cppcheck-detected source code errors"

Closes #51

See merge request isc-projects/bind9!46
2018-02-26 10:39:45 +11:00
Evan HuntandMark Andrews 26b1e37f87 minor cleanup and addressed a sprintf format warning
(cherry picked from commit ab0fe63f07)
2018-02-26 10:39:44 +11:00
Mark Andrews a29f564e1f update printf format to match type
(cherry picked from commit 48ca11df5f)
2018-02-26 10:39:44 +11:00
Mark Andrews 7adbccfb6d improve the conditional declaration and use of variable to silence cppcheck
(cherry picked from commit a04bb76973)
2018-02-26 10:39:44 +11:00
Mark Andrews a7c51e8c79 remove deadcode
(cherry picked from commit b71a1386ed)
2018-02-26 10:39:44 +11:00
Mark Andrews c5b7bdf0cb silence unread assignment warning by using POST macro
(cherry picked from commit e8249dcd49)
2018-02-26 10:39:44 +11:00
Mark Andrews 1470774f9c update the sscanf format strings so they match the pointer types
(cherry picked from commit 70d192eb97)
2018-02-26 10:39:44 +11:00
Mark Andrews efb8880d1b redefine CHECK so cppcheck see the definition
(cherry picked from commit a4186b1867)
2018-02-26 10:39:44 +11:00
Mark Andrews 4fd6458326 remove unused struct dst_context declaration
(cherry picked from commit f2c22662cc)
2018-02-26 10:39:44 +11:00
Mark Andrews b34931bd49 conditionally typedef fstrmtable
(cherry picked from commit dcd309bea1)
2018-02-26 10:39:43 +11:00
Mark Andrews 65bf254fc8 adjust goto target and conditional compilation so that cleanup_spillattimer and cleanup_alglock labels match the element to be cleanup and so that they are always used
(cherry picked from commit 7b27be54ee)
2018-02-26 10:39:43 +11:00
Evan Hunt 2a5cc9dd85 Merge branch 'note-v9_12' into 'v9_12'
add missing release note

See merge request isc-projects/bind9!73
2018-02-25 14:39:45 -08:00
Evan Hunt c170745f8c added missing release note
(cherry picked from commit cc5432cea5)
2018-02-25 14:39:45 -08:00
Evan Hunt 992a964d38 Merge branch 'upforwd-error-v9_12' into 'v9_12'
Resolve "upforwd test error"

See merge request isc-projects/bind9!72
2018-02-25 13:55:59 -08:00
Evan Hunt 26c1d47e88 fixed an upforwd test error.
(cherry picked from commit 54e010d51e)
2018-02-25 13:55:59 -08:00
Evan Hunt 4a84773a22 Merge branch 'tidy-runall.sh-environment-variables-v9_12' into 'v9_12'
Tidy runall.sh environment variables

See merge request isc-projects/bind9!18
2018-02-24 17:35:57 -08:00
Michał KępieńandEvan Hunt 62ae94478c Preserve values of environment variables which are already set
This enables the environment variables controlling run.sh behavior to be
permanently set in a working environment (e.g. to automatically force
colored output without using "-c" in each runall.sh invocation).

Relevant runall.sh command line arguments still have a higher priority.

(cherry picked from commit d989d20fe5)
2018-02-24 17:35:57 -08:00
Michał KępieńandEvan Hunt 1ff4ee81e0 Allow forcing colored system test output
As parallel.mk and runsequential.sh both pipe system test output through
"tee" (for the purpose of creating test.output), run.sh invoked from
these two files detects it is not writing to a terminal, which prevents
colored output from being generated.  Allow forcing colored output using
a new command line argument for runall.sh, "-c", which sets an
environment variable (SYSTEMTEST_FORCE_COLOR) causing conf.sh to
unconditionally enable colored output.

The same environment variable can also be used directly to force colored
output when using "make test" instead of runall.sh.

(cherry picked from commit a324031a82)
2018-02-24 17:35:57 -08:00
Michał KępieńandEvan Hunt 3c9384eebb Allow retaining system test output using an environment variable
Instead of exporting an environment variable containing a command line
argument (NOCLEAN="-n"), extend run.sh to handle a "boolean" environment
variable (SYSTEMTEST_NO_CLEAN) itself.  The former method is buggy
because the value of NOCLEAN is set in parallel.mk when that file is
first created, but it is not subsequently updated upon each test run
(because make considers parallel.mk to be up to date).

To retain backward compatibility, the "-n" command line argument for
run.sh is still supported (and has a higher priority than the relevant
environment variable).

The SYSTEMTEST_NO_CLEAN environment variable can also be used directly
to prevent cleanup when using "make test" instead of runall.sh.

Apart from fixing a bug, this simplifies the way runall.sh controls
run.sh behavior due to the Makefile being bypassed.  Direct processing
of environment variables in run.sh is more scalable in the long run,
given that the previously utilized technique, even with its
implementation fixed, would still require Makefile.in to be modified in
two places each time a new flag needed to be passed from runall.sh to
run.sh.

(cherry picked from commit 3862043879)
2018-02-24 17:35:57 -08:00
Evan Hunt bf1928c30a Merge branch '71-xfer-system-test-fails-intermittently-v9_12' into 'v9_12'
chg: dev: Improve the resilience of the xfer system test, which could be flaky under load.

Closes #71

See merge request isc-projects/bind9!61
2018-02-24 01:45:49 -08:00
Evan Hunt 09a1a261dc improve reliability of xfer test
(cherry picked from commit 5d7d6881a1)
2018-02-24 01:45:46 -08:00
Evan Hunt ed64c0f619 Merge branch 'kyua-oot-v9_12' into 'v9_12'
chg: dev: Unit tests were broken in out-of-tree builds.

See merge request isc-projects/bind9!57
2018-02-23 15:45:20 -08:00
Petr MenšíkandEvan Hunt eb5c7e91fa unit/unittest.sh is generated by configure. It will always be
generated into builddir. If out-of-tree build is used, make unit
will always fail. Kyuafiles and testdata still have to be copied
manually into the builddir.

(cherry picked from commit 95cde3608a)
2018-02-23 15:45:19 -08:00
Evan Hunt 2505871105 Merge branch 'master-v9_12' into 'v9_12'
Code cleanups

See merge request isc-projects/bind9!36
2018-02-23 13:51:29 -08:00
Petr MenšíkandEvan Hunt d04af52222 Reduce repeated detection of mysql lib directory.
Use common part once a bit later.

(cherry picked from commit 2a70eae04f)
2018-02-23 13:51:23 -08:00
Petr MenšíkandEvan Hunt cb98ce8e67 Reuse new function from rt46864 for similar block elsewhere.
(cherry picked from commit e7a93321f0)
2018-02-23 13:51:23 -08:00
Evan Hunt 574475539d Merge branch '95-fix-dyndb-v9_12' into 'v9_12'
Resolve "dyndb system test fails intermittently"

Closes #95

See merge request isc-projects/bind9!63
2018-02-23 13:39:55 -08:00
Evan Hunt b41d27d2a2 improve dyndb test resilience
- no longer grep for specific line numbers when checking
  parameter logging, as those can change
- report the failure immediatey if parameter check fails

(cherry picked from commit 749df056be)
2018-02-23 13:39:55 -08:00
Michał KępieńandOndřej Surý 59c637c019 Fix dyndb system test after copyright information update
(cherry picked from commit b20ff30a79)
2018-02-23 16:02:48 +01:00
Ondřej Surý 06dd7555e5 Merge branch 'year-2018-copyright-update-in-master-v9_12' into 'v9_12'
Remove copyright years from individual source files (and keep them only in the COPYRIGHT file)

Closes #55

See merge request isc-projects/bind9!37
2018-02-23 10:38:10 +01:00
Ondřej Surý 557a5c3f78 Update license headers to not include years in copyright in all applicable files
(cherry picked from commit 843d389661)
2018-02-23 10:38:02 +01:00
Ondřej Surý b1fb05bead Update scripts in util/ to drop the year information from the individual source files.
(cherry picked from commit c8efcca408)
2018-02-23 10:34:51 +01:00
Ondřej Surý 6454e7169f Merge branch '91-parallel-tests-v9_12' into 'v9_12'
chg: dev: Convert most of the remaining system tests to be able to run in parallel [GL #91]

Closes #91

See merge request isc-projects/bind9!59
2018-02-23 08:34:40 +01:00
Evan HuntandOndřej Surý 7f1039d8d0 final cleanup
- add CHANGES note
- update copyrights and license headers
- add -j to the make commands in .gitlab-ci.yml to take
  advantage of parallelization in the gitlab CI process

(cherry picked from commit 0c559199bf)
2018-02-23 08:34:37 +01:00
Evan HuntandOndřej Surý a5015d7791 improve reliability of the xfer test on slow systems
- lengthed the wait loop for the transfers to complete

(cherry picked from commit b9246ce773)
2018-02-23 08:32:03 +01:00
Evan HuntandOndřej Surý 7971873639 remove v6synth
- this was a test for the allow-v6-synthesis option, which was
  deprecated and no longer works. the test was removed
  from conf.sh.in long ago.

(cherry picked from commit 474b10a133)
2018-02-23 08:32:03 +01:00
Evan HuntandOndřej Surý 17245b86d5 removed some unnecessary greps
(cherry picked from commit 731ad28be2)
2018-02-23 08:32:03 +01:00
Evan HuntandOndřej Surý 4429f8b291 reorder tests to get better use of parallelism
(cherry picked from commit 56e440f65f)
2018-02-23 08:32:03 +01:00
Evan HuntandOndřej Surý 2b81f322cb parallelize most system tests
(cherry picked from commit c032c54dda)
2018-02-23 08:31:59 +01:00
Mark Andrews 9554107d15 Merge branch 'cherry-pick-14388a4a' into 'v9_12'
Merge branch '68-rpz-system-test-fails-intermittently' into 'v9_12'

See merge request isc-projects/bind9!54
2018-02-21 23:10:50 -05:00
Mark Andrews dc445b7d8a Merge branch '68-rpz-system-test-fails-intermittently' into 'master'
Prevent rpz system test from wiping out forensic data

See merge request isc-projects/bind9!51

(cherry picked from commit 14388a4ad6)

034450ba add test numbers as use them in file names
05f9deba use symbolic test modes native/dnsrps
b98a9207 perform rpz testing with a loop rather that recursion
f7172cf2 add CHANGES note
2018-02-21 23:10:12 -05:00
Mark Andrews c50bae4a04 Merge branch 'cherry-pick-aa7964dd' into 'v9_12'
Merge branch '82-cacheclean-test-is-not-robust' into 'v9_12'

See merge request isc-projects/bind9!52
2018-02-21 20:33:58 -05:00
Mark Andrews d7cd9fe95b Merge branch '82-cacheclean-test-is-not-robust' into 'master'
Resolve "cacheclean test is not robust."

Closes #82

See merge request isc-projects/bind9!50

(cherry picked from commit aa7964dd4b)

146c16c0 check that sed selects a non zero range of lines
8c8ad74a add CHANGES entry
2018-02-21 20:17:21 -05:00
Stephen Morris b3c84d31ac Merge branch 'rt46602-v9_12' into 'v9_12'
Allow parallel run of system tests

See merge request isc-projects/bind9!7
2018-02-21 15:47:16 +00:00
Stephen Morris 13a89cf671 [rt46602] Update CHANGES for parallel tests 2018-02-21 15:47:03 +00:00
Stephen Morris 1d1b37d838 [rt46602] Changes to get tests running on Windows
1. Track changes to conf.sh.in in conf.sh.win32
2. Modifications to prevent Windows "Configure" script replacing
   the sed "@PORT@" substitution tokens in conf.sh.win32.
3. runall.sh now runs Windows tests sequentially

(cherry picked from commit 7bb9a97904)
2018-02-21 15:44:40 +00:00
Stephen Morris a9e25e9686 [rt46602] Miscellaneous changes to fix rebase issues
(cherry picked from commit 7222c9fc76)
2018-02-21 15:44:40 +00:00
Stephen Morris 2b0b035571 [rt46602] Change name of shell variable holding current test directory
It was TESTNAME, but this is an obvious name and was used in one of
the system tests, something that interfered with the content of
progress messages.  It is now SYSTESTDIR.

(cherry picked from commit 30cd931a0d)
2018-02-21 15:44:40 +00:00
Michał KępieńandStephen Morris 8fc6d51b0d [rt46602] Export environment variables in a portable manner
(cherry picked from commit 2c519531a7)
2018-02-21 15:44:40 +00:00
Michał KępieńandStephen Morris a8b10e9b3a [rt46602] Sanitize test names to fix "make check" on Solaris
(cherry picked from commit e005fb948d)
2018-02-21 15:44:40 +00:00
Stephen Morris 9078c24900 [rt46602] Add .gitignore file for catz
(cherry picked from commit 3dfb7c17eb)
2018-02-21 15:44:40 +00:00
Stephen Morris 121be65138 [rt46602] Pass noclean option to Makefile via exported variable
(cherry picked from commit 59d88ee192)
2018-02-21 15:44:40 +00:00
Stephen Morris b98e011dc6 [rt46602] Mention conf.sh.win32 in instructions for adding a test.
(cherry picked from commit 23dfa27a84)
2018-02-21 15:44:40 +00:00
Michał KępieńandStephen Morris c6b66a406d [rt46602] Fix various typos, formatting issues and stylistic nits
(cherry picked from commit f0721de624)
2018-02-21 15:44:39 +00:00
Michał KępieńandStephen Morris 18b0ad81ec [rt46602] Remove redundant variable assignment
(cherry picked from commit 42cf18d239)
2018-02-21 15:44:39 +00:00
Michał KępieńandStephen Morris 63bbbb936a [rt46602] named.port is no longer created by setup.sh for allow_query
(cherry picked from commit 1ac4c3e4e5)
2018-02-21 15:44:39 +00:00
Michał KępieńandStephen Morris 933bba9d73 [rt46602] Consistently print usage for runall.sh to stderr
(cherry picked from commit fe1ccafc34)
2018-02-21 15:44:39 +00:00
Michał KępieńandStephen Morris 9ff064089b [rt46602] Clean up getopts usage
Ensure case clauses are in sync with the string passed to getopts.
Remove catch-all clauses as they will never be evaluated.

(cherry picked from commit 0dcee1cad3)
2018-02-21 15:44:39 +00:00
Michał KępieńandStephen Morris 815820b3a9 [rt46602] Assign default values to variables set by command line options and consistently treat them as integers
(cherry picked from commit fe51c34df3)
2018-02-21 15:44:39 +00:00
Michał KępieńandStephen Morris 3c7784b745 [rt46602] named.port cannot be ignored by git because it is required to be present by notify/ns4
(cherry picked from commit 1960de5530)
2018-02-21 15:44:39 +00:00
Michał KępieńandStephen Morris 5b0a99e291 [rt46602] Re-add clean.sh invocation to catz/setup.sh
Commit 57aa7b60fd caused catz/setup.sh to no longer call clean.sh, which
results in the catz system test failing on subsequent runs if the first
run is interrupted or fails.

(cherry picked from commit 344d05063f)
2018-02-21 15:44:39 +00:00
Stephen Morris 6f341ed6cd [rt46602] Remove option to format the printed start time of a test
There was too much incompatibility between operating systems as to
the allowed options for "date".

(cherry picked from commit 451b7309ca)
2018-02-21 15:44:39 +00:00
Stephen Morris d59a3f1c82 [rt46602] Escape line ends in shell script variable assignment
Escape the line ends in a multi-line variable assignment.  Under some
circumstances, substituting the variable caused syntax errors when
used as the list of values in a shell script "for" statement.

(cherry picked from commit 462766cd76)
2018-02-21 15:44:39 +00:00
Stephen Morris c18241451b [rt46602] Fix EXTRAPORT substitutions in copy_setport
Fix problems where all EXTRAPORT macros were being replaced by
the EXTRAPORT1 value. (Copy and paste issue.)

(cherry picked from commit fb78f82ba1)
2018-02-21 15:44:39 +00:00
Stephen Morris 33394a55e4 [rt46602] Minor documentation changes
(cherry picked from commit cdf18a5009)
2018-02-21 15:44:39 +00:00
Stephen Morris 3906b1778f [rt46602] Correct way allow_query test produces RNDC output
(cherry picked from commit 7f2d41d4c4)
2018-02-21 15:44:39 +00:00
Stephen Morris 7cb5722c49 [rt46602] Simplify the cleanup code
(cherry picked from commit 0855a8a6cc)
2018-02-21 15:44:39 +00:00
Stephen Morris 269858ac02 [rt46602] Extensions to README
Added descriptions of how nameservers are started and stopped
during the tests, and how the framework cleans up the files created.

(cherry picked from commit f606b17dfb)
2018-02-21 15:44:39 +00:00
Stephen Morris 34a8e43ac1 [rt46602] Miscellenous small changes
(cherry picked from commit b88b508b22)
2018-02-21 15:44:39 +00:00
Stephen Morris 820c47b137 [rt46602] Handle echoing of multi-line output from tests
(cherry picked from commit 1f07c69f25)
2018-02-21 15:44:38 +00:00
Stephen Morris f6d8f9cdcb [rt46602] Rename "test" variable to "systest"
... to avoid confusion between the variable and the command of the
same name.

(cherry picked from commit c12e06755f)
2018-02-21 15:44:38 +00:00
Stephen Morris ec063cdc99 [rt46602] Add ability to prevent deletion of output files when running all tests
Some tests may need to examine all output files from all system tests.
Allow the deletion of these files to be inhibited if required.

(cherry picked from commit 00bc29640b)
2018-02-21 15:44:38 +00:00
Stephen Morris d150fe27ed [rt46602] Error messages before start of test are output to stderr
Error messages concerning the invocation of run.sh are output to
stderr.  Messages after the test has started are output to stdout.

(cherry picked from commit 244d1c30e2)
2018-02-21 15:44:38 +00:00
Stephen Morris 3859c55031 [rt46602] Ensure that output sent to stderr is routed to the output file
(cherry picked from commit a5cf6bd12a)
2018-02-21 15:44:38 +00:00
Stephen Morris 626bd48214 [rt46602] Minor tidying up of documentation
(cherry picked from commit ce66752adc)
2018-02-21 15:44:38 +00:00
Stephen Morris 4dc368a837 [rt46602] Check prerequsities before network interfaces when running test.
(cherry picked from commit 549a6c6bc8)
2018-02-21 15:44:38 +00:00
Stephen Morris d737040fcf [rt46602] Minor formatting changes to Perl files
(cherry picked from commit f0f5b5f045)
2018-02-21 15:44:38 +00:00
Stephen Morris 9e176a0a34 [rt46603] Provide echostart() and echoend() to output test start/end messages.
(cherry picked from commit c344e1d768)
2018-02-21 15:44:38 +00:00
Stephen Morris 62652988ed [rt46602] Ensure test output in systests.output is not mixed up
When running all the system tests, output from a test is sent to a
test.output file in the test directory.  These are combined in to
systests.output when the run finishes.

(cherry picked from commit 055e5be9fd)
2018-02-21 15:44:38 +00:00
Stephen Morris 0a372b07a9 [rt46602] Miscellaneous minor fixes
... for misspellings, typos, trailing spaces, duplicated lines etc.

(cherry picked from commit 3c25e5fa02)
2018-02-21 15:44:38 +00:00
Stephen Morris 0d9b1190ce [rt46602] Allocate 100 ports to each test
(cherry picked from commit edc7a18d84)
2018-02-21 15:44:38 +00:00
Stephen Morris 21e48340b3 [rt46602] Pass port numbers to tests via environment variables
(cherry picked from commit f5d8f07900)
2018-02-21 15:44:38 +00:00
Stephen Morris 32b4e0ce4d [rt46602] Ensure parallel tests are in alphabetical order
(cherry picked from commit b2d90da0c2)
2018-02-21 15:44:38 +00:00
Stephen Morris 353ab4dc69 [rt46602] Expanded system tests README
Add more information on running the tests, together with a section
on how the tests are organised, aimed at new developers.

(cherry picked from commit af005cdbcf)
2018-02-21 15:44:38 +00:00
Stephen Morris a807f8a77a [rt46602] More updates to the test running framework
Tidy up the stop/start files and make switch usage consistent. Also
tidy up the various "clean" targets in the Makefile.

(cherry picked from commit b24c2e11d8)
2018-02-21 15:44:37 +00:00
Stephen Morris cbe20bcc1f [rt46602] Modify some test files to cope with the "-p" flag
(cherry picked from commit 517d990bd4)
2018-02-21 15:44:37 +00:00
Stephen Morris 499e768d07 [rt46602] Tidy up run management
Miscellaneous tidying up of run management.  The most significant
change is that "runall.sh" now runs _all_ the tests, even the
ones that can run in parallel.  runsequential.sh is the script
to run tests that have not been converted to parallel running.

(cherry picked from commit 32fe6f7682)
2018-02-21 15:44:37 +00:00
Stephen Morris b2f2c67fd9 [rt46602] Assign block of ports for each test
Some tests use more ports than just the query and control ports.
Each test that can run in parallel with other tests is now assigned
a unique block of 10 ports.

(cherry picked from commit e0ff77f9d3)
2018-02-21 15:44:37 +00:00
Stephen Morris 60945507d8 [rt46602] Allow catz system test to run in parallel with other tests
(cherry picked from commit 07341693e1)
2018-02-21 15:44:37 +00:00
Stephen Morris 2ed6a072c9 [rt46602] Miscellaneous changes to existing parallelised tests
Currently these tests are allow_query, rpzrecurse and serve-stale

1. Function to copy files and set port numbers renamed from copy_config
to copy_setports, as this is used to change the ports in Perl and Python
test scripts as well.
2. Changes to rpzrecurse/tests.sh to handle two calls to getopts (one to
parse port numbers, the other to parse rpzrecurse-specific options). Also
fixed various commands to use correct ports.
3. Updates to "clean.sh" scripts to ensure that all files created in the
test are removed.

(cherry picked from commit 78f2b9ca01)
2018-02-21 15:44:37 +00:00
Stephen Morris 6fbf96c112 [rt46602] Ensure that tests running in parallel use unique ports
Via an intermediate make file, tests that have been modified to be able
to run in parallel are assigned unique query and control port numbers
(other than 5300 and 9953 respectively).  Tests that have not yet been
modified all use ports 5300 and 9953, so must be run sequentially.

(cherry picked from commit e7429b124b)
2018-02-21 15:44:37 +00:00
Stephen Morris f396d62285 [rt46602] Miscellaneous tidying up of code cherry-picked from experimental branch
(cherry picked from commit e1a69e5d1f)
2018-02-21 15:44:37 +00:00
Ondřej SurýandStephen Morris e34bd38f69 [rt46602] Allow parallel run of new dynamic port tests and the old ones
(cherry picked from commit 3b14d54fd7)
2018-02-21 15:44:37 +00:00
Ondřej SurýandStephen Morris 79fe35af4a [rt46602] Put back original .gitignore files in the system tests
(cherry picked from commit caaec1ef6d)
2018-02-21 15:44:37 +00:00
Ondřej SurýandStephen Morris 4465749695 [rt46602] Adjust rpzrecurse for dynamic port usage
Resolve conflict in run.sh during cherry-pick from an experimental branch.

(cherry picked from commit 2a435708e4)
2018-02-21 15:44:37 +00:00
Ondřej SurýandStephen Morris 6890a3b63e [rt46602] Add $SEDPORTS variable to help with @PORT@ and @CONTROLPORT@ replacement
(cherry picked from commit e6802badc0)
2018-02-21 15:44:37 +00:00
Ondřej SurýandStephen Morris e00c4c1b66 [rt46602] Move most of ignored files to top of system tests directory
(cherry picked from commit d2c8286163)
2018-02-21 15:44:37 +00:00
Ondřej SurýandStephen Morris 2d41a16ba9 [rt46602] Fix output from rndc reload
(cherry picked from commit 53bade5ece)
2018-02-21 15:44:37 +00:00
Ondřej SurýandStephen Morris 5dc741cd3e [rt46602] Add .gitignore to allow_query
(cherry picked from commit bc276f6c05)
2018-02-21 15:44:37 +00:00
Ondřej SurýandStephen Morris c707a93f6d [rt46602] Utilize echo_i to allow mixed test output
(cherry picked from commit 7e3c96c867)
2018-02-21 15:44:36 +00:00
Ondřej SurýandStephen Morris 2c99184849 [rt46602] Prefix R:<result> as R:<test>:<result>
Resolve conflict in run.sh during cherry-pick from experimental branch.

(cherry picked from commit 278c72fef6)
2018-02-21 15:44:36 +00:00
Ondřej SurýandStephen Morris 3be9b6078f [rt46602] Add echo_i function to print I:<testname>:string
(cherry picked from commit f7ac41757a)
2018-02-21 15:44:36 +00:00
Ondřej SurýandStephen Morris 9974e247ff [rt46602] Add serve-stale working files to .gitignore
(cherry picked from commit cba162e70e)
2018-02-21 15:44:36 +00:00
Ondřej SurýandStephen Morris 0b174d71d3 [rt46602] Convert allow_query to dynamic port
(cherry picked from commit 992a2bafec)
2018-02-21 15:44:36 +00:00
Ondřej SurýandStephen Morris 8a107c58f2 [rt46602] Update server-stale test to run on port passed from run.sh script
(cherry picked from commit f83ebd34b9)
2018-02-21 15:44:36 +00:00
Ondřej SurýandStephen Morris 0b1a5a586f [rt46602] Change the system tests script to support running individual tests on different ports
Resolved conflict in run.sh.

(cherry picked from commit fb00f18005)
2018-02-21 15:44:36 +00:00
Mark Andrews 01ec64fc76 Merge branch 'cherry-pick-643c8c27' into 'v9_12'
Merge branch '67-stabilize-cacheclean-system-test' into 'v9_12'

See merge request isc-projects/bind9!48
2018-02-20 16:08:23 -05:00
Mark Andrews e5fcbe5f26 Merge branch '67-stabilize-cacheclean-system-test' into 'master'
Stabilize cacheclean system test

Closes #67

See merge request isc-projects/bind9!43

(cherry picked from commit 643c8c27ff)

01de79b3 Assign an index to each check in the cacheclean system test
aeea1faf Do not overwrite cache dumps
2bbff06d Wait until a cache dump completes instead of waiting for a fixed amount of time
ca1049b2 Improve the way cache contents are searched for "ns.flushtest.example"
2018-02-20 16:02:34 -05:00
Evan Hunt cd8d44403b [v9_12] copyrights 2018-02-17 21:26:12 -08:00
Tinderbox User c964a71c76 regen v9_12 2018-02-18 04:13:10 +00:00
Evan Hunt 5254978eec [v9_12] re-prep 9.12.1rc1 to include needed fixes; update README 2018-02-17 19:54:52 -08:00
Michał Kępień ba787b3a57 Merge branch 'fix-dnstap-output-file-rolling-v9_12' into v9_12 2018-02-16 11:39:16 +01:00
Michał Kępień bc22789bcb Add CHANGES entry
4894.	[bug]		named could crash while rolling a dnstap output file.
			[RT #46942]
2018-02-16 09:38:48 +01:00
Michał Kępień 5f12985f0b Make dns_dt_send() call dns_dt_reopen() asynchronously
Instead of checking current dnstap output file size and potentially
synchronously calling dns_dt_reopen() upon every call to dns_dt_send():

  - call dns_dt_reopen() asynchronously by queuing an event to the task
    specified at dnstap environment creation time,

  - ensure no roll event is outstanding before checking dnstap output
    file size and potentially queuing another roll event.

This causes dnstap output files to exceed their configured size limits,
but prevents any two threads from performing the roll simultaneously
(which causes crashes).
2018-02-16 09:37:23 +01:00
Michał Kępień 2c1307f061 Make dns_dt_reopen() request task-exclusive mode on its own
Instead of relying on the caller to set up task-exclusive mode, make
dns_dt_reopen() enforce task-exclusive mode itself, using the task
specified at dnstap environment creation time.
2018-02-16 09:37:23 +01:00
Michał Kępień e26c5df16f Add dns_dt_create2()
Implement a new variant of dns_dt_create() to enable a dnstap
environment structure to hold the task in the context of which
dns_dt_reopen() will be executed.
2018-02-16 09:37:23 +01:00
Michał Kępień fba6c2e982 Merge branch 'fix-loadpending-handling-v9_12' into v9_12 2018-02-16 08:55:23 +01:00
Michał Kępień 3235c3b2e4 Add CHANGES entry
4892.	[bug]		named could leak memory when "rndc reload" was invoked
			before all zone loading actions triggered by a previous
			"rndc reload" command were completed. [RT #47076]
2018-02-16 08:48:05 +01:00
Michał Kępień 840c9348bf Do not recheck DNS_ZONEFLG_LOADPENDING in zone_asyncload()
Remove a block of code which dates back to commit 8a2ab2b920, when
dns_zone_asyncload() did not yet check DNS_ZONEFLG_LOADPENDING.
Currently, no race in accessing DNS_ZONEFLG_LOADPENDING is possible any
more, because:

  - dns_zone_asyncload() is still the only function which may queue
    zone_asyncload(),

  - dns_zone_asyncload() accesses DNS_ZONEFLG_LOADPENDING under a lock
    (and potentially queues an event under the same lock),

  - DNS_ZONEFLG_LOADPENDING is not cleared until the load actually
    completes.

Thus, the rechecking code can be safely removed from zone_asyncload().

Note that this also brings zone_asyncload() to a state in which the
completion callback is always invoked.  This is required to prevent
leaking memory in case something goes wrong in zone_asyncload() and a
zone table the zone belongs to is indefinitely left with a positive
reference count.
2018-02-16 08:47:40 +01:00
Michał Kępień 3395f6fac3 Asynchronous zone load events have no way of getting canceled
Code handling cancellation of asynchronous zone load events was likely
copied over from other functions when asynchronous zone loading was
first implemented in commit 8a2ab2b920.  However, unlike those other
functions, asynchronous zone loading events currently have no way of
getting canceled once they get posted, which means the aforementioned
code is effectively dead.  Remove it to prevent confusion.
2018-02-16 08:47:40 +01:00
Michał Kępień 7c64547d95 Only clear DNS_ZONEFLG_LOADPENDING in zone_asyncload() if zone loading is completed immediately
zone_load() is not always synchronous, it may only initiate an
asynchronous load and return DNS_R_CONTINUE, which means zone loading
has not yet been completed.  In such a case, zone_asyncload() must not
clear DNS_ZONEFLG_LOADPENDING immediately and leave that up to
zone_postload().
2018-02-16 08:47:40 +01:00
Michał Kępień 93c176d2d6 Lock zone before checking whether its asynchronous load is already pending
While this is not an issue in named, which only calls
dns_zone_asyncload() from task-exclusive mode, this function is exported
by libdns and thus may in theory be concurrently called for the same
zone by multiple threads.  It also does not hurt to be consistent
locking-wise with other DNS_ZONEFLG_LOADPENDING accesses.
2018-02-16 08:47:40 +01:00
Mark Andrews 44d995992a Merge branch 'fix-cpp-check-errors' into 'v9_12'
Fix cpp check errors v9_12

See merge request isc-projects/bind9!29
2018-02-15 22:15:49 -05:00
Mark Andrews a5ea45f9f6 s/cppchecker/cppcheck 2018-02-16 14:09:10 +11:00
Mark Andrews 171843167b add GL issue number 2018-02-16 14:09:09 +11:00
Mark Andrews 6ab800a82b add CHANGES note 2018-02-16 14:09:09 +11:00
Mark Andrews 3208b02910 add POST(len); 2018-02-16 14:08:26 +11:00
Mark Andrews 736cbc97d7 conditionally declare stacksize 2018-02-16 14:08:26 +11:00
Mark Andrews 58c141e9b6 add POST(len); 2018-02-16 14:08:26 +11:00
Mark Andrews 494a3b33a2 Clarify calculation precedence for '&' and '?' 2018-02-16 14:08:26 +11:00
Mark Andrews d6b79d3d43 add POST(tl) 2018-02-16 14:08:26 +11:00
Mark Andrews 57fbc03b11 return failure count 2018-02-16 14:08:26 +11:00
Mark Andrews 6a896a0247 conditionally declare strbuf 2018-02-16 14:08:26 +11:00
Mark Andrews 13e2a127f2 test for == 0 rather than <= as value is unsigned 2018-02-16 14:08:26 +11:00
Mark Andrews 5aba593545 add brackets 2018-02-16 14:08:26 +11:00
Mark Andrews cf53ca27d5 reorder test to silence cppcheck 2018-02-16 14:08:26 +11:00
Mark Andrews e416b6f57c remove event which is only used for sizeof 2018-02-16 14:08:26 +11:00
Mark Andrews a87296cb7b remember the masters count 2018-02-16 14:08:26 +11:00
Mark Andrews 6fc28063f1 reorder test to silence cppcheck 2018-02-16 14:08:26 +11:00
Mark Andrews fb93276320 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 3b412a0634 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews d23375e5b3 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews e34eec79a8 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 7670515fac use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 14e5f05a5e use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 5a21fe753d use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 1e943e3f3a use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews ade6a20c56 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews cf063314f2 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews bf74665d5c case to unsigned; reorder expression 2018-02-16 14:08:26 +11:00
Mark Andrews 800c5a61a2 simplify expression 2018-02-16 14:08:26 +11:00
Mark Andrews 2f859b6f9e use %u and preserve unsigned property 2018-02-16 14:08:26 +11:00
Mark Andrews a4d75d92aa make declaration and use of setnocookie fully conditional 2018-02-16 14:08:26 +11:00
Mark Andrews c178a8e904 cast to unsigned 2018-02-16 14:08:26 +11:00
Mark Andrews 19ef6d7b21 preserve unsigned property 2018-02-16 14:08:26 +11:00
Mark Andrews d76f6a67dd use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 585a420c64 make both arguments of & unsigned 2018-02-16 14:08:26 +11:00
Mark Andrews d177c5ffc1 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 000eec7831 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews eaae1216b3 use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews 1bca37c8e1 shift unsigned (~0U) rather than signed (~0) contant 2018-02-16 14:08:26 +11:00
Mark Andrews 684424a6fe use %u instead of %d 2018-02-16 14:08:26 +11:00
Mark Andrews f691251b95 unsigned constants 2018-02-16 14:08:26 +11:00
Mark Andrews df835b580b unsigned constants 2018-02-16 14:08:25 +11:00
Mark Andrews 615822391e use %u instead of %d 2018-02-16 14:08:25 +11:00
Mark Andrews ef957e6d25 use %u instead of %d 2018-02-16 14:08:25 +11:00
Mark Andrews 9e2a1ba979 use %u instead of %d 2018-02-16 14:08:25 +11:00
Mark Andrews da38b41d83 prevent implict conversion to signed 2018-02-16 14:07:35 +11:00
Mark Andrews c132205eb2 use %u instead of %d 2018-02-16 14:07:35 +11:00
Mark Andrews e25d38c68b INSIST ipnum6 != NULL 2018-02-16 14:07:35 +11:00
Mark Andrews bb426bb13a use %u instead of %d 2018-02-16 14:07:35 +11:00
Mark Andrews fa7f2ef594 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 571b3a4005 test for >= 0 and use %d instead of %u 2018-02-16 14:07:34 +11:00
Mark Andrews c4c2d94e61 formally cast to int; use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews e71e7673b3 formally cast to int 2018-02-16 14:07:34 +11:00
Mark Andrews 5c2ea775c4 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 059ff0206b use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 90f7a76891 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 7aab54de6f use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews cc0b343e78 copyrights 2018-02-16 14:07:34 +11:00
Mark Andrews 2e0129aba4 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 018cb006e1 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 4230e366b4 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews a6c47e456e use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews aaac93da3c make declarations consistent 2018-02-16 14:07:34 +11:00
Mark Andrews 51e274b187 report argument error in human form 2018-02-16 14:07:34 +11:00
Mark Andrews 191ebf1076 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 4f6706e0ed use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews ef5ecb3e6d use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 599d257fad use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 7aa9ea8709 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews 0a9b55e23e use %u instead of %i 2018-02-16 14:07:34 +11:00
Mark Andrews 6a2292d0f4 use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews a014677c1f use %u rather than %d; pass a unsigned int pointer 2018-02-16 14:07:34 +11:00
Mark Andrews ef3b87e15a clear *logp 2018-02-16 14:07:34 +11:00
Mark Andrews 5e29734aee use %u instead of %d 2018-02-16 14:07:34 +11:00
Mark Andrews dddb3e2976 signed vs unsigned fixes 2018-02-16 14:07:34 +11:00
Tinderbox User a85fdc1c5b regen v9_12 2018-02-15 19:30:53 +00:00
Evan Hunt d37fb4625c [v9_12] prep 9.12.1rc1 2018-02-15 11:12:45 -08:00
Evan Hunt d44775b859 [v9_12] copyrights 2018-02-10 16:30:58 -08:00
Mark Andrews dc089b3339 check warning text
(cherry picked from commit c6cd108838)
2018-02-09 14:05:20 +11:00
Mark Andrews 06da554649 get the correct test file
(cherry picked from commit ae09500989)
2018-02-09 13:57:39 +11:00
Evan Hunt cbd58053e6 [v9_12] fix test error 2018-02-08 18:45:56 -08:00
Evan HuntandMark Andrews b032182b8a [rt43670] more emphatic warning 2018-02-09 12:29:02 +11:00
Mark Andrews 303f4e8b5d 4889. [func] Warn about the use of old root keys without the new
root key being present.  Warn about dlv.isc.org's
                        key being present. Warn about both managed and
                        trusted root keys being present. [RT #43670]

(cherry picked from commit baef0ca988)
2018-02-09 12:11:10 +11:00
Evan Hunt e19f246994 [v9_12] fix typo 2018-02-08 16:16:03 -08:00
Evan Hunt ed829a6ba4 [v9_12] copyrights 2018-02-08 14:30:02 -08:00
Tinderbox User 7c95fa1c87 regen v9_12 2018-02-08 22:22:04 +00:00
Evan Hunt b979f79037 [v9_12] update README and notes 2018-02-08 14:15:37 -08:00
Tinderbox User 42f67ba196 regen v9_12 2018-02-08 21:56:13 +00:00
Evan Hunt 988f5de10a [v9_12] prep 9.12.1b1 2018-02-08 13:47:56 -08:00
Evan Hunt 8fb952e6ab [v9_12] copyrights 2018-02-08 13:40:50 -08:00
Mark AndrewsandEvan Hunt e79cb31fdf [v9_12] fix nsupdate test on windows
4888.	[test]		Initialize sockets correctly in sample-update so
			that nsupdate system test will will run on Windows.
			[RT #47097]

(cherry picked from commit 6757dc6488)
2018-02-08 13:35:11 -08:00
Mark AndrewsandEvan Hunt e59f44f51d [v9_12] fix rpzrecurse test on windows
4887.	[test]		Enable the rpzrecurse test to run on Windows.
			[RT #47093]

(cherry picked from commit ecf6dcc5c6)
2018-02-08 13:29:17 -08:00
Tony FinchandMukund Sivaraman 30c86d5649 Document dig -u in manpage (#47150)
(cherry picked from commit cc82b5aa3c)
2018-02-09 00:52:25 +05:30
Tinderbox User 9f91102603 regen v9_12 2018-02-08 01:18:14 +00:00
Tinderbox User 85fec73a21 update copyright notice / whitespace 2018-02-07 23:47:00 +00:00
Tinderbox User 5294428582 newcopyrights 2018-02-07 23:31:36 +00:00
Mark Andrews fe8d9962d2 add note for update-policy rules changes
(cherry picked from commit ff8f2a584d)
2018-02-07 14:03:51 +11:00
Mark Andrews b329876bf1 4885. [security] update-policy rules that otherwise ignore the name
field now require that it be set to "." to ensure
                        that any type list present is properly interpreted.
                        [RT #47126]

(cherry picked from commit ec771bbdc8)
2018-02-07 13:36:45 +11:00
Tinderbox User 4c0adf3d56 update copyright notice / whitespace 2018-02-05 23:47:17 +00:00
Tinderbox User 5d6a5c810c newcopyrights 2018-02-05 23:30:15 +00:00
Michał Kępień 5c33d89ff1 [v9_12] Prevent crashing due to a race during server shutdown
4884.	[bug]		named could crash on shutdown due to a race between
			shutdown_server() and ns__client_request(). [RT #47120]

(cherry picked from commit af1937c35a)
2018-02-05 20:25:41 +01:00
Mark Andrews b480d1eaa8 look for #! to determine if the file is PYTHON or PYTHON-BIN
(cherry picked from commit 4fcc550877)
2018-02-05 11:40:34 +11:00
Tinderbox User 5c36169128 regen v9_12 2018-02-03 01:20:16 +00:00
Evan Hunt d6a3fbe09d [v9_12] spelling, release note
(cherry picked from commit c34680cf3b)
2018-02-02 10:32:35 -08:00
Tinderbox User 042b8c6f08 update copyright notice / whitespace 2018-02-01 23:47:39 +00:00
Mark Andrews 1a22ae18fe Update license to 'MPL' [RT #47101]
(cherry picked from commit a97ca00ce8)
2018-02-02 10:38:34 +11:00
Tinderbox User 5681b48b5d newcopyrights 2018-02-01 23:30:14 +00:00
Michał Kępień 5a03cc6d01 [v9_12] Silence compiler warnings about comparisons between signed and unsigned integers [RT #46980]
(cherry picked from commit a3c2b8831e)
2018-02-01 21:29:03 +01:00
Tinderbox User 072b32faf0 update copyright notice / whitespace 2018-01-31 23:46:36 +00:00
Tinderbox User 27fb719fd5 newcopyrights 2018-01-31 23:30:25 +00:00
Evan Hunt 69b5fafb03 [v9_12] improve debugging output from dnssec-cds
4883.	[cleanup]	Improved debugging output from dnssec-cds. [RT #47026]

Patch submitted by Tony Finch (dot@dotat.at)
2018-01-31 10:23:54 -08:00
Tinderbox User fd7a1d9cb9 update copyright notice / whitespace 2018-01-30 23:46:57 +00:00
Tinderbox User 4cc09536a6 newcopyrights 2018-01-30 23:30:47 +00:00
Mark Andrews 9bf7f18d02 handle different eol coventions
(cherry picked from commit a2c693ab3b)
2018-01-31 10:06:37 +11:00
Evan Hunt 78f761222a [v9_12] use 'command' instead of 'type' to find atf-run and kyua paths 2018-01-30 10:33:31 -08:00
Evan Hunt 53fad7791c [v9_12] typo 2018-01-30 09:13:03 -08:00
Mark Andrews d52acebeb8 4882. [bug] Address potential memory leak in
dns_update_signaturesinc. [RT #47084]

(cherry picked from commit 7817caa3c7)
2018-01-30 15:27:51 +11:00
Mark Andrews 0e24c4d100 4881. [bug] Only include dst_openssl.h when OpenSSL is required.
[RT #47068]

(cherry picked from commit a64503c736)
2018-01-30 15:21:29 +11:00
Mark Andrews 33132cbfc8 4880. [bug] Named wasn't returning the target of a cross zone
CNAME between to served zones when recursion was
                        desired and available (RD=1, RA=1). Don't return
                        the CNAME target otherwise to prevent accidental
                        cache poisoning. [RT #47078]

(cherry picked from commit d26f90241d)
2018-01-30 13:12:18 +11:00
Mark Andrews 36d1e278c1 4879. [bug] dns_rdata_caa:value_len is was small. [RT #47086]
(cherry picked from commit 3ae586b857)
2018-01-30 11:00:34 +11:00
Tinderbox User 89961ad9e5 update copyright notice / whitespace 2018-01-29 23:46:55 +00:00
Tinderbox User 9c36e9c90d newcopyrights 2018-01-29 23:30:14 +00:00
Mark Andrews bd08ea42dd 4878. [bug] List 'ply' as a requirement for the 'isc' python
package. [RT #47065]

(cherry picked from commit 6e08af82ed)
2018-01-29 13:28:50 +11:00
Tinderbox User 4c8cd59241 regen v9_12 2018-01-26 01:19:47 +00:00
Tinderbox User 9ded20d5e9 update copyright notice / whitespace 2018-01-25 23:47:18 +00:00
Tinderbox User 16c46c3167 newcopyrights 2018-01-25 23:30:19 +00:00
Evan Hunt 6475d08439 [v9_12] clarify dnssec-cds man page
(cherry picked from commit cbd46e23cb)
2018-01-25 10:21:41 -08:00
Mark Andrews 7a58c9d770 remove Bv9ARM.ch13.html 2018-01-25 11:01:37 +11:00
Tinderbox User d59b79c94f update copyright notice / whitespace 2018-01-24 23:46:37 +00:00
Tinderbox User 96ed39d2d0 newcopyrights 2018-01-24 23:30:11 +00:00
Evan Hunt bb0a05e72b [v9_12] change uint to isc_uint 2018-01-24 11:02:57 -08:00
Evan Hunt 7e7a5bb189 [v9_12] update 9.11 api range 2018-01-24 10:23:11 -08:00
Evan Hunt 67b1e54716 [v9_12] address overflow in retry backoff
4877.	[bug]		Address integer overflow when exponentially
			backing off retry intervals. [RT #47041]

(cherry picked from commit 8b440753b6)
2018-01-24 09:45:55 -08:00
Mark Andrews c34b3b98ab 4876. [bug] Address deadlock with accessing a keytable. [RT #47000]
(cherry picked from commit b575c4ec42)
2018-01-24 18:56:28 +11:00
Mark Andrews d4d3eeaa6f 4875. [bug] Address compile failures on older systems. [RT #47015]
(cherry picked from commit 99178b6329)
2018-01-24 13:10:39 +11:00
Tinderbox User 4a91af9bbf newcopyrights 2018-01-23 23:30:10 +00:00
Mark Andrews 132e7795f9 4874. [bug] Wrong time display when reporting new keywarntime.
[RT #47042]

(cherry picked from commit 83d005de61)
2018-01-24 08:00:25 +11:00
Evan Hunt 941db929d3 [v9_12] renumber chapters now that the former chapter 5 is gone 2018-01-23 17:59:45 +00:00
Tinderbox User 14dc904052 regen v9_12 2018-01-23 00:56:08 +00:00
Tinderbox User 6774dbb0ab update copyright notice / whitespace 2018-01-22 23:46:35 +00:00
Tinderbox User ba1c79564b newcopyrights 2018-01-22 23:39:20 +00:00
Mark Andrews 3b86824ac0 doc/misc/*.zoneopt are X
(cherry picked from commit 7f4dfa539c)
2018-01-23 10:36:43 +11:00
Evan Hunt 1773b2c7cc [v9_12] fix test failure by sorting "type" to the top of zone clauses 2018-01-22 13:19:11 -08:00
Evan Hunt 4404974d84 [v9_12] silence warning 2018-01-22 13:07:33 -08:00
Evan Hunt cb5101969f [v9_12] regenerate 2018-01-22 19:48:04 +00:00
Evan Hunt 9b9f790a8b [v9_12] fix unresolved externals for win32 2018-01-22 11:45:47 -08:00
Evan Hunt f662d5484e [v9_12] automatically generate named.conf grammars for the ARM
4873.	[doc]		Grammars for named.conf included in the ARM are now
			automatically generated by the configuration parser
			itself.  As a side effect of the work needed to
			separate zone type grammars from each other, this
			also makes checking of zone statements in
			named-checkconf more correct and consistent.
			[RT #36957]

(cherry picked from commit 129c4414cb)
2018-01-22 11:08:49 -08:00
Evan Hunt 2aa30a80b1 [v9_12] remove dangling doc reference to the lightweight resolver
(cherry picked from commit 4d6800942c)
2018-01-22 10:58:43 -08:00
Mukund Sivaraman c8eb726046 Don't permit loading meta RR types such as TKEY from master files (#47009)
(cherry picked from commit 8a4ce20172)
2018-01-22 14:31:05 +05:30
Mukund Sivaraman 7e1ed15762 Fix configure issue detecting stdatomic.h support (#46959)
(cherry picked from commit 63d0c6a3fc)
2018-01-22 13:50:07 +05:30
Mark Andrews 8e369ab833 remove old entries
(cherry picked from commit 54c4adef80)
2018-01-22 11:26:10 +11:00
Tinderbox User 5088140fc7 update copyright notice / whitespace 2018-01-21 23:46:29 +00:00
Tinderbox User a4e58f73b5 newcopyrights 2018-01-21 23:31:42 +00:00
Mark Andrews 4d06005eae 4870. [test] Update included ATF library to atf-0.21 preserving
the ATF tool. [RT #46967]

(cherry picked from commit 23d77c8747)
2018-01-22 10:00:40 +11:00
Mark Andrews 9bc567aad7 silence clang static analyser warning. [RT #46881]
(cherry picked from commit af034ef188)
2018-01-22 09:48:37 +11:00
Mark Andrews f6911d4295 4869. [bug] Address some cases where NULL with zero length could
be passed to memmove which is undefined behaviour and
                        can lead to bad optimisation. [RT #46888]

(cherry picked from commit fdd8838bf9)
2018-01-22 09:37:30 +11:00
Tinderbox User 9a521b1359 newcopyrights 2018-01-19 23:30:14 +00:00
Tinderbox User 747bceba00 regen v9_12 2018-01-19 01:14:38 +00:00
Tinderbox User ec8e6c1f44 update copyright notice / whitespace 2018-01-18 23:46:35 +00:00
Tinderbox User 99567a8e1a newcopyrights 2018-01-18 23:30:15 +00:00
Evan Hunt 6d527f5439 [v9_12] normalize rndc on/off commands
4867.	[cleanup]	Normalize rndc on/off commands (validation,
			querylog, serve-stale) so they all accept the
			same synonyms for on/off (yes/no, true/false,
			enable/disable). Thanks to Tony Finch. [RT #47022]

(cherry picked from commit cf8f4241e7)
2018-01-18 10:50:24 -08:00
Tinderbox User 574dd7e2a9 regen v9_12 2018-01-18 01:14:03 +00:00
Tinderbox User c2140b163e update copyright notice / whitespace 2018-01-17 23:46:24 +00:00
Tinderbox User 493c6da5ee newcopyrights 2018-01-17 23:30:13 +00:00
Francis Dupont 48e0471f97 bcmp -> memcmp 2018-01-17 15:32:09 +01:00
Francis Dupont fd1f64696e Applied #46125 fix (hardcoded "pkcs11") 2018-01-17 15:20:02 +01:00
Francis Dupont 5075f3faef Merged rt46864 (check MD5 amd SHA1 support) 2018-01-17 14:36:06 +01:00
Mark Andrews ee74cc4d67 sync CHANGES with 9.12.0rc3 2018-01-17 15:58:58 +11:00
Tinderbox User b1ef8c1d9c update copyright notice / whitespace 2018-01-15 23:46:48 +00:00
Tinderbox User d58a9a8b0e newcopyrights 2018-01-15 23:30:09 +00:00
Michał Kępień 893517ec31 [v9_12] Ensure all master definitions in a catalog zone contain an IP address
4864.	[bug]		named acting as a slave for a catalog zone crashed if
			the latter contained a master definition without an IP
			address. [RT #45999]

(cherry picked from commit ae51a676c9)
2018-01-15 20:52:37 +01:00
Mark Andrews f4c1681dad silence coverity false positive. [RT #46841]
(cherry picked from commit fa22351a7c)
2018-01-15 12:03:24 +11:00
Tinderbox User 416b1cec1d update copyright notice / whitespace 2018-01-13 23:47:25 +00:00
Tinderbox User 40121b345d newcopyrights 2018-01-13 23:30:14 +00:00
Mark Andrews 7a3fcfe34c ret was not being set to 1 on dig error. [RT #46990]
(cherry picked from commit 69c4c987f6)
2018-01-13 13:15:22 +11:00
Tinderbox User eee54aab6e update copyright notice / whitespace 2018-01-12 23:46:21 +00:00
Tinderbox User 8ed2ff2ef0 newcopyrights 2018-01-12 23:30:08 +00:00
Mukund Sivaraman 0374e1c3fd Fix various bugs reported by valgrind --tool=memcheck (#46978)
(cherry picked from commit f96133826e)
2018-01-13 00:37:28 +05:30
Tinderbox User 7e3fc6aa03 update copyright notice / whitespace 2018-01-11 23:46:21 +00:00
Tinderbox User bbf18146c6 newcopyrights 2018-01-11 23:30:08 +00:00
Evan Hunt a847e6d035 [v9_12] go three section levels deep in the ARM table of contents
(cherry picked from commit 0c061ce614)
2018-01-11 13:41:59 -08:00
Tinderbox User 5f73c315d0 update copyright notice / whitespace 2018-01-10 23:48:07 +00:00
Tinderbox User 76616f708b newcopyrights 2018-01-10 23:30:20 +00:00
Mark Andrews d9a382fe4b grammar
(cherry picked from commit a35b95acb1)
2018-01-11 09:54:06 +11:00
Mark Andrews b69bb481cf 4862. [bug] The rdata flags for RRSIG was not being properly set
when constructing a rdataslab. [RT #46978]

(cherry picked from commit 7befb67af4)
2018-01-11 09:54:06 +11:00
Tinderbox User 7001d93870 update copyright notice / whitespace 2018-01-09 23:46:10 +00:00
Tinderbox User 98bbc626bc newcopyrights 2018-01-09 23:30:06 +00:00
Mark Andrews 3eab3b21ec 4861. [bug] The isc_crc64 unit test was not endian independent.
[RT #46973]

(cherry picked from commit 0ce212b9f5)
2018-01-10 09:46:47 +11:00
Mark Andrews 607423e5a6 4860. [bug] isc_int8_t should be signed char. [RT #46973]
(cherry picked from commit 21f708c88c)
2018-01-10 08:42:15 +11:00
Tinderbox User f546a77f77 update copyright notice / whitespace 2018-01-08 23:46:22 +00:00
Tinderbox User 7ffcfb1981 newcopyrights 2018-01-08 23:30:09 +00:00
Mark Andrews 2cb473514f add ns5/
(cherry picked from commit 3a4ea455ed)
2018-01-08 16:28:17 +11:00
Mark Andrews 2af6a352ec write nextpart to disk so that it is available when tests fail
(cherry picked from commit 02d3f1e855)
2018-01-08 16:21:09 +11:00
Tinderbox User 3ab43d029b newcopyrights 2018-01-06 23:30:07 +00:00
Tinderbox User 53a5106d21 regen v9_12 2018-01-06 01:16:38 +00:00
Mark Andrews f09733999c test devent->sigrdataset rather than devent->rdataset before calling query_putrdataset
(cherry picked from commit 67faaa41c9)
2018-01-05 12:39:19 +11:00
Mark Andrews 879e17b77d mem.c failed to compile if ISC_MEM_CHECKOVERRUN=0
(cherry picked from commit 4c33e133ca7eb0aa65986f0ea5d788007e70aaa9)
2018-01-05 12:10:21 +11:00
Tinderbox User 77caf49c98 update copyright notice / whitespace 2018-01-04 23:45:53 +00:00
Tinderbox User d1f3eab8a3 newcopyrights 2018-01-04 23:30:16 +00:00
Mark Andrews b1e6c5d922 unconditionally typedef summarystat_t for coverity
(cherry picked from commit a0e66ef6dd)
2018-01-05 10:11:13 +11:00
Evan Hunt 1da3a1fc67 [v9_12] typo 2018-01-03 19:30:05 -08:00
Evan Hunt 2b51d5874c [v9_12] block validator deadlock and prevent use-after-free
4859.	[bug]		A loop was possible when attempting to validate
			unsigned CNAME responses from secure zones;
			this caused a delay in returning SERVFAIL and
			also increased the chances of encountering
			CVE-2017-3145. [RT #46839]

4858.	[security]	Addresses could be referenced after being freed
			in resolver.c, causing an assertion failure.
			(CVE-2017-3145) [RT #46839]
2018-01-03 19:18:29 -08:00
Mark Andrews 0ed1d4154d use RESTORE rather than SAVE as is better describes the operation
(cherry picked from commit 9e6b394410)
2018-01-04 13:12:09 +11:00
Mark Andrews 749598d94f 4857. [bug] Maintain attach/detach semantics for event->db,
event->node, event->rdataset and event->sigrdataset
                        in query.c. [RT #46891]

(cherry picked from commit eed2f6cef0)
2018-01-04 10:51:27 +11:00
Tinderbox User 82820349cb update copyright notice / whitespace 2018-01-03 23:45:49 +00:00
Tinderbox User 8a7c841aed newcopyrights 2018-01-03 23:30:05 +00:00
Mark Andrews 96d9eed2ac 4856. [bug] 'rndc zonestatus' reported the wrong underlying type
for a inline slave zone. [RT #46875]

(cherry picked from commit 0b27aa0712)
2018-01-04 10:11:41 +11:00
Mark Andrews 4a63f0253c 4855. [bug] isc_time_formatshorttimestamp produced incorrect
output. [RT #46938]

(cherry picked from commit 1e10ef06ce)
2018-01-04 09:58:02 +11:00
Mark Andrews c0749224c8 4849 and 4850 are now released in 9.12.0 2018-01-04 09:53:44 +11:00
Mark Andrews 84499d7f41 missing newline in comment
(cherry picked from commit 7258b852cf)
2018-01-03 17:11:39 +11:00
Mark Andrews e12ba790a1 wait for status: line to be readable, before checking status
(cherry picked from commit 4674127443)
2018-01-03 13:55:27 +11:00
Tinderbox User 99a488899e update copyright notice / whitespace 2018-01-02 23:45:46 +00:00
Tinderbox User a980141495 newcopyrights 2018-01-02 23:30:06 +00:00
Mark Andrews be2380edf9 4854. [bug] query_synthcnamewildcard should stop generating the
response if query_synthwildcard fails. [RT #46939]

(cherry picked from commit c9ee9718ae)
2018-01-03 10:08:16 +11:00
Tinderbox User ef6247f49d regen v9_12 2018-01-02 01:15:58 +00:00
Mark Andrews 5cf9dc5eb2 4853. [bug] Add REQUIRE's and INSIST's to isc_time_formatISO8601L
and isc_time_formatISO8601Lms. [RT #46916]

(cherry picked from commit 0645f8f1ce)
2018-01-02 10:58:03 +11:00
Mark Andrews fe00fac13c 4852. [bug] Handle strftime() failing in isc_time_formatISO8601ms.
Add REQUIRE's and INSIST's to isc_time_formattimestamp,
                        isc_time_formathttptimestamp, isc_time_formatISO8601,
                        isc_time_formatISO8601ms. [RT #46892]
2018-01-02 10:47:27 +11:00
Tinderbox User 0113327dd2 update copyright notice / whitespace 2018-01-01 23:45:43 +00:00
Tinderbox User cb37b4aae0 newcopyrights 2018-01-01 23:30:09 +00:00
Mark Andrews 298f3d5340 4851. [port] Support using kyua as well as atf-run to run the unit
tests. [RT #46853]

(cherry picked from commit ccb5678066)
2018-01-02 10:21:32 +11:00
Tinderbox User d7095706e9 newcopyrights 2017-12-29 23:30:47 +00:00
Mark Andrews 81f3fdadac X Kyuafile's
(cherry picked from commit fa0caa1f85)
2017-12-29 13:34:52 +11:00
Tinderbox User 251446d350 regen v9_12 2017-12-29 02:16:29 +00:00
Mark Andrews cb68b39428 4850. [bug] Named failed to restart with multiple added zones in
lmdb database. [RT #46889]

(cherry picked from commit 9bec7facfb)
2017-12-27 16:25:01 +11:00
Mark Andrews f3f3480ed2 save why ydump.py failed
(cherry picked from commit f5d429e7c3)
2017-12-22 16:03:42 +11:00
Mark Andrews 5a248803e3 silence clang static analysis
(cherry picked from commit f933be6d45)
2017-12-22 13:09:28 +11:00
Mark Andrews d8cb1587ec initalize sigsize to zero; ATF_CHECK_EQ(sigsize, tsig.siglen);
(cherry picked from commit 9f61f6b46b)
2017-12-22 08:58:59 +11:00
Mark Andrews 0163c3b813 add POST(argc);
(cherry picked from commit be5a0eaa7a)
2017-12-22 08:48:57 +11:00
Mark Andrews 5b419ede19 add POST(argv); and POST(argc);
(cherry picked from commit d11ada1376)
2017-12-22 08:44:15 +11:00
Tinderbox User e552233bf6 regen v9_12 2017-12-21 01:15:46 +00:00
Mark Andrews 2cc7c4d62c lowercase m in macOS 2017-12-21 10:54:53 +11:00
Tinderbox User 7274c956e2 update copyright notice / whitespace 2017-12-20 23:46:17 +00:00
Tinderbox User d8f38bba3d newcopyrights 2017-12-20 23:30:24 +00:00
Mark Andrews 22a32060c1 4849. [bug] Duplicate zones could appear in the .nzf file if
addzone failed. [RT #46435]

(cherry picked from commit 2d7f89b9c7)
2017-12-20 17:15:23 +11:00
Tinderbox User 67b7334b62 regen v9_12 2017-12-20 01:15:42 +00:00
Mark Andrews 7d1bf2cc8d set AC_INIT to 9.11 2017-12-20 09:26:35 +11:00
Francis Dupont 993a57a5eb Fixed embedded atf code warning (RT 46833) 2017-12-18 16:18:21 +01:00
Tinderbox User bfb76ec3a4 regen v9_12 2017-12-16 01:18:48 +00:00
Evan Hunt ef2bfc219c [v9_12] clear release notes so they can be repopulated for 9.12.1 2017-12-15 01:36:26 -08:00
Mark Andrews cd11163b6d fix case
(cherry picked from commit 68a2932f75)
2017-12-15 14:54:16 +11:00
Mark Andrews 469254ba3e add MacOS to contents
(cherry picked from commit 13508261e0)
2017-12-15 14:46:33 +11:00
Mark Andrews cb2533d0c1 add MacOS note
(cherry picked from commit 91e4700bcc)
2017-12-15 14:39:00 +11:00
Tinderbox User 67df162ebd regen v9_12 2017-12-15 01:15:23 +00:00
Mark Andrews 62563bdc74 add 9.12.0 release marker 2017-12-14 14:38:37 +11:00
Mark Andrews 16d9d739b5 9.12.1-dev 2017-12-14 14:37:25 +11:00
2021 changed files with 441904 additions and 43461 deletions
-64
View File
@@ -1,64 +0,0 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((c-mode .
((eval .
(set (make-local-variable 'directory-of-current-dir-locals-file)
(file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
)
)
(eval .
(set (make-local-variable 'include-directories)
(list
;; top directory
(expand-file-name
(concat directory-of-current-dir-locals-file "./"))
;; current directory
(expand-file-name (concat default-directory "./"))
;; libisc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/include"))
;; libdns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns/include"))
;; libisccc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isccc/include"))
;; libisccfg
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isccfg/include"))
;; libns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/ns/include"))
;; libirs
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/irs/include"))
;; libbind9
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
(expand-file-name "/usr/local/opt/openssl@1.1/include")
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
(expand-file-name "/usr/local/include")
)
)
)
(eval setq flycheck-clang-include-path include-directories)
(eval setq flycheck-cppcheck-include-path include-directories)
)
))
+1 -5
View File
@@ -7,8 +7,6 @@ libtool
/isc-config.sh
/configure.lineno
autom4te.cache/
*.rej
*.orig
*.o
*.lo
*.so
@@ -23,14 +21,12 @@ ans.run
named.run
named.memstats
gen.dSYM/
.ccache/
.libs/
.deps/
.dirstamp
.libs/
# ccc-analyzer store its results in .plist directories
*.plist/
*~
.project
.cproject
.settings
kyua.log
+23 -2
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-randomdev=/dev/urandom --with-libtool --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:
@@ -117,7 +117,6 @@ stages:
.system_test: &system_test_job
<<: *default_triggering_rules
stage: test
retry: 2
before_script:
- bash -x bin/tests/system/ifconfig.sh up
- bash -x util/prepare-softhsm2.sh
@@ -475,3 +474,25 @@ unit:pkcs11:sid:amd64:
<<: *unit_test_job
dependencies:
- pkcs11:sid:amd64
# Jobs for GCC builds with assertions compiled away on Debian Sid (amd64)
noassert:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_CHECK_NONE=1"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *build_job
system:noassert:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- noassert:sid:amd64
unit:noassert:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- noassert:sid:amd64
-46
View File
@@ -1,46 +0,0 @@
<!--
If the bug you are reporting is potentially security-related - for example,
if it involves an assertion failure or other crash in `named` that can be
triggered repeatedly - then please do *NOT* report it here, but send an
email to [security-officer@isc.org](security-officer@isc.org).
-->
### Summary
(Summarize the bug encountered concisely.)
### BIND version used
(Paste the output of `named -V`.)
### Steps to reproduce
(How one can reproduce the issue - this is very important.)
### What is the current *bug* behavior?
(What actually happens.)
### What is the expected *correct* behavior?
(What you should see instead.)
### Relevant configuration files
(Paste any relevant configuration files - please use code blocks (```)
to format console output. If submitting the contents of your
configuration file in a non-confidential Issue, it is advisable to
obscure key secrets: this can be done automatically by using
`named-checkconf -px`.)
### Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console
output, logs, and code, as it's very hard to read otherwise.)
### Possible fixes
(If you can, link to the line of code that might be responsible for the
problem.)
/label ~bug
@@ -1,11 +0,0 @@
### Description
(Describe the problem, use cases, benefits, and/or goals.)
### Request
(Describe the solution you'd like to see.)
### Links / references
/label ~"feature request"
-44
View File
@@ -1,44 +0,0 @@
## Release Checklist
- [ ] (Manager) Check for the presence of a milestone for the release:
- If there is a milestone, are all the issues for the milestone resolved? (other than this checklist).
- [ ] (Manager) Inform Support/Marketing of impending release (and give estimated release dates).
- (SwEng) Prepare the sources for tarball generation:
- [ ] Check perflab to ensure there has been no unexplained drop in performance for the version being released.
- [ ] Ensure that there are no outstanding merge requests in the private repository (subscription version only).
- [ ] Update API files for libraries with new version information.
- [ ] Change software version and library versions in configure.in (new major release only).
- [ ] Rebuild configure using autoconf on docs.isc.org.
- [ ] Update CHANGES.
- [ ] Update CHANGES.SE (subscription branch only).
- [ ] Update "version".
- [ ] Update "readme.md".
- Check the release notes are correct:
- [ ] Compare content with merge requests for the release.
- [ ] Check formatting.
- [ ] Build documentation on docs.isc.org.
- [ ] Commit changes and make sure the gitlab-ci tests are passing.
- [ ] Push the changes and tag ("alphatag" is an optional string such as "b1", "rc1" etc.). (```git tag -u <DEVELOPER_KEYID> -a -s -m "BIND 9.X.Y[alphatag]" v9_X_Y[alphatag]```)
- [ ] If this is the first tag for a release (e.g. beta), create a release branch named `release_v9_X_Y` (this allows development to continue on the release branch whilst release engineering continues).
- [ ] (SwEng) Run the "make release" Jenkins job to produce the tarballs and zips.
- [ ] (SwEng) Ask QA to sanity check the tarball and zips (passing to them the number of the Jenkins job).
- [ ] (QA) Sanity check the tarballs.
- [ ] (QA) Request the signature on the tarballs.
- [ ] (QA) Check signatures on tarballs.
- [ ] (QA) Tell Support to handle notification of release.
- [ ] (Manager) Inform Marketing of the release
- [ ] (Manager) Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
- [ ] (SwEng) Update DEB and RPM packages
- [ ] (SwEng) Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`)
## Support
- [ ] Make tarballs and signatures available to download.
- [ ] Write release email to bind9-announce.
- [ ] Write email to bind9-users (if a major release).
- [ ] Update tickets in case of waiting support customers.
## Marketing
- [ ] Post short note to Twitter.
- [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND).
- [ ] Write blog article (if a major release).
-1434
View File
File diff suppressed because it is too large Load Diff
+92 -481
View File
@@ -1,16 +1,22 @@
--- 9.14.0rc1 released ---
--- 9.12.4-P1 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]
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]
5167. [bug] nxdomain-redirect could sometimes lookup the wrong
redirect name. [GL #892]
5166. [placeholder]
--- 9.12.4 released ---
5165. [contrib] Removed SDB drivers from contrib; they're obsolete.
[GL #428]
--- 9.12.4rc1 released ---
5166. [port] openbsd: Threads are now enabled by default. [GL !1548]
5164. [bug] Correct errno to result translation in dlz filesystem
modules. [GL #884]
@@ -20,9 +26,6 @@
5162. [cleanup] Improve dnssec-keymgr manual. Thanks to Tony Finch.
[GL !1518]
5161. [bug] Do not require the SEP bit to be set for mirror zone
trust anchors. [GL #873]
5160. [contrib] Added DNAME support to the DLZ LDAP schema. Also
fixed a compilation bug affecting several DLZ
modules. [GL #872]
@@ -36,52 +39,9 @@
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
mirror zones. [GL #774]
5155. [func] "named -V" now outputs the default paths to
named.conf, rndc.conf, bind.keys, and other
files used or created by named and other tools, so
that the correct paths to these files can quickly be
determined regardless of the configure settings
used when BIND was built. [GL #859]
5154. [bug] dig: process_opt could be called twice on the same
message leading to a assertion failure. [GL #860]
5153. [func] Zone transfer statistics (size, number of records, and
number of messages) are now logged for outgoing
transfers as well as incoming ones. [GL #513]
5152. [func] Improved logging of DNSSEC key events:
- 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,
or revoked.
[GL #714]
5151. [func] Options that have been been marked as obsolete in
named.conf for a very long time are now fatal
configuration errors. [GL #358]
5150. [cleanup] Remove the ability to compile BIND with assertions
disabled. [GL #735]
5149. [func] "rndc dumpdb" now prints a line above a stale RRset
indicating how long the data will be retained in the
cache for emergency use. [GL #101]
@@ -91,22 +51,16 @@
5147. [bug] dnssec-keymgr: Add a five-minute margin to better
handle key events close to 'now'. [GL #848]
5146. [placeholder]
5145. [func] Use atomics instead of locked variables for isc_quota
and isc_counter. [GL !1389]
5144. [bug] dig now returns a non-zero exit code when a TCP
connection is prematurely closed by a peer more than
once for the same lookup. [GL #820]
5146. [bug] Removed an unnecessary assert that could be
triggered from PKCS#11 modules during
deconstruction. [GL #841]
5143. [bug] dnssec-keymgr and dnssec-coverage failed to find
key files for zone names ending in ".". [GL #560]
5142. [cleanup] Removed "configure --disable-rpz-nsip" and
"--disable-rpz-nsdname" options. "nsip-enable"
and "nsdname-enable" both now default to yes,
regardless of compile-time settings. [GL #824]
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]
5140. [bug] Don't immediately mark existing keys as inactive and
deleted when running dnssec-keymgr for the first
@@ -118,19 +72,6 @@
be present if the forwarding server is returning
minimal responses. [GL #752]
5138. [bug] Under some circumstances named could hit an assertion
failure when doing qname minimization when using
forwarders. [GL #797]
5137. [func] named now logs messages whenever a mirror zone becomes
usable or unusable for resolution purposes. [GL #818]
5136. [cleanup] Check in named-checkconf that allow-update and
allow-update-forwarding are not set at the
view/options level; fix documentation. [GL #512]
5135. [port] sparc: Use smt_pause() instead of pause. [GL #816]
5134. [bug] win32: WSAStartup was not called before getservbyname
was called. [GL #590]
@@ -141,13 +82,6 @@
5132. [bug] Fix race condition in cleanup part of dns_dt_create().
[GL !1323]
5131. [cleanup] Address Coverity warnings. [GL #801]
5130. [cleanup] Remove support for l10n message catalogs. [GL #709]
5129. [contrib] sdlz_helper.c:build_querylist was not properly
splitting the query string. [GL #798]
5128. [bug] Refreshkeytime was not being updated for managed
keys zones. [GL #784]
@@ -174,23 +108,14 @@
5121. [contrib] dlz_stub_driver.c fails to return ISC_R_NOTFOUND on none
matching zone names. [GL !1299]
5120. [placeholder]
5119. [placeholder]
5117. [placeholder]
5116. [bug] Named/named-checkconf triggered a assertion when
a mirror zone's name is bad. [GL #778]
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]
5115. [bug] Allow unsupported algorithms in zone when not used for
signing with dnssec-signzone. [GL #783]
5114. [func] Include a 'reconfig/reload in progress' status line
in rndc status, use it in tests.
5113. [port] Fixed a Windows build error.
5112. [bug] Named/named-checkconf could dump core if there was
a missing masters clause and a bad notify clause.
[GL #779]
@@ -198,9 +123,8 @@
5111. [bug] Occluded DNSKEY records could make it into the
delegating NSEC/NSEC3 bitmap. [GL #742]
5109. [cleanup] Remove support for RSAMD5 algorithm. [GL #628]
--- 9.13.5 released ---
5110. [security] Named leaked memory if there were multiple Key Tag
EDNS options present. (CVE-2018-5744) [GL #772]
5108. [bug] Named could fail to determine bottom of zone when
removing out of date keys leading to invalid NSEC
@@ -208,26 +132,6 @@
5107. [bug] 'host -U' did not work. [GL #769]
5106. [experimental] A new "plugin" mechanism has been added to allow
extension of query processing functionality through
the use of dynamically loadable libraries. A
"filter-aaaa.so" plugin has been implemented,
replacing the filter-aaaa feature that was formerly
implemented as a native part of BIND.
The "filter-aaaa", "filter-aaaa-on-v4" and
"filter-aaaa-on-v6" options can no longer be
configured using native named.conf syntax. However,
loading the filter-aaaa.so plugin and setting its
parameters provides identical functionality.
Note that the plugin API is a work in progress and
is likely to evolve as further plugins are
implemented. [GL #15]
5105. [bug] Fix a race between process_fd and socketclose in
unix socket code. [GL #744]
5104. [cleanup] Log clearer informational message when a catz zone
is overridden by a zone in named.conf.
Thanks to Tony Finch. [GL !1157]
@@ -239,27 +143,14 @@
checking KSK deletion times leading to a exception.
[GL #585]
5101. [bug] Fix default installation path for Python modules and
remove the dnspython dependency accidentally introduced
by change 4970. [GL #730]
5100. [func] Pin resolver tasks to specific task queues. [GL !1117]
5099. [func] Failed mutex and conditional creations are always
fatal. [GL #674]
--- 9.13.4 released ---
5101. [bug] Fix default installation path for Python modules.
[GL #730]
5098. [func] Failed memory allocations are now fatal. [GL #674]
5097. [cleanup] Remove embedded ATF unit testing framework
from BIND source distribution. [GL !875]
5096. [func] Use multiple event loops in socket code, and
make network threads CPU-affinitive. This
significantly improves performance on large
systems. [GL #666]
5095. [test] Converted all unit tests from ATF to CMocka;
removed the source code for the ATF libraries.
Build with "configure --with-cmocka" to enable
@@ -267,15 +158,9 @@
5094. [func] Add 'dig -r' to disable reading of .digrc. [GL !970]
5093. [bug] Log lame qname-minimization servers only if they're
really lame. [GL #671]
5092. [bug] Address memory leak on SIGTERM in nsupdate when using
GSS-TSIG. [GL #558]
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
with a dash. [GL #584]
@@ -295,27 +180,9 @@
5085. [bug] win32: Restore looking up nameservers, search list,
etc. [GL #186]
5084. [placeholder]
5083. [func] Add autoconf macro AX_POSIX_SHELL, so we
can use POSIX-compatible shell features
in the scripts.
5082. [bug] Fixed a race that could cause a crash in
dig/host/nslookup. [GL #650]
5081. [func] Use per-worker queues in task manager, make task
runners CPU-affine. [GL #659]
5080. [func] Improvements to "rndc nta" user interface:
- catch and report invalid command line options
- when removing an NTA from all views, do not
abort with an error if the NTA was not found
in one of the views
- include the view name in "rndc nta -dump"
output, for consistency with the add and remove
actions
Thanks to Tony Finch. [GL !816]
5084. [func] Add configure time detection of Utimaco HSM
and disable runtime md5/sha1 detection when it
compiled with it. [GL #656]
5079. [func] Disable IDN processing in dig and nslookup
when not on a tty. [GL #653]
@@ -323,23 +190,9 @@
5078. [cleanup] Require python components to be explicitly disabled if
python is not available on unix platforms. [GL #601]
5077. [cleanup] Remove ip6.int support (-i) from dig and mdig.
[GL !969]
5076. [bug] "require-server-cookie" was not effective if
"rate-limit" was configured. [GL #617]
5075. [bug] Refresh nameservers from cache when sending final
query in qname minimization. [GL #16]
5074. [cleanup] Remove vector socket functions - isc_socket_recvv(),
isc_socket_sendtov(), isc_socket_sendtov2(),
isc_socket_sendv() - in order to simplify socket code.
[GL #645]
5073. [bug] Destroy a task first when destroying rpzs and catzs.
[GL #84]
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
behavior for auto-reallocated buffers. [GL #644]
@@ -354,9 +207,6 @@
5068. [bug] Fix a race in RPZ with min-update-interval set to 0.
[GL #643]
5067. [bug] Don't minimize qname when sending the query
to a forwarder. [GL #361]
5066. [cleanup] Allow unquoted strings to be used as a zone names
in response-policy statements. [GL #641]
@@ -365,13 +215,6 @@
5064. [test] Initalize TZ environment variable before calling
dns_test_begin in dnstap_test. [GL #624]
5063. [test] In statschannel test try a few times before failing
when checking if the compressed output is the same as
uncompressed. [GL !909]
5062. [func] Use non-crypto-secure PRNG to generate nonces for
cookies. [GL !887]
5061. [protocol] Add support for EID and NIMLOC. [GL #626]
5060. [bug] GID, UID and UINFO could not be loaded using unknown
@@ -380,29 +223,8 @@
5059. [bug] Display a per-view list of zones in the web interface.
[GL #427]
5058. [func] Replace old message digest and hmac APIs with more
generic isc_md and isc_hmac APIs, and convert their
respective tests to cmocka. [GL #305]
5057. [protocol] Add support for ATMA. [GL #619]
5056. [placeholder]
5055. [func] A default list of primary servers for the root zone is
now built into named, allowing the "masters" statement
to be omitted when configuring an IANA root zone
mirror. [GL #564]
5054. [func] Attempts to use mirror zones with recursion disabled
are now considered a configuration error. [GL #564]
5053. [func] The only valid zone-level NOTIFY settings for mirror
zones are now "notify no;" and "notify explicit;".
[GL #564]
5052. [func] Mirror zones are now configured using "type mirror;"
rather than "mirror yes;". [GL #564]
5051. [doc] Documentation incorrectly stated that the
"server-addresses" static-stub zone option accepts
custom port numbers. [GL #582]
@@ -411,9 +233,7 @@
scoped IPv6 addresses present in /etc/resolv.conf.
[GL #187]
5049. [cleanup] QNAME minimization has been deeply refactored. [GL #16]
5048. [func] Add configure option to enable and enforce FIPS mode
5048. [func] Add configure option to enabled and enforce FIPS mode
in BIND 9. [GL #506]
5047. [bug] Messages logged for certain query processing failures
@@ -423,40 +243,22 @@
5046. [bug] named could crash during shutdown if an RPZ
reload was in progress. [RT #46210]
5045. [func] Remove support for DNSSEC algorithms 3 (DSA)
and 6 (DSA-NSEC3-SHA1). [GL #22]
5044. [cleanup] If "dnssec-enable" is no, then "dnssec-validation"
now also defaults to no. [GL #388]
5043. [bug] Fix creating and validating EdDSA signatures. [GL #579]
5042. [test] Make the chained delegations in reclimit behave
like they would in a regular name server. [GL #578]
like they would in a regular name server. [GL #578]
5041. [test] The chain test contains a incomplete delegation.
[GL #568]
5040. [func] Extended dnstap so that it can log UPDATE requests
and responses as separate message types. Thanks
to Greg Rabil. [GL #570]
5039. [bug] Named could fail to preserve owner name case of new
RRset. [GL #420]
--- 9.12.3 released ---
--- 9.12.3rc1 released ---
5038. [bug] Chaosnet addresses were compared incorrectly.
[GL #562]
5037. [func] "allow-recursion-on" and "allow-query-cache-on"
each now default to the other if only one of them
is set, in order to be more consistent with the way
"allow-recursion" and "allow-query-cache" work.
Also we now ensure that both query-cache ACLs are
checked when determining cache access. [GL #319]
5036. [cleanup] Fixed a spacing/formatting error in some RPZ-related
error messages in the log. [GL !805]
5035. [test] Fixed errors that prevented the DNSRPS subtests
from running in the rpz and rpzrecurse system
tests. [GL #503]
@@ -476,56 +278,23 @@
5032. [func] Add krb5-selfsub and ms-selfsub update policy rules.
[GL #511]
5031. [cleanup] Various defines in platform.h has been either dropped
if always or never triggered on supported platforms
or replaced with config.h equivalents if the defines
didn't have any impact on public headers. Workarounds
for LinuxThreads have been removed because NPTL is
available since Linux kernel 2.6.0. [GL #525]
5030. [bug] Align CMSG buffers to a 64-bit boundary, fixes crash
on architectures with strict alignment. [GL #521]
--- 9.13.3 released ---
5029. [func] Workarounds for servers that misbehave when queried
with EDNS have been removed, because these broken
servers and the workarounds for their noncompliance
cause unnecessary delays, increase code complexity,
and prevent deployment of new DNS features. See
https://dnsflagday.net for further details. [GL #150]
5028. [bug] Spread the initial RRSIG expiration times over the
entire working sig-validity-interval when signing a
zone in named to even out re-signing and transfer
loads. [GL #418]
5027. [func] Set SO_SNDBUF size on sockets. [GL #74]
5026. [bug] rndc reconfig should not touch already loaded zones.
[GL #276]
5025. [cleanup] Remove isc_keyboard family of functions. [GL #178]
5024. [func] Replace custom assembly for atomic operations with
atomic support from the compiler. The code will now use
C11 stdatomic, or __atomic, or __sync builtins with GCC
or Clang compilers, and Interlocked functions with MSVC.
[GL #10]
5023. [cleanup] Remove wrappers that try to fix broken or incomplete
implementations of IPv6, pthreads and other core
functionality required and used by BIND. [GL #192]
5022. [doc] Update ms-self, ms-subdomain, krb5-self, and
krb5-subdomain documentation. [GL !708]
5021. [bug] dig returned a non-zero exit code when it received a
reply over TCP after a retry. [GL #487]
5020. [func] RNG uses thread-local storage instead of locks, if
supported by platform. [GL #496]
5019. [cleanup] A message is now logged when ixfr-from-differences is
set at zone level for an inline-signed zone. [GL #470]
@@ -550,12 +319,6 @@
5012. [bug] Fix lock order reversal in pk11_initialize. [GL !590]
5011. [func] Remove support for unthreaded named. [GL #478]
5010. [func] New "validate-except" option specifies a list of
domains beneath which DNSSEC validation should not
be performed. [GL #237]
5009. [bug] Upon an OpenSSL failure, the first error in the OpenSSL
error queue was not logged. [GL #476]
@@ -590,15 +353,6 @@
5000. [bug] named_server_servestale() could leave the server in
exclusive mode if an error occured. [GL #441]
4999. [cleanup] Remove custom printf implementation in lib/isc/print.c.
[GL #261]
4998. [test] Make resolver and cacheclean tests more civilized.
4997. [security] named could crash during recursive processing
of DNAME records when "deny-answer-aliases" was
in use. (CVE-2018-5740) [GL #387]
4996. [bug] dig: Handle malformed +ednsopt option. [GL #403]
4995. [test] Add tests for "tcp-self" update policy. [GL !282]
@@ -606,50 +360,30 @@
4994. [bug] Trust anchor telemetry queries were not being sent
upstream for locally served zones. [GL #392]
4993. [cleanup] Remove support for silently ignoring 'no-change' deltas
from BIND 8 when processing an IXFR stream. 'no-change'
deltas will now trigger a fallback to AXFR as the
recovery mechanism. [GL #369]
4992. [bug] The wrong address was being logged for trust anchor
telemetry queries. [GL #379]
4991. [bug] "rndc reconfig" was incorrectly handling zones whose
"mirror" setting was changed. [GL #381]
4990. [bug] Prevent a possible NULL reference in pkcs11-keygen.
[GL #401]
4989. [cleanup] IDN support in dig has been reworked. IDNA2003
fallbacks were removed in the process. [GL #384]
4988. [bug] Don't synthesize NXDOMAIN from NSEC for records under
a DNAME.
a DNAME. [GL #386]
--- 9.13.2 released ---
--- 9.12.2-P1 released ---
4987. [cleanup] dns_rdataslab_tordataset() and its related
dns_rdatasetmethods_t callbacks were removed as they
were not being used by anything in BIND. [GL #371]
4997. [security] named could crash during recursive processing
of DNAME records when "deny-answer-aliases" was
in use. (CVE-2018-5740) [GL #387]
4986. [func] When built on Linux, BIND now requires the libcap
library to set process privileges, unless capability
support is explicitly overridden with "configure
--disable-linux-caps". [GL #321]
--- 9.12.2 released ---
4985. [func] Add a new slave zone option, "mirror", to enable
serving a non-authoritative copy of a zone that
is subject to DNSSEC validation before being
used. For now, this option is only meant to
facilitate deployment of an RFC 7706-style local
copy of the root zone. [GL #33]
--- 9.12.2rc2 released ---
4984. [bug] Improve handling of very large incremental
zone transfers to prevent journal corruption. [GL #339]
4983. [func] Add the ability to not return a DNS COOKIE option
when one is present in the request (answer-cookie no;).
[GL #173]
4983. [cleanup] Remove the deprecated flag from "answer-cookie";
it will be allowed to persist into 9.13. [GL #275].
4982. [cleanup] Return FORMERR if the question section is empty
and no COOKIE option is present; this restores
@@ -662,7 +396,9 @@
4980. [bug] Named-checkconf failed to detect bad in-view targets.
[GL #288]
4979. [placeholder]
4979. [bug] Non-libcap builds were not checking whether all
requested capabilities are present in the permitted
capability set. [GL #321]
4978. [test] Fix error handling and resolver configuration in the
"rpz" system test. [GL #312]
@@ -678,30 +414,22 @@
4974. [bug] Restore default rrset-order to random. [GL #336]
4973. [func] verifyzone() and the functions it uses were moved to
libdns and refactored to prevent exit() from being
called upon failure. A side effect of that is that
dnssec-signzone and dnssec-verify now check for memory
leaks upon shutdown. [GL #266]
4972. [func] Declare the 'rdata' argument for dns_rdata_tostruct()
to be const. [GL #341]
4971. [bug] dnssec-signzone and dnssec-verify did not treat records
below a DNAME as out-of-zone data. [GL #298]
4970. [func] Add QNAME minimization option to resolver. [GL #16]
4969. [cleanup] Refactor zone logging functions. [GL #269]
--- 9.13.1 released ---
--- 9.12.2rc1 released ---
4968. [bug] If glue records are signed, attempt to validate them.
[GL #209]
4967. [cleanup] Add "answer-cookie" to the parser, marked obsolete.
4966. [placeholder]
4966. [func] Add the ability to not return a DNS COOKIE option
when one is present in the request (answer-cookie no;).
[GL #173]
4965. [func] Add support for marking options as deprecated.
[GL #322]
@@ -717,9 +445,6 @@
4962. [cleanup] Move 'named -T' processing to its own function.
[GL #316]
4961. [protocol] Remove support for ECC-GOST (GOST R 34.11-94).
[GL #295]
4960. [security] When recursion is enabled, but the "allow-recursion"
and "allow-query-cache" ACLs are not specified,
they should be limited to local networks,
@@ -727,23 +452,8 @@
"allow-query", thus allowing remote queries.
(CVE-2018-5738) [GL #309]
4959. [func] NSID logging (enabled by the "request-nsid" option)
now has its own "nsid" category, instead of using the
"resolver" category. [GL !332]
4958. [bug] Remove redundant space from NSEC3 record. [GL #281]
4957. [func] The default setting for "dnssec-validation" is now
"auto", which activates DNSSEC validation using the
IANA root key. (The default can be changed back to
"yes", which activates DNSSEC validation only when keys
are explicitly configured in named.conf, by building
BIND with "configure --disable-auto-validation".)
[GL #30]
4956. [func] Change isc_random() to be just PRNG using xoshiro128**,
and add isc_nonce_buf() that uses CSPRNG. [GL #289]
4955. [cleanup] Silence cppcheck warnings in lib/dns/master.c.
[GL #286]
@@ -751,49 +461,17 @@
directed to the "serve-stale" logging category.
Also clarified serve-stale documentation. [GL !323]
4953. [bug] Removed the option to build the red black tree
database without a hash table; the non-hashing
version was buggy and is not needed. [GL #184]
4952. [func] Authoritative server support in named for the
EDNS CLIENT-SUBNET option (which was experimental
and not practical to deploy) has been removed.
The ECS option is still supported in dig and mdig
via the +subnet option, and can be parsed and logged
when received by named, but it is no longer used
for ACL processing. The "geoip-use-ecs" option
is now obsolete; a warning will be logged if it is
used in named.conf. "ecs" tags in an ACL definition
are also obsolete and will cause the configuration
to fail to load. [GL #32]
4951. [protocol] Add "HOME.ARPA" to list of built in empty zones as
per RFC 8375. [GL #273]
--- 9.13.0 released ---
4950. [bug] ISC_SOCKEVENTATTR_TRUNC was not be set. [GL #238]
4949. [placeholder]
4948. [bug] When request-nsid is turned on, EDNS NSID options
should be logged at level info. Since change 3741
they have been logged at debug(3) by mistake.
[GL !290]
4947. [func] Replace all random functions with isc_random(),
isc_random_buf() and isc_random_uniform() API.
[GL #221]
4949. [bug] lib/isc/print.c failed to handle floating point
output correctly. [GL #261]
4946. [bug] Additional glue was not being returned by resolver
for unsigned zones since change 4596. [GL #209]
4945. [func] BIND can no longer be built without DNSSEC support.
A cryptography provder (i.e., OpenSSL or a hardware
service module with PKCS#11 support) must be
available. [GL #244]
4944. [cleanup] Silence cppcheck portability warnings in
lib/isc/tests/buffer_test.c. [GL #239]
@@ -802,25 +480,8 @@
hash table size to 512 entries for 'named -m record'
restoring the previous memory footprint. [GL #248]
4942. [cleanup] Consolidate multiple instances of splitting of
batchline in dig into a single function. [GL #196]
4941. [cleanup] Silence clang static analyzer warnings. [GL #196]
4940. [cleanup] Extract the loop in dns__zone_updatesigs() into
separate functions to improve code readability.
[GL #135]
4939. [test] Add basic unit tests for update_sigs(). [GL #135]
4938. [placeholder]
4937. [func] Remove support for OpenSSL < 1.0.0 [GL #191]
4936. [func] Always use OpenSSL or PKCS#11 random data providers,
and remove the --{enable,disable}-crypto-rand configure
options. [GL #165]
4935. [func] Add support for LibreSSL >= 2.7.0 (some OpenSSL 1.1.0
call were added). [GL #191]
@@ -839,37 +500,12 @@
logged even when an error occurred while updating
signatures. [GL #159]
4931. [func] Removed the "rbtdb64" database implementation.
[GL #217]
4930. [bug] Remove a bogus check in nslookup command line
argument processing. [GL #206]
4929. [func] Add the ability to set RA and TC in queries made by
dig (+[no]raflag, +[no]tcflag). [GL #213]
4928. [func] The "dnskey-sig-validity" option allows
"sig-validity-interval" to be overriden for signatures
covering DNSKEY RRsets. [GL #145]
4927. [placeholder]
4926. [func] Add root key sentinel support. To disable, add
'root-key-sentinel no;' to named.conf. [GL #37]
4925. [func] Several configuration options that define intervals
can now take TTL value suffixes (for example, 2h or 1d)
in addition to integer parameters. These include
max-cache-ttl, max-ncache-ttl, max-policy-ttl,
fstrm-set-reopen-interval, interface-interval, and
min-update-interval. [GL #203]
4924. [cleanup] Clean up the isc_string_* namespace and leave
only strlcpy and strlcat. [GL #178]
4923. [cleanup] Refactor socket and socket event options into
enum types. [GL !135]
4922. [bug] dnstap: Log the destination address of client
packets rather than the interface address.
[GL #197]
@@ -879,20 +515,8 @@
refactoring dns_fixedname_*() macros were turned into
functions. [GL #183]
4920. [cleanup] Clean up libdns removing most of the backwards
compatibility wrappers.
4919. [cleanup] Clean up the isc_hash_* namespace and leave only
the FNV-1a hash implementation. [GL #178]
4918. [bug] Fix double free after keygen error in dnssec-keygen
when OpenSSL >= 1.1.0 is used and RSA_generate_key_ex
fails. [GL #109]
4917. [func] Support 64 RPZ policy zones by default. [GL #123]
4916. [func] Remove IDNA2003 support and the bundled idnkit-1.0
library.
4915. [func] Implement IDNA2008 support in dig by adding support
for libidn2. New dig option +idnin has been added,
@@ -927,15 +551,10 @@
4907. [test] Improved the reliability of the 'notify' system
test. [GL #59]
4906. [func] Replace getquad() with inet_pton(), completing
change #4900. [GL #56]
4905. [bug] irs_resconf_load() ignored resolv.conf syntax errors
when "domain" or "search" options were present in that
file. [GL #110]
4904. [bug] Temporarily revert change #4859. [GL #124]
4903. [bug] "check-mx fail;" did not prevent MX records containing
IP addresses from being added to a zone by a dynamic
update. [GL #112]
@@ -943,21 +562,11 @@
4902. [test] Improved the reliability of the 'ixfr' system
test. [GL #66]
4901. [func] "dig +nssearch" now lists the name servers
for a domain that time out, as well as the servers
that respond. [GL #64]
4900. [func] Remove all uses of inet_aton(). As a result of this
change, IPv4 addresses are now only accepted in
dotted-quad format. [GL #13]
4899. [test] Convert most of the remaining system tests to be able
to run in parallel, continuing the work from change
#4895. To take advantage of this, use "make -jN check",
where N is the number of processors to use. [GL #91]
4898. [func] Remove libseccomp based system-call filtering. [GL #93]
4897. [test] Update to rpz system test so that it doesn't recurse.
[GL #68]
@@ -966,6 +575,14 @@
4895. [test] Allow some system tests to run in parallel.
[RT #46602]
--- 9.12.1 released ---
--- 9.12.1rc2 released ---
4904. [bug] Temporarily revert change #4859. [GL #124]
--- 9.12.1rc1 released ---
4894. [bug] named could crash while rolling a dnstap output file.
[RT #46942]
@@ -975,16 +592,13 @@
before all zone loading actions triggered by a previous
"rndc reload" command were completed. [RT #47076]
4891. [placeholder]
4890. [func] Remove unused ondestroy callback from libisc.
[isc-projects/bind9!3]
4889. [func] Warn about the use of old root keys without the new
root key being present. Warn about dlv.isc.org's
key being present. Warn about both managed and
trusted root keys being present. [RT #43670]
--- 9.12.1b1 released ---
4888. [test] Initialize sockets correctly in sample-update so
that the nsupdate system test will run on Windows.
[RT #47097]
@@ -1055,9 +669,6 @@
be passed to memmove which is undefined behavior and
can lead to bad optimization. [RT #46888]
4868. [func] dnssec-keygen can no longer generate HMAC keys.
Use tsig-keygen instead. [RT #46404]
4867. [cleanup] Normalize rndc on/off commands (validation,
querylog, serve-stale) so they all accept the
same synonyms for on/off (yes/no, true/false,
@@ -1067,33 +678,15 @@
was not disabled) and SHA-1 hash and HMAC support.
[RT #46764]
4865. [cleanup] Simplify handling isc_socket_sendto2() return values.
[RT #46986]
4864. [bug] named acting as a slave for a catalog zone crashed if
the latter contained a master definition without an IP
address. [RT #45999]
4863. [bug] Fix various other bugs reported by Valgrind's
memcheck tool. [RT #46978]
4862. [bug] The rdata flags for RRSIG were not being properly set
when constructing a rdataslab. [RT #46978]
4861. [bug] The isc_crc64 unit test was not endian independent.
[RT #46973]
4860. [bug] isc_int8_t should be signed char. [RT #46973]
4859. [bug] A loop was possible when attempting to validate
unsigned CNAME responses from secure zones;
this caused a delay in returning SERVFAIL and
also increased the chances of encountering
CVE-2017-3145. [RT #46839]
4858. [security] Addresses could be referenced after being freed
in resolver.c, causing an assertion failure.
(CVE-2017-3145) [RT #46839]
4857. [bug] Maintain attach/detach semantics for event->db,
event->node, event->rdataset and event->sigrdataset
@@ -1119,16 +712,6 @@
4851. [port] Support using kyua as well as atf-run to run the unit
tests. [RT #46853]
4850. [bug] Named failed to restart with multiple added zones in
lmdb database. [RT #46889]
4849. [bug] Duplicate zones could appear in the .nzf file if
addzone failed. [RT #46435]
4848. [func] Zone types "primary" and "secondary" can now be used
as synonyms for "master" and "slave" in named.conf.
[RT #46713]
4847. [bug] dnssec-dnskey-kskonly was not being honored for
CDS and CDNSKEY. [RT #46755]
@@ -1146,6 +729,34 @@
4842. [bug] Conditionally compile opensslecdsa_link.c to avoid
warnings about unused function. [RT #46790]
--- 9.12.0 released ---
--- 9.12.0rc3 released ---
4863. [bug] Fix various other bugs reported by Valgrind's
memcheck tool. [RT #46978]
4862. [bug] The rdata flags for RRSIG were not being properly set
when constructing a rdataslab. [RT #46978]
--- 9.12.0rc2 released ---
4859. [bug] A loop was possible when attempting to validate
unsigned CNAME responses from secure zones;
this caused a delay in returning SERVFAIL and
also increased the chances of encountering
CVE-2017-3145. [RT #46839]
4858. [security] Addresses could be referenced after being freed
in resolver.c, causing an assertion failure.
(CVE-2017-3145) [RT #46839]
4850. [bug] Named failed to restart with multiple added zones in
lmdb database. [RT #46889]
4849. [bug] Duplicate zones could appear in the .nzf file if
addzone failed. [RT #46435]
--- 9.12.0rc1 released ---
4841. [bug] Address -fsanitize=undefined warnings. [RT #46786]
+2 -9
View File
@@ -14,7 +14,7 @@ top_builddir = @top_builddir@
VERSION=@BIND9_VERSION@
SUBDIRS = make lib fuzz bin doc
SUBDIRS = make lib bin doc
TARGETS =
PREREQS = bind.keys.h
@@ -22,8 +22,7 @@ MANPAGES = isc-config.sh.1
HTMLPAGES = isc-config.sh.html
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS \
${MANPAGES} ${HTMLPAGES}
MANOBJS = README HISTORY OPTIONS ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
@@ -90,7 +89,6 @@ force-test: test-force
test-force:
status=0; \
(cd fuzz && ${MAKE} check) || status=1; \
(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
(test -f ${top_builddir}/unit/unittest.sh && \
$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
@@ -116,11 +114,6 @@ CONTRIBUTING: 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 | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
unit::
sh ${top_builddir}/unit/unittest.sh
+3
View File
@@ -19,6 +19,9 @@ Setting Description
named-checkzone
-DNS_RUN_PID_DIR=0 Create default PID files in ${localstatedir}/run
rather than ${localstatedir}/run/named/
Increase the maximum number of configurable
-DNS_RPZ_MAX_ZONES=64 response policy zones from 32 to 64; this is the
highest possible setting
Disable the use of inline functions to implement
-DISC_BUFFER_USEINLINE=0 the isc_buffer API: this reduces performance but
may be useful when debugging
+1
View File
@@ -23,5 +23,6 @@ Some of these settings are:
|`-DCHECK_SIBLING=0`|Don't check sibling glue in `named-checkzone`|
|`-DCHECK_LOCAL=0`|Don't check out-of-zone addresses in `named-checkzone`|
|`-DNS_RUN_PID_DIR=0`|Create default PID files in `${localstatedir}/run` rather than `${localstatedir}/run/named/`|
|`-DNS_RPZ_MAX_ZONES=64`|Increase the maximum number of configurable response policy zones from 32 to 64; this is the highest possible setting|
|`-DISC_BUFFER_USEINLINE=0`|Disable the use of inline functions to implement the `isc_buffer` API: this reduces performance but may be useful when debugging |
|`-DISC_HEAP_CHECK`|Test heap consistency after every heap operation; used when debugging|
-90
View File
@@ -1,90 +0,0 @@
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with
RFC-compliant IPv6 support, POSIX-compliant threads, and the OpenSSL
cryptography library. Atomic operations support from the compiler is
needed, either in the form of builtin operations, C11 atomics or the
Interlocked family of functions on Windows.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
Regularly tested platforms
As of Feb 2019, BIND 9.14 is fully supported and regularly tested on the
following systems:
* Debian 8, 9, 10
* Ubuntu 16.04, 18.04
* Fedora 28, 29
* Red Hat Enterprise Linux / CentOS 6, 7
* FreeBSD 11.x
* OpenBSD 6.2, 6.3
The amd64, i386, armhf and arm64 CPU architectures are all fully
supported.
Best effort
The following are platforms on which BIND is known to build and run. ISC
makes every effort to fix bugs on these platforms, but may be unable to do
so quickly due to lack of hardware, less familiarity on the part of
engineering staff, and other constraints. With the exception of Windows
Server 2012 R2, none of these are tested regularly by ISC.
* Windows Server 2012 R2, 2016 / x64
* Windows 10 / x64
* macOS 10.12+
* Solaris 11
* FreeBSD 10.x, 12.0+
* OpenBSD 6.4+
* NetBSD
* Other Linux distributions still supported by their vendors, such as:
+ Ubuntu 14.04, 18.10+
+ Gentoo
+ Arch Linux
+ Alpine Linux
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
Unsupported platforms
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
* Windows Server 2012 and older
* Solaris 10 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or
library)
* Linux without NPTL (Native POSIX Thread Library)
Platform quirks
ARM
If the compilation ends with following error:
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
-102
View File
@@ -1,102 +0,0 @@
<!--
- 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.
-->
## Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with RFC-compliant
IPv6 support, POSIX-compliant threads, and the OpenSSL cryptography library.
Atomic operations support from the compiler is needed, either in the form of
builtin operations, C11 atomics or the Interlocked family of functions on
Windows.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
### Regularly tested platforms
As of Feb 2019, BIND 9.14 is fully supported and regularly tested on the
following systems:
* Debian 8, 9, 10
* Ubuntu 16.04, 18.04
* Fedora 28, 29
* Red Hat Enterprise Linux / CentOS 6, 7
* FreeBSD 11.x
* OpenBSD 6.2, 6.3
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
### Best effort
The following are platforms on which BIND is known to build and run.
ISC makes every effort to fix bugs on these platforms, but may be unable to
do so quickly due to lack of hardware, less familiarity on the part of
engineering staff, and other constraints. With the exception of Windows
Server 2012 R2, none of these are tested regularly by ISC.
* Windows Server 2012 R2, 2016 / x64
* Windows 10 / x64
* macOS 10.12+
* Solaris 11
* FreeBSD 10.x, 12.0+
* OpenBSD 6.4+
* NetBSD
* Other Linux distributions still supported by their vendors, such as:
* Ubuntu 14.04, 18.10+
* Gentoo
* Arch Linux
* Alpine Linux
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
## Unsupported platforms
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
* Windows Server 2012 and older
* Solaris 10 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or library)
* Linux without NPTL (Native POSIX Thread Library)
## Platform quirks
### ARM
If the compilation ends with following error:
```
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
```
+90 -68
View File
@@ -5,7 +5,7 @@ Contents
1. Introduction
2. Reporting bugs and getting help
3. Contributing to BIND
4. BIND 9.14 features
4. BIND 9.12 features
5. Building BIND
6. macOS
7. Dependencies
@@ -32,9 +32,9 @@ administrative tools, including the dig and delv DNS lookup tools,
nsupdate for dynamic DNS zone updates, rndc for remote name server
administration, and more.
BIND 9 began as a complete re-write of the BIND architecture that was used
in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a
501(c)(3) public benefit corporation dedicated to providing software and
BIND 9 is a complete re-write of the BIND architecture that was used 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,
@@ -49,8 +49,6 @@ the file CHANGES. See below for details on the CHANGES file format.
For up-to-date release notes and errata, see http://www.isc.org/software/
bind9/releasenotes
For information about supported platforms, see PLATFORMS.
Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may
@@ -85,8 +83,8 @@ ISC maintains a public git repository for BIND; details can be found at
http://www.isc.org/git/.
Information for BIND contributors can be found in the following files: -
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
- BIND architecture and developer guide: doc/dev/dev.md
General information: doc/dev/contrib.md - BIND 9 code style: doc/dev/
style.md - BIND architecture and developer guide: doc/dev/dev.md
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
@@ -100,63 +98,77 @@ 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.14 features
BIND 9.12 features
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:
BIND 9.12.0 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.11 and earlier releases. New features
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.
* 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 are transferred in as with traditional slave zones, but are
subject to DNSSEC validation and are not treated as authoritative data
when answering. This makes it easier to configure a local copy of the
root zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below
which DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with libidn2.
* "named -V" now outputs the default paths for files used by named and
other tools.
* named and related libraries have been substantially refactored for
improved query performance -- particularly on delegation heavy zones
-- and for improved readability, maintainability, and testability.
* Code implementing the name server query processing logic has been
moved into a new libns library, for easier testing and use in tools
other than named.
* Cached, validated NSEC and other records can now be used to synthesize
NXDOMAIN responses.
* The DNS Response Policy Service API (DNSRPS) is now supported.
* Setting 'max-journal-size default' now limits the size of journal
files to twice the size of the zone.
* dnstap-read -x prints a hex dump of the wire format of each logged DNS
message.
* dnstap output files can now be configured to roll automatically when
reaching a given size.
* Log file timestamps can now also be formatted in ISO 8601 (local) or
ISO 8601 (UTC) formats.
* Logging channels and dnstap output files can now be configured to use
a timestamp as the suffix when rolling to a new file.
* 'named-checkconf -l' lists zones found in named.conf.
* Added support for the EDNS Padding and Keepalive options.
* 'new-zones-directory' option sets the location where the configuration
data for zones added by rndc addzone is stored.
* The default key algorithm in rndc-confgen is now hmac-sha256.
* filter-aaaa-on-v4 and filter-aaaa-on-v6 options are now available by
default without a configure option.
* The obsolete isc-hmac-fixup command has been removed.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See https://dnsflagday.net for more details.
BIND 9.12.1
Cryptographic support has been modernized. BIND now uses the best
available pseudo-random number generator for the platform on which it's
built. Very old versions of OpenSSL are no longer supported. Cryptography
is now mandatory: building BIND without DNSSEC is no longer supported.
BIND 9.12.1 is a maintenance release.
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. Non-threaded builds
are no longer supported.
BIND 9.12.2
BIND 9.12.2 is a maintenance release, and addresses security
vulnerabilities disclosed in CVE-2018-5736, CVE-2018-5737 and
CVE-2018-5738.
BIND 9.12.3
BIND 9.12.3 is a maintenance release, and also addresses CVE-2018-5741 by
correcting faulty documentation and introducing the following new feature:
* New krb5-selfsub and ms-selfsub rule types for update-policy
statements allow updating of subdomains based on a Kerberos or Active
Directory machine principal.
BIND 9.12.4
BIND 9.12.4 is a maintenance release, and addresses the security
vulnerabilities disclosed in CVE-2018-5744, CVE-2018-5745, and
CVE-2019-6465.
BIND 9.12.4-P1
BIND 9.12.4-P1 addresses the security vulnerabilities disclosed in
CVE-2018-5743 and CVE-2019-6467.
Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have
been observed on many versions of Linux and UNIX, including RedHat,
Fedora, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS
X, Solaris, HP-UX, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires the
libcap library to set process privileges, though this requirement can be
overridden by disabling capability support at compile time. See
Compile-time options below for details on other libraries that may be
required to support optional features.
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
support, and a 64-bit integer type. Successful builds have been observed
on many versions of Linux and UNIX, including RedHat, Fedora, Debian,
Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris,
HP-UX, AIX, SCO OpenServer, and OpenWRT.
BIND is also available for Windows 2008 and higher. See win32utils/
readme1st.txt for details on building for Windows systems.
@@ -212,16 +224,27 @@ Compile-time options
To see a full list of configuration options, run configure --help.
On most platforms, BIND 9 is built with multithreading support, allowing
it to take advantage of multiple CPUs. You can configure this by
specifying --enable-threads or --disable-threads on the configure command
line. The default is to enable threads, except on some older operating
systems on which threads are known to have had problems in the past.
(Note: Prior to BIND 9.10, the default was to disable threads on Linux
systems; this has now been reversed. On Linux systems, the threaded build
is known to change BIND's behavior with respect to file permissions; it
may be necessary to specify a user with the -u option when running named.)
To build shared libraries, specify --with-libtool on the configure command
line.
For the server to support DNSSEC, you need to build it with crypto
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
installed. If the OpenSSL library is installed in a nonstandard location,
specify the prefix using --with-openssl=<PREFIX> on the configure command
line. To use a PKCS#11 hardware service module for cryptographic
specify the prefix using "--with-openssl=<PREFIX>" on the configure
command line. To use a PKCS#11 hardware service module for cryptographic
operations, specify the path to the PKCS#11 provider library using
--with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11.
"--with-pkcs11=<PREFIX>", and configure BIND with
"--enable-native-pkcs11".
To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2 http://xmlsoft.org or json-c https://
@@ -234,12 +257,12 @@ specify the prefix using --with-zlib=/prefix.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in
a nonstandard location, specify the prefix using with-lmdb=/prefix.
a nonstandard location, specify the prefix using "with-lmdb=/prefix".
To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with
--with-geoip. If the library is installed in a nonstandard location,
specify the prefix using --with-geoip=/prefix.
"--with-geoip". If the library is installed in a nonstandard location, use
specify the prefix using "--with-geoip=/prefix".
For DNSTAP packet logging, you must have installed libfstrm https://
github.com/farsightsec/fstrm and libprotobuf-c https://
@@ -253,11 +276,6 @@ large on the configure command line. This can improve performance on big
servers, but will consume more memory and may degrade performance on
smaller systems.
On Linux, process capabilities are managed in user space using the libcap
library, which can be installed on most Linux systems via the libcap-dev
or libcap-devel module. Process capability support can also be disabled by
configuring with --disable-linux-caps.
On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using
--enable-largefile on the configure command line.
@@ -267,6 +285,10 @@ specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
command line. By default, fixed rrset-order is disabled to reduce memory
footprint.
If your operating system has integrated support for IPv6, it will be used
automatically. If you have installed KAME IPv6 separately, use --with-kame
[=PATH] to specify its location.
The --enable-querytrace option causes named to log every step of
processing every query. This should only be enabled when debugging,
because it has a significant negative impact on query performance.
+88 -66
View File
@@ -15,7 +15,7 @@
1. [Introduction](#intro)
1. [Reporting bugs and getting help](#help)
1. [Contributing to BIND](#contrib)
1. [BIND 9.14 features](#features)
1. [BIND 9.12 features](#features)
1. [Building BIND](#build)
1. [macOS](#macos)
1. [Dependencies](#dependencies)
@@ -42,8 +42,8 @@ administrative tools, including the `dig` and `delv` DNS lookup tools,
`nsupdate` for dynamic DNS zone updates, `rndc` for remote name server
administration, and more.
BIND 9 began as a complete re-write of the BIND architecture that was
used in versions 4 and 8. Internet Systems Consortium
BIND 9 is a complete re-write of the BIND architecture that was used in
versions 4 and 8. Internet Systems Consortium
([https://www.isc.org](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
@@ -60,8 +60,6 @@ CHANGES file format.
For up-to-date release notes and errata, see
[http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes)
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
### <a name="help"/> Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may
@@ -98,7 +96,7 @@ ISC maintains a public git repository for BIND; details can be found
at [http://www.isc.org/git/](http://www.isc.org/git/).
Information for BIND contributors can be found in the following files:
- General information: [CONTRIBUTING.md](CONTRIBUTING)
- General information: [doc/dev/contrib.md](doc/dev/contrib.md)
- BIND 9 code style: [doc/dev/style.md](doc/dev/style.md)
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
@@ -117,63 +115,78 @@ 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.14 features
### <a name="features"/> BIND 9.12 features
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:
BIND 9.12.0 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.11 and earlier releases. New features
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.
* 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
are transferred in as with traditional slave zones, but are subject to
DNSSEC validation and are not treated as authoritative data when
answering. This makes it easier to configure a local copy of the root
zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below which
DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with `libidn2`.
* "named -V" now outputs the default paths for files used by named
and other tools.
* `named` and related libraries have been substantially refactored for
improved query performance -- particularly on delegation heavy zones --
and for improved readability, maintainability, and testability.
* Code implementing the name server query processing logic has been moved
into a new `libns` library, for easier testing and use in tools other
than `named`.
* Cached, validated NSEC and other records can now be used to synthesize
NXDOMAIN responses.
* The DNS Response Policy Service API (DNSRPS) is now supported.
* Setting `'max-journal-size default'` now limits the size of journal files
to twice the size of the zone.
* `dnstap-read -x` prints a hex dump of the wire format of each logged
DNS message.
* `dnstap` output files can now be configured to roll automatically when
reaching a given size.
* Log file timestamps can now also be formatted in ISO 8601 (local) or ISO
8601 (UTC) formats.
* Logging channels and `dnstap` output files can now be configured to use a
timestamp as the suffix when rolling to a new file.
* `'named-checkconf -l'` lists zones found in `named.conf`.
* Added support for the EDNS Padding and Keepalive options.
* 'new-zones-directory' option sets the location where the configuration
data for zones added by rndc addzone is stored.
* The default key algorithm in `rndc-confgen` is now hmac-sha256.
* `filter-aaaa-on-v4` and `filter-aaaa-on-v6` options are now available
by default without a configure option.
* The obsolete `isc-hmac-fixup` command has been removed.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
for more details.
#### BIND 9.12.1
Cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory: building BIND without DNSSEC is no
longer supported.
BIND 9.12.1 is a maintenance release.
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. Non-threaded builds are no longer supported.
#### BIND 9.12.2
BIND 9.12.2 is a maintenance release, and addresses security
vulnerabilities disclosed in CVE-2018-5736, CVE-2018-5737 and
CVE-2018-5738.
#### BIND 9.12.3
BIND 9.12.3 is a maintenance release, and also addresses CVE-2018-5741
by correcting faulty documentation and introducing the following new
feature:
* New `krb5-selfsub` and `ms-selfsub` rule types for `update-policy`
statements allow updating of subdomains based on a Kerberos or
Active Directory machine principal.
#### BIND 9.12.4
BIND 9.12.4 is a maintenance release, and addresses the security
vulnerabilities disclosed in CVE-2018-5744, CVE-2018-5745, and
CVE-2019-6465.
#### BIND 9.12.4-P1
BIND 9.12.4-P1 addresses the security vulnerabilities disclosed in
CVE-2018-5743 and CVE-2019-6467.
### <a name="build"/> Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have been
observed on many versions of Linux and UNIX, including RedHat, Fedora,
Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X,
Solaris, HP-UX, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires
the `libcap` library to set process privileges, though this requirement
can be overridden by disabling capability support at compile time.
See [Compile-time options](#opts) below for details on other libraries
that may be required to support optional features.
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
support, and a 64-bit integer type. Successful builds have been observed on
many versions of Linux and UNIX, including RedHat, Fedora, Debian, Ubuntu,
SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris, HP-UX, AIX,
SCO OpenServer, and OpenWRT.
BIND is also available for Windows 2008 and higher. See
`win32utils/readme1st.txt` for details on building for Windows
@@ -223,16 +236,26 @@ system tests, require the 'argparse' and 'ply' modules to be available.
To see a full list of configuration options, run `configure --help`.
On most platforms, BIND 9 is built with multithreading support, allowing it
to take advantage of multiple CPUs. You can configure this by specifying
`--enable-threads` or `--disable-threads` on the `configure` command line.
The default is to enable threads, except on some older operating systems on
which threads are known to have had problems in the past. (Note: Prior to
BIND 9.10, the default was to disable threads on Linux systems; this has
now been reversed. On Linux systems, the threaded build is known to change
BIND's behavior with respect to file permissions; it may be necessary to
specify a user with the -u option when running `named`.)
To build shared libraries, specify `--with-libtool` on the `configure`
command line.
For the server to support DNSSEC, you need to build it with crypto support.
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
OpenSSL library is installed in a nonstandard location, specify the prefix
using `--with-openssl=<PREFIX>` on the configure command line. To use a
using "--with-openssl=&lt;PREFIX&gt;" on the configure command line. To use a
PKCS#11 hardware service module for cryptographic operations, specify the
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
configure BIND with `--enable-native-pkcs11`.
path to the PKCS#11 provider library using "--with-pkcs11=&lt;PREFIX&gt;", and
configure BIND with "--enable-native-pkcs11".
To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2
@@ -247,12 +270,12 @@ specify the prefix using `--with-zlib=/prefix`.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in a
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
nonstandard location, specify the prefix using "with-lmdb=/prefix".
To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with
`--with-geoip`. If the library is installed in a nonstandard location,
specify the prefix using `--with-geoip=/prefix`.
"--with-geoip". If the library is installed in a nonstandard location, use
specify the prefix using "--with-geoip=/prefix".
For DNSTAP packet logging, you must have installed libfstrm
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
@@ -267,11 +290,6 @@ values better suited to large servers with abundant memory resources (e.g,
performance on big servers, but will consume more memory and may degrade
performance on smaller systems.
On Linux, process capabilities are managed in user space using
the `libcap` library, which can be installed on most Linux systems via
the `libcap-dev` or `libcap-devel` module. Process capability support can
also be disabled by configuring with `--disable-linux-caps`.
On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using
`--enable-largefile` on the `configure` command line.
@@ -281,6 +299,10 @@ specifying `--enable-fixed-rrset` or `--disable-fixed-rrset` on the
configure command line. By default, fixed rrset-order is disabled to
reduce memory footprint.
If your operating system has integrated support for IPv6, it will be used
automatically. If you have installed KAME IPv6 separately, use
`--with-kame[=PATH]` to specify its location.
The `--enable-querytrace` option causes `named` to log every step of
processing every query. This should only be enabled when debugging, because
it has a significant negative impact on query performance.
+137
View File
@@ -0,0 +1,137 @@
/*
* 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.
*/
/*! \file */
/***
*** This file is not to be included by any public header files, because
*** it does not get installed.
***/
@TOP@
/** define on DEC OSF to enable 4.4BSD style sa_len support */
#undef _SOCKADDR_LEN
/** define if your system needs pthread_init() before using pthreads */
#undef NEED_PTHREAD_INIT
/** define if your system has sigwait() */
#undef HAVE_SIGWAIT
/** define if sigwait() is the UnixWare flavor */
#undef HAVE_UNIXWARE_SIGWAIT
/** define on Solaris to get sigwait() to work using pthreads semantics */
#undef _POSIX_PTHREAD_SEMANTICS
/** define if LinuxThreads is in use */
#undef HAVE_LINUXTHREADS
/** define if sysconf() is available */
#undef HAVE_SYSCONF
/** define if sysctlbyname() is available */
#undef HAVE_SYSCTLBYNAME
/** define if catgets() is available */
#undef HAVE_CATGETS
/** define if getifaddrs() exists */
#undef HAVE_GETIFADDRS
/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
#undef HAVE_IFLIST_SYSCTL
/** define if tzset() is available */
#undef HAVE_TZSET
/** define if struct addrinfo exists */
#undef HAVE_ADDRINFO
/** define if getaddrinfo() exists */
#undef HAVE_GETADDRINFO
/** define if gai_strerror() exists */
#undef HAVE_GAISTRERROR
/**
* define if pthread_setconcurrency() should be called to tell the
* OS how many threads we might want to run.
*/
#undef CALL_PTHREAD_SETCONCURRENCY
/** define if IPv6 is not disabled */
#undef WANT_IPV6
/** define if flockfile() is available */
#undef HAVE_FLOCKFILE
/** define if getc_unlocked() is available */
#undef HAVE_GETCUNLOCKED
/** Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
#undef SHUTUP_SPUTAUX
#ifdef SHUTUP_SPUTAUX
struct __sFILE;
extern __inline int __sputaux(int _c, struct __sFILE *_p);
#endif
/** Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
#undef SHUTUP_SIGWAIT
#ifdef SHUTUP_SIGWAIT
int sigwait(const unsigned int *set, int *sig);
#endif
/** Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
#undef SHUTUP_STDARG_CAST
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
#include <stdarg.h> /** Grr. Must be included *every time*. */
/**
* The silly continuation line is to keep configure from
* commenting out the #undef.
*/
#undef \
va_start
#define va_start(ap, last) \
do { \
union { const void *konst; long *var; } _u; \
_u.konst = &(last); \
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
} while (0)
#endif /** SHUTUP_STDARG_CAST && __GNUC__ */
/** define if the system has a random number generating device */
#undef PATH_RANDOMDEV
/** define if pthread_attr_getstacksize() is available */
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
/** define if pthread_attr_setstacksize() is available */
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
/** define if you have strerror in the C library. */
#undef HAVE_STRERROR
/* Define if OpenSSL includes DSA support */
#undef HAVE_OPENSSL_DSA
/* Define if you have getpassphrase in the C library. */
#undef HAVE_GETPASSPHRASE
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
#undef ISC_SOCKADDR_LEN_T
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
#undef NEED_PTHREAD_SCOPE_SYSTEM
/* Define to 1 if you have the uname library function. */
#undef HAVE_UNAME
Vendored
+5 -8
View File
@@ -288,11 +288,8 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
m4_include([m4/ax_check_openssl.m4])
m4_include([m4/ax_posix_shell.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
m4_include([libtool.m4/libtool.m4])
m4_include([libtool.m4/ltoptions.m4])
m4_include([libtool.m4/ltsugar.m4])
m4_include([libtool.m4/ltversion.m4])
m4_include([libtool.m4/lt~obsolete.m4])
+1 -1
View File
@@ -12,7 +12,7 @@ VPATH = @srcdir@
top_srcdir = @top_srcdir@
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
TARGETS =
@BIND9_MAKE_RULES@
+5 -5
View File
@@ -16,15 +16,15 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
${ISC_INCLUDES} @OPENSSL_INCLUDES@
${ISC_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CDEFINES = @CRYPTO@ -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@
@@ -66,7 +66,7 @@ named-checkzone.@O@: named-checkzone.c
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
export LIBS0="${NSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
${FINALBUILDCMD}
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
+35 -14
View File
@@ -62,6 +62,14 @@
#define CHECK_LOCAL 1
#endif
#ifdef HAVE_ADDRINFO
#ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAISTRERROR
#define USE_GETADDRINFO
#endif
#endif
#endif
#define CHECK(r) \
do { \
result = (r); \
@@ -92,17 +100,18 @@ bool docheckmx = false;
bool dochecksrv = false;
bool docheckns = false;
#endif
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKMX |
DNS_ZONEOPT_MANYERRORS |
DNS_ZONEOPT_CHECKNAMES |
DNS_ZONEOPT_CHECKINTEGRITY |
unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKMX |
DNS_ZONEOPT_MANYERRORS |
DNS_ZONEOPT_CHECKNAMES |
DNS_ZONEOPT_CHECKINTEGRITY |
#if CHECK_SIBLING
DNS_ZONEOPT_CHECKSIBLING |
DNS_ZONEOPT_CHECKSIBLING |
#endif
DNS_ZONEOPT_CHECKWILDCARD |
DNS_ZONEOPT_WARNMXCNAME |
DNS_ZONEOPT_WARNSRVCNAME;
DNS_ZONEOPT_CHECKWILDCARD |
DNS_ZONEOPT_WARNMXCNAME |
DNS_ZONEOPT_WARNSRVCNAME;
unsigned int zone_options2 = 0;
/*
* This needs to match the list in bin/named/log.c.
@@ -169,6 +178,7 @@ static bool
checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
dns_rdataset_t *a, dns_rdataset_t *aaaa)
{
#ifdef USE_GETADDRINFO
dns_rdataset_t *rdataset;
dns_rdata_t rdata = DNS_RDATA_INIT;
struct addrinfo hints, *ai, *cur;
@@ -364,10 +374,14 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
}
freeaddrinfo(ai);
return (answer);
#else
return (true);
#endif
}
static bool
checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
#ifdef USE_GETADDRINFO
struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE];
@@ -446,10 +460,14 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
}
return (true);
}
#else
return (true);
#endif
}
static bool
checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
#ifdef USE_GETADDRINFO
struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE];
@@ -527,6 +545,9 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
}
return (true);
}
#else
return (true);
#endif
}
isc_result_t
@@ -669,8 +690,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
CHECK(dns_zone_setorigin(zone, origin));
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
CHECK(dns_zone_setfile(zone, filename, fileformat,
&dns_master_style_default));
CHECK(dns_zone_setfile2(zone, filename, fileformat));
if (journal != NULL)
CHECK(dns_zone_setjournal(zone, journal));
@@ -680,6 +700,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, zone_options, true);
dns_zone_setoption2(zone, zone_options2, true);
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
dns_zone_setmaxttl(zone, maxttl);
@@ -691,7 +712,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
if (dochecksrv)
dns_zone_setchecksrv(zone, checksrv);
CHECK(dns_zone_load(zone, false));
CHECK(dns_zone_load(zone));
/*
* When loading map files we can't catch oversize TTLs during
@@ -742,8 +763,8 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
}
}
result = dns_zone_dumptostream(zone, output, fileformat, style,
rawversion);
result = dns_zone_dumptostream3(zone, output, fileformat, style,
rawversion);
if (output != stdout)
(void)isc_stdio_close(output);
+2 -2
View File
@@ -24,7 +24,6 @@
#include <dns/masterdump.h>
#include <dns/types.h>
#include <dns/zone.h>
ISC_LANG_BEGINDECLS
@@ -52,7 +51,8 @@ extern bool nomerge;
extern bool docheckmx;
extern bool docheckns;
extern bool dochecksrv;
extern dns_zoneopt_t zone_options;
extern unsigned int zone_options;
extern unsigned int zone_options2;
ISC_LANG_ENDDECLS
+1 -8
View File
@@ -39,7 +39,7 @@
named-checkconf \- named configuration file syntax checking tool
.SH "SYNOPSIS"
.HP \w'\fBnamed\-checkconf\fR\ 'u
\fBnamed\-checkconf\fR [\fB\-chjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
\fBnamed\-checkconf\fR [\fB\-hjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
.SH "DESCRIPTION"
.PP
\fBnamed\-checkconf\fR
@@ -79,13 +79,6 @@ When loading a zonefile read the journal if it exists\&.
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
.RE
.PP
\-c
.RS 4
Check "core" configuration only\&. This suppresses the loading of plugin modules, and causes all parameters to
\fBplugin\fR
statements to be ignored\&.
.RE
.PP
\-p
.RS 4
Print out the
+17 -23
View File
@@ -21,6 +21,7 @@
#include <isc/commandline.h>
#include <isc/dir.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/log.h>
#include <isc/mem.h>
@@ -46,8 +47,6 @@
static const char *program = "named-checkconf";
static bool loadplugins = true;
isc_log_t *logc = NULL;
#define CHECK(r)\
@@ -130,13 +129,8 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
element = cfg_list_next(element)) {
value = cfg_listelt_value(element);
type = cfg_tuple_get(value, "type");
if ((strcasecmp(cfg_obj_asstring(type),
"primary") != 0) &&
(strcasecmp(cfg_obj_asstring(type),
"master") != 0))
{
if (strcasecmp(cfg_obj_asstring(type), "master") != 0)
continue;
}
*obj = cfg_tuple_get(value, "mode");
return (true);
}
@@ -252,14 +246,11 @@ configure_zone(const char *vclass, const char *view,
* Skip loading checks for any type other than
* master and redirect
*/
if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0) {
if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0)
return (configure_hint(zfile, zclass, mctx));
} else if ((strcasecmp(cfg_obj_asstring(typeobj), "primary") != 0) &&
(strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) &&
(strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0))
{
else if ((strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) &&
(strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0))
return (ISC_R_SUCCESS);
}
/*
* Is the redirect zone configured as a slave?
@@ -423,7 +414,7 @@ configure_zone(const char *vclass, const char *view,
obj = NULL;
if (get_maps(maps, "max-zone-ttl", &obj)) {
maxttl = cfg_obj_asuint32(obj);
zone_options |= DNS_ZONEOPT_CHECKTTL;
zone_options2 |= DNS_ZONEOPT2_CHECKTTL;
}
result = load_zone(mctx, zname, zfile, masterformat,
@@ -554,6 +545,7 @@ main(int argc, char **argv) {
isc_mem_t *mctx = NULL;
isc_result_t result;
int exit_status = 0;
isc_entropy_t *ectx = NULL;
bool load_zones = false;
bool list_zones = false;
bool print = false;
@@ -564,7 +556,7 @@ main(int argc, char **argv) {
/*
* Process memory debugging argument first.
*/
#define CMDLINE_FLAGS "cdhjlm:t:pvxz"
#define CMDLINE_FLAGS "dhjlm:t:pvxz"
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (c) {
case 'm':
@@ -589,10 +581,6 @@ main(int argc, char **argv) {
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
switch (c) {
case 'c':
loadplugins = false;
break;
case 'd':
debug++;
break;
@@ -673,6 +661,10 @@ main(int argc, char **argv) {
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
== ISC_R_SUCCESS);
dns_result_register();
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
@@ -683,10 +675,9 @@ main(int argc, char **argv) {
ISC_R_SUCCESS)
exit(1);
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
if (result != ISC_R_SUCCESS) {
result = bind9_check_namedconf(config, logc, mctx);
if (result != ISC_R_SUCCESS)
exit_status = 1;
}
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
result = load_zones_fromconfig(config, mctx, list_zones);
@@ -704,6 +695,9 @@ main(int argc, char **argv) {
isc_log_destroy(&logc);
isc_hash_destroy();
isc_entropy_detach(&ectx);
isc_mem_destroy(&mctx);
#ifdef _WIN32
+1 -12
View File
@@ -53,7 +53,7 @@
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>named-checkconf</command>
<arg choice="opt" rep="norepeat"><option>-chjlvz</option></arg>
<arg choice="opt" rep="norepeat"><option>-hjlvz</option></arg>
<arg choice="opt" rep="norepeat"><option>-p</option>
<arg choice="opt" rep="norepeat"><option>-x</option>
</arg></arg>
@@ -115,17 +115,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-c</term>
<listitem>
<para>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<command>plugin</command> statements to be ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem>
+1 -9
View File
@@ -33,7 +33,7 @@
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">named-checkconf</code>
[<code class="option">-chjlvz</code>]
[<code class="option">-hjlvz</code>]
[<code class="option">-p</code>
[<code class="option">-x</code>
]]
@@ -88,14 +88,6 @@
(e.g. master or slave).
</p>
</dd>
<dt><span class="term">-c</span></dt>
<dd>
<p>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<span class="command"><strong>plugin</strong></span> statements to be ignored.
</p>
</dd>
<dt><span class="term">-p</span></dt>
<dd>
<p>
+8 -1
View File
@@ -21,6 +21,7 @@
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/dir.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/log.h>
#include <isc/mem.h>
@@ -47,6 +48,7 @@
static int quiet = 0;
static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
dns_zone_t *zone = NULL;
dns_zonetype_t zonetype = dns_zone_master;
static int dumpzone = 0;
@@ -261,7 +263,7 @@ main(int argc, char **argv) {
break;
case 'l':
zone_options |= DNS_ZONEOPT_CHECKTTL;
zone_options2 |= DNS_ZONEOPT2_CHECKTTL;
endp = NULL;
maxttl = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0') {
@@ -523,6 +525,9 @@ main(int argc, char **argv) {
if (!quiet)
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
== ISC_R_SUCCESS);
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
== ISC_R_SUCCESS);
dns_result_register();
@@ -554,6 +559,8 @@ main(int argc, char **argv) {
destroy();
if (lctx != NULL)
isc_log_destroy(&lctx);
isc_hash_destroy();
isc_entropy_detach(&ectx);
isc_mem_destroy(&mctx);
#ifdef _WIN32
DestroySockets();
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
+2 -2
View File
@@ -58,7 +58,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -80,7 +80,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
@@ -87,7 +87,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -105,7 +105,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<PostBuildEvent>
+2 -2
View File
@@ -27,8 +27,8 @@ CWARNINGS =
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@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
+12 -1
View File
@@ -39,7 +39,7 @@
ddns-confgen \- ddns key generation tool
.SH "SYNOPSIS"
.HP \w'\fBtsig\-keygen\fR\ 'u
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [name]
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [name]
.HP \w'\fBddns\-confgen\fR\ 'u
\fBddns\-confgen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-q\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\-s\ \fIname\fR | \-z\ \fIzone\fR]
.SH "DESCRIPTION"
@@ -109,6 +109,17 @@ only\&.) Quiet mode: Print only the key, with no explanatory text or usage examp
\fBtsig\-keygen\fR\&.
.RE
.PP
\-r \fIrandomfile\fR
.RS 4
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
/dev/random
or equivalent device, the default source of randomness is keyboard input\&.
randomdev
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
keyboard
indicates that keyboard input should be used\&.
.RE
.PP
\-s \fIname\fR
.RS 4
(\fBddns\-confgen\fR
+13 -8
View File
@@ -19,15 +19,17 @@
#include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdarg.h>
#include <isc/assertions.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/print.h>
@@ -36,7 +38,7 @@
#include <isc/time.h>
#include <isc/util.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
@@ -66,9 +68,10 @@ usage(int status) {
if (progmode == progmode_confgen) {
fprintf(stderr, "\
Usage:\n\
%s [-a alg] [-k keyname] [-q] [-s name | -z zone]\n\
%s [-a alg] [-k keyname] [-r randomfile] [-q] [-s name | -z zone]\n\
-a alg: algorithm (default hmac-sha256)\n\
-k keyname: name of the key as it will be used in named.conf\n\
-r randomfile: source of random data (use \"keyboard\" for key timing)\n\
-s name: domain name to be updated using the created key\n\
-z zone: name of the zone as it will be used in named.conf\n\
-q: quiet mode: print the key, with no explanatory text\n",
@@ -76,8 +79,9 @@ Usage:\n\
} else {
fprintf(stderr, "\
Usage:\n\
%s [-a alg] [keyname]\n\
-a alg: algorithm (default hmac-sha256)\n\n",
%s [-a alg] [-r randomfile] [keyname]\n\
-a alg: algorithm (default hmac-sha256)\n\
-r randomfile: source of random data (use \"keyboard\" for key timing)\n",
progname);
}
@@ -92,6 +96,7 @@ main(int argc, char **argv) {
isc_buffer_t key_txtbuffer;
char key_txtsecret[256];
isc_mem_t *mctx = NULL;
const char *randomfile = NULL;
const char *keyname = NULL;
const char *zone = NULL;
const char *self_domain = NULL;
@@ -102,7 +107,7 @@ main(int argc, char **argv) {
int len = 0;
int ch;
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -166,7 +171,7 @@ main(int argc, char **argv) {
usage(1);
break;
case 'r':
fatal("The -r option has been deprecated.");
randomfile = isc_commandline_argument;
break;
case 's':
if (progmode == progmode_confgen)
@@ -233,7 +238,7 @@ main(int argc, char **argv) {
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
generate_key(mctx, alg, keysize, &key_txtbuffer);
generate_key(mctx, randomfile, alg, keysize, &key_txtbuffer);
if (!quiet)
+18
View File
@@ -47,6 +47,7 @@
<command>tsig-keygen</command>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
<arg choice="opt" rep="norepeat">name</arg>
</cmdsynopsis>
<cmdsynopsis sepchar=" ">
@@ -157,6 +158,23 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomfile</replaceable></term>
<listitem>
<para>
Specifies a source of random data for generating the
authorization. If the operating system does not provide a
<filename>/dev/random</filename> or equivalent device, the
default source of randomness is keyboard input.
<filename>randomdev</filename> specifies the name of a
character device or file containing random data to be used
instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard input
should be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">name</replaceable></term>
<listitem>
+15
View File
@@ -35,6 +35,7 @@
<code class="command">tsig-keygen</code>
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-h</code>]
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
[name]
</p></div>
<div class="cmdsynopsis"><p>
@@ -135,6 +136,20 @@
This is essentially identical to <span class="command"><strong>tsig-keygen</strong></span>.
</p>
</dd>
<dt><span class="term">-r <em class="replaceable"><code>randomfile</code></em></span></dt>
<dd>
<p>
Specifies a source of random data for generating the
authorization. If the operating system does not provide a
<code class="filename">/dev/random</code> or equivalent device, the
default source of randomness is keyboard input.
<code class="filename">randomdev</code> specifies the name of a
character device or file containing random data to be used
instead of the default. The special value
<code class="filename">keyboard</code> indicates that keyboard input
should be used.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt>
<dd>
<p>
+48 -7
View File
@@ -19,7 +19,9 @@
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/entropy.h>
#include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/result.h>
@@ -42,8 +44,10 @@
const char *
alg_totext(dns_secalg_t alg) {
switch (alg) {
#ifndef PK11_MD5_DISABLE
case DST_ALG_HMACMD5:
return "hmac-md5";
#endif
case DST_ALG_HMACSHA1:
return "hmac-sha1";
case DST_ALG_HMACSHA224:
@@ -68,8 +72,10 @@ alg_fromtext(const char *name) {
if (strncasecmp(p, "hmac-", 5) == 0)
p = &name[5];
#ifndef PK11_MD5_DISABLE
if (strcasecmp(p, "md5") == 0)
return DST_ALG_HMACMD5;
#endif
if (strcasecmp(p, "sha1") == 0)
return DST_ALG_HMACSHA1;
if (strcasecmp(p, "sha224") == 0)
@@ -107,19 +113,26 @@ alg_bits(dns_secalg_t alg) {
}
/*%
* Generate a key of size 'keysize' and place it in 'key_txtbuffer'
* Generate a key of size 'keysize' using entropy source 'randomfile',
* and place it in 'key_txtbuffer'
*/
void
generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
isc_buffer_t *key_txtbuffer) {
generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
int keysize, isc_buffer_t *key_txtbuffer) {
isc_result_t result = ISC_R_SUCCESS;
isc_entropysource_t *entropy_source = NULL;
int open_keyboard = ISC_ENTROPY_KEYBOARDMAYBE;
int entropy_flags = 0;
isc_entropy_t *ectx = NULL;
isc_buffer_t key_rawbuffer;
isc_region_t key_rawregion;
char key_rawsecret[64];
dst_key_t *key = NULL;
switch (alg) {
#ifndef PK11_MD5_DISABLE
case DST_ALG_HMACMD5:
#endif
case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256:
@@ -137,12 +150,31 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
fatal("unsupported algorithm %d\n", alg);
}
DO("initialize dst library", dst_lib_init(mctx, NULL));
DO("create entropy context", isc_entropy_create(mctx, &ectx));
#ifdef ISC_PLATFORM_CRYPTORANDOM
if (randomfile == NULL) {
isc_entropy_usehook(ectx, true);
}
#endif
if (randomfile != NULL && strcmp(randomfile, "keyboard") == 0) {
randomfile = NULL;
open_keyboard = ISC_ENTROPY_KEYBOARDYES;
}
DO("start entropy source", isc_entropy_usebestsource(ectx,
&entropy_source,
randomfile,
open_keyboard));
entropy_flags = ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY;
DO("initialize dst library", dst_lib_init(mctx, ectx, entropy_flags));
DO("generate key", dst_key_generate(dns_rootname, alg,
keysize, 0, 0, DNS_KEYPROTO_ANY,
dns_rdataclass_in, mctx, &key,
NULL));
keysize, 0, 0,
DNS_KEYPROTO_ANY,
dns_rdataclass_in, mctx, &key));
isc_buffer_init(&key_rawbuffer, &key_rawsecret, sizeof(key_rawsecret));
@@ -153,9 +185,17 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
DO("bsse64 encode secret", isc_base64_totext(&key_rawregion, -1, "",
key_txtbuffer));
/*
* Shut down the entropy source now so the "stop typing" message
* does not muck with the output.
*/
if (entropy_source != NULL)
isc_entropy_destroysource(&entropy_source);
if (key != NULL)
dst_key_free(&key);
isc_entropy_detach(&ectx);
dst_lib_destroy();
}
@@ -191,3 +231,4 @@ write_key_file(const char *keyfile, const char *user,
fatal("fclose(%s) failed\n", keyfile);
fprintf(stderr, "wrote key file \"%s\"\n", keyfile);
}
+2 -2
View File
@@ -19,8 +19,8 @@
ISC_LANG_BEGINDECLS
void generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
isc_buffer_t *key_txtbuffer);
void generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
int keysize, isc_buffer_t *key_txtbuffer);
void write_key_file(const char *keyfile, const char *user,
const char *keyname, isc_buffer_t *secret,
+12 -1
View File
@@ -39,7 +39,7 @@
rndc-confgen \- rndc key generation tool
.SH "SYNOPSIS"
.HP \w'\fBrndc\-confgen\fR\ 'u
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-A\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-c\ \fR\fB\fIkeyfile\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-A\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-c\ \fR\fB\fIkeyfile\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
.SH "DESCRIPTION"
.PP
\fBrndc\-confgen\fR
@@ -147,6 +147,17 @@ listens for connections from
\fBrndc\fR\&. The default is 953\&.
.RE
.PP
\-r \fIrandomfile\fR
.RS 4
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
/dev/random
or equivalent device, the default source of randomness is keyboard input\&.
randomdev
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
keyboard
indicates that keyboard input should be used\&.
.RE
.PP
\-s \fIaddress\fR
.RS 4
Specifies the IP address where
+8 -4
View File
@@ -22,15 +22,17 @@
#include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdarg.h>
#include <isc/assertions.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/print.h>
@@ -69,7 +71,7 @@ usage(int status) {
fprintf(stderr, "\
Usage:\n\
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] \
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] [-r randomfile] \
[-s addr] [-t chrootdir] [-u user]\n\
-a: generate just the key clause and write it to keyfile (%s)\n\
-A alg: algorithm (default hmac-sha256)\n\
@@ -77,6 +79,7 @@ Usage:\n\
-c keyfile: specify an alternate key file (requires -a)\n\
-k keyname: the name as it will be used in named.conf and rndc.conf\n\
-p port: the port named will listen on and rndc will connect to\n\
-r randomfile: source of random data (use \"keyboard\" for key timing)\n\
-s addr: the address to which rndc should connect\n\
-t chrootdir: write a keyfile in chrootdir as well (requires -a)\n\
-u user: set the keyfile owner to \"user\" (requires -a)\n",
@@ -93,6 +96,7 @@ main(int argc, char **argv) {
isc_mem_t *mctx = NULL;
isc_result_t result = ISC_R_SUCCESS;
const char *keyname = NULL;
const char *randomfile = NULL;
const char *serveraddr = NULL;
dns_secalg_t alg;
const char *algname;
@@ -162,7 +166,7 @@ main(int argc, char **argv) {
isc_commandline_argument);
break;
case 'r':
fatal("The -r option has been deprecated.");
randomfile = isc_commandline_argument;
break;
case 's':
serveraddr = isc_commandline_argument;
@@ -214,7 +218,7 @@ main(int argc, char **argv) {
DO("create memory context", isc_mem_create(0, 0, &mctx));
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
generate_key(mctx, alg, keysize, &key_txtbuffer);
generate_key(mctx, randomfile, alg, keysize, &key_txtbuffer);
if (keyonly) {
write_key_file(keyfile, chrootdir == NULL ? user : NULL,
+19
View File
@@ -59,6 +59,7 @@
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">address</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">chrootdir</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">user</replaceable></option></arg>
@@ -191,6 +192,24 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomfile</replaceable></term>
<listitem>
<para>
Specifies a source of random data for generating the
authorization. If the operating
system does not provide a <filename>/dev/random</filename>
or equivalent device, the default source of randomness
is keyboard input. <filename>randomdev</filename>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard
input should be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">address</replaceable></term>
<listitem>
+16
View File
@@ -40,6 +40,7 @@
[<code class="option">-h</code>]
[<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>]
[<code class="option">-p <em class="replaceable"><code>port</code></em></code>]
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
[<code class="option">-s <em class="replaceable"><code>address</code></em></code>]
[<code class="option">-t <em class="replaceable"><code>chrootdir</code></em></code>]
[<code class="option">-u <em class="replaceable"><code>user</code></em></code>]
@@ -153,6 +154,21 @@
The default is 953.
</p>
</dd>
<dt><span class="term">-r <em class="replaceable"><code>randomfile</code></em></span></dt>
<dd>
<p>
Specifies a source of random data for generating the
authorization. If the operating
system does not provide a <code class="filename">/dev/random</code>
or equivalent device, the default source of randomness
is keyboard input. <code class="filename">randomdev</code>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<code class="filename">keyboard</code> indicates that keyboard
input should be used.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>address</code></em></span></dt>
<dd>
<p>
+2 -2
View File
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
@@ -106,7 +106,7 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
+2 -2
View File
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -16,16 +16,16 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @OPENSSL_INCLUDES@
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = -DVERSION=\"${VERSION}\" \
CDEFINES = @CRYPTO@ -DVERSION=\"${VERSION}\" \
-DSYSCONFDIR=\"${sysconfdir}\"
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+33 -21
View File
@@ -523,17 +523,17 @@ setup_style(dns_master_style_t **stylep) {
}
if (multiline || (nottl && noclass))
result = dns_master_stylecreate(&style, styleflags,
24, 24, 24, 32, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate2(&style, styleflags,
24, 24, 24, 32, 80, 8,
splitwidth, mctx);
else if (nottl || noclass)
result = dns_master_stylecreate(&style, styleflags,
24, 24, 32, 40, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate2(&style, styleflags,
24, 24, 32, 40, 80, 8,
splitwidth, mctx);
else
result = dns_master_stylecreate(&style, styleflags,
24, 32, 40, 48, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate2(&style, styleflags,
24, 32, 40, 48, 80, 8,
splitwidth, mctx);
if (result == ISC_R_SUCCESS)
*stylep = style;
@@ -743,8 +743,8 @@ setup_dnsseckeys(dns_client_t *client) {
isc_buffer_init(&b, anchortext, sizeof(anchortext) - 1);
isc_buffer_add(&b, sizeof(anchortext) - 1);
result = cfg_parse_buffer(parser, &b, NULL, 0,
&cfg_type_bindkeys, 0, &bindkeys);
result = cfg_parse_buffer(parser, &b, &cfg_type_bindkeys,
&bindkeys);
if (result != ISC_R_SUCCESS)
fatal("Unable to parse built-in keys");
}
@@ -952,6 +952,18 @@ cleanup:
return (result);
}
static char *
next_token(char **stringp, const char *delim) {
char *res;
do {
res = strsep(stringp, delim);
if (res == NULL)
break;
} while (*res == '\0');
return (res);
}
static isc_result_t
parse_uint(uint32_t *uip, const char *value, uint32_t max,
const char *desc) {
@@ -971,23 +983,23 @@ parse_uint(uint32_t *uip, const char *value, uint32_t max,
static void
plus_option(char *option) {
isc_result_t result;
char *cmd, *value, *last = NULL;
char option_store[256];
char *cmd, *value, *ptr;
bool state = true;
INSIST(option != NULL);
cmd = strtok_r(option, "=", &last);
strlcpy(option_store, option, sizeof(option_store));
ptr = option_store;
cmd = next_token(&ptr,"=");
if (cmd == NULL) {
printf(";; Invalid option %s\n", option);
printf(";; Invalid option %s\n", option_store);
return;
}
value = ptr;
if (strncasecmp(cmd, "no", 2)==0) {
cmd += 2;
state = false;
}
value = strtok_r(NULL, "\0", &last);
#define FULLCHECK(A) \
do { \
size_t _l = strlen(cmd); \
@@ -1561,7 +1573,7 @@ get_reverse(char *reverse, size_t len, char *value, bool strict) {
unsigned int options = 0;
name = dns_fixedname_initname(&fname);
result = dns_byaddr_createptrname(&addr, options, name);
result = dns_byaddr_createptrname2(&addr, options, name);
if (result != ISC_R_SUCCESS)
return (result);
dns_name_format(name, reverse, (unsigned int)len);
@@ -1645,8 +1657,8 @@ main(int argc, char *argv[]) {
/* Create client */
clopt = DNS_CLIENTCREATEOPT_USECACHE;
result = dns_client_createx(mctx, actx, taskmgr, socketmgr, timermgr,
clopt, &client, srcaddr4, srcaddr6);
result = dns_client_createx2(mctx, actx, taskmgr, socketmgr, timermgr,
clopt, &client, srcaddr4, srcaddr6);
if (result != ISC_R_SUCCESS) {
delv_log(ISC_LOG_ERROR, "dns_client_create: %s",
isc_result_totext(result));
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+6 -8
View File
@@ -19,16 +19,16 @@ READLINE_LIB = @READLINE_LIB@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
CDEFINES = -DVERSION=\"${VERSION}\"
CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
@@ -41,10 +41,10 @@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
${ISCDEPLIBS} ${ISCCFGDEPLIBS}
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
${ISCLIBS} @IDNKIT_LIBS@ @LIBIDN2_LIBS@ @LIBS@
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@
${ISCNOSYMLIBS} @IDNKIT_LIBS@ @LIBIDN2_LIBS@ @LIBS@
SUBDIRS =
@@ -64,8 +64,6 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
LDFLAGS = @LDFLAGS@ @LIBIDN2_LDFLAGS@
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
+10 -16
View File
@@ -176,6 +176,11 @@ reads a list of lookup requests to process from the given
using the command\-line interface\&.
.RE
.PP
\-i
.RS 4
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC 2874) are not attempted\&.
.RE
.PP
\-k \fIkeyfile\fR
.RS 4
Sign queries using TSIG using a key read from the given file\&. Key files can be generated using
@@ -249,7 +254,9 @@ arguments\&.
\fBdig\fR
automatically performs a lookup for a name like
94\&.2\&.0\&.192\&.in\-addr\&.arpa
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain\&.
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain (but see also the
\fB\-i\fR
option)\&.
.RE
.PP
\-y \fI[hmac:]\fR\fIkeyname:secret\fR
@@ -537,7 +544,7 @@ Include an EDNS name server ID request when sending a query\&.
.RS 4
When this option is set,
\fBdig\fR
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone\&. Addresses of servers that that did not respond are also printed\&.
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone\&.
.RE
.PP
\fB+[no]onesoa\fR
@@ -569,11 +576,6 @@ Print [do not print] the query as it is sent\&. By default, the query is not pri
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
.RE
.PP
\fB+[no]raflag\fR
.RS 4
Set [do not set] the RA (Recursion Available) bit in the query\&. The default is +noraflag\&. This bit should be ignored by the server for QUERY\&.
.RE
.PP
\fB+[no]rdflag\fR
.RS 4
A synonym for
@@ -663,11 +665,6 @@ for short, sends an EDNS CLIENT\-SUBNET option with an empty address and a sourc
be used when resolving this query\&.
.RE
.PP
\fB+[no]tcflag\fR
.RS 4
Set [do not set] the TC (TrunCation) bit in the query\&. The default is +notcflag\&. This bit should be ignored by the server for QUERY\&.
.RE
.PP
\fB+[no]tcp\fR
.RS 4
Use [do not use] TCP when querying name servers\&. The default behavior is to use UDP unless a type
@@ -800,10 +797,7 @@ has been built with IDN (internationalized domain name) support, it can accept a
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, use parameters
\fI+noidnin\fR
and
\fI+noidnout\fR
or define the
\fBIDN_DISABLE\fR
environment variable\&.
\fI+noidnout\fR\&.
.SH "FILES"
.PP
/etc/resolv\&.conf
+93 -88
View File
@@ -65,7 +65,7 @@ static char domainopt[DNS_NAME_MAXTEXT];
static char hexcookie[81];
static bool short_form = false, printcmd = true,
plusquest = false, pluscomm = false,
ip6_int = false, plusquest = false, pluscomm = false,
ipv4only = false, ipv6only = false, digrc = true;
static uint32_t splitwidth = 0xffffffff;
@@ -153,6 +153,7 @@ help(void) {
" -b address[#port] (bind to source address/port)\n"
" -c class (specify query class)\n"
" -f filename (batch mode)\n"
" -i (use IP6.INT for IPv6 reverse lookups)\n"
" -k keyfile (specify tsig key file)\n"
" -m (enable memory usage debugging)\n"
" -p port (specify port number)\n"
@@ -210,7 +211,6 @@ help(void) {
" +padding=### (Set padding block size [0])\n"
" +[no]qr (Print question before sending)\n"
" +[no]question (Control display of question section)\n"
" +[no]raflag (Set RA flag in query (+[no]raflag))\n"
" +[no]rdflag (Recursive mode (+[no]recurse))\n"
" +[no]recurse (Recursive mode (+[no]rdflag))\n"
" +retry=### (Set number of UDP retries) [2]\n"
@@ -223,7 +223,6 @@ help(void) {
" +[no]split=## (Split hex/base64 fields into chunks)\n"
" +[no]stats (Control display of statistics)\n"
" +subnet=addr (Set edns-client-subnet option)\n"
" +[no]tcflag (Set TC flag in query (+[no]tcflag))\n"
" +[no]tcp (TCP mode (+[no]vc))\n"
" +timeout=### (Set query timeout) [5]\n"
" +[no]trace (Trace delegation down from root [+dnssec])\n"
@@ -265,7 +264,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
printf(";; Query time: %ld msec\n", (long) diff / 1000);
printf(";; SERVER: %s(%s)\n", fromtext, query->servname);
time(&tnow);
#if !defined(WIN32)
#if defined(ISC_PLATFORM_USETHREADS) && !defined(WIN32)
(void)localtime_r(&tnow, &tmnow);
#else
tmnow = *localtime(&tnow);
@@ -488,17 +487,17 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
}
if (query->lookup->multiline ||
(query->lookup->nottl && query->lookup->noclass))
result = dns_master_stylecreate(&style, styleflags,
24, 24, 24, 32, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate2(&style, styleflags,
24, 24, 24, 32, 80, 8,
splitwidth, mctx);
else if (query->lookup->nottl || query->lookup->noclass)
result = dns_master_stylecreate(&style, styleflags,
24, 24, 32, 40, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate2(&style, styleflags,
24, 24, 32, 40, 80, 8,
splitwidth, mctx);
else
result = dns_master_stylecreate(&style, styleflags,
24, 32, 40, 48, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate2(&style, styleflags,
24, 32, 40, 48, 80, 8,
splitwidth, mctx);
check_result(result, "dns_master_stylecreate");
if (query->lookup->cmdline[0] != 0) {
@@ -737,27 +736,28 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
*/
static void
plus_option(char *option, bool is_batchfile,
plus_option(const char *option, bool is_batchfile,
dig_lookup_t *lookup)
{
isc_result_t result;
char *cmd, *value, *last = NULL, *code, *extra;
char option_store[256];
char *cmd, *value, *ptr, *code;
uint32_t num;
bool state = true;
size_t n;
INSIST(option != NULL);
if ((cmd = strtok_r(option, "=", &last)) == NULL) {
printf(";; Invalid option %s\n", option);
strlcpy(option_store, option, sizeof(option_store));
ptr = option_store;
cmd = next_token(&ptr, "=");
if (cmd == NULL) {
printf(";; Invalid option %s\n", option_store);
return;
}
value = ptr;
if (strncasecmp(cmd, "no", 2)==0) {
cmd += 2;
state = false;
}
/* parse the rest of the string */
value = strtok_r(NULL, "", &last);
#define FULLCHECK(A) \
do { \
@@ -1009,9 +1009,8 @@ plus_option(char *option, bool is_batchfile,
}
code = NULL;
if (value != NULL) {
code = strtok_r(value,
":",
&last);
code = strtok(value,
":");
}
if (code == NULL) {
warn("ednsopt no "
@@ -1019,9 +1018,8 @@ plus_option(char *option, bool is_batchfile,
"specified");
goto exit_or_usage;
}
extra = strtok_r(NULL, "\0",
&last);
save_opt(lookup, code, extra);
value = strtok(NULL, "\0");
save_opt(lookup, code, value);
break;
default:
goto invalid_option;
@@ -1063,7 +1061,7 @@ plus_option(char *option, bool is_batchfile,
switch (cmd[3]) {
case 'i':
FULLCHECK("idnin");
#ifndef HAVE_LIBIDN2
#ifndef WITH_IDN_SUPPORT
fprintf(stderr, ";; IDN input support"
" not enabled\n");
#else
@@ -1072,7 +1070,7 @@ plus_option(char *option, bool is_batchfile,
break;
case 'o':
FULLCHECK("idnout");
#ifndef HAVE_LIBIDN2
#ifndef WITH_IDN_OUT_SUPPORT
fprintf(stderr, ";; IDN output support"
" not enabled\n");
#else
@@ -1256,10 +1254,6 @@ plus_option(char *option, bool is_batchfile,
break;
case 'r':
switch (cmd[1]) {
case 'a': /* raflag */
FULLCHECK("raflag");
lookup->raflag = state;
break;
case 'd': /* rdflag */
FULLCHECK("rdflag");
lookup->recurse = state;
@@ -1403,20 +1397,10 @@ plus_option(char *option, bool is_batchfile,
case 't':
switch (cmd[1]) {
case 'c': /* tcp */
switch (cmd[2]) {
case 'f':
FULLCHECK("tcflag");
lookup->tcflag = state;
break;
case 'p':
FULLCHECK("tcp");
if (!is_batchfile) {
lookup->tcp_mode = state;
lookup->tcp_mode_set = true;
}
break;
default:
goto invalid_option;
FULLCHECK("tcp");
if (!is_batchfile) {
lookup->tcp_mode = state;
lookup->tcp_mode_set = true;
}
break;
case 'i': /* timeout */
@@ -1552,7 +1536,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
bool config_only, int argc, char **argv,
bool *firstarg)
{
char opt, *value, *ptr, *ptr2, *ptr3, *last;
char opt, *value, *ptr, *ptr2, *ptr3;
isc_result_t result;
bool value_from_next;
isc_textregion_t tr;
@@ -1608,7 +1592,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
exit(0);
break;
case 'i':
/* deprecated */
ip6_int = true;
break;
case 'm': /* memdebug */
/* memdebug is handled in preparse_args() */
@@ -1770,21 +1754,26 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
value);
return (value_from_next);
case 'y':
if ((ptr = strtok_r(value, ":", &last)) == NULL) {
ptr = next_token(&value, ":"); /* hmac type or name */
if (ptr == NULL) {
usage();
}
if ((ptr2 = strtok_r(NULL, ":", &last)) == NULL) { /* name or secret */
ptr2 = next_token(&value, ":"); /* name or secret */
if (ptr2 == NULL)
usage();
}
if ((ptr3 = strtok_r(NULL, ":", &last)) != NULL) { /* secret or NULL */
ptr3 = next_token(&value, ":"); /* secret or NULL */
if (ptr3 != NULL) {
parse_hmac(ptr);
ptr = ptr2;
ptr2 = ptr3;
} else {
#ifndef PK11_MD5_DISABLE
hmacname = DNS_TSIG_HMACMD5_NAME;
#else
hmacname = DNS_TSIG_HMACSHA256_NAME;
#endif
digestbits = 0;
}
/* XXXONDREJ: FIXME */
strlcpy(keynametext, ptr, sizeof(keynametext));
strlcpy(keysecret, ptr2, sizeof(keysecret));
return (value_from_next);
@@ -1793,12 +1782,13 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
*lookup = clone_lookup(default_lookup, true);
*need_clone = true;
if (get_reverse(textname, sizeof(textname), value,
false) == ISC_R_SUCCESS) {
ip6_int, false) == ISC_R_SUCCESS) {
strlcpy((*lookup)->textname, textname,
sizeof((*lookup)->textname));
debug("looking up %s", (*lookup)->textname);
(*lookup)->trace_root = ((*lookup)->trace ||
(*lookup)->ns_search_only);
(*lookup)->ip6_int = ip6_int;
if (!(*lookup)->rdtypeset)
(*lookup)->rdtype = dns_rdatatype_ptr;
if (!(*lookup)->rdclassset)
@@ -1893,22 +1883,6 @@ preparse_args(int argc, char **argv) {
}
}
static int
split_batchline(char *batchline, char **bargv, int len, const char *msg) {
int bargc;
char *last = NULL;
REQUIRE(batchline != NULL);
for (bargc = 1, bargv[bargc] = strtok_r(batchline, " \t\r\n", &last);
bargc < len && bargv[bargc];
bargv[++bargc] = strtok_r(NULL, " \t\r\n", &last))
{
debug("%s %d: %s", msg, bargc, bargv[bargc]);
}
return (bargc);
}
static void
parse_args(bool is_batchfile, bool config_only,
int argc, char **argv)
@@ -1927,8 +1901,10 @@ parse_args(bool is_batchfile, bool config_only,
char **rv;
#ifndef NOPOSIX
char *homedir;
char rcfile[PATH_MAX];
char rcfile[256];
#endif
char *input;
int i;
bool need_clone = true;
/*
@@ -1961,21 +1937,30 @@ parse_args(bool is_batchfile, bool config_only,
debug("digrc (open)");
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
homedir);
if (n < sizeof(rcfile)) {
if (n < sizeof(rcfile))
batchfp = fopen(rcfile, "r");
}
}
if (batchfp != NULL) {
while (fgets(batchline, sizeof(batchline),
batchfp) != 0)
{
batchfp) != 0) {
debug("config line %s", batchline);
bargc = split_batchline(batchline, bargv, 62,
".digrc argv");
bargc = 1;
input = batchline;
bargv[bargc] = next_token(&input, " \t\r\n");
while ((bargc < 62) && (bargv[bargc] != NULL)) {
bargc++;
bargv[bargc] =
next_token(&input, " \t\r\n");
}
bargv[0] = argv[0];
argv0 = argv[0];
parse_args(true, true,
bargc, (char **)bargv);
for(i = 0; i < bargc; i++)
debug(".digrc argv %d: %s",
i, bargv[i]);
parse_args(true, true, bargc,
(char **)bargv);
}
fclose(batchfp);
}
@@ -1986,9 +1971,8 @@ parse_args(bool is_batchfile, bool config_only,
/* Processing '-f batchfile'. */
lookup = clone_lookup(default_lookup, true);
need_clone = false;
} else {
} else
lookup = default_lookup;
}
rc = argc;
rv = argv;
@@ -2122,7 +2106,7 @@ parse_args(bool is_batchfile, bool config_only,
need_clone = true;
strlcpy(lookup->textname, rv[0],
sizeof(lookup->textname));
lookup->trace_root = (lookup->trace ||
lookup->trace_root = (lookup->trace ||
lookup->ns_search_only);
lookup->new_search = true;
if (firstarg) {
@@ -2155,14 +2139,23 @@ parse_args(bool is_batchfile, bool config_only,
/* XXX Remove code dup from shutdown code */
next_line:
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
bargc = 1;
debug("batch line %s", batchline);
if (batchline[0] == '\r' || batchline[0] == '\n' ||
batchline[0] == '#' || batchline[0] == ';')
if (batchline[0] == '\r' || batchline[0] == '\n'
|| batchline[0] == '#' || batchline[0] == ';')
goto next_line;
bargc = split_batchline(batchline, bargv, 14,
"batch argv");
input = batchline;
bargv[bargc] = next_token(&input, " \t\r\n");
while ((bargc < 14) && (bargv[bargc] != NULL)) {
bargc++;
bargv[bargc] = next_token(&input, " \t\r\n");
}
bargv[0] = argv[0];
argv0 = argv[0];
for(i = 0; i < bargc; i++)
debug("batch argv %d: %s", i, bargv[i]);
parse_args(true, false, bargc, (char **)bargv);
return;
}
@@ -2201,6 +2194,8 @@ query_finished(void) {
char batchline[MXNAME];
int bargc;
char *bargv[16];
char *input;
int i;
if (batchname == NULL) {
isc_app_shutdown();
@@ -2218,8 +2213,18 @@ query_finished(void) {
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
debug("batch line %s", batchline);
bargc = split_batchline(batchline, bargv, 14, "batch argv");
bargc = 1;
input = batchline;
bargv[bargc] = next_token(&input, " \t\r\n");
while ((bargc < 14) && (bargv[bargc] != NULL)) {
bargc++;
bargv[bargc] = next_token(&input, " \t\r\n");
}
bargv[0] = argv0;
for(i = 0; i < bargc; i++)
debug("batch argv %d: %s", i, bargv[i]);
parse_args(true, false, bargc, (char **)bargv);
start_lookup();
} else {
+15 -28
View File
@@ -273,6 +273,17 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
domain, which is no longer in use. Obsolete bit string
label queries (RFC 2874) are not attempted.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">keyfile</replaceable></term>
<listitem>
@@ -395,7 +406,8 @@
<literal>94.2.0.192.in-addr.arpa</literal> and sets the
query type and class to PTR and IN respectively. IPv6
addresses are looked up using nibble format under the
IP6.ARPA domain.
IP6.ARPA domain (but see also the <option>-i</option>
option).
</para>
</listitem>
</varlistentry>
@@ -907,8 +919,7 @@
attempts to find the authoritative name servers for
the zone containing the name being looked up and
display the SOA record that each name server has for
the zone. Addresses of servers that that did not
respond are also printed.
the zone.
</para>
</listitem>
</varlistentry>
@@ -972,17 +983,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]raflag</option></term>
<listitem>
<para>
Set [do not set] the RA (Recursion Available) bit in
the query. The default is +noraflag. This bit should
be ignored by the server for QUERY.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]rdflag</option></term>
<listitem>
@@ -1126,17 +1126,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]tcflag</option></term>
<listitem>
<para>
Set [do not set] the TC (TrunCation) bit in the query.
The default is +notcflag. This bit should be ignored
by the server for QUERY.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]tcp</option></term>
<listitem>
@@ -1342,9 +1331,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
reply from the server.
If you'd like to turn off the IDN support for some reason, use
parameters <parameter>+noidnin</parameter> and
<parameter>+noidnout</parameter> or define
the <envar>IDN_DISABLE</envar> environment variable.
<parameter>+noidnout</parameter>.
</para>
</refsection>
+12 -22
View File
@@ -228,6 +228,14 @@
<span class="command"><strong>dig</strong></span> using the command-line interface.
</p>
</dd>
<dt><span class="term">-i</span></dt>
<dd>
<p>
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
domain, which is no longer in use. Obsolete bit string
label queries (RFC 2874) are not attempted.
</p>
</dd>
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
<dd>
<p>
@@ -324,7 +332,8 @@
<code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
query type and class to PTR and IN respectively. IPv6
addresses are looked up using nibble format under the
IP6.ARPA domain.
IP6.ARPA domain (but see also the <code class="option">-i</code>
option).
</p>
</dd>
<dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
@@ -721,8 +730,7 @@
attempts to find the authoritative name servers for
the zone containing the name being looked up and
display the SOA record that each name server has for
the zone. Addresses of servers that that did not
respond are also printed.
the zone.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
@@ -769,14 +777,6 @@
the question section as a comment.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]raflag</code></span></dt>
<dd>
<p>
Set [do not set] the RA (Recursion Available) bit in
the query. The default is +noraflag. This bit should
be ignored by the server for QUERY.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]rdflag</code></span></dt>
<dd>
<p>
@@ -887,14 +887,6 @@
this query.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]tcflag</code></span></dt>
<dd>
<p>
Set [do not set] the TC (TrunCation) bit in the query.
The default is +notcflag. This bit should be ignored
by the server for QUERY.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
<dd>
<p>
@@ -1072,9 +1064,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
reply from the server.
If you'd like to turn off the IDN support for some reason, use
parameters <em class="parameter"><code>+noidnin</code></em> and
<em class="parameter"><code>+noidnout</code></em> or define
the <code class="envar">IDN_DISABLE</code> environment variable.
<em class="parameter"><code>+noidnout</code></em>.
</p>
</div>
+387 -273
View File
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -112,6 +112,11 @@ Print debugging traces\&. Equivalent to the
verbose option\&.
.RE
.PP
\-i
.RS 4
Obsolete\&. Use the IP6\&.INT domain for reverse lookups of IPv6 addresses as defined in RFC1886 and deprecated in RFC4159\&. The default is to use IP6\&.ARPA as specified in RFC3596\&.
.RE
.PP
\-l
.RS 4
List zone: The
@@ -252,7 +257,7 @@ If
\fBhost\fR
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
\fBhost\fR
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, define the
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, defines the
\fBIDN_DISABLE\fR
environment variable\&. The IDN support is disabled if the variable is set when
\fBhost\fR
+28 -3
View File
@@ -22,6 +22,13 @@
#include <locale.h>
#endif
#ifdef WITH_IDNKIT
#include <idn/result.h>
#include <idn/log.h>
#include <idn/resconf.h>
#include <idn/api.h>
#endif
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/netaddr.h>
@@ -29,6 +36,7 @@
#include <isc/string.h>
#include <isc/util.h>
#include <isc/task.h>
#include <isc/stdlib.h>
#include <dns/byaddr.h>
#include <dns/fixedname.h>
@@ -143,6 +151,7 @@ show_usage(void) {
" -c specifies query class for non-IN data\n"
" -C compares SOA records on authoritative nameservers\n"
" -d is equivalent to -v\n"
" -i IP6.INT reverse lookups\n"
" -l lists all hosts in a domain, using AXFR\n"
" -m set memory debugging flag (trace|record|usage)\n"
" -N changes the number of dots allowed before root lookup is done\n"
@@ -716,6 +725,9 @@ parse_args(bool is_batchfile, int argc, char **argv) {
lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = rdtype;
lookup->rdtypeset = true;
#ifdef WITH_IDNKIT
idnoptions = 0;
#endif
if (rdtype == dns_rdatatype_axfr) {
/* -l -t any -v */
list_type = dns_rdatatype_any;
@@ -728,6 +740,13 @@ parse_args(bool is_batchfile, int argc, char **argv) {
} else if (rdtype == dns_rdatatype_any) {
if (!lookup->tcp_mode_set)
lookup->tcp_mode = true;
#ifdef WITH_IDNKIT
} else if (rdtype == dns_rdatatype_a ||
rdtype == dns_rdatatype_aaaa ||
rdtype == dns_rdatatype_mx) {
idnoptions = IDN_ASCCHECK;
list_type = rdtype;
#endif
} else
list_type = rdtype;
list_addresses = false;
@@ -756,6 +775,9 @@ parse_args(bool is_batchfile, int argc, char **argv) {
if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = dns_rdatatype_any;
#ifdef WITH_IDNKIT
idnoptions = 0;
#endif
list_type = dns_rdatatype_any;
list_addresses = false;
lookup->rdtypeset = true;
@@ -763,7 +785,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
default_lookups = false;
break;
case 'i':
/* deprecated */
lookup->ip6_int = true;
break;
case 'n':
/* deprecated */
@@ -842,8 +864,8 @@ parse_args(bool is_batchfile, int argc, char **argv) {
check_ra = true;
lookup->pending = false;
if (get_reverse(store, sizeof(store), hostname, true)
== ISC_R_SUCCESS) {
if (get_reverse(store, sizeof(store), hostname,
lookup->ip6_int, true) == ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = true;
@@ -867,6 +889,9 @@ main(int argc, char **argv) {
ISC_LIST_INIT(search_list);
fatalexit = 1;
#ifdef WITH_IDNKIT
idnoptions = IDN_ASCCHECK;
#endif
/* setup dighost callbacks */
dighost_printmessage = printmessage;
+13 -1
View File
@@ -180,6 +180,18 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Obsolete.
Use the IP6.INT domain for reverse lookups of IPv6
addresses as defined in RFC1886 and deprecated in RFC4159.
The default is to use IP6.ARPA as specified in RFC3596.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-l</term>
<listitem>
@@ -378,7 +390,7 @@
<command>host</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, define
If you'd like to turn off the IDN support for some reason, defines
the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>host</command> runs.
+10 -1
View File
@@ -138,6 +138,15 @@
Equivalent to the <code class="option">-v</code> verbose option.
</p>
</dd>
<dt><span class="term">-i</span></dt>
<dd>
<p>
Obsolete.
Use the IP6.INT domain for reverse lookups of IPv6
addresses as defined in RFC1886 and deprecated in RFC4159.
The default is to use IP6.ARPA as specified in RFC3596.
</p>
</dd>
<dt><span class="term">-l</span></dt>
<dd>
<p>
@@ -302,7 +311,7 @@
<span class="command"><strong>host</strong></span> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, define
If you'd like to turn off the IDN support for some reason, defines
the <code class="envar">IDN_DISABLE</code> environment variable.
The IDN support is disabled if the variable is set when
<span class="command"><strong>host</strong></span> runs.
+17 -14
View File
@@ -26,7 +26,6 @@
#include <isc/formatcheck.h>
#include <isc/lang.h>
#include <isc/list.h>
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/sockaddr.h>
@@ -82,11 +81,6 @@ typedef struct dig_server dig_server_t;
typedef ISC_LIST(dig_server_t) dig_serverlist_t;
typedef struct dig_searchlist dig_searchlist_t;
#define DIG_QUERY_MAGIC ISC_MAGIC('D','i','g','q')
#define DIG_VALID_QUERY(x) ISC_MAGIC_VALID((x), DIG_QUERY_MAGIC)
/*% The dig_lookup structure */
struct dig_lookup {
bool
@@ -102,13 +96,12 @@ struct dig_lookup {
aaonly,
adflag,
cdflag,
raflag,
tcflag,
zflag,
trace, /*% dig +trace */
trace_root, /*% initial query for either +trace or +nssearch */
tcp_mode,
tcp_mode_set,
ip6_int,
comments,
stats,
section_question,
@@ -190,7 +183,6 @@ struct dig_lookup {
/*% The dig_query structure */
struct dig_query {
unsigned int magic;
dig_lookup_t *lookup;
bool waiting_connect,
pending_free,
@@ -209,12 +201,15 @@ struct dig_query {
bool ixfr_axfr;
char *servname;
char *userarg;
isc_bufferlist_t sendlist,
recvlist,
lengthlist;
isc_buffer_t recvbuf,
lengthbuf,
tmpsendbuf,
sendbuf;
char *recvspace, *tmpsendspace,
lengthspace[4];
slbuf;
char *recvspace,
lengthspace[4],
slspace[4];
isc_socket_t *sock;
ISC_LINK(dig_query_t) link;
ISC_LINK(dig_query_t) clink;
@@ -222,6 +217,7 @@ struct dig_query {
isc_time_t time_sent;
isc_time_t time_recv;
uint64_t byte_count;
isc_buffer_t sendbuf;
isc_timer_t *timer;
};
@@ -275,6 +271,9 @@ extern char *progname;
extern int tries;
extern int fatalexit;
extern bool verbose;
#ifdef WITH_IDNKIT
extern int idnoptions;
#endif
/*
* Routines in dighost.c.
@@ -286,7 +285,8 @@ int
getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
isc_result_t
get_reverse(char *reverse, size_t len, char *value, bool strict);
get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
bool strict);
ISC_PLATFORM_NORETURN_PRE void
fatal(const char *format, ...)
@@ -374,6 +374,9 @@ destroy_libs(void);
void
set_search_domain(char *domain);
char *
next_token(char **stringp, const char *delim);
/*
* Routines to be defined in dig.c, host.c, and nslookup.c. and
* then assigned to the appropriate function pointer
+11 -5
View File
@@ -772,7 +772,7 @@ addlookup(char *opt) {
rdclass = dns_rdataclass_in;
}
lookup = make_empty_lookup();
if (get_reverse(store, sizeof(store), opt, true)
if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, true)
== ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr;
@@ -815,12 +815,12 @@ addlookup(char *opt) {
static void
do_next_command(char *input) {
char *ptr, *arg, *last;
char *ptr, *arg;
if ((ptr = strtok_r(input, " \t\r\n", &last)) == NULL) {
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
return;
}
arg = strtok_r(NULL, " \t\r\n", &last);
arg = next_token(&input, " \t\r\n");
if ((strcasecmp(ptr, "set") == 0) &&
(arg != NULL))
setoption(arg);
@@ -943,6 +943,12 @@ flush_lookup_list(void) {
ISC_SOCKCANCEL_ALL);
isc_socket_detach(&q->sock);
}
if (ISC_LINK_LINKED(&q->recvbuf, link))
ISC_LIST_DEQUEUE(q->recvlist, &q->recvbuf,
link);
if (ISC_LINK_LINKED(&q->lengthbuf, link))
ISC_LIST_DEQUEUE(q->lengthlist, &q->lengthbuf,
link);
isc_buffer_invalidate(&q->recvbuf);
isc_buffer_invalidate(&q->lengthbuf);
qp = q;
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+2 -2
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -77,7 +77,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+5 -4
View File
@@ -15,14 +15,15 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = -DVERSION=\"${VERSION}\"
CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
@CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
+1 -1
View File
@@ -102,7 +102,7 @@ Specify a digest algorithm to use when converting CDNSKEY records to DS records\
.sp
The
\fIalgorithm\fR
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&.
must be one of SHA\-1, SHA\-256, SHA\-384, or GOST\&. These values are case insensitive, and hyphens may be omitted\&. If no algorithm is specified, the default is SHA\-256\&.
.RE
.PP
\-c \fIclass\fR
+26 -16
View File
@@ -25,6 +25,7 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/mem.h>
@@ -55,14 +56,14 @@
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif
const char *program = "dnssec-cds";
@@ -73,6 +74,7 @@ int verbose;
*/
static isc_log_t *lctx = NULL;
static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
/*
* The domain we are working on
@@ -253,8 +255,8 @@ load_db(const char *filename, dns_db_t **dbp, dns_dbnode_t **nodep) {
rdclass, 0, NULL, dbp);
check_result(result, "dns_db_create()");
result = dns_db_load(*dbp, filename,
dns_masterformat_text, DNS_MASTER_HINT);
result = dns_db_load3(*dbp, filename,
dns_masterformat_text, DNS_MASTER_HINT);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
fatal("can't load %s: %s", filename,
isc_result_totext(result));
@@ -378,9 +380,9 @@ formatset(dns_rdataset_t *rdataset) {
* which just separates fields with spaces. The huge tab stop width
* eliminates any tab characters.
*/
result = dns_master_stylecreate(&style, styleflags,
0, 0, 0, 0, 0, 1000000, 0,
mctx);
result = dns_master_stylecreate2(&style, styleflags,
0, 0, 0, 0, 0, 1000000, 0,
mctx);
check_result(result, "dns_master_stylecreate2 failed");
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
@@ -568,7 +570,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
ki->algo = dnskey.algorithm;
dns_rdata_toregion(keyrdata, &r);
ki->tag = dst_region_computeid(&r);
ki->tag = dst_region_computeid(&r, ki->algo);
ki->dst = NULL;
if (!match_key_dsset(ki, dsset, strictness)) {
@@ -665,11 +667,8 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
}
result = dns_dnssec_verify(name, rdataset, ki->dst,
false, 0, mctx,
&sigrdata, NULL);
if (result != ISC_R_SUCCESS &&
result != DNS_R_FROMWILDCARD) {
false, mctx, &sigrdata);
if (result != ISC_R_SUCCESS) {
vbprintf(1, "skip RRSIG by key %d:"
" verification failed: %s\n",
sig.keyid, isc_result_totext(result));
@@ -1111,7 +1110,7 @@ usage(void) {
program);
fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "Options:\n"
" -a <algorithm> digest algorithm (SHA-1 / SHA-256 / SHA-384)\n"
" -a <algorithm> digest algorithm (SHA-1 / SHA-256 / GOST / SHA-384)\n"
" -c <class> of domain (default IN)\n"
" -D prefer CDNSKEY records instead of CDS\n"
" -d <file|dir> where to find parent dsset- file\n"
@@ -1143,7 +1142,7 @@ main(int argc, char *argv[]) {
fatal("out of memory");
}
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -1227,11 +1226,20 @@ main(int argc, char *argv[]) {
setup_logging(mctx, &lctx);
result = dst_lib_init(mctx, NULL);
if (ectx == NULL) {
setup_entropy(mctx, NULL, &ectx);
}
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS) {
fatal("could not initialize hash");
}
result = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS) {
fatal("could not initialize dst: %s",
isc_result_totext(result));
}
isc_entropy_stopcallbacksources(ectx);
if (ds_path == NULL) {
fatal("missing -d DS pathname");
@@ -1381,6 +1389,8 @@ main(int argc, char *argv[]) {
free_all_sets();
cleanup_logging(&lctx);
dst_lib_destroy();
isc_hash_destroy();
cleanup_entropy(&ectx);
if (verbose > 10) {
isc_mem_stats(mctx, stdout);
}
+3 -3
View File
@@ -144,9 +144,9 @@
record. This option has no effect when using CDS records.
</para>
<para>
The <replaceable>algorithm</replaceable> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
The <replaceable>algorithm</replaceable> must be one of SHA-1,
SHA-256, SHA-384, or GOST. These values are case insensitive,
and hyphens may be omitted. If no algorithm is specified,
the default is SHA-256.
</para>
</listitem>
+3 -3
View File
@@ -129,9 +129,9 @@
record. This option has no effect when using CDS records.
</p>
<p>
The <em class="replaceable"><code>algorithm</code></em> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1,
SHA-256, SHA-384, or GOST. These values are case insensitive,
and hyphens may be omitted. If no algorithm is specified,
the default is SHA-256.
</p>
</dd>
+17 -6
View File
@@ -19,6 +19,7 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/mem.h>
#include <isc/print.h>
@@ -43,14 +44,14 @@
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif
const char *program = "dnssec-dsfromkey";
@@ -114,7 +115,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
db_load_from_stream(db, stdin);
filename = "input";
} else {
result = dns_db_load(db, filename, dns_masterformat_text, 0);
result = dns_db_load(db, filename);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("can't load %s: %s", filename,
isc_result_totext(result));
@@ -326,7 +327,7 @@ usage(void) {
fprintf(stderr, "Options:\n"
" -1: digest algorithm SHA-1\n"
" -2: digest algorithm SHA-256\n"
" -a algorithm: digest algorithm (SHA-1, SHA-256 or SHA-384)\n"
" -a algorithm: digest algorithm (SHA-1, SHA-256, SHA-384 or GOST)\n"
" -A: include all keys in DS set, not just KSKs (-f only)\n"
" -c class: rdata class for DS set (default IN) (-f or -s only)\n"
" -C: print CDS records\n"
@@ -357,6 +358,7 @@ main(int argc, char **argv) {
bool showall = false;
isc_result_t result;
isc_log_t *log = NULL;
isc_entropy_t *ectx = NULL;
dns_rdataset_t rdataset;
dns_rdata_t rdata;
@@ -369,7 +371,7 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -472,10 +474,17 @@ main(int argc, char **argv) {
if (argc > isc_commandline_index + 1)
fatal("extraneous arguments");
result = dst_lib_init(mctx, NULL);
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not initialize hash");
isc_entropy_stopcallbacksources(ectx);
setup_logging(mctx, &log);
@@ -536,7 +545,9 @@ main(int argc, char **argv) {
if (dns_rdataset_isassociated(&rdataset))
dns_rdataset_disassociate(&rdataset);
cleanup_logging(&log);
isc_hash_destroy();
dst_lib_destroy();
cleanup_entropy(&ectx);
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
+17 -6
View File
@@ -18,6 +18,7 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/mem.h>
#include <isc/print.h>
@@ -42,14 +43,14 @@
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif
const char *program = "dnssec-importkey";
@@ -118,8 +119,8 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
db_load_from_stream(db, stdin);
filename = "input";
} else {
result = dns_db_load(db, filename, dns_masterformat_text,
DNS_MASTER_NOTTL);
result = dns_db_load3(db, filename, dns_masterformat_text,
DNS_MASTER_NOTTL);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("can't load %s: %s", filename,
isc_result_totext(result));
@@ -297,6 +298,7 @@ main(int argc, char **argv) {
int ch;
isc_result_t result;
isc_log_t *log = NULL;
isc_entropy_t *ectx = NULL;
dns_rdataset_t rdataset;
dns_rdata_t rdata;
isc_stdtime_t now;
@@ -311,7 +313,7 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -403,10 +405,17 @@ main(int argc, char **argv) {
if (argc > isc_commandline_index + 1)
fatal("extraneous arguments");
result = dst_lib_init(mctx, NULL);
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not initialize hash");
isc_entropy_stopcallbacksources(ectx);
setup_logging(mctx, &log);
@@ -449,7 +458,9 @@ main(int argc, char **argv) {
if (dns_rdataset_isassociated(&rdataset))
dns_rdataset_disassociate(&rdataset);
cleanup_logging(&log);
isc_hash_destroy();
dst_lib_destroy();
cleanup_entropy(&ectx);
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
+3 -3
View File
@@ -55,7 +55,7 @@ of the key is specified on the command line\&. This must match the name of the z
.RS 4
Selects the cryptographic algorithm\&. The value of
\fBalgorithm\fR
must be one of RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
.sp
If no algorithm is specified, then RSASHA1 will be used by default, unless the
\fB\-3\fR
@@ -63,9 +63,9 @@ option is specified, in which case NSEC3RSASHA1 will be used instead\&. (If
\fB\-3\fR
is used and an algorithm is specified, that algorithm will be checked for compatibility with NSEC3\&.)
.sp
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 is specified along with the
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
\fB\-3\fR
option, then NSEC3RSASHA1 will be used instead\&.
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
.sp
As of BIND 9\&.12\&.0, this option is mandatory except when using the
\fB\-S\fR
+58 -16
View File
@@ -20,6 +20,7 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/mem.h>
#include <isc/region.h>
#include <isc/print.h>
@@ -39,7 +40,7 @@
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
@@ -64,16 +65,19 @@ usage(void) {
fprintf(stderr, " name: owner of the key\n");
fprintf(stderr, "Other options:\n");
fprintf(stderr, " -a algorithm: \n"
" DH | RSASHA1 |\n"
" NSEC3RSASHA1 |\n"
" RSASHA256 | RSASHA512 |\n"
" RSA | RSAMD5 | DH | DSA | RSASHA1 |\n"
" NSEC3DSA | NSEC3RSASHA1 |\n"
" RSASHA256 | RSASHA512 | ECCGOST |\n"
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
fprintf(stderr, " -c class (default: IN)\n");
fprintf(stderr, " -E <engine>:\n");
#if USE_PKCS11
#if defined(PKCS11CRYPTO)
fprintf(stderr, " path to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " name of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else
fprintf(stderr, " name of an OpenSSL engine to use\n");
#endif
@@ -123,7 +127,11 @@ main(int argc, char **argv) {
const char *directory = NULL;
const char *predecessor = NULL;
dst_key_t *prevkey = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
char *classname = NULL;
char *endp;
dst_key_t *key = NULL;
@@ -140,6 +148,7 @@ main(int argc, char **argv) {
char filename[255];
isc_buffer_t buf;
isc_log_t *log = NULL;
isc_entropy_t *ectx = NULL;
dns_rdataclass_t rdclass;
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
char *label = NULL;
@@ -168,7 +177,7 @@ main(int argc, char **argv) {
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -340,7 +349,10 @@ main(int argc, char **argv) {
}
}
ret = dst_lib_init(mctx, engine);
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
ret = dst_lib_init2(mctx, ectx, engine,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (ret != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(ret));
@@ -382,24 +394,47 @@ main(int argc, char **argv) {
fatal("no algorithm specified");
}
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS) {
fatal("unknown algorithm %s", algname);
}
if (alg == DST_ALG_DH) {
options |= DST_TYPE_KEY;
if (strcasecmp(algname, "RSA") == 0) {
#ifndef PK11_MD5_DISABLE
fprintf(stderr, "The use of RSA (RSAMD5) is not "
"recommended.\nIf you still wish to "
"use RSA (RSAMD5) please specify "
"\"-a RSAMD5\"\n");
#else
fprintf(stderr,
"The use of RSA (RSAMD5) was disabled\n");
if (freeit != NULL)
free(freeit);
return (1);
} else if (strcasecmp(algname, "RSAMD5") == 0) {
fprintf(stderr, "The use of RSAMD5 was disabled\n");
#endif
if (freeit != NULL)
free(freeit);
return (1);
} else {
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS)
fatal("unknown algorithm %s", algname);
if (alg == DST_ALG_DH)
options |= DST_TYPE_KEY;
}
if (use_nsec3) {
switch (alg) {
case DST_ALG_DSA:
alg = DST_ALG_NSEC3DSA;
break;
case DST_ALG_RSASHA1:
alg = DST_ALG_NSEC3RSASHA1;
break;
case DST_ALG_NSEC3DSA:
case DST_ALG_NSEC3RSASHA1:
case DST_ALG_RSASHA256:
case DST_ALG_RSASHA512:
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384:
case DST_ALG_ED25519:
@@ -485,6 +520,11 @@ main(int argc, char **argv) {
alg = dst_key_alg(prevkey);
flags = dst_key_flags(prevkey);
#ifdef PK11_MD5_DISABLE
if (alg == DST_ALG_RSAMD5)
fatal("Key %s uses disabled RSAMD5", predecessor);
#endif
dst_key_format(prevkey, keystr, sizeof(keystr));
dst_key_getprivateformat(prevkey, &major, &minor);
if (major != DST_MAJOR_VERSION || minor < DST_MINOR_VERSION)
@@ -574,12 +614,13 @@ main(int argc, char **argv) {
/* associate the key */
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
#if USE_PKCS11
#ifdef PKCS11CRYPTO
"pkcs11",
#else
engine,
#endif
label, NULL, mctx, &key);
isc_entropy_stopcallbacksources(ectx);
if (ret != ISC_R_SUCCESS) {
char namestr[DNS_NAME_FORMATSIZE];
@@ -698,6 +739,7 @@ main(int argc, char **argv) {
dst_key_free(&prevkey);
cleanup_logging(&log);
cleanup_entropy(&ectx);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
+4 -4
View File
@@ -106,8 +106,8 @@
<listitem>
<para>
Selects the cryptographic algorithm. The value of
<option>algorithm</option> must be one of RSASHA1,
NSEC3RSASHA1, RSASHA256, RSASHA512,
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
</para>
<para>
@@ -120,9 +120,9 @@
<para>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
along with the <option>-3</option> option, then NSEC3RSASHA1
will be used instead.
or NSEC3DSA will be used instead.
</para>
<para>
As of BIND 9.12.0, this option is mandatory except when using
+4 -4
View File
@@ -89,8 +89,8 @@
<dd>
<p>
Selects the cryptographic algorithm. The value of
<code class="option">algorithm</code> must be one of RSASHA1,
NSEC3RSASHA1, RSASHA256, RSASHA512,
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
</p>
<p>
@@ -103,9 +103,9 @@
<p>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
will be used instead.
or NSEC3DSA will be used instead.
</p>
<p>
As of BIND 9.12.0, this option is mandatory except when using
+34 -19
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\-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\-r\ \fR\fB\fIrandomdev\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}
.SH "DESCRIPTION"
.PP
\fBdnssec\-keygen\fR
@@ -62,23 +62,23 @@ may be preferable to direct use of
.RS 4
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
\fBalgorithm\fR
must be one of RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
\fB\-T KEY\fR
option as well\&.
.sp
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 is specified along with the
\fB\-3\fR
option, then NSEC3RSASHA1 will be used instead\&.
.sp
This parameter
\fImust\fR
be specified except when using the
\fB\-S\fR
option, which copies the algorithm from the predecessor key\&.
.sp
In prior releases, HMAC algorithms could be generated for use as TSIG keys, but that feature has been removed as of BIND 9\&.13\&.0\&. Use
TSIG keys can also be generated by setting the value to one of HMAC\-MD5, HMAC\-SHA1, HMAC\-SHA224, HMAC\-SHA256, HMAC\-SHA384, or HMAC\-SHA512\&. As with DH, specifying these values will automatically set
\fB\-T KEY\fR\&. Note, however, that
\fBtsig\-keygen\fR
to generate TSIG keys\&.
produces TSIG keys in a more useful format\&. These algorithms have been deprecated in
\fBdnssec\-keygen\fR, and will be removed in a future release\&.
.sp
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
\fB\-3\fR
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
.sp
As of BIND 9\&.12\&.0, this option is mandatory except when using the
\fB\-S\fR
option, which copies the algorithm from the predecessor key\&. Previously, the default for newly generated keys was RSASHA1\&.
.RE
.PP
\-b \fIkeysize\fR
@@ -178,6 +178,21 @@ stderr
indicating the progress of the key generation\&. A \*(Aq\&.\*(Aq indicates that a random number has been found which passed an initial sieve test; \*(Aq+\*(Aq means a number has passed a single round of the Miller\-Rabin primality test; a space means that the number has passed all the tests and is a satisfactory key\&.
.RE
.PP
\-r \fIrandomdev\fR
.RS 4
Specifies a source of randomness\&. Normally, when generating DNSSEC keys, this option has no effect; the random number generation function provided by the cryptographic library will be used\&.
.sp
If that behavior is disabled at compile time, however, the specified file will be used as entropy source for key generation\&.
randomdev
is the name of a character device or file containing random data to be used\&. The special value
keyboard
indicates that keyboard input should be used\&.
.sp
The default is
/dev/random
if the operating system provides it or an equivalent device; if not, the default source of randomness is keyboard input\&.
.RE
.PP
\-S \fIkey\fR
.RS 4
Create a new key which is an explicit successor to an existing key\&. The name, algorithm, size, and type of the key will be set to match the existing key\&. The activation date of the new key will be set to the inactivation date of the existing one\&. The publication date will be set to the activation date minus the prepublication interval, which defaults to 30 days\&.
@@ -327,21 +342,21 @@ and
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
To generate a 768\-bit DSA key for the domain
\fBexample\&.com\fR, the following command would be issued:
.PP
\fBdnssec\-keygen \-a ECDSAP256SHA256 \-n ZONE example\&.com\fR
\fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example\&.com\fR
.PP
The command would print a string of the form:
.PP
\fBKexample\&.com\&.+013+26160\fR
\fBKexample\&.com\&.+003+26160\fR
.PP
In this example,
\fBdnssec\-keygen\fR
creates the files
Kexample\&.com\&.+013+26160\&.key
Kexample\&.com\&.+003+26160\&.key
and
Kexample\&.com\&.+013+26160\&.private\&.
Kexample\&.com\&.+003+26160\&.private\&.
.SH "SEE ALSO"
.PP
\fBdnssec-signzone\fR(8),
+209 -38
View File
@@ -35,6 +35,7 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/region.h>
@@ -54,7 +55,7 @@
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
@@ -79,21 +80,36 @@ usage(void) {
fprintf(stderr, "Options:\n");
fprintf(stderr, " -K <directory>: write keys into directory\n");
fprintf(stderr, " -a <algorithm>:\n");
fprintf(stderr, " RSASHA1 | NSEC3RSASHA1 |\n");
fprintf(stderr, " RSASHA256 | RSASHA512 |\n");
fprintf(stderr, " RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1"
" | NSEC3DSA |\n");
fprintf(stderr, " RSASHA256 | RSASHA512 | ECCGOST |\n");
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
fprintf(stderr, " ED25519 | ED448 | DH\n");
fprintf(stderr, " ED25519 | ED448 | DH |\n");
fprintf(stderr, " HMAC-MD5 | HMAC-SHA1 | HMAC-SHA224 | "
"HMAC-SHA256 | \n");
fprintf(stderr, " HMAC-SHA384 | HMAC-SHA512\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
fprintf(stderr, " -b <key size in bits>:\n");
fprintf(stderr, " RSAMD5:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " RSASHA1:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " NSEC3RSASHA1:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " RSASHA256:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " RSASHA512:\t[1024..%d]\n", MAX_RSA);
fprintf(stderr, " DH:\t\t[128..4096]\n");
fprintf(stderr, " DSA:\t\t[512..1024] and divisible by 64\n");
fprintf(stderr, " NSEC3DSA:\t[512..1024] and divisible "
"by 64\n");
fprintf(stderr, " ECCGOST:\tignored\n");
fprintf(stderr, " ECDSAP256SHA256:\tignored\n");
fprintf(stderr, " ECDSAP384SHA384:\tignored\n");
fprintf(stderr, " ED25519:\tignored\n");
fprintf(stderr, " ED448:\tignored\n");
fprintf(stderr, " HMAC-MD5:\t[1..512]\n");
fprintf(stderr, " HMAC-SHA1:\t[1..160]\n");
fprintf(stderr, " HMAC-SHA224:\t[1..224]\n");
fprintf(stderr, " HMAC-SHA256:\t[1..256]\n");
fprintf(stderr, " HMAC-SHA384:\t[1..384]\n");
fprintf(stderr, " HMAC-SHA512:\t[1..512]\n");
fprintf(stderr, " (key size defaults are set according to\n"
" algorithm and usage (ZSK or KSK)\n");
fprintf(stderr, " -n <nametype>: ZONE | HOST | ENTITY | "
@@ -102,9 +118,12 @@ usage(void) {
fprintf(stderr, " -c <class>: (default: IN)\n");
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
fprintf(stderr, " -E <engine>:\n");
#if USE_PKCS11
#if defined(PKCS11CRYPTO)
fprintf(stderr, " path to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " name of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else
fprintf(stderr, " name of an OpenSSL engine to use\n");
#endif
@@ -113,6 +132,7 @@ usage(void) {
"(DH only)\n");
fprintf(stderr, " -L <ttl>: default key TTL\n");
fprintf(stderr, " -p <protocol>: (default: 3 [dnssec])\n");
fprintf(stderr, " -r <randomdev>: a file containing random data\n");
fprintf(stderr, " -s <strength>: strength value this key signs DNS "
"records with (default: 0)\n");
fprintf(stderr, " -T <rrtype>: DNSKEY | KEY (default: DNSKEY; "
@@ -155,6 +175,11 @@ usage(void) {
exit (-1);
}
static bool
dsa_size_ok(int size) {
return (size >= 512 && size <= 1024 && size % 64 == 0);
}
static void
progress(int p)
{
@@ -204,7 +229,12 @@ main(int argc, char **argv) {
dst_key_t *prevkey = NULL;
isc_buffer_t buf;
isc_log_t *log = NULL;
isc_entropy_t *ectx = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
dns_rdataclass_t rdclass;
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
int dbits = 0;
@@ -231,7 +261,7 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -346,8 +376,7 @@ main(int argc, char **argv) {
quiet = true;
break;
case 'r':
fatal("The -r option has been deprecated.\n"
"System random data is always used.\n");
setup_entropy(mctx, isc_commandline_argument, &ectx);
break;
case 's':
signatory = strtol(isc_commandline_argument,
@@ -476,7 +505,10 @@ main(int argc, char **argv) {
if (!isatty(0))
quiet = true;
ret = dst_lib_init(mctx, engine);
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
ret = dst_lib_init2(mctx, ectx, engine,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (ret != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(ret));
@@ -506,28 +538,80 @@ main(int argc, char **argv) {
fatal("no algorithm specified");
}
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS) {
fatal("unknown algorithm %s", algname);
}
if (alg == DST_ALG_DH) {
options |= DST_TYPE_KEY;
if (strcasecmp(algname, "RSA") == 0) {
#ifndef PK11_MD5_DISABLE
fprintf(stderr, "The use of RSA (RSAMD5) is not "
"recommended.\nIf you still wish to "
"use RSA (RSAMD5) please specify "
"\"-a RSAMD5\"\n");
INSIST(freeit == NULL);
return (1);
} else if (strcasecmp(algname, "HMAC-MD5") == 0) {
alg = DST_ALG_HMACMD5;
#else
fprintf(stderr,
"The use of RSA (RSAMD5) was disabled\n");
INSIST(freeit == NULL);
return (1);
} else if (strcasecmp(algname, "RSAMD5") == 0) {
fprintf(stderr, "The use of RSAMD5 was disabled\n");
INSIST(freeit == NULL);
return (1);
} else if (strcasecmp(algname, "HMAC-MD5") == 0) {
fprintf(stderr,
"The use of HMAC-MD5 was disabled\n");
return (1);
#endif
} else if (strcasecmp(algname, "HMAC-SHA1") == 0)
alg = DST_ALG_HMACSHA1;
else if (strcasecmp(algname, "HMAC-SHA224") == 0)
alg = DST_ALG_HMACSHA224;
else if (strcasecmp(algname, "HMAC-SHA256") == 0)
alg = DST_ALG_HMACSHA256;
else if (strcasecmp(algname, "HMAC-SHA384") == 0)
alg = DST_ALG_HMACSHA384;
else if (strcasecmp(algname, "HMAC-SHA512") == 0)
alg = DST_ALG_HMACSHA512;
else {
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS)
fatal("unknown algorithm %s", algname);
if (alg == DST_ALG_DH)
options |= DST_TYPE_KEY;
}
if (!dst_algorithm_supported(alg)) {
fatal("unsupported algorithm: %d", alg);
#ifdef PK11_MD5_DISABLE
INSIST((alg != DNS_KEYALG_RSAMD5) && (alg != DST_ALG_HMACMD5));
#endif
if (alg == DST_ALG_HMACMD5 || alg == DST_ALG_HMACSHA1 ||
alg == DST_ALG_HMACSHA224 || alg == DST_ALG_HMACSHA256 ||
alg == DST_ALG_HMACSHA384 || alg == DST_ALG_HMACSHA512)
{
fprintf(stderr,
"Use of dnssec-keygen for HMAC keys is "
"deprecated: use tsig-keygen\n");
}
if (!dst_algorithm_supported(alg))
fatal("unsupported algorithm: %d", alg);
if (use_nsec3) {
switch (alg) {
case DST_ALG_DSA:
alg = DST_ALG_NSEC3DSA;
break;
case DST_ALG_RSASHA1:
alg = DST_ALG_NSEC3RSASHA1;
break;
case DST_ALG_NSEC3DSA:
case DST_ALG_NSEC3RSASHA1:
case DST_ALG_RSASHA256:
case DST_ALG_RSASHA512:
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384:
case DST_ALG_ED25519:
@@ -540,20 +624,20 @@ main(int argc, char **argv) {
}
if (type != NULL && (options & DST_TYPE_KEY) != 0) {
if (strcasecmp(type, "NOAUTH") == 0) {
if (strcasecmp(type, "NOAUTH") == 0)
flags |= DNS_KEYTYPE_NOAUTH;
} else if (strcasecmp(type, "NOCONF") == 0) {
else if (strcasecmp(type, "NOCONF") == 0)
flags |= DNS_KEYTYPE_NOCONF;
} else if (strcasecmp(type, "NOAUTHCONF") == 0) {
else if (strcasecmp(type, "NOAUTHCONF") == 0) {
flags |= (DNS_KEYTYPE_NOAUTH |
DNS_KEYTYPE_NOCONF);
if (size < 0)
size = 0;
} else if (strcasecmp(type, "AUTHCONF") == 0) {
/* nothing */;
} else {
fatal("invalid type %s", type);
}
else if (strcasecmp(type, "AUTHCONF") == 0)
/* nothing */;
else
fatal("invalid type %s", type);
}
if (size < 0) {
@@ -573,6 +657,7 @@ main(int argc, char **argv) {
" to %d\n", size);
}
break;
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384:
case DST_ALG_ED25519:
@@ -687,6 +772,7 @@ main(int argc, char **argv) {
}
switch (alg) {
case DNS_KEYALG_RSAMD5:
case DNS_KEYALG_RSASHA1:
case DNS_KEYALG_NSEC3RSASHA1:
case DNS_KEYALG_RSASHA256:
@@ -701,6 +787,14 @@ main(int argc, char **argv) {
if (size != 0 && (size < 128 || size > 4096))
fatal("DH key size %d out of range", size);
break;
case DNS_KEYALG_DSA:
case DNS_KEYALG_NSEC3DSA:
if (size != 0 && !dsa_size_ok(size))
fatal("invalid DSS key size: %d", size);
break;
case DST_ALG_ECCGOST:
size = 256;
break;
case DST_ALG_ECDSA256:
size = 256;
break;
@@ -713,18 +807,78 @@ main(int argc, char **argv) {
case DST_ALG_ED448:
size = 456;
break;
case DST_ALG_HMACMD5:
options |= DST_TYPE_KEY;
if (size < 1 || size > 512)
fatal("HMAC-MD5 key size %d out of range", size);
if (dbits != 0 && (dbits < 80 || dbits > 128))
fatal("HMAC-MD5 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-MD5 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA1:
options |= DST_TYPE_KEY;
if (size < 1 || size > 160)
fatal("HMAC-SHA1 key size %d out of range", size);
if (dbits != 0 && (dbits < 80 || dbits > 160))
fatal("HMAC-SHA1 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA1 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA224:
options |= DST_TYPE_KEY;
if (size < 1 || size > 224)
fatal("HMAC-SHA224 key size %d out of range", size);
if (dbits != 0 && (dbits < 112 || dbits > 224))
fatal("HMAC-SHA224 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA224 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA256:
options |= DST_TYPE_KEY;
if (size < 1 || size > 256)
fatal("HMAC-SHA256 key size %d out of range", size);
if (dbits != 0 && (dbits < 128 || dbits > 256))
fatal("HMAC-SHA256 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA256 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA384:
options |= DST_TYPE_KEY;
if (size < 1 || size > 384)
fatal("HMAC-384 key size %d out of range", size);
if (dbits != 0 && (dbits < 192 || dbits > 384))
fatal("HMAC-SHA384 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA384 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA512:
options |= DST_TYPE_KEY;
if (size < 1 || size > 512)
fatal("HMAC-SHA512 key size %d out of range", size);
if (dbits != 0 && (dbits < 256 || dbits > 512))
fatal("HMAC-SHA512 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA512 digest bits %d not divisible by 8",
dbits);
break;
}
if (alg != DNS_KEYALG_DH && generator != 0)
fatal("specified DH generator for a non-DH key");
if (nametype == NULL) {
if ((options & DST_TYPE_KEY) != 0) /* KEY */
if ((options & DST_TYPE_KEY) != 0) /* KEY / HMAC */
fatal("no nametype specified");
flags |= DNS_KEYOWNER_ZONE; /* DNSKEY */
} else if (strcasecmp(nametype, "zone") == 0)
flags |= DNS_KEYOWNER_ZONE;
else if ((options & DST_TYPE_KEY) != 0) { /* KEY */
else if ((options & DST_TYPE_KEY) != 0) { /* KEY / HMAC */
if (strcasecmp(nametype, "host") == 0 ||
strcasecmp(nametype, "entity") == 0)
flags |= DNS_KEYOWNER_ENTITY;
@@ -740,7 +894,7 @@ main(int argc, char **argv) {
if (directory == NULL)
directory = ".";
if ((options & DST_TYPE_KEY) != 0) /* KEY */
if ((options & DST_TYPE_KEY) != 0) /* KEY / HMAC */
flags |= signatory;
else if ((flags & DNS_KEYOWNER_ZONE) != 0) { /* DNSKEY */
flags |= kskflag;
@@ -761,13 +915,15 @@ main(int argc, char **argv) {
}
if ((flags & DNS_KEYFLAG_OWNERMASK) == DNS_KEYOWNER_ZONE &&
alg == DNS_KEYALG_DH)
{
(alg == DNS_KEYALG_DH || alg == DST_ALG_HMACMD5 ||
alg == DST_ALG_HMACSHA1 || alg == DST_ALG_HMACSHA224 ||
alg == DST_ALG_HMACSHA256 || alg == DST_ALG_HMACSHA384 ||
alg == DST_ALG_HMACSHA512))
fatal("a key with algorithm '%s' cannot be a zone key",
algname);
}
switch(alg) {
case DNS_KEYALG_RSAMD5:
case DNS_KEYALG_RSASHA1:
case DNS_KEYALG_NSEC3RSASHA1:
case DNS_KEYALG_RSASHA256:
@@ -779,11 +935,23 @@ main(int argc, char **argv) {
param = generator;
break;
case DNS_KEYALG_DSA:
case DNS_KEYALG_NSEC3DSA:
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384:
case DST_ALG_ED25519:
case DST_ALG_ED448:
show_progress = true;
/* fall through */
case DST_ALG_HMACMD5:
case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256:
case DST_ALG_HMACSHA384:
case DST_ALG_HMACSHA512:
param = 0;
break;
}
@@ -797,17 +965,19 @@ main(int argc, char **argv) {
if (!quiet && show_progress) {
fprintf(stderr, "Generating key pair.");
ret = dst_key_generate(name, alg, size, param, flags,
protocol, rdclass, mctx, &key,
&progress);
ret = dst_key_generate2(name, alg, size, param, flags,
protocol, rdclass, mctx, &key,
&progress);
putc('\n', stderr);
fflush(stderr);
} else {
ret = dst_key_generate(name, alg, size, param, flags,
protocol, rdclass, mctx, &key,
NULL);
ret = dst_key_generate2(name, alg, size, param, flags,
protocol, rdclass, mctx, &key,
NULL);
}
isc_entropy_stopcallbacksources(ectx);
if (ret != ISC_R_SUCCESS) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_SECALG_FORMATSIZE];
@@ -960,6 +1130,7 @@ main(int argc, char **argv) {
dst_key_free(&prevkey);
cleanup_logging(&log);
cleanup_entropy(&ectx);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
+49 -18
View File
@@ -82,6 +82,7 @@
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
<arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-S <replaceable class="parameter">key</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">strength</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
@@ -123,30 +124,35 @@
<listitem>
<para>
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <option>algorithm</option> must be one of RSASHA1,
NSEC3RSASHA1, RSASHA256, RSASHA512,
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
TKEY, the value must be DH (Diffie Hellman); specifying
his value will automatically set the <option>-T KEY</option>
option as well.
</para>
<para>
TSIG keys can also be generated by setting the value to
one of HMAC-MD5, HMAC-SHA1, HMAC-SHA224, HMAC-SHA256,
HMAC-SHA384, or HMAC-SHA512. As with DH, specifying these
values will automatically set <option>-T KEY</option>. Note,
however, that <command>tsig-keygen</command> produces TSIG keys
in a more useful format. These algorithms have been deprecated
in <command>dnssec-keygen</command>, and will be removed in a
future release.
</para>
<para>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
along with the <option>-3</option> option, then NSEC3RSASHA1
will be used instead.
or NSEC3DSA will be used instead.
</para>
<para>
This parameter <emphasis>must</emphasis> be specified except
when using the <option>-S</option> option, which copies the
algorithm from the predecessor key.
</para>
<para>
In prior releases, HMAC algorithms could be generated for
use as TSIG keys, but that feature has been removed as of
BIND 9.13.0. Use <command>tsig-keygen</command> to generate
TSIG keys.
As of BIND 9.12.0, this option is mandatory except when using
the <option>-S</option> option, which copies the algorithm from
the predecessor key. Previously, the default for newly
generated keys was RSASHA1.
</para>
</listitem>
</varlistentry>
@@ -349,6 +355,31 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
<listitem>
<para>
Specifies a source of randomness. Normally, when generating
DNSSEC keys, this option has no effect; the random number
generation function provided by the cryptographic library will
be used.
</para>
<para>
If that behavior is disabled at compile time, however,
the specified file will be used as entropy source
for key generation. <filename>randomdev</filename> is
the name of a character device or file containing random
data to be used. The special value <filename>keyboard</filename>
indicates that keyboard input should be used.
</para>
<para>
The default is <filename>/dev/random</filename> if the
operating system provides it or an equivalent device;
if not, the default source of randomness is keyboard input.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-S <replaceable class="parameter">key</replaceable></term>
<listitem>
@@ -606,22 +637,22 @@
<refsection><info><title>EXAMPLE</title></info>
<para>
To generate an ECDSAP256SHA256 key for the domain
To generate a 768-bit DSA key for the domain
<userinput>example.com</userinput>, the following command would be
issued:
</para>
<para><userinput>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</userinput>
<para><userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
</para>
<para>
The command would print a string of the form:
</para>
<para><userinput>Kexample.com.+013+26160</userinput>
<para><userinput>Kexample.com.+003+26160</userinput>
</para>
<para>
In this example, <command>dnssec-keygen</command> creates
the files <filename>Kexample.com.+013+26160.key</filename>
the files <filename>Kexample.com.+003+26160.key</filename>
and
<filename>Kexample.com.+013+26160.private</filename>.
<filename>Kexample.com.+003+26160.private</filename>.
</para>
</refsection>
+46 -18
View File
@@ -57,6 +57,7 @@
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
[<code class="option">-q</code>]
[<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>]
[<code class="option">-S <em class="replaceable"><code>key</code></em></code>]
[<code class="option">-s <em class="replaceable"><code>strength</code></em></code>]
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
@@ -99,30 +100,35 @@
<dd>
<p>
Selects the cryptographic algorithm. For DNSSEC keys, the value
of <code class="option">algorithm</code> must be one of RSASHA1,
NSEC3RSASHA1, RSASHA256, RSASHA512,
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
TKEY, the value must be DH (Diffie Hellman); specifying
his value will automatically set the <code class="option">-T KEY</code>
option as well.
</p>
<p>
TSIG keys can also be generated by setting the value to
one of HMAC-MD5, HMAC-SHA1, HMAC-SHA224, HMAC-SHA256,
HMAC-SHA384, or HMAC-SHA512. As with DH, specifying these
values will automatically set <code class="option">-T KEY</code>. Note,
however, that <span class="command"><strong>tsig-keygen</strong></span> produces TSIG keys
in a more useful format. These algorithms have been deprecated
in <span class="command"><strong>dnssec-keygen</strong></span>, and will be removed in a
future release.
</p>
<p>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
will be used instead.
or NSEC3DSA will be used instead.
</p>
<p>
This parameter <span class="emphasis"><em>must</em></span> be specified except
when using the <code class="option">-S</code> option, which copies the
algorithm from the predecessor key.
</p>
<p>
In prior releases, HMAC algorithms could be generated for
use as TSIG keys, but that feature has been removed as of
BIND 9.13.0. Use <span class="command"><strong>tsig-keygen</strong></span> to generate
TSIG keys.
As of BIND 9.12.0, this option is mandatory except when using
the <code class="option">-S</code> option, which copies the algorithm from
the predecessor key. Previously, the default for newly
generated keys was RSASHA1.
</p>
</dd>
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
@@ -278,6 +284,28 @@
a satisfactory key.
</p>
</dd>
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
<dd>
<p>
Specifies a source of randomness. Normally, when generating
DNSSEC keys, this option has no effect; the random number
generation function provided by the cryptographic library will
be used.
</p>
<p>
If that behavior is disabled at compile time, however,
the specified file will be used as entropy source
for key generation. <code class="filename">randomdev</code> is
the name of a character device or file containing random
data to be used. The special value <code class="filename">keyboard</code>
indicates that keyboard input should be used.
</p>
<p>
The default is <code class="filename">/dev/random</code> if the
operating system provides it or an equivalent device;
if not, the default source of randomness is keyboard input.
</p>
</dd>
<dt><span class="term">-S <em class="replaceable"><code>key</code></em></span></dt>
<dd>
<p>
@@ -498,22 +526,22 @@
<a name="id-1.11"></a><h2>EXAMPLE</h2>
<p>
To generate an ECDSAP256SHA256 key for the domain
To generate a 768-bit DSA key for the domain
<strong class="userinput"><code>example.com</code></strong>, the following command would be
issued:
</p>
<p><strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 -n ZONE example.com</code></strong>
<p><strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE example.com</code></strong>
</p>
<p>
The command would print a string of the form:
</p>
<p><strong class="userinput"><code>Kexample.com.+013+26160</code></strong>
<p><strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
</p>
<p>
In this example, <span class="command"><strong>dnssec-keygen</strong></span> creates
the files <code class="filename">Kexample.com.+013+26160.key</code>
the files <code class="filename">Kexample.com.+003+26160.key</code>
and
<code class="filename">Kexample.com.+013+26160.private</code>.
<code class="filename">Kexample.com.+003+26160.private</code>.
</p>
</div>
+23 -5
View File
@@ -20,6 +20,7 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/mem.h>
@@ -32,7 +33,7 @@
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
@@ -51,9 +52,12 @@ usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr, " %s [options] keyfile\n\n", program);
fprintf(stderr, "Version: %s\n", VERSION);
#if USE_PKCS11
#if defined(PKCS11CRYPTO)
fprintf(stderr, " -E engine: specify PKCS#11 provider "
"(default: %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " -E engine: specify OpenSSL engine "
"(default \"pkcs11\")\n");
#else
fprintf(stderr, " -E engine: specify OpenSSL engine\n");
#endif
@@ -74,13 +78,18 @@ usage(void) {
int
main(int argc, char **argv) {
isc_result_t result;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
char const *filename = NULL;
char *dir = NULL;
char newname[1024], oldname[1024];
char keystr[DST_KEY_FORMATSIZE];
char *endp;
int ch;
isc_entropy_t *ectx = NULL;
dst_key_t *key = NULL;
uint32_t flags;
isc_buffer_t buf;
@@ -95,7 +104,7 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS)
fatal("Out of memory");
#if HAVE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -173,10 +182,17 @@ main(int argc, char **argv) {
}
}
result = dst_lib_init(mctx, engine);
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init2(mctx, ectx, engine,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS)
fatal("Could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("Could not initialize hash");
isc_entropy_stopcallbacksources(ectx);
result = dst_key_fromnamedfile(filename, dir,
DST_TYPE_PUBLIC|DST_TYPE_PRIVATE,
@@ -239,7 +255,7 @@ main(int argc, char **argv) {
* Remove old key file, if told to (and if
* it isn't the same as the new file)
*/
if (removefile) {
if (removefile && dst_key_alg(key) != DST_ALG_RSAMD5) {
isc_buffer_init(&buf, oldname, sizeof(oldname));
dst_key_setflags(key, flags & ~DNS_KEYFLAG_REVOKE);
dst_key_buildfilename(key, DST_TYPE_PRIVATE, dir, &buf);
@@ -257,7 +273,9 @@ main(int argc, char **argv) {
cleanup:
dst_key_free(&key);
isc_hash_destroy();
dst_lib_destroy();
cleanup_entropy(&ectx);
if (verbose > 10)
isc_mem_stats(mctx, stdout);
if (dir != NULL)
+19 -4
View File
@@ -22,6 +22,7 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/mem.h>
@@ -35,7 +36,7 @@
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
@@ -55,7 +56,7 @@ usage(void) {
fprintf(stderr, " %s [options] keyfile\n\n", program);
fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "General options:\n");
#if USE_PKCS11
#if defined(PKCS11CRYPTO)
fprintf(stderr, " -E engine: specify PKCS#11 provider "
"(default: %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
@@ -129,13 +130,18 @@ printtime(dst_key_t *key, int type, const char *tag, bool epoch,
int
main(int argc, char **argv) {
isc_result_t result;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
const char *filename = NULL;
char *directory = NULL;
char newname[1024];
char keystr[DST_KEY_FORMATSIZE];
char *endp, *p;
int ch;
isc_entropy_t *ectx = NULL;
const char *predecessor = NULL;
dst_key_t *prevkey = NULL;
dst_key_t *key = NULL;
@@ -176,7 +182,7 @@ main(int argc, char **argv) {
setup_logging(mctx, &log);
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -374,10 +380,17 @@ main(int argc, char **argv) {
if (argc > isc_commandline_index + 1)
fatal("Extraneous arguments");
result = dst_lib_init(mctx, engine);
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init2(mctx, ectx, engine,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS)
fatal("Could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("Could not initialize hash");
isc_entropy_stopcallbacksources(ectx);
if (predecessor != NULL) {
int major, minor;
@@ -661,7 +674,9 @@ main(int argc, char **argv) {
if (prevkey != NULL)
dst_key_free(&prevkey);
dst_key_free(&key);
isc_hash_destroy();
dst_lib_destroy();
cleanup_entropy(&ectx);
if (verbose > 10)
isc_mem_stats(mctx, stdout);
cleanup_logging(&log);
+20 -4
View File
@@ -39,7 +39,7 @@
dnssec-signzone \- DNSSEC zone signing tool
.SH "SYNOPSIS"
.HP \w'\fBdnssec\-signzone\fR\ 'u
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-Q\fR] [\fB\-R\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-p\fR] [\fB\-Q\fR] [\fB\-R\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
.SH "DESCRIPTION"
.PP
\fBdnssec\-signzone\fR
@@ -278,6 +278,11 @@ specifies the format version of the raw zone file: if N is 0, the raw file can b
\fBnamed\fR; if N is 1, the file can be read by release 9\&.9\&.0 or higher; the default is 1\&.
.RE
.PP
\-p
.RS 4
Use pseudo\-random data when signing the zone\&. This is faster, but less secure, than using real random data\&. This option may be useful when signing large zones or when the entropy source is limited\&.
.RE
.PP
\-P
.RS 4
Disable post sign verification tests\&.
@@ -306,6 +311,17 @@ This option is similar to
to signatures from keys that are no longer published\&. This enables ZSK rollover using the procedure described in RFC 4641, section 4\&.2\&.1\&.2 ("Double Signature Zone Signing Key Rollover")\&.
.RE
.PP
\-r \fIrandomdev\fR
.RS 4
Specifies the source of randomness\&. If the operating system does not provide a
/dev/random
or equivalent device, the default source of randomness is keyboard input\&.
randomdev
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
keyboard
indicates that keyboard input should be used\&.
.RE
.PP
\-S
.RS 4
Smart signing: Instructs
@@ -415,9 +431,9 @@ Specify which keys should be used to sign the zone\&. If no keys are specified,
.PP
The following command signs the
\fBexample\&.com\fR
zone with the ECDSAP256SHA256 key generated by key generated by
zone with the DSA key generated by
\fBdnssec\-keygen\fR
(Kexample\&.com\&.+013+17247)\&. Because the
(Kexample\&.com\&.+003+17247)\&. Because the
\fB\-S\fR
option is not being used, the zone\*(Aqs keys must be in the master file (db\&.example\&.com)\&. This invocation looks for
dsset
@@ -428,7 +444,7 @@ files, in the current directory, so that DS records can be imported from them (\
.\}
.nf
% dnssec\-signzone \-g \-o example\&.com db\&.example\&.com \e
Kexample\&.com\&.+013+17247
Kexample\&.com\&.+003+17247
db\&.example\&.com\&.signed
%
.fi
+74 -109
View File
@@ -27,7 +27,6 @@
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <time.h>
@@ -36,11 +35,11 @@
#include <isc/app.h>
#include <isc/base32.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/event.h>
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/hex.h>
#include <isc/md.h>
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/os.h>
@@ -50,6 +49,7 @@
#include <isc/serial.h>
#include <isc/safe.h>
#include <isc/stdio.h>
#include <isc/stdlib.h>
#include <isc/string.h>
#include <isc/task.h>
#include <isc/time.h>
@@ -78,18 +78,17 @@
#include <dns/soa.h>
#include <dns/time.h>
#include <dns/update.h>
#include <dns/zoneverify.h>
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif
const char *program = "dnssec-signzone";
@@ -99,10 +98,6 @@ typedef struct hashlist hashlist_t;
static int nsec_datatype = dns_rdatatype_nsec;
#define check_dns_dbiterator_current(result) \
check_result((result == DNS_R_NEWORIGIN) ? ISC_R_SUCCESS : result, \
"dns_dbiterator_current()")
#define IS_NSEC3 (nsec_datatype == dns_rdatatype_nsec3)
#define OPTOUT(x) (((x) & DNS_NSEC3FLAG_OPTOUT) != 0)
@@ -136,6 +131,7 @@ static int jitter = 0;
static bool tryverify = false;
static bool printstats = false;
static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
static dns_ttl_t zone_soa_min_ttl;
static dns_ttl_t soa_ttl;
static FILE *outfp = NULL;
@@ -300,10 +296,11 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
else
expiry = endtime;
jendtime = (jitter != 0) ? expiry - isc_random_uniform(jitter) : expiry;
jendtime = (jitter != 0) ? isc_random_jitter(expiry, jitter) : expiry;
isc_buffer_init(&b, array, sizeof(array));
result = dns_dnssec_sign(name, rdataset, key, &starttime, &jendtime,
mctx, &b, &trdata);
isc_entropy_stopcallbacksources(ectx);
if (result != ISC_R_SUCCESS) {
fatal("dnskey '%s' failed to sign data: %s",
keystr, isc_result_totext(result));
@@ -312,8 +309,8 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
if (tryverify) {
result = dns_dnssec_verify(name, rdataset, key,
true, 0, mctx, &trdata, NULL);
if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD) {
true, mctx, &trdata);
if (result == ISC_R_SUCCESS) {
vbprintf(3, "\tsignature verified\n");
INCSTAT(nverified);
} else {
@@ -473,9 +470,8 @@ setverifies(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
dns_rdata_t *rrsig)
{
isc_result_t result;
result = dns_dnssec_verify(name, set, key, false, 0, mctx, rrsig,
NULL);
if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD) {
result = dns_dnssec_verify(name, set, key, false, mctx, rrsig);
if (result == ISC_R_SUCCESS) {
INCSTAT(nverified);
return (true);
} else {
@@ -505,11 +501,11 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
dns_ttl_t ttl;
int i;
char namestr[DNS_NAME_FORMATSIZE];
char typestr[DNS_RDATATYPE_FORMATSIZE];
char typestr[TYPE_FORMATSIZE];
char sigstr[SIG_FORMATSIZE];
dns_name_format(name, namestr, sizeof(namestr));
dns_rdatatype_format(set->type, typestr, sizeof(typestr));
type_format(set->type, typestr, sizeof(typestr));
ttl = ISC_MIN(set->ttl, endtime - starttime);
@@ -533,6 +529,8 @@ signset(dns_diff_t *del, dns_diff_t *add, dns_dbnode_t *node, dns_name_t *name,
arraysize += dns_rdataset_count(&sigset);
wassignedby = isc_mem_get(mctx, arraysize * sizeof(bool));
nowsignedby = isc_mem_get(mctx, arraysize * sizeof(bool));
if (wassignedby == NULL || nowsignedby == NULL)
fatal("out of memory");
for (i = 0; i < arraysize; i++)
wassignedby[i] = nowsignedby[i] = false;
@@ -789,7 +787,7 @@ hashlist_add_dns_name(hashlist_t *l, /*const*/ dns_name_t *name,
static int
hashlist_comp(const void *a, const void *b) {
return (memcmp(a, b, hash_length + 1));
return (isc_safe_memcompare(a, b, hash_length + 1));
}
static void
@@ -920,7 +918,7 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
rdclass, 0, NULL, dbp);
check_result(result, "dns_db_create()");
result = dns_db_load(*dbp, filename, inputformat, DNS_MASTER_HINT);
result = dns_db_load3(*dbp, filename, inputformat, DNS_MASTER_HINT);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
dns_db_detach(dbp);
}
@@ -1047,47 +1045,6 @@ secure(dns_name_t *name, dns_dbnode_t *node) {
return (result == ISC_R_SUCCESS);
}
static bool
is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
dns_name_t *name, dns_dbnode_t *node, uint32_t *ttlp)
{
dns_rdataset_t nsset;
isc_result_t result;
if (dns_name_equal(name, origin))
return (false);
dns_rdataset_init(&nsset);
result = dns_db_findrdataset(db, node, ver, dns_rdatatype_ns,
0, 0, &nsset, NULL);
if (dns_rdataset_isassociated(&nsset)) {
if (ttlp != NULL)
*ttlp = nsset.ttl;
dns_rdataset_disassociate(&nsset);
}
return ((result == ISC_R_SUCCESS));
}
/*%
* Return true if version 'ver' of database 'db' contains a DNAME RRset at
* 'node'; return false otherwise.
*/
static bool
has_dname(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node) {
dns_rdataset_t dnameset;
isc_result_t result;
dns_rdataset_init(&dnameset);
result = dns_db_findrdataset(db, node, ver, dns_rdatatype_dname, 0, 0,
&dnameset, NULL);
if (dns_rdataset_isassociated(&dnameset)) {
dns_rdataset_disassociate(&dnameset);
}
return ((result == ISC_R_SUCCESS));
}
/*%
* Signs all records at a name.
*/
@@ -1549,9 +1506,8 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
{
zonecut = savezonecut(&fzonecut, name);
if (!OPTOUT(nsec3flags) ||
secure(name, node)) {
secure(name, node))
found = true;
}
} else if (has_dname(gdb, gversion, node)) {
zonecut = savezonecut(&fzonecut, name);
found = true;
@@ -2137,10 +2093,10 @@ rrset_cleanup(dns_name_t *name, dns_rdataset_t *rdataset,
unsigned int count1 = 0;
dns_rdataset_t tmprdataset;
char namestr[DNS_NAME_FORMATSIZE];
char typestr[DNS_RDATATYPE_FORMATSIZE];
char typestr[TYPE_FORMATSIZE];
dns_name_format(name, namestr, sizeof(namestr));
dns_rdatatype_format(rdataset->type, typestr, sizeof(typestr));
type_format(rdataset->type, typestr, sizeof(typestr));
dns_rdataset_init(&tmprdataset);
for (result = dns_rdataset_first(rdataset);
@@ -2532,7 +2488,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
rdclass, 0, NULL, db);
check_result(result, "dns_db_create()");
result = dns_db_load(*db, file, inputformat, 0);
result = dns_db_load2(*db, file, inputformat);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("failed loading zone from '%s': %s",
file, isc_result_totext(result));
@@ -2698,7 +2654,7 @@ build_final_keylist(void) {
* Find keys that match this zone in the key repository.
*/
result = dns_dnssec_findmatchingkeys(gorigin, directory,
now, mctx, &matchkeys);
mctx, &matchkeys);
if (result == ISC_R_NOTFOUND) {
result = ISC_R_SUCCESS;
}
@@ -3045,8 +3001,7 @@ writeset(const char *prefix, dns_rdatatype_t type) {
check_result(result, "dns_diff_apply");
dns_diff_clear(&diff);
result = dns_master_dump(mctx, db, dbversion, style, filename,
dns_masterformat_text, NULL);
result = dns_master_dump(mctx, db, dbversion, style, filename);
check_result(result, "dns_master_dump");
isc_mem_put(mctx, filename, filenamelen);
@@ -3128,16 +3083,23 @@ usage(void) {
fprintf(stderr, "\t\tsoa serial format of signed zone file (keep)\n");
fprintf(stderr, "\t-D:\n");
fprintf(stderr, "\t\toutput only DNSSEC-related records\n");
fprintf(stderr, "\t-r randomdev:\n");
fprintf(stderr, "\t\ta file containing random data\n");
fprintf(stderr, "\t-a:\t");
fprintf(stderr, "verify generated signatures\n");
fprintf(stderr, "\t-c class (IN)\n");
fprintf(stderr, "\t-E engine:\n");
#if USE_PKCS11
#if defined(PKCS11CRYPTO)
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, "\t\tname of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
#endif
fprintf(stderr, "\t-p:\t");
fprintf(stderr, "use pseudorandom data (faster but less secure)\n");
fprintf(stderr, "\t-P:\t");
fprintf(stderr, "disable post-sign verification\n");
fprintf(stderr, "\t-Q:\t");
@@ -3225,9 +3187,15 @@ main(int argc, char *argv[]) {
isc_time_t timer_start, timer_finish;
isc_time_t sign_start, sign_finish;
dns_dnsseckey_t *key;
isc_result_t result, vresult;
isc_result_t result;
isc_log_t *log = NULL;
bool pseudorandom = false;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
unsigned int eflags;
bool free_output = false;
int tempfilelen = 0;
dns_rdataclass_t rdclass;
@@ -3280,7 +3248,7 @@ main(int argc, char *argv[]) {
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -3456,7 +3424,7 @@ main(int argc, char *argv[]) {
break;
case 'p':
fatal("The -p option has been deprecated.\n");
pseudorandom = true;
break;
case 'Q':
@@ -3468,7 +3436,7 @@ main(int argc, char *argv[]) {
break;
case 'r':
fatal("The -r options has been deprecated.\n");
setup_entropy(mctx, isc_commandline_argument, &ectx);
break;
case 'S':
@@ -3544,11 +3512,21 @@ main(int argc, char *argv[]) {
}
}
result = dst_lib_init(mctx, engine);
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
eflags = ISC_ENTROPY_BLOCKING;
if (!pseudorandom)
eflags |= ISC_ENTROPY_GOODONLY;
result = dst_lib_init2(mctx, ectx, engine, eflags);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not create hash context");
isc_stdtime_get(&now);
if (startstr != NULL) {
@@ -3674,8 +3652,8 @@ main(int argc, char *argv[]) {
if (output_dnssec_only && set_maxttl)
fatal("option -D cannot be used with -M");
result = dns_master_stylecreate(&dsstyle, DNS_STYLEFLAG_NO_TTL,
0, 24, 0, 0, 0, 8, 0xffffffff, mctx);
result = dns_master_stylecreate(&dsstyle, DNS_STYLEFLAG_NO_TTL,
0, 24, 0, 0, 0, 8, mctx);
check_result(result, "dns_master_stylecreate");
gdb = NULL;
@@ -3874,11 +3852,9 @@ main(int argc, char *argv[]) {
isc_result_totext(result));
}
isc_mutex_init(&namelock);
if (printstats) {
isc_mutex_init(&statslock);
}
RUNTIME_CHECK(isc_mutex_init(&namelock) == ISC_R_SUCCESS);
if (printstats)
RUNTIME_CHECK(isc_mutex_init(&statslock) == ISC_R_SUCCESS);
presign();
TIME_NOW(&sign_start);
@@ -3908,18 +3884,9 @@ main(int argc, char *argv[]) {
postsign();
TIME_NOW(&sign_finish);
if (disable_zone_check) {
vresult = ISC_R_SUCCESS;
} else {
vresult = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin,
NULL, mctx, ignore_kskflag,
keyset_kskonly);
if (vresult != ISC_R_SUCCESS) {
fprintf(output_stdout ? stderr : stdout,
"Zone verification failed (%s)\n",
isc_result_totext(vresult));
}
}
if (!disable_zone_check)
verifyzone(gdb, gversion, gorigin, mctx,
ignore_kskflag, keyset_kskonly);
if (outputformat != dns_masterformat_text) {
dns_masterrawheader_t header;
@@ -3930,31 +3897,27 @@ main(int argc, char *argv[]) {
header.flags = DNS_MASTERRAW_SOURCESERIALSET;
header.sourceserial = serialnum;
}
result = dns_master_dumptostream(mctx, gdb, gversion,
masterstyle, outputformat,
&header, outfp);
result = dns_master_dumptostream3(mctx, gdb, gversion,
masterstyle, outputformat,
&header, outfp);
check_result(result, "dns_master_dumptostream3");
}
isc_mutex_destroy(&namelock);
DESTROYLOCK(&namelock);
if (printstats)
isc_mutex_destroy(&statslock);
DESTROYLOCK(&statslock);
if (!output_stdout) {
result = isc_stdio_close(outfp);
check_result(result, "isc_stdio_close");
removefile = false;
if (vresult == ISC_R_SUCCESS) {
result = isc_file_rename(tempfile, output);
if (result != ISC_R_SUCCESS) {
fatal("failed to rename temp file to %s: %s",
output, isc_result_totext(result));
}
printf("%s\n", output);
} else {
isc_file_remove(tempfile);
}
result = isc_file_rename(tempfile, output);
if (result != ISC_R_SUCCESS)
fatal("failed to rename temp file to %s: %s",
output, isc_result_totext(result));
printf("%s\n", output);
}
dns_db_closeversion(gdb, &gversion, false);
@@ -3977,7 +3940,9 @@ main(int argc, char *argv[]) {
dns_master_styledestroy(&dsstyle, mctx);
cleanup_logging(&log);
isc_hash_destroy();
dst_lib_destroy();
cleanup_entropy(&ectx);
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
@@ -3994,5 +3959,5 @@ main(int argc, char *argv[]) {
#ifdef _WIN32
DestroySockets();
#endif
return (vresult == ISC_R_SUCCESS ? 0 : 1);
return (0);
}
+35 -5
View File
@@ -79,8 +79,10 @@
<arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-O <replaceable class="parameter">output-format</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-P</option></arg>
<arg choice="opt" rep="norepeat"><option>-p</option></arg>
<arg choice="opt" rep="norepeat"><option>-Q</option></arg>
<arg choice="opt" rep="norepeat"><option>-R</option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-S</option></arg>
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">ttl</replaceable></option></arg>
@@ -507,6 +509,18 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem>
<para>
Use pseudo-random data when signing the zone. This is faster,
but less secure, than using real random data. This option
may be useful when signing large zones or when the entropy
source is limited.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-P</term>
<listitem>
@@ -558,6 +572,23 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
<listitem>
<para>
Specifies the source of randomness. If the operating
system does not provide a <filename>/dev/random</filename>
or equivalent device, the default source of randomness
is keyboard input. <filename>randomdev</filename>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard
input should be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-S</term>
<listitem>
@@ -788,16 +819,15 @@
<para>
The following command signs the <userinput>example.com</userinput>
zone with the ECDSAP256SHA256 key generated by key generated by
<command>dnssec-keygen</command> (Kexample.com.+013+17247).
Because the <command>-S</command> option is not being used,
the zone's keys must be in the master file
zone with the DSA key generated by <command>dnssec-keygen</command>
(Kexample.com.+003+17247). Because the <command>-S</command> option
is not being used, the zone's keys must be in the master file
(<filename>db.example.com</filename>). This invocation looks
for <filename>dsset</filename> files, in the current directory,
so that DS records can be imported from them (<command>-g</command>).
</para>
<programlisting>% dnssec-signzone -g -o example.com db.example.com \
Kexample.com.+013+17247
Kexample.com.+003+17247
db.example.com.signed
%</programlisting>
<para>
+29 -5
View File
@@ -54,8 +54,10 @@
[<code class="option">-o <em class="replaceable"><code>origin</code></em></code>]
[<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>]
[<code class="option">-P</code>]
[<code class="option">-p</code>]
[<code class="option">-Q</code>]
[<code class="option">-R</code>]
[<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>]
[<code class="option">-S</code>]
[<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>]
[<code class="option">-T <em class="replaceable"><code>ttl</code></em></code>]
@@ -398,6 +400,15 @@
can be read by release 9.9.0 or higher; the default is 1.
</p>
</dd>
<dt><span class="term">-p</span></dt>
<dd>
<p>
Use pseudo-random data when signing the zone. This is faster,
but less secure, than using real random data. This option
may be useful when signing large zones or when the entropy
source is limited.
</p>
</dd>
<dt><span class="term">-P</span></dt>
<dd>
<p>
@@ -442,6 +453,20 @@
("Double Signature Zone Signing Key Rollover").
</p>
</dd>
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
<dd>
<p>
Specifies the source of randomness. If the operating
system does not provide a <code class="filename">/dev/random</code>
or equivalent device, the default source of randomness
is keyboard input. <code class="filename">randomdev</code>
specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<code class="filename">keyboard</code> indicates that keyboard
input should be used.
</p>
</dd>
<dt><span class="term">-S</span></dt>
<dd>
<p>
@@ -624,16 +649,15 @@
<p>
The following command signs the <strong class="userinput"><code>example.com</code></strong>
zone with the ECDSAP256SHA256 key generated by key generated by
<span class="command"><strong>dnssec-keygen</strong></span> (Kexample.com.+013+17247).
Because the <span class="command"><strong>-S</strong></span> option is not being used,
the zone's keys must be in the master file
zone with the DSA key generated by <span class="command"><strong>dnssec-keygen</strong></span>
(Kexample.com.+003+17247). Because the <span class="command"><strong>-S</strong></span> option
is not being used, the zone's keys must be in the master file
(<code class="filename">db.example.com</code>). This invocation looks
for <code class="filename">dsset</code> files, in the current directory,
so that DS records can be imported from them (<span class="command"><strong>-g</strong></span>).
</p>
<pre class="programlisting">% dnssec-signzone -g -o example.com db.example.com \
Kexample.com.+013+17247
Kexample.com.+003+17247
db.example.com.signed
%</pre>
<p>
+27 -9
View File
@@ -20,6 +20,7 @@
#include <isc/app.h>
#include <isc/base32.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/event.h>
#include <isc/file.h>
#include <isc/hash.h>
@@ -32,6 +33,7 @@
#include <isc/rwlock.h>
#include <isc/serial.h>
#include <isc/stdio.h>
#include <isc/stdlib.h>
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
@@ -58,11 +60,10 @@
#include <dns/result.h>
#include <dns/soa.h>
#include <dns/time.h>
#include <dns/zoneverify.h>
#include <dst/dst.h>
#if USE_PKCS11
#ifdef PKCS11CRYPTO
#include <pk11/result.h>
#endif
@@ -73,6 +74,7 @@ int verbose;
static isc_stdtime_t now;
static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
static dns_masterformat_t inputformat = dns_masterformat_text;
static dns_db_t *gdb; /* The database */
static dns_dbversion_t *gversion; /* The database version */
@@ -106,7 +108,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
rdclass, 0, NULL, db);
check_result(result, "dns_db_create()");
result = dns_db_load(*db, file, inputformat, 0);
result = dns_db_load2(*db, file, inputformat);
switch (result) {
case DNS_R_SEENINCLUDE:
case ISC_R_SUCCESS:
@@ -150,9 +152,12 @@ usage(void) {
fprintf(stderr, "\t\tfile format of input zonefile (text)\n");
fprintf(stderr, "\t-c class (IN)\n");
fprintf(stderr, "\t-E engine:\n");
#if USE_PKCS11
#if defined(PKCS11CRYPTO)
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, "\t\tname of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
#endif
@@ -168,7 +173,11 @@ main(int argc, char *argv[]) {
char *inputformatstr = NULL;
isc_result_t result;
isc_log_t *log = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL;
#endif
char *classname = NULL;
dns_rdataclass_t rdclass;
char *endp;
@@ -205,7 +214,7 @@ main(int argc, char *argv[]) {
if (result != ISC_R_SUCCESS)
fatal("out of memory");
#if USE_PKCS11
#ifdef PKCS11CRYPTO
pk11_result_register();
#endif
dns_result_register();
@@ -269,11 +278,18 @@ main(int argc, char *argv[]) {
}
}
result = dst_lib_init(mctx, engine);
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init2(mctx, ectx, engine, ISC_ENTROPY_BLOCKING);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not create hash context");
isc_stdtime_get(&now);
rdclass = strtoclass(classname);
@@ -316,14 +332,16 @@ main(int argc, char *argv[]) {
result = dns_db_newversion(gdb, &gversion);
check_result(result, "dns_db_newversion()");
result = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin, NULL,
mctx, ignore_kskflag, keyset_kskonly);
verifyzone(gdb, gversion, gorigin, mctx,
ignore_kskflag, keyset_kskonly);
dns_db_closeversion(gdb, &gversion, false);
dns_db_detach(&gdb);
cleanup_logging(&log);
dst_lib_destroy();
isc_hash_destroy();
cleanup_entropy(&ectx);
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
@@ -331,5 +349,5 @@ main(int argc, char *argv[]) {
(void) isc_app_finish();
return (result == ISC_R_SUCCESS ? 0 : 1);
return (0);
}
+1452 -8
View File
File diff suppressed because it is too large Load Diff
+31
View File
@@ -21,6 +21,11 @@
#include <dns/rdatastruct.h>
#include <dst/dst.h>
#define check_dns_dbiterator_current(result) \
check_result((result == DNS_R_NEWORIGIN) ? ISC_R_SUCCESS : result, \
"dns_dbiterator_current()")
typedef void (fatalcallback_t)(void);
ISC_PLATFORM_NORETURN_PRE void
@@ -39,6 +44,10 @@ vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
ISC_PLATFORM_NORETURN_PRE void
version(const char *program) ISC_PLATFORM_NORETURN_POST;
void
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
#define TYPE_FORMATSIZE 20
void
sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
@@ -49,6 +58,12 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp);
void
cleanup_logging(isc_log_t **logp);
void
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
void
cleanup_entropy(isc_entropy_t **ectx);
dns_ttl_t strtottl(const char *str);
isc_stdtime_t
@@ -74,6 +89,22 @@ bool
key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
isc_mem_t *mctx, bool *exact);
bool
is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
dns_name_t *name, dns_dbnode_t *node, uint32_t *ttlp);
/*%
* Return true if version 'ver' of database 'db' contains a DNAME RRset at
* 'node'; return false otherwise.
*/
bool
has_dname(dns_db_t *db, dns_dbversion_t *ver, dns_dbnode_t *node);
void
verifyzone(dns_db_t *db, dns_dbversion_t *ver,
dns_name_t *origin, isc_mem_t *mctx,
bool ignore_kskflag, bool keyset_kskonly);
bool
isoptarg(const char *arg, char **argv, void (*usage)(void));
+2 -2
View File
@@ -61,7 +61,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -84,7 +84,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
@IF PYTHON
<PostBuildEvent>
@@ -94,7 +94,7 @@ set PYTHONPATH=.
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -113,7 +113,7 @@ set PYTHONPATH=.
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
@IF PYTHON
<PostBuildEvent>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
+6 -8
View File
@@ -46,17 +46,17 @@ 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} @DST_OPENSSL_INC@
CDEFINES = @CONTRIB_DLZ@
CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO@
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
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@
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@
@@ -72,13 +72,11 @@ DEPLIBS = ${NSDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
LIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
@LIBS@
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \
@LIBS@
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
SUBDIRS = unix
+29 -39
View File
@@ -52,7 +52,11 @@ options {\n\
automatic-interface-scan yes;\n\
bindkeys-file \"" NAMED_SYSCONFDIR "/bind.keys\";\n\
# blackhole {none;};\n"
#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
" cookie-algorithm aes;\n"
#else
" cookie-algorithm sha256;\n"
#endif
#ifndef WIN32
" coresize default;\n\
datasize default;\n"
@@ -87,8 +91,13 @@ options {\n\
nta-recheck 300;\n\
# pid-file \"" NAMED_LOCALSTATEDIR "/run/named/named.pid\"; \n\
port 53;\n\
prefetch 2 9;\n\
recursing-file \"named.recursing\";\n\
prefetch 2 9;\n"
#if defined(ISC_PLATFORM_CRYPTORANDOM)
" random-device none;\n"
#elif defined(PATH_RANDOMDEV)
" random-device \"" PATH_RANDOMDEV "\";\n"
#endif
" recursing-file \"named.recursing\";\n\
recursive-clients 1000;\n\
request-nsid false;\n\
reserved-sockets 512;\n\
@@ -146,7 +155,7 @@ options {\n\
clients-per-query 10;\n\
dnssec-accept-expired no;\n\
dnssec-enable yes;\n\
dnssec-validation " VALIDATION_DEFAULT "; \n"
dnssec-validation yes; \n"
#ifdef HAVE_DNSTAP
" dnstap-identity hostname;\n"
#endif
@@ -154,7 +163,10 @@ 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"
fetches-per-zone 0;\n\
filter-aaaa-on-v4 no;\n\
filter-aaaa-on-v6 no;\n\
filter-aaaa { any; };\n"
#ifdef HAVE_GEOIP
" geoip-use-ecs yes;\n"
#endif
@@ -171,8 +183,6 @@ options {\n\
max-recursion-queries 75;\n\
max-stale-ttl 604800; /* 1 week */\n\
message-compression yes;\n\
min-ncache-ttl 0; /* 0 hours */\n\
min-cache-ttl 0; /* 0 seconds */\n\
# min-roots <obsolete>;\n\
minimal-any false;\n\
minimal-responses no-auth-recursive;\n\
@@ -180,7 +190,6 @@ options {\n\
notify-source-v6 *;\n\
nsec3-test-zone no;\n\
provide-ixfr true;\n\
qname-minimization relaxed;\n\
query-source address *;\n\
query-source-v6 address *;\n\
recursion true;\n\
@@ -243,7 +252,6 @@ options {\n\
sig-signing-signatures 10;\n\
sig-signing-type 65534;\n\
sig-validity-interval 30; /* days */\n\
dnskey-sig-validity 0; /* default: sig-validity-interval */\n\
transfer-source *;\n\
transfer-source-v6 *;\n\
try-tcp-refresh yes; /* BIND 8 compat */\n\
@@ -300,21 +308,6 @@ view \"_bind\" chaos {\n\
MANAGED_KEYS
"# END MANAGED KEYS\n\
\n\
masters " DEFAULT_IANA_ROOT_ZONE_MASTERS " {\n\
2001:500:84::b; # b.root-servers.net\n\
2001:500:2f::f; # f.root-servers.net\n\
2001:7fd::1; # k.root-servers.net\n\
2620:0:2830:202::132; # xfr.cjr.dns.icann.org\n\
2620:0:2d0:202::132; # xfr.lax.dns.icann.org\n\
192.228.79.201; # b.root-servers.net\n\
192.33.4.12; # c.root-servers.net\n\
192.5.5.241; # f.root-servers.net\n\
192.112.36.4; # g.root-servers.net\n\
193.0.14.129; # k.root-servers.net\n\
192.0.47.132; # xfr.cjr.dns.icann.org\n\
192.0.32.132; # xfr.lax.dns.icann.org\n\
};\n\
";
isc_result_t
@@ -323,9 +316,9 @@ named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
isc_buffer_init(&b, defaultconf, sizeof(defaultconf) - 1);
isc_buffer_add(&b, sizeof(defaultconf) - 1);
return (cfg_parse_buffer(parser, &b, __FILE__, 0,
&cfg_type_namedconf,
CFG_PCTX_NODEPRECATED, conf));
return (cfg_parse_buffer4(parser, &b, __FILE__, 0,
&cfg_type_namedconf,
CFG_PCTX_NODEPRECATED, conf));
}
isc_result_t
@@ -438,16 +431,10 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
const char *str;
str = cfg_obj_asstring(zonetypeobj);
if (strcasecmp(str, "primary") == 0 ||
strcasecmp(str, "master") == 0)
{
if (strcasecmp(str, "master") == 0) {
ztype = dns_zone_master;
} else if (strcasecmp(str, "secondary") == 0 ||
strcasecmp(str, "slave") == 0)
{
} else if (strcasecmp(str, "slave") == 0) {
ztype = dns_zone_slave;
} else if (strcasecmp(str, "mirror") == 0) {
ztype = dns_zone_mirror;
} else if (strcasecmp(str, "stub") == 0) {
ztype = dns_zone_stub;
} else if (strcasecmp(str, "static-stub") == 0) {
@@ -570,9 +557,9 @@ named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
}
}
isc_result_t
named_config_getmastersdef(const cfg_obj_t *cctx, const char *name,
const cfg_obj_t **ret)
static isc_result_t
get_masters_def(const cfg_obj_t *cctx, const char *name,
const cfg_obj_t **ret)
{
isc_result_t result;
const cfg_obj_t *masters = NULL;
@@ -714,8 +701,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
break;
if (j < l)
continue;
tresult = named_config_getmastersdef(config, listname,
&list);
tresult = get_masters_def(config, listname, &list);
if (tresult == ISC_R_NOTFOUND) {
cfg_obj_log(addr, named_g_lctx, ISC_LOG_ERROR,
"masters \"%s\" not found", listname);
@@ -972,9 +958,11 @@ struct keyalgorithms {
unsigned int type;
uint16_t size;
} algorithms[] = {
#ifndef PK11_MD5_DISABLE
{ "hmac-md5", hmacmd5, DST_ALG_HMACMD5, 128 },
{ "hmac-md5.sig-alg.reg.int", hmacmd5, DST_ALG_HMACMD5, 0 },
{ "hmac-md5.sig-alg.reg.int.", hmacmd5, DST_ALG_HMACMD5, 0 },
#endif
{ "hmac-sha1", hmacsha1, DST_ALG_HMACSHA1, 160 },
{ "hmac-sha224", hmacsha224, DST_ALG_HMACSHA224, 224 },
{ "hmac-sha256", hmacsha256, DST_ALG_HMACSHA256, 256 },
@@ -1021,7 +1009,9 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
if (name != NULL) {
switch (algorithms[i].hmac) {
#ifndef PK11_MD5_DISABLE
case hmacmd5: *name = dns_tsig_hmacmd5_name; break;
#endif
case hmacsha1: *name = dns_tsig_hmacsha1_name; break;
case hmacsha224: *name = dns_tsig_hmacsha224_name; break;
case hmacsha256: *name = dns_tsig_hmacsha256_name; break;
-1
View File
@@ -15,7 +15,6 @@
#include <config.h>
#include <stdbool.h>
#include <isc/app.h>
#include <isc/event.h>
#include <isc/lex.h>
+9 -3
View File
@@ -23,7 +23,6 @@
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/nonce.h>
#include <isc/random.h>
#include <isc/result.h>
#include <isc/stdtime.h>
@@ -235,7 +234,11 @@ address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
isc_netaddr_fromsockaddr(&netaddr, sockaddr);
result = dns_acl_match(&netaddr, NULL, acl, env, &match, NULL);
return (result == ISC_R_SUCCESS && match > 0);
if (result != ISC_R_SUCCESS || match <= 0)
return (false);
else
return (true);
}
static isc_result_t
@@ -325,6 +328,7 @@ static void
control_recvmessage(isc_task_t *task, isc_event_t *event) {
controlconnection_t *conn = NULL;
controllistener_t *listener = NULL;
named_server_t *server = NULL;
controlkey_t *key = NULL;
isccc_sexpr_t *request = NULL;
isccc_sexpr_t *response = NULL;
@@ -346,6 +350,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
conn = event->ev_arg;
listener = conn->listener;
server = listener->controls->server;
algorithm = DST_ALG_UNKNOWN;
secret.rstart = NULL;
text = NULL;
@@ -457,7 +462,8 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
*/
if (conn->nonce == 0) {
while (conn->nonce == 0) {
isc_nonce_buf(&conn->nonce, sizeof(conn->nonce));
isc_rng_randombytes(server->sctx->rngctx, &conn->nonce,
sizeof(conn->nonce));
}
eresult = ISC_R_SUCCESS;
} else
+9 -11
View File
@@ -9,7 +9,7 @@
* information regarding copyright ownership.
*/
#include <config.h>
#include "config.h"
#include <inttypes.h>
#include <stdbool.h>
@@ -36,6 +36,10 @@
#include <unistd.h>
#include <pthread.h>
#ifndef __AFL_LOOP
#error To use American Fuzzy Lop you have to set CC to afl-clang-fast!!!
#endif
/*
* We are using pthreads directly because we might be using it with
* unthreaded version of BIND, where all thread functions are
@@ -57,6 +61,7 @@ fuzz_thread_client(void *arg) {
char *port;
struct sockaddr_in servaddr;
int sockfd;
int loop;
void *buf;
UNUSED(arg);
@@ -98,18 +103,14 @@ fuzz_thread_client(void *arg) {
* Processing fuzzed packets 100,000 times before shutting down
* the app.
*/
#ifdef __AFL_LOOP
for (int loop = 0; loop < 100000; loop++) {
#else
{
#endif
for (loop = 0; loop < 100000; loop++) {
ssize_t length;
ssize_t sent;
length = read(0, buf, 65536);
if (length <= 0) {
usleep(1000000);
goto next;
continue;
}
/*
@@ -129,7 +130,7 @@ fuzz_thread_client(void *arg) {
return (NULL);
}
raise(SIGSTOP);
goto next;
continue;
}
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
@@ -150,7 +151,6 @@ fuzz_thread_client(void *arg) {
pthread_cond_wait(&cond, &mutex);
RUNTIME_CHECK(pthread_mutex_unlock(&mutex) == 0);
next: ;
}
free(buf);
@@ -586,7 +586,6 @@ fuzz_thread_resolver(void *arg) {
named_server_flushonshutdown(named_g_server, false);
isc_app_shutdown();
#ifdef __AFL_LOOP
/*
* This is here just for the signature, that's how AFL detects
* if it's a 'persistent mode' binary. It has to occur somewhere
@@ -595,7 +594,6 @@ fuzz_thread_resolver(void *arg) {
* in persistent mode if it's present.
*/
__AFL_LOOP(0);
#endif
return (NULL);
}
-6
View File
@@ -22,8 +22,6 @@
#include <dns/types.h>
#include <dns/zone.h>
#define DEFAULT_IANA_ROOT_ZONE_MASTERS "_default_iana_root_zone_masters"
isc_result_t
named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
@@ -59,10 +57,6 @@ void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_dscp_t **dscpsp, uint32_t count);
isc_result_t
named_config_getmastersdef(const cfg_obj_t *cctx, const char *name,
const cfg_obj_t **ret);
isc_result_t
named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
isc_mem_t *mctx, dns_ipkeylist_t *ipkl);

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