Compare commits

..
Author SHA1 Message Date
Michal Nowak e6ded8ed5b Omit spurious string from unit test debugging efforts
When both 'broken' and 'failed' test cases appear in unit test output

...
===> Broken tests
lib/isc/tests/socket_test:main  ->  broken: Test case timed out  [300.022s]
===> Failed tests
lib/isc/tests/time_test:main  ->  failed: 2 of 6 tests failed  [0.006s]
===> Summary
...

spurious '===>' string gets matched, that results in the following
error:

  Usage error for command debug: '===>' is not a test case identifier (missing ':'?).

Following change makes sure the string is omitted.

I checked on FreeBSD and OpenBSD that the AWK construct is supported.
2020-01-08 15:20:26 +01:00
Ondřej Surý 3bce0c2c20 Merge branch '1525-inline-system-test-failed-need-to-wait-for-zone-to-be-loaded' into 'master'
Resolve "inline system test failed, need to wait for zone to be loaded."

Closes #1525

See merge request isc-projects/bind9!2796
2020-01-08 07:23:42 +00:00
Mark AndrewsandOndřej Surý 2dc4d72fa9 address some timing issues in inline system test 2020-01-08 08:23:03 +01:00
Ondřej Surý cd17b773b1 Merge branch '1513-inline-system-test-failed' into 'master'
Resolve "inline system test failed"

Closes #1513

See merge request isc-projects/bind9!2777
2020-01-08 07:17:47 +00:00
Mark AndrewsandOndřej Surý 13fa80ede8 Address timing issues in 'inline' system test.
"rndc signing -serial <value>" could take longer than a second to
complete.  Loop waiting for update to succeed.

For tests where "rndc signing -serial <value>" is supposed to not
succeed, repeatedly test that we don't get the new serial, then
test that we have the old value.  This should prevent false negatives.
2020-01-07 16:14:12 +01:00
Ondřej Surý e3d8732548 Merge branch '1467-xfer-test-suppress-zone-transfer-when-we-are-going-to-retry' into 'master'
Resolve "xfer test: suppress zone transfer when we are going to retry."

Closes #1467

See merge request isc-projects/bind9!2735
2020-01-07 13:56:35 +00:00
Mark AndrewsandOndřej Surý 05aa45c602 improve forensic logs
improve forensic logs by directing output to per sub-test named
files and reporting the sub-subtest number.
2020-01-07 14:23:48 +01:00
Mark AndrewsandOndřej Surý 9bd6720f58 suppress unnecessary zone transfer
suppressed unnecessary zone transfer in "test mapped zone with
out of zone data" sub-test.
2020-01-07 14:23:17 +01:00
Mark AndrewsandOndřej Surý 46982b414b Improve forensic logging in "testing basic zone transfer functionality"
Split the "testing basic zone transfer functionality" into primary and
secondary parts to improve forensic logging.
2020-01-07 14:23:08 +01:00
Matthijs Mekking 2c38dd5474 Merge branch 'copyrights-2020' into 'master'
Update copyrights 2020

See merge request isc-projects/bind9!2809
2020-01-06 17:53:09 +00:00
Matthijs Mekking 935a2ae33f Update copyrights 2020
Happy New Year!
2020-01-06 15:05:03 +01:00
Michal Nowak db9ad43294 Merge branch 'mnowak/get-the-backtraces-out-of-unit-test-coredumps' into 'master'
Gather debug info on broken unit tests

See merge request isc-projects/bind9!2699
2020-01-06 11:25:09 +00:00
Michal Nowak 6a94e6ba73 Gather debug info on broken unit tests 2020-01-06 11:25:09 +00:00
Michał Kępień fc0fe4c5a7 Merge branch 'michal/misc-doc-fixes' into 'master'
Miscellaneous documentation fixes

See merge request isc-projects/bind9!2800
2020-01-03 08:24:18 +00:00
Michał Kępień 56f388cae1 Fix minor CHANGES issues 2020-01-03 09:08:09 +01:00
Michał Kępień b2f3eaf188 Fix whitespace and punctuation in release notes 2020-01-03 09:08:09 +01:00
Michał Kępień 2d00143ab1 Prevent splitting GitLab identifiers across lines
GitLab issue and merge request numbers placed in release notes (in the
form of "#1234" for issues and "!5678" for merge requests) should not be
split across two lines.  Extend the shell pipeline generating
doc/arm/notes.txt with a sed invocation which prevents such splitting.
2020-01-03 09:08:09 +01:00
Evan Hunt 996c1d3727 Merge branch 'each-copyrights' into 'master'
update copyright year to 2020

See merge request isc-projects/bind9!2801
2020-01-03 05:53:01 +00:00
Evan Hunt 2df13f79ef update copyright year to 2020 2020-01-02 21:45:30 -08:00
Mark Andrews 993633ad96 Merge branch '1530-lib-dns-gen-c-29-26-fatal-error-isc-platform-h-no-such-file-or-directory' into 'master'
Resolve "lib/dns/gen.c:29:26: fatal error: isc/platform.h: No such file or directory"

Closes #1530

See merge request isc-projects/bind9!2792
2019-12-22 21:18:09 +00:00
Mark Andrews 848c1c8b8b remove duplicate #includes 2019-12-23 07:47:36 +11:00
Mark Andrews 7278f2529a revert d10fbdec for lib/dns/gen.c as it is a build platform executable 2019-12-23 07:37:13 +11:00
Mark Andrews 39780ae54f Merge branch '1501-summary-threadsanitizer-lock-order-inversion-potential-deadlock-in-pthread_rwlock_wrlock' into 'master'
Resolve "SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_rwlock_wrlock - zone_postload"

See merge request isc-projects/bind9!2776
2019-12-20 10:57:43 +00:00
Mark Andrews d26e125438 Refactor loop body as copy_non_dnssec_records. 2019-12-20 21:31:23 +11:00
Ondřej SurýandMark Andrews bff83b9480 Add failure handling when iterators don't end with ISC_R_NOMORE 2019-12-20 21:31:23 +11:00
Ondřej SurýandMark Andrews 6012479419 Refactor receive_secure_db to make the variables and code flow around the iterator more local 2019-12-20 21:31:23 +11:00
Mark Andrews 9d8f9cc8f2 Call dns_dbiterator_destroy earlier to prevent potential deadlock. 2019-12-20 21:31:23 +11:00
Mark Andrews dafb1eb8bb Merge branch '1523-pkcs11-destroy-s-usage-message-is-misleading' into 'master'
Resolve "pkcs11-destroy's usage message is misleading"

Closes #1523

See merge request isc-projects/bind9!2785
2019-12-20 08:56:11 +00:00
Mark Andrews 41d827893e update usage message 2019-12-20 08:28:37 +00:00
Mark Andrews 3352a38da4 Merge branch '1418-threadsanitizer-data-race-dig-c-2542-in-main' into 'master'
Resolve "ThreadSanitizer: data race dig.c:2542 in main"

Closes #1418

See merge request isc-projects/bind9!2647
2019-12-20 05:57:50 +00:00
Ondřej SurýandMark Andrews b218bf5227 Fix the concurrent access to batchname in dig.c 2019-12-20 03:43:04 +00:00
Mark Andrews f8ec2140be Merge branch 'feature/master/maxminddb-version' into 'master'
Include maxminddb and protobuf version in named -V

See merge request isc-projects/bind9!2686
2019-12-17 23:58:31 +00:00
Mark Andrews 2f2bc03b2d add CHANGES 2019-12-18 10:57:25 +11:00
Petr MenšíkandMark Andrews 85f3476894 Include protobuf-c version
Include used version of protobuf-c in version info, both link time and
runtime version is available.
2019-12-17 23:46:52 +00:00
Petr MenšíkandMark Andrews e6d7384c0d Provide GeoIP2 library version in version
Libmaxmind does not provide any version macro for link time version.
Print at least runtime version library used, if linked.
2019-12-17 23:46:52 +00:00
Mark Andrews 0b7339ac6e Merge branch '1482-autosign-system-test-failed' into 'master'
Resolve "autosign system test failed"

Closes #1461 and #1482

See merge request isc-projects/bind9!2773
2019-12-13 08:58:14 +00:00
Mark Andrews 17d25dbf47 Fix autosign system test issues.
* report when NSEC3PARAM is not yet present
* allow more time for NSEC3PARAM to become present
* adjust frequency failure message
2019-12-13 08:31:56 +00:00
Ondřej Surý c2421a1ec3 Merge branch '1414-threadsanitizer-data-race-task-c-367-in-task_shutdown-v9_14+' into 'master'
Convert task->flags to C11 atomics

Closes #1414

See merge request isc-projects/bind9!2768
2019-12-13 07:41:53 +00:00
Ondřej Surý 5746172da3 Convert task flags to C11 atomics 2019-12-13 07:10:25 +01:00
Evan Hunt de42a7aa9f Merge branch 'prep-release-v9_15_7' into 'master'
Prep 9.15.7

See merge request isc-projects/bind9!2771
2019-12-13 00:00:45 +00:00
Tinderbox User 67bac2bcd9 Merge branch 'prep-release' 2019-12-12 23:59:51 +00:00
Tinderbox User e088272172 prep 9.15.7 2019-12-12 23:59:39 +00:00
Evan Hunt a3dc02103a Merge branch '1392-initial-tcp-highwater-wrong' into 'master'
Resolve "Initial TCP high-water value is wrong"

Closes #1392

See merge request isc-projects/bind9!2610
2019-12-12 19:52:36 +00:00
Evan Hunt 8c48c4f738 CHANGES 2019-12-12 11:24:26 -08:00
Diego FronzaandEvan Hunt 114520425c Added tcp-highwater test on initial statistics verification
The initial tcp statistics test was not testing tcp-highwater counter,
but only initial number of current TCP clients, so this missing test was
added to ensure initial tcp-highwater value is correct.
2019-12-12 11:23:11 -08:00
Diego FronzaandEvan Hunt ed9853e739 Fix tcp-highwater stats updating
After the network manager rewrite, tcp-higwater stats was only being
updated when a valid DNS query was received over tcp.

It turns out tcp-quota is updated right after a tcp connection is
accepted, before any data is read, so in the event that some client
connect but don't send a valid query, it wouldn't be taken into
account to update tcp-highwater stats, that is wrong.

This commit fix tcp-highwater to update its stats whenever a tcp connection
is established, independent of what happens after (timeout/invalid
request, etc).
2019-12-12 11:23:10 -08:00
Diego FronzaandEvan Hunt ead7b3dc53 Fix tcp-highwater initial value
During BIND startup it scans for network interfaces available, in this
process it ensures that for every interface it will bind and listen to,
at least one socket will be always available accepting connections on
that interface, this way avoiding some DOS attacks that could exploit
tcp quota on some interface and make others unavailable.

In the previous network implementation this initial "reserved" tcp-quota
used by BIND was already been added to the tcp-highwater stats, but with
the new network code it was necesary to add this workaround to ensure
tcp-highwater stats reflect the tcp-quota used by BIND after startup.
2019-12-12 11:23:10 -08:00
Ondřej Surý 74082abba0 Merge branch '1497-threadsanitizer-data-race-lib-isc-unix-socket-c-1839-2-in-destroy' into 'master'
Add missing isc_refcount_destroy and lock the socket ISC_LISTS in destroy()

Closes #1497

See merge request isc-projects/bind9!2767
2019-12-12 14:14:45 +00:00
Ondřej Surý d5b6db3b09 Additionally lock accessing the ISC_LISTs in free_socket() 2019-12-12 13:08:34 +01:00
Ondřej Surý d35739d516 Add missing isc_refcount_destroy and lock the socket ISC_LISTS in destroy() 2019-12-12 12:59:39 +01:00
Mark Andrews 6f3fdf36b4 Merge branch '1486-threadsanitizer-lock-order-inversion-potential-deadlock-dns_resolver_createfetch-vs' into 'master'
Resolve "ThreadSanitizer: lock-order-inversion (potential deadlock) - dns_resolver_createfetch vs dns_resolver_shutdown"

Closes #1471 and #1486

See merge request isc-projects/bind9!2760
2019-12-12 09:04:32 +00:00
Mark Andrews 62abb6aa82 make resolver->zspill atomic to prevent potential deadlock 2019-12-12 08:26:59 +00:00
Mark Andrews a6f2d6191e Merge branch '1494-lock-order-inversion-potential-deadlock-nm_thread-vs-nm_destroy' into 'master'
Resolve "lock-order-inversion (potential deadlock) - nm_thread vs nm_destroy"

Closes #1494

See merge request isc-projects/bind9!2763
2019-12-12 08:26:24 +00:00
Mark Andrews ad12c2f3b0 address lock order inversion 2019-12-12 17:43:03 +11:00
Ondřej Surý 80c476721c Merge branch '1423-threadsanitizer-data-race-time-c-170-in-isc_time_nowplusinterval' into 'master'
Ensure all zone_settimer() calls are done on locked zone

Closes #1423

See merge request isc-projects/bind9!2738
2019-12-12 06:15:20 +00:00
Ondřej SurýandMark Andrews cf48e8eb32 Ensure all zone_settimer() calls are done on locked zone 2019-12-11 22:58:59 +00:00
Evan Hunt 8536d740f1 Merge branch 'michal/prepare-release-notes-for-bind-9.15.7' into 'master'
Prepare release notes for BIND 9.15.7

See merge request isc-projects/bind9!2753
2019-12-11 22:15:04 +00:00
Michał KępieńandEvan Hunt c428479d6d Prepare release notes for BIND 9.15.7
- Add a GitLab merge request number to the "trust-anchors" release
    note and slightly rephrase its second half.

  - Replace tabs with spaces in doc/arm/notes-9.15.7.xml to retain
    consistency with other XML files containing release notes.

  - Move the "Security Fixes" section for BIND 9.15.6 higher up, for
    consistency with release notes for other versions.
2019-12-11 22:14:22 +00:00
Ondřej Surý 448ada561d Merge branch '1119-enable-thread-sanitizer-in-the-gitlab-ci' into 'master'
Enable ThreadSanitizer enabled build and unit tests

See merge request isc-projects/bind9!2367
2019-12-11 17:03:58 +00:00
Ondřej Surý b6960da6c8 Enable ThreadSanitizer enabled build, system and unit tests 2019-12-11 17:24:05 +01:00
Michal Nowak 7ee4ff6182 Merge branch 'mnowak/fedora31' into 'master'
Update GitLab CI to Fedora 31

See merge request isc-projects/bind9!2662
2019-12-11 15:25:17 +00:00
Michal Nowak 7aa77038bd Update GitLab CI to Fedora 31
Since Fedora 31 is the current Fedora release, replace Fedora 30 GitLab
CI jobs with their up-to-date counterparts.
2019-12-11 15:25:17 +00:00
Michał Kępień 94bddd2ce3 Merge branch 'michal/update-release-checklist' into 'master'
Update release checklist

See merge request isc-projects/bind9!2751
2019-12-11 14:47:55 +00:00
Michał Kępień e792d01e00 Update release checklist
Apply tweaks necessary to make the release checklist consistent with the
security incident handling checklist.
2019-12-11 15:45:22 +01:00
Michał Kępień 53858d4afd Merge branch 'michal/fix-release-notes-for-bind-9.15.6' into 'master'
Fix release notes for BIND 9.15.6

See merge request isc-projects/bind9!2607
2019-12-11 12:12:13 +00:00
Michał Kępień 88497a59cc Fix release notes for BIND 9.15.6
- Add a missing release note for TCP high-water.  That feature was not
    yet merged when the initial version of !2524 was prepared and its
    release note was missed when that merge request was later rebased.

  - Rephrase the release note for CVE-2019-6477 so that it uses the same
    text as its corresponding notes in all other releases.

  - Unify whitespace in doc/arm/notes-9.15.6.xml.
2019-12-11 13:11:22 +01:00
Michał Kępień b0f7351820 Merge branch 'michal/create-release-tarballs-in-gitlab-ci' into 'master'
Create release tarballs in GitLab CI

See merge request isc-projects/bind9!2745
2019-12-11 11:04:45 +00:00
Michał Kępień 922a2ae44a Drop Jenkins mentions from release issue template
Update the release issue template to account for the fact that Jenkins
is no longer needed for creating BIND release tarballs.
2019-12-11 12:04:29 +01:00
Michał Kępień 5a4a6b5e91 Add a job creating a release tarball to GitLab CI
Add a GitLab CI job (which is run only if all other jobs in a pipeline
succeed) that builds a BIND release tarball, i.e. fetches the source
tarball from the tarball building job, creates Windows zips, puts
certain parts of BIND documentation into the appropriate places, and
packs it all up into a single tarball whose contents can be subsequently
signed and published.
2019-12-11 12:04:29 +01:00
Michał Kępień 2b1c8c54d1 Add a Windows debug system test job to GitLab CI
Add a system test job for binaries created by Visual Studio in the
"Debug" build configuration to GitLab CI so that they can be tested
along their "Release" counterparts when necessary.
2019-12-11 12:04:29 +01:00
Michał Kępień 12564928a7 Add a Windows debug build job to GitLab CI
Add a Visual Studio build job using the "Debug" build configuration to
GitLab CI without enabling it for every pipeline as it takes about twice
as long to complete as its "Release" counterpart.
2019-12-11 12:04:29 +01:00
Michał Kępień 8d56749046 Create and test BIND source tarballs in GitLab CI
Add a set of jobs to GitLab CI that create a BIND source tarball and
then build and test its contents.  Run those extra jobs only when a tag
is pushed to the Git repository as they are only meant to be sanity
checks of BIND source tarball contents.
2019-12-11 12:04:29 +01:00
Michał Kępień c0be772ebc Include prepare-softhsm2.sh in source tarballs
The util/prepare-softhsm2.sh script is useful for initializing a working
SoftHSM environment which can be used by unit tests and system tests.
However, since it is a test-specific script, it does not really belong
in the util/ subdirectory which is mostly pruned during the BIND source
tarball creation process.  Move the prepare-softhsm2.sh script to
bin/tests/ so that its location is more appropriate for its purpose and
also so that it does not get removed during the BIND source tarball
creation process, allowing it to be used for setting up test
environments for tarball-based builds.
2019-12-11 12:04:29 +01:00
Michał Kępień 925ecb0aae List paths which should be excluded from tarballs
Convert the logic (currently present in the form of "rm -rf" calls in
util/kit.sh) for removing files and directories which are tracked by Git
but redundant in release tarballs into a set of .gitattributes rules
which allow the same effect to be achieved using "git archive".
2019-12-11 12:04:29 +01:00
Michał Kępień eee162257c Merge branch 'michal/fix-the-forward-system-test-on-windows' into 'master'
Fix the "forward" system test on Windows

See merge request isc-projects/bind9!2750
2019-12-11 09:37:35 +00:00
Michał Kępień 075613aea4 Fix the "forward" system test on Windows
Make sure carriage return characters are stripped from sed input to
enable the "forward" system test to pass on Windows.
2019-12-11 09:44:20 +01:00
Mark Andrews 48ece3bb9d Merge branch '1479-_wait_for_rcode-adds-extraneous-query' into 'master'
Resolve "_wait_for_rcode adds extraneous query"

Closes #1479

See merge request isc-projects/bind9!2747
2019-12-11 00:25:07 +00:00
Mark Andrews 0ee0580fc9 consume all arguments we have processed in shift 2019-12-11 00:01:08 +00:00
Mark Andrews 37fe7c5269 Merge branch '1411-threadsanitizer-data-race-resolver-c-2153-in-fctx_query' into 'master'
Resolve "ThreadSanitizer: data race resolver.c:2153 in fctx_query"

Closes #1411

See merge request isc-projects/bind9!2675
2019-12-10 23:53:13 +00:00
Mark Andrews 13aaeaa06f Note bucket lock requirements and move REQUIRE inside locked section. 2019-12-10 22:16:15 +00:00
Mark Andrews 5589748eca lock access to fctx->nqueries 2019-12-10 22:16:15 +00:00
Ondřej Surý 03ed64c251 Merge branch '1473-threadsanitizer-data-race-home-ondrej-projects-bind9-lib-isc-netmgr-netmgr-c-1027-in' into 'master'
Resolve "ThreadSanitizer: data race /home/ondrej/Projects/bind9/lib/isc/netmgr/netmgr.c:1027 in nmhandle_free"

Closes #1473

See merge request isc-projects/bind9!2739
2019-12-10 13:00:17 +00:00
Ondřej Surý 1fa0deb4ea Add isc_refcount_destroy() call to nm_handle_free() 2019-12-10 13:43:18 +01:00
Ondřej Surý 71fe7d3c25 Add isc_refcount_destroy() call to nm_destroy() 2019-12-10 13:43:18 +01:00
Ondřej Surý 3248de7785 Correct the DbC check order in isc__nm_async_tcpchildstop() 2019-12-10 13:43:18 +01:00
Mark Andrews 977f334648 Merge branch '1441-threadsanitizer-lock-order-inversion-potential-deadlock-usr-lib-x86_64-linux-gnu-libtsan-so-0' into 'master'
Resolve "ThreadSanitizer: lock-order-inversion (potential deadlock) (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x2cf99) in pthread_rwlock_rdlock"

Closes #1441

See merge request isc-projects/bind9!2734
2019-12-10 12:35:20 +00:00
Mark Andrews fd52417f71 address deadlock introduced in cd2469d3cd 2019-12-10 12:08:57 +00:00
Michał Kępień ac564683cf Merge branch '1465-fix-idna-system-test' into 'master'
Fix the "idna" system test

See merge request isc-projects/bind9!2740
2019-12-10 10:57:02 +00:00
Michał Kępień 2ee7ff23ce Only use LC_ALL=C where intended
The LC_ALL=C assignments in the "idna" system test, which were only
meant to affect a certain subset of checks, in fact persist throughout
all the subsequent checks in that system test.  That affects the test's
behavior and is misleading.

When the "VARIABLE=value command ..." syntax is used in a shell script,
in order for the variable assignment to only apply to "command", the
latter must be an external binary; otherwise, the VARIABLE=value
assignment persists for all subsequent commands in a script:

    $ cat foo.sh
    #!/bin/sh

    foo() {
        /bin/sh bar.sh
    }

    BAR="baz0"
    BAR="baz1" /bin/sh bar.sh
    echo "foo: BAR=${BAR}"
    BAR="baz2" foo
    echo "foo: BAR=${BAR}"

    $ cat bar.sh
    #!/bin/sh

    echo "bar: BAR=${BAR}"

    $ /bin/sh foo.sh
    bar: BAR=baz1
    foo: BAR=baz0
    bar: BAR=baz2
    foo: BAR=baz2
    $

Fix by saving the value of LC_ALL before the relevant set of checks in
the "idna" system test, restoring it afterwards, and dropping the
"LC_ALL=C command ..." syntax.
2019-12-10 10:56:19 +01:00
Ondřej Surý dbbfcdc1f7 Merge branch 'ondrej/run-full-pipeline-on-schedule' into 'master'
Run all jobs on scheduled builds (including OpenBSD and Windows)

See merge request isc-projects/bind9!2736
2019-12-10 09:30:26 +00:00
Ondřej Surý 52773e226a Run all jobs on scheduled builds (including OpenBSD and Windows) 2019-12-10 09:29:12 +00:00
Witold Krecicki ec80c7b576 Merge branch '1469-lock-order-inversion-tcp-listening' into 'master'
Fix a potential lock-order-inversion in tcp listening code

Closes #1469

See merge request isc-projects/bind9!2737
2019-12-10 09:21:03 +00:00
Witold Kręcicki ccd44b69e5 Fix a potential lock-order-inversion in tcp listening code 2019-12-10 10:05:15 +01:00
Witold Krecicki 01481dee1c Merge branch 'wpk/tcp-multithreaded' into 'master'
netmgr: make tcp listening multithreaded.

See merge request isc-projects/bind9!2659
2019-12-09 21:20:40 +00:00
Witold Kręcicki 83e54f906d CHANGES entry 2019-12-09 21:44:04 +01:00
Evan HuntandWitold Kręcicki 31b3980ef0 shorten some names
reduce line breaks and general unwieldiness by changing some
function, type, and parameter names.
2019-12-09 21:44:04 +01:00
Evan HuntandWitold Kręcicki 8c0792723d style nits 2019-12-09 21:44:04 +01:00
Witold Kręcicki 35679aef9b unittest: Allow for 32 (not 16) mock nmhandles in ns tests 2019-12-09 21:44:04 +01:00
Witold Kręcicki a34ced776e Remove read callback before detaching from inner socket in tcpdns 2019-12-09 21:44:04 +01:00
Witold Kręcicki 86a847314a Fix a race in socket destruction - we need to remove handle from socket in async close callback or we might race between destruction in the callback and in the original nmhandle_unref 2019-12-09 21:44:04 +01:00
Witold Kręcicki b804d3a395 always return true in ns_interfacemgr_listeningon if interfacemgr is shutting down
to avoid deadlocks on shutdown.
2019-12-09 21:44:04 +01:00
Witold Kręcicki b0779cc429 netmgr: Add more DbC checks for asynchronous calls. 2019-12-09 21:44:04 +01:00
Witold Kręcicki ef2dff5c7a pause and unpause netmgr in isc_nm_destroy to flush all events from worker queues 2019-12-09 21:44:04 +01:00
Evan HuntandWitold Kręcicki c7b86d1cac Style fixes 2019-12-09 21:44:03 +01:00
Witold Kręcicki 3e66b7ba1c Fix a race in tcpdns close with uv_close on timer
stop timers before closing

netmgr: tcpdns_close needs to be asynchronous, it manipulates sock->timer
2019-12-09 21:43:45 +01:00
Witold Kręcicki 23ab349bbd netmgr: fix a race in socket destruction, happening if we close the socket
externally and, at the same time, a timeout timer callback was called.
2019-12-09 21:43:45 +01:00
Witold Kręcicki 0bf74ac792 netmgr:
- make tcp listening IPC pipe name saner
 - put the pipe in /tmp on unices
 - add pid to the pipe name to avoid conflicts between processes
 - fsync directory in which the pipe resides to make sure that the
   child threads will see it and be able to open it
2019-12-09 21:43:45 +01:00
Evan Hunt b05194160b style, comments 2019-12-09 11:15:27 -08:00
Witold KręcickiandEvan Hunt 8c5aaacbef - Add separate priority event queue for events that must be processed
even when worker is paused (e.g. interface reconfiguration). This is
  needed to prevent deadlocks when reconfiguring interfaces - as network
  manager is paused then, but we still need to stop/start listening.

- Proper handling of TCP listen errors in netmgr - bind to the socket first,
  then return the error code.
2019-12-09 11:15:27 -08:00
Witold KręcickiandEvan Hunt 5a65ec0aff Add uv_handle_{get,set}_data functions that's absent in pre-1.19 libuv to make code clearer.
This might be removed when we stop supporting older libuv versions.
2019-12-09 11:15:27 -08:00
Witold KręcickiandEvan Hunt bc5aae1579 netmgr: make tcp listening multithreaded.
When listening for TCP connections we create a socket, bind it
and then pass it over IPC to all threads - which then listen on
in and accept connections. This sounds broken, but it's the
official way of dealing with multithreaded TCP listeners in libuv,
and works on all platforms supported by libuv.
2019-12-09 11:15:27 -08:00
Ondřej Surý 09c2dbffb5 Merge branch '1443-threadsanitizer-data-race-lib-dns-rbtdb-c-1960-in-decrement_reference-2' into 'master'
Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1960 in decrement_reference"

Closes #1443

See merge request isc-projects/bind9!2703
2019-12-09 18:48:35 +00:00
Mark AndrewsandOndřej Surý c6efc0e50f Add is_leaf and send_to_prune_tree.
Add is_leaf and send_to_prune_tree to make the logic easier
to understand in cleanup_dead_nodes and decrement_reference.
2019-12-09 17:43:54 +00:00
Mark AndrewsandOndřej Surý 176b23b6cd Testing node->down requires the tree lock to be held.
In decrement_reference only test node->down if the tree lock
is held.  As node->down is not always tested in
decrement_reference we need to test that it is non NULL in
cleanup_dead_nodes prior to removing the node from the rbt
tree.  Additionally it is not always possible to aquire the
node lock and reactivate a node when adding parent nodes.
Reactivate such nodes in cleanup_dead_nodes if required.
2019-12-09 17:43:54 +00:00
Ondřej Surý 23e29b17db Merge branch '1453-the-zero-system-test-timeouts-intermittently' into 'master'
Bail-out early if dig fails to finish successfully or takes too long

Closes #1453

See merge request isc-projects/bind9!2712
2019-12-09 17:41:25 +00:00
Ondřej Surý eb8007a5ba Merge branch '1458-intermittent-failure-in-the-forward-system-test' into 'master'
Resolve "Intermittent failure in the forward system test"

Closes #1458

See merge request isc-projects/bind9!2716
2019-12-09 17:15:53 +00:00
Ondřej SurýandOndřej Surý 2a65a47f39 Bail-out early if dig fails to finish successfully or takes too long
Before, the zero system test could get stuck almost infinitely, because
the first test sends > 300 queries with 5 seconds timeout on each in
each pass.  If named crashed early, it would took the test more than 4
hours to properly timeout.

This commit introduces a "watchdog" on the dig commands running in the
background and failing the test on timeout, failing any test if any dig
command fails to return successfully, and making the tests.sh script
shellcheck clean.
2019-12-09 18:15:18 +01:00
Ondřej Surý fb03edacd8 Wait for named to forward the question before testing the validity 2019-12-09 17:30:37 +01:00
Ondřej Surý 0e15cbb092 Make forward system test shellcheck clean 2019-12-09 17:30:37 +01:00
Ondřej Surý 10f4cd066f Use $n to keep diagnostic output of every individual test separate 2019-12-09 17:30:37 +01:00
Ondřej Surý 64df488e1e Add the standard $n to each test 2019-12-09 17:30:37 +01:00
Ondřej Surý 12578b9e96 Merge branch '1425-intermittent-failure-in-the-addzone-system-test' into 'master'
Resolve "Intermittent failure in the addzone system test"

Closes #1425

See merge request isc-projects/bind9!2714
2019-12-09 16:27:31 +00:00
Witold KręcickiandOndřej Surý 8885fd6966 tests: addzone: retry when checking for things, to allow for timing problems 2019-12-09 16:02:03 +00:00
Mark AndrewsandOndřej Surý 9e8cd3ccc5 loop waiting for the redirect zone to load 2019-12-09 16:02:03 +00:00
Matthijs Mekking 6ff780db5b Merge branch '1466-kasp-test-keyid-0' into 'master'
Fix get key id from key_idpad

Closes #1466

See merge request isc-projects/bind9!2731
2019-12-09 14:42:08 +00:00
Matthijs Mekking 2e7cb4978f Fix get key id from key_idpad
The kasp system test has a call to sed to retrieve the key identifier
without leading zeros.  The sed call could not handle key id 0.
Update the kasp test to also correctly deal with this case.
2019-12-09 14:54:04 +01:00
Matthijs Mekking 910a7a56bc Merge branch '1457-intermittent-failure-autosign' into 'master'
Resolve "Intermittent failure in the autosign system test"

Closes #1457

See merge request isc-projects/bind9!2729
2019-12-09 13:29:36 +00:00
Matthijs Mekking bd4035900a Better error handling in autosign system test 2019-12-09 13:38:54 +01:00
Matthijs Mekking 2e4273b55a Fix race in autosign test
The autosign test has a test case where a DNSSEC maintaiend zone
has a set of DNSSEC keys without any timing metadata set.  It
tests if named picks up the key for publication and signing if a
delayed dnssec-settime/loadkeys event has occured.

The test failed intermittently despite the fact it sleeps for 5
seconds but the triggered key reconfigure action should happen after
3 seconds.

However, the test output showed that the test query came in before
the key reconfigure action was complete (see excerpts below).

The loadkeys command is received:

15:38:36 received control channel command 'loadkeys delay.example.'

The reconfiguring zone keys action is triggered after 3 seconds:

15:38:39 zone delay.example/IN: reconfiguring zone keys
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7484 (ZSK) is now published
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7455 (KSK) is now published
15:38:39 writing to journal

Two seconds later the test query comes in:

15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: query
15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: endrequest

And 6 more seconds later the reconfigure keys action is complete:

15:38:47 zone delay.example/IN: next key event: 05-Dec-2019 15:48:39

This commit fixes the test by checking the "next key event" log has
been seen before executing the test query, making sure that the
reconfigure keys action has been complete.

This commit however does not fix, nor explain why it took such a long
time (8 seconds) to reconfigure the keys.
2019-12-09 13:38:54 +01:00
Matthijs Mekking cfaa631f65 Move wait_for_log to conf.sh.common 2019-12-09 13:38:54 +01:00
Matthijs Mekking 6b4a17ef7c Save settime output 2019-12-09 13:38:54 +01:00
Matthijs Mekking edd6a084f0 Merge branch 'misc-fixes-kasp' into 'master'
Miscellaneous fixes kasp

See merge request isc-projects/bind9!2711
2019-12-09 08:22:56 +00:00
Matthijs Mekking 4b66c0ebf4 Change some dnssec-policy defaults
Suggested by Tony Finch, these seem to be more reasonable defaults.
2019-12-09 07:25:20 +00:00
Matthijs Mekking 0f9d45a5b8 Default key size 2048
The default size for RSA keys is 2048 bits, for both ZSKs and KSKs.
2019-12-09 07:25:20 +00:00
Matthijs Mekking a339a6df48 Update docs with durations, built-in dnssec-policy
Clarify in the ARM that TTL-style options can also now take ISO
8601 durations.

Mention the built-in dnssec policies "default" and "none".  Mention
that "none" is the default.

Add a file documenting the default dnssec-policy configuration options.

Fix dnssec-policy syntax in ARM (dnssec-policy.grammar.xml).
2019-12-09 07:25:20 +00:00
Ondřej Surý 6f096f5245 Merge branch 'ondrej/remove-too-generic-node_count-macro-from-dns_acl' into 'master'
Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace

See merge request isc-projects/bind9!2725
2019-12-09 06:49:00 +00:00
Ondřej Surý 8120088ec7 Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace 2019-12-06 15:47:39 +01:00
Mark Andrews fe31fedc31 Merge branch '1401-intermittent-failures-in-the-catz-system-test' into 'master'
Debug "Intermittent failures in the catz system test"

See merge request isc-projects/bind9!2715
2019-12-06 14:16:03 +00:00
Mark Andrews 4dd9ec8919 Increase wait_for_message attempts to 20. 2019-12-06 13:40:46 +00:00
Mark Andrews 1334daaec0 save wait_for_message contents 2019-12-06 13:40:46 +00:00
Michał Kępień dd6f9391c3 Merge branch '1452-system-test-framework-cleanup-tweaks' into 'master'
System test framework: cleanup tweaks

Closes #1452

See merge request isc-projects/bind9!2717
2019-12-06 13:32:07 +00:00
Michał Kępień 34fb70b17c Merge branch '1452-detect-missing-system-test-results' into 'master'
Detect missing system test results

See merge request isc-projects/bind9!2708
2019-12-06 13:24:26 +00:00
Michał Kępień d8905b7a9c Automatically run clean.sh from run.sh
The first step in all existing setup.sh scripts is to call clean.sh.  To
reduce code duplication and ensure all system tests added in the future
behave consistently with existing ones, invoke clean.sh from run.sh
before calling setup.sh.
2019-12-06 14:11:01 +01:00
Michał Kępień 3c3085be3c Detect missing system test results
At the end of each system test suite run, the system test framework
collects all existing test.output files from system test subdirectories
and produces bin/tests/system/systests.output from those files.
However, it does not check whether a test.output file was found for
every executed test.  Thus, if the test.output file is accidentally
deleted by the system test itself (e.g. due to an overly broad file
removal wildcard present in clean.sh), its output will not be included
in bin/tests/system/systests.output.  Since the result of each system
test suite run is determined by bin/tests/system/testsummary.sh, which
only operates on the contents of bin/tests/system/systests.output, this
can lead to test failures being ignored.  Fix by ensuring the number of
test results found in bin/tests/system/systests.output is equal to the
number of tests run and triggering a system test suite failure in case
of a discrepancy between these two values.
2019-12-06 14:11:01 +01:00
Michał Kępień bf3eeac067 Remove bin/tests/system/clean.sh
Since the role of the bin/tests/system/clean.sh script has now been
reduced to calling a given system test's clean.sh script, remove the
former altogether and replace its only use with a direct invocation of
the latter.
2019-12-06 14:11:01 +01:00
Michał Kępień b4d37878f6 Remove the -r switch from system test scripts
Since files containing system test output are no longer stored in test
subdirectories, bin/tests/system/clean.sh no longer needs to take care
of removing the test.output file for a given test as testsummary.sh
already takes care of that and even if a test suite terminates
abnormally and another one is started, tee invoked without the -a
command line switch overwrites the destination file if it exists, so
leftover test.output.* files from previous test suite runs are not a
concern.  Remove the -r command line switch and the code associated with
it from the relevant scripts.
2019-12-06 14:11:01 +01:00
Michał Kępień b0916bba41 Store system test output in bin/tests/system/
Some clean.sh scripts contain overly broad file deletion wildcards which
cause the test.output file (used by the system test framework for
collecting output) in a given system test's directory to be erroneously
removed immediately after the test is started (due to setup.sh scripts
calling clean.sh at the beginning).  This prevents the test's output
from being placed in bin/tests/system/systests.output at the end of a
test suite run and thus can lead to test failures being ignored.  Fix by
storing each test's output in a test.output.<test-name> file in
bin/tests/system/, which prevents clean.sh scripts from removing it (as
they should only ever affect files contained in a given system test's
directory).
2019-12-06 14:11:01 +01:00
Matthijs Mekking 26ee43da1b Merge branch '1460-duration-ttlval-print-bug' into 'master'
Resolve "checkconf test failure on Solaris"

Closes #1460

See merge request isc-projects/bind9!2718
2019-12-06 13:03:14 +00:00
Ondřej SurýandMatthijs Mekking 9dfa33050b Add semantic patch to find void f() { ... return ((void)g())); ... }
When a function returns void, it can be used as an argument to return in
function returning also void, e.g.:

void in(void) {
  return;
}

void out(void) {
  return (in());
}

while this is legal, it should be rewritten as:

void out(void) {
  in();
  return;
}

The semantic patch just find the occurrences, and they need to be fixed
by hand.
2019-12-06 13:42:18 +01:00
Matthijs Mekking 60fa5fc760 Fix duration printing on Solaris 2019-12-06 13:12:06 +01:00
Matthijs Mekking 8fd8404e16 Replace two leftover ttlval with duration
Since the introduction of durations, all ttlval configuration types
are replaced with durations.  Duration is an ISO 8601 duration, a
TTL-style value, or a number.  These two references were missed and
are now also replaced.
2019-12-06 12:28:40 +01:00
Matthijs Mekking 4597ebc91b Merge branch 'trust-anchors-minor-fixes' into 'master'
Minor fixes in trust anchor code

See merge request isc-projects/bind9!2676
2019-12-06 08:12:55 +00:00
Matthijs Mekking eddac8575d Minor fixes in trust anchor code
This commit makes some minor changes to the trust anchor code:

1. Replace the undescriptive n1, n2 and n3 identifiers with slightly
   better rdata1, rdata2, and rdata3.
2. Fix an occurrence where in the error log message a static number
   32 was printed, rather than the rdata3 length.
3. Add a default case to the switch statement checking DS digest
   algorithms to catch unknown algorithms.
2019-12-06 07:12:24 +00:00
Mark Andrews 564707023c Merge branch '1455-job-failed-453300' into 'master'
Resolve "Job Failed #453300"

Closes #1455

See merge request isc-projects/bind9!2706
2019-12-05 22:05:24 +00:00
Mark Andrews e4b1d0b686 loop waiting for the redirect zone to load 2019-12-05 21:31:32 +00:00
Ondřej Surý 3fb215c952 Merge branch '1427-intermittent-failure-in-fetchlimit-system-test' into 'master'
Test for the hard fetchlimit instead of soft fetchlimit

Closes #1427

See merge request isc-projects/bind9!2705
2019-12-05 15:55:24 +00:00
Ondřej Surý c35a4e05fa Test for the hard fetchlimit instead of soft fetchlimit
Previously, the fetchlimit tested the recursive-clients soft limit
that's defined as 90% of the hard limit (the actual configured value).
This worked previously because the reaping of the oldest recursive
client was put on the same event queue as the current TCP client, thus
the cleaning has happened before the new TCP client established a new
connection.

With the change in BIND 9.14 that added a multiple event queues the
cleaning of the oldests clients is no longer synchronous and could
happen stochastically making the soft limit testing fail often.  The
situation became even worse with the new networking manager, thus we
change the system test to fail only if the hard limit bound is not
honored.

Changing the accounting of the already reaped TCP clients so the soft
limit testing is possible again is out of the scope for this change.
2019-12-05 16:33:12 +01:00
Ondřej Surý a07f9b71e9 Merge branch '1407-intermittent-failure-in-the-mkeys-system-test' into 'master'
Improve the error handling in mkeys test and use retry_quiet()

Closes #1407

See merge request isc-projects/bind9!2704
2019-12-05 14:24:29 +00:00
Ondřej Surý b0ad689e16 Wait for 'all zones loaded' message instead of zoneless 'loaded serial' message 2019-12-05 15:22:28 +01:00
Ondřej Surý 3b63c51a64 Save all rndc diagnostic output 2019-12-05 15:22:28 +01:00
Ondřej Surý 4ff25c06c1 Make mkeys system test shellcheck clean and run under set -e 2019-12-05 15:22:28 +01:00
Ondřej Surý f239d67c1a Improve the error handling in mkeys test and use retry_quiet() 2019-12-05 15:22:28 +01:00
Matthijs Mekking ec80d61ab0 Merge branch 'dnssec-keys-rename-to-trust-anchors' into 'master'
Rename 'dnssec-keys' to 'trust-anchors'

See merge request isc-projects/bind9!2702
2019-12-05 13:57:11 +00:00
Matthijs Mekking 8c37d3d320 Rename 'dnssec-keys' to 'trust-anchors' 2019-12-05 12:19:17 +01:00
Diego dos Santos Fronza e2129fb103 Merge branch '1410-intermittent-failure-in-the-resolver-test' into 'master'
Resolve "Intermittent failure in the resolver test"

Closes #1410

See merge request isc-projects/bind9!2671
2019-12-04 22:58:21 +00:00
Diego Fronza 994fc2e822 Improved prefetch disabled test code
Using retry_quiet to test that prefetch is disabled instead of a
standard loop with sleep 1 between each iteration.
2019-12-04 19:29:55 -03:00
Diego Fronza a711d6f8c0 Fix resolver tests: prefetch 40/41
These two tests were failing basically because in order for prefetching to
happen, the TTL for a given DNS record must be greater than or equal to
the prefetch config value + 9.

The previous TTL for both records was 10, while prefetch value in
configuration was 3, thus making only records with TTL >= 12 elligible
for prefetching.

TTL value for both records was adjusted to the value 13, and prefetch
value was set to 4 (inc by 1), so records with TTL (4 + 9) >= 13 are
elligible for prefetching.

Adjusting prefetch value to 4 gives the test 1 second more to avoid time
problems when sharing resources on a heavy loaded PC.

Also prefetch value in settings is now read by the script and used
by it to corrrectly calculate the amount of time needed to delay before
sending a request to trigger prefetch, adding a bit of flexibility to
fine tune the test in the future.
2019-12-04 19:29:55 -03:00
Diego Fronza dd524cc893 Fix resolver test: prefetch disabled
The previous test had two problems:
1. It wasn't written specifically for testing what it was supposed to:
prefetch disabled.
2. It could fail in some circunstances if the computer's load is too
high, due to sleeps not taking parallel tests and cpu load into account.

The new test is testing prefetch disabled as follows:
1. It asks for a txt record for a given domain and takes note of the
record's TTL (which is 10).
2. It sleeps for (TTL - 5) = 5 seconds, having a window of 5 seconds to
issue new queries before the record expires from cache.
3. Three(3) queries are executed in a row, with a interval of 1 second
between them, and for each query we verify that the TTL in response is
less than the previous one, thus ensuring that prefetch is disabled (if
it were enabled this record would have been refreshed already and TTL
would be >= the first TTL).

Having a window of 5 seconds to perform 3 queries with a interval of 1
second between them gives the test a reasonable amount of time
to not suffer from a machine with heavy load.
2019-12-04 19:29:54 -03:00
Ondřej Surý da94ed13b8 Merge branch '1444-deprecate-isc_thread_key-API' into 'master'
Use native compiler Thread Local Storage instead of isc_thread_key API

Closes #1444

See merge request isc-projects/bind9!2680
2019-12-04 22:07:54 +00:00
Ondřej Surý 04e901a86c Add CHANGES 2019-12-04 22:25:57 +01:00
Ondřej Surý c62748c9e3 Update PLATFORMS.md to explicitly list Thread Local Storage as requirement for BIND 9 2019-12-04 14:17:19 +01:00
Ondřej Surý b1a7ec7481 Remove isc_thread_key API in favor of ISC_THREAD_LOCAL variables
For BIND 9.16+, TLS aware compiler is required, and using
ISC_THREAD_LOCAL is preferred way of using Thread Local Storage.  The
isc_thread_key API is no longer used anywhere and hence was removed from
BIND 9.
2019-12-04 14:17:19 +01:00
Ondřej Surý 5d43b7126c Refactor the irs_context API to use ISC_THREAD_LOCAL
Previously, the irs_context API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.
2019-12-04 14:17:19 +01:00
Ondřej Surý a4ffb64073 Refactor the dns_geoip API to use ISC_THREAD_LOCAL
Previously, the dns_geoip API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables, and
creating the local memory context was moved to named and stored in the
named_g_geoip global context.
2019-12-04 14:17:19 +01:00
Ondřej SurýandOndřej Surý 4a3d589403 Refactor the dns_dt API to use ISC_THREAD_LOCAL
Previously, the dns_dt API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.
2019-12-03 16:27:30 +01:00
Ondřej SurýandOndřej Surý 1a66aabd22 Refactor the dns_name API to use ISC_THREAD_LOCAL
Previously, the dns_name API used isc_thread_key API for TLS, which is
fairly complicated and requires initialization of memory contexts, etc.
This part of code was refactored to use a ISC_THREAD_LOCAL pointer which
greatly simplifies the whole code related to storing TLS variables.
2019-12-03 16:27:24 +01:00
Ondřej SurýandOndřej Surý 01731d4b1b Add and use ISC_THREAD_LOCAL macro
The new ISC_THREAD_LOCAL macro unifies usage of platform dependent
Thread Local Storage definition thread_local vs __thread vs
__declspec(thread) to a single macro.

The commit also unifies the required level of support for TLS as for
some parts of the code it was mandatory and for some parts of the code
it wasn't.
2019-12-03 16:27:24 +01:00
Mark Andrews 96475e7eb4 Merge branch '1434-explicitly-set-python-to-a-empty-string-with-without-python' into 'master'
Resolve "explicitly set PYTHON to a empty string with --without-python"

Closes #1434

See merge request isc-projects/bind9!2672
2019-12-03 12:48:42 +00:00
Mark Andrews eed2aabc40 add AC_ARG_VAR([PYTHON], [path to python executable]) 2019-12-03 23:42:08 +11:00
Mark Andrews 8cd3cf90b2 add CHANGES 2019-12-03 23:42:08 +11:00
Mark Andrews d8fc544569 unset PYTHON on --without-python to prevent python still being used 2019-12-03 23:41:28 +11:00
Mark Andrews e4fcbba86e Merge branch '1419-threadsanitizer-data-race-rbtdb-c-7568-in-issecure' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:7568 in issecure"

Closes #1419

See merge request isc-projects/bind9!2656
2019-12-03 01:14:27 +00:00
Mark Andrews cd2469d3cd r/w of rbtdb->current_version requires that rbtdb->lock be held 2019-12-02 23:48:41 +00:00
Mark Andrews e121c3e179 Merge branch '1412-threadsanitizer-data-race-resolver-c-7030-in-fctx_decreference-2' into 'master'
Resolve "ThreadSanitizer: data race resolver.c:7030 in fctx_decreference"

Closes #1412

See merge request isc-projects/bind9!2673
2019-12-02 23:46:16 +00:00
Mark Andrews 912ce87479 Make fctx->attributes atomic.
FCTX_ATTR_SHUTTINGDOWN needs to be set and tested while holding the node
lock but the rest of the attributes don't as they are task locked. Making
fctx->attributes atomic allows both behaviours without races.
2019-12-03 08:58:53 +11:00
Michał Kępień 29c83f5922 Merge branch 'michal/address-asan-memory-leak-reports' into 'master'
Address ASAN memory leak reports

See merge request isc-projects/bind9!2679
2019-12-02 15:07:45 +00:00
Michał Kępień 6ee04f8458 Do not define ASAN_OPTIONS at build time
Disabling ASAN memory leak detection for a build job is pointless
because ASAN is only used in test jobs.  (Also, memory leak detection
should not be disabled globally - explicit suppressions should be used
in case of issues with external code.)
2019-12-02 16:03:23 +01:00
Michał Kępień b425b5d56e Move xmlInitThreads()/xmlCleanupThreads() calls
xmlInitThreads() and xmlCleanupThreads() are called from within
named_statschannels_configure() and named_statschannels_shutdown(),
respectively.  Both of these functions are executed by worker threads,
not the main named thread.  This causes ASAN to report memory leaks like
the following one upon shutdown (as long as named is asked to produce
any XML output over its configured statistics channels during its
lifetime):

    Direct leak of 968 byte(s) in 1 object(s) allocated from:
        #0 0x7f677c249cd8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
        #1 0x7f677bc1838f in xmlGetGlobalState (/usr/lib/libxml2.so.2+0xa838f)

The data mentioned in the above report is a libxml2 state structure
stored as thread-specific data.  Such chunks of memory are automatically
released (by a destructor passed to pthread_key_create() by libxml2)
whenever a thread that allocated a given chunk exits.  However, if
xmlCleanupThreads() is called by a given thread before it exits, the
destructor will not be invoked (due to xmlCleanupThreads() calling
pthread_key_delete()) and ASAN will report a memory leak.  Thus,
xmlInitThreads() and xmlCleanupThreads() must not be called from worker
threads.  Since xmlInitThreads() must be called on Windows in order for
libxml2 to work at all, move xmlInitThreads() and xmlCleanupThreads()
calls to the main named thread (which does not produce any XML output
itself) in order to prevent the memory leak from being reported by ASAN.
2019-12-02 16:03:23 +01:00
Michał Kępień 3f96af1ae6 Merge branch '1445-fix-geoip2-memory-leak-upon-reconfiguration' into 'master'
Fix GeoIP2 memory leak upon reconfiguration

Closes #1445

See merge request isc-projects/bind9!2678
2019-12-02 14:54:42 +00:00
Michał Kępień 628b1837d2 Add CHANGES entry
5329.	[bug]		Reconfiguring named caused memory to be leaked when any
			GeoIP2 database was in use. [GL #1445]
2019-12-02 15:15:06 +01:00
Michał Kępień 670afbe84a Fix GeoIP2 memory leak upon reconfiguration
Loaded GeoIP2 databases are only released when named is shut down, but
not during server reconfiguration.  This causes memory to be leaked
every time "rndc reconfig" or "rndc reload" is used, as long as any
GeoIP2 database is in use.  Fix by releasing any loaded GeoIP2 databases
before reloading them.  Do not call dns_geoip_shutdown() until server
shutdown as that function releases the memory context used for caching
GeoIP2 lookup results.
2019-12-02 15:15:06 +01:00
Ondřej Surý 289f143d8a Merge branch '1416-threadsanitizer-data-race-resolver-c-3384-in-findname' into 'master'
Resolve "ThreadSanitizer: data race resolver.c:3384 in findname"

Closes #1416

See merge request isc-projects/bind9!2668
2019-12-02 08:49:15 +00:00
Mark Andrews 9ca6ad6311 Assign fctx->client when fctx is created rather when the join happens.
This prevents races on fctx->client whenever a new fetch joins a existing
fetch (by calling fctx_join) as it is now invariant for the active life of
fctx.
2019-12-02 06:01:46 +00:00
Ondřej Surý cf8e034b75 Merge branch '1293-change-the-return-value-for-dns_name_dup-to-void-and-cleanup-the-code' into 'master'
Change the return value for dns_name_dup() to void and cleanup the code

Closes #1293

See merge request isc-projects/bind9!2518
2019-11-29 13:40:54 +00:00
Ondřej Surý 7a69ac32c9 Disable no longer useful semantic patches
Some semantic patches are meant to be run just once, as they work on
functions with changed prototypes. We keep them for reference, but
disabled them from the CI to save time.
2019-11-29 14:26:14 +01:00
Ondřej SurýandOndřej Surý edd97cddc1 Refactor dns_name_dup() usage using the semantic patch 2019-11-29 14:00:37 +01:00
Ondřej SurýandOndřej Surý 21902d0ac7 cocci: Add semantic patch to refactor dns_name_dup() usage 2019-11-29 13:59:40 +01:00
Ondřej SurýandOndřej Surý a35b19f80e libdns: dns_name_dup() can't fail, change return type to void 2019-11-29 13:59:40 +01:00
Michał Kępień b1413ccf8d Merge branch '1430-fix-logging-long-named-command-lines' into 'master'
Fix logging long named command lines

Closes #1430

See merge request isc-projects/bind9!2667
2019-11-29 08:07:47 +00:00
Michał Kępień 009df30f3a Fix logging long named command lines
The saved_command_line buffer in bin/named/main.c is 8192 bytes long.
The size of libisc's internal logging buffer (defined by the value of
the LOG_BUFFER_SIZE constant in lib/isc/log.c) is also 8192 bytes.
Since the buffer containing the ellipsis is passed as the last argument
to isc_log_write() and the buffer containing the potentially trimmed
named command line (saved_command_line) is passed as the second argument
in the same isc_log_write() call, it may happen that saved_command_line
will exhaust all available space in libisc's internal logging buffer, in
which case the ellipsis will be elided from the output.

Make saved_command_line 4096 bytes long as that value is arguably also
large enough for any reasonable use case and at the same time it ensures
ellipsis will always be printed for excessively long named command
lines.
2019-11-29 09:06:41 +01:00
Michał Kępień c6811ed052 Merge branch '1310-improve-portability-of-the-runtime-system-test' into 'master'
Improve portability of the "runtime" system test

Closes #1310

See merge request isc-projects/bind9!2666
2019-11-29 07:48:08 +00:00
Michał Kępień 58121f5f6d Improve portability of the "runtime" system test
The "runtime" system test currently fails on Windows because it waits
for named to log a message indicating successful startup ("running"),
but that never happens since named on Windows fails to open the
configuration file as its path includes control characters.

Instead of putting control characters in directory names, put them in
the value of the -D command line switch passed to named, which is used
for identifying an instance of named in a process listing and whose
value is completely ignored by named, but still logged.

While a similar check using special characters appears to be working
fine on Windows for the time being, modify it in the same way to avoid
potential future problems on other platforms and make the test cleaner.
2019-11-29 08:47:33 +01:00
Ondřej Surý b6c96f05f3 Merge branch '1431-summary-sanitizer-grep-is-dangerous' into 'master'
Resolve ""SUMMARY: .*Sanitizer" grep is dangerous"

Closes #1431

See merge request isc-projects/bind9!2669
2019-11-29 07:02:30 +00:00
Mark Andrews 36ce99d8a4 replace grep -r with 'find -type f | xargs' 2019-11-29 10:58:28 +11:00
Ondřej Surý 1e7e0d2465 Merge branch 'ondrej/keep-sanitizer-tainted-system-tests-files' into 'master'
Don't clean the system test temporary files if sanitizer reports were found inside

See merge request isc-projects/bind9!2657
2019-11-28 21:39:28 +00:00
Ondřej Surý 7489e6e6f9 Don't clean the system test temporary files if sanitizer reports were found inside 2019-11-28 21:39:20 +00:00
Mark Andrews ef2825f1b8 Merge branch '1417-threadsanitizer-data-race-rbtdb-c-1535-in-add32' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:1535 in add32"

Closes #1417

See merge request isc-projects/bind9!2655
2019-11-28 20:10:33 +00:00
Mark AndrewsandOndřej Surý 68693f8279 add CHANGES 2019-11-28 13:37:56 +01:00
Mark AndrewsandOndřej Surý 637b2c4e51 rdataset_setownercase and rdataset_getownercase need to obtain a node lock 2019-11-28 13:37:56 +01:00
Ondřej Surý 6be1e9b565 Merge branch 'ondrej/stop-retrying-system-tests' into 'master'
Stop retrying the system tests; we should fix the tests instead

See merge request isc-projects/bind9!2649
2019-11-28 12:22:59 +00:00
Ondřej Surý caa5cd947d Merge branch 'wpk/clock-realtime-fast' into 'master'
Use clock_realtime_fast where available

See merge request isc-projects/bind9!2661
2019-11-28 12:07:37 +00:00
Ondřej SurýandOndřej Surý 8ad67f8b9f Stop retrying the system tests; we should fix the tests instead 2019-11-28 13:06:38 +01:00
Witold KręcickiandOndřej Surý f01d739968 Use clock_realtime_fast where available 2019-11-28 12:36:55 +01:00
Ondřej Surý 1ca1dda266 Merge branch 'ondrej/use_ATOMIC_VAR_INIT_to_initialize_tid_base_in_isc_hp_API' into 'master'
Use ATOMIC_VAR_INIT to initialize tid_v_base to 0

See merge request isc-projects/bind9!2660
2019-11-28 11:30:37 +00:00
Ondřej Surý 4d021be52e Merge branch 'ondrej/lib_isc_counter_improvements' into 'master'
Improve the atomics usage in isc_counter API

See merge request isc-projects/bind9!2658
2019-11-28 11:07:42 +00:00
Ondřej Surý c5b18d3dcb Use ATOMIC_VAR_INIT to initialize tid_v_base to 0 2019-11-28 12:06:10 +01:00
Ondřej Surý 9e8feec7d3 Improve the atomics usage in isc_counter API 2019-11-28 11:21:52 +01:00
Ondřej Surý 1a575d0f90 Merge branch '1401-intermittent-failures-in-the-catz-system-test' into 'master'
Resolve "Intermittent failures in the catz system test"

Closes #1401

See merge request isc-projects/bind9!2633
2019-11-28 08:37:29 +00:00
Ondřej SurýandWitold Krecicki 51b05189f7 Use retry() and nextpart*() to simplify catz test 2019-11-28 08:02:33 +00:00
Witold KręcickiandWitold Krecicki 9b43e65c01 Fix timing issues in catz test
Make the log checks more precise and use the retry() function for
repeating the checks.
2019-11-28 08:02:33 +00:00
Evan Hunt e25611457d Merge branch '1376-supported-platforms' into 'master'
update "supported platforms" in release notes

Closes #1376

See merge request isc-projects/bind9!2654
2019-11-28 05:42:28 +00:00
Evan Hunt 07f727ba01 update "supported platforms" in release notes
also added more information about library dependencies in PLATFORMS.md,
and cleaned up the grammar.
2019-11-27 13:06:13 -08:00
Ondřej Surý f29dfb45d6 Merge branch 'mnowak/runtime-forward-port-softhsm2-setup' into 'master'
Fix the UID switch test to work with PKCS#11 build

See merge request isc-projects/bind9!2652
2019-11-27 17:19:10 +00:00
Michal NowakandOndřej Surý e00d650328 Fix the UID switch test to work with PKCS#11 build
Forward port of 32fe9a0051fc76be4657fc2742e71d2be6193011 by Ondřej Surý.
2019-11-27 17:19:10 +00:00
Ondřej Surý e41b2999be Merge branch '1402-multiple-issues-in-the-runtime-system-test' into 'master'
Resolve "Multiple issues in the runtime system test"

Closes #1402

See merge request isc-projects/bind9!2636
2019-11-27 12:02:55 +00:00
Ondřej SurýandOndřej Surý cd804158b4 Fix multiple issues in named setuid check 2019-11-27 11:50:29 +01:00
Evan HuntandOndřej Surý 7a8269207d fixed a test failure, some other shell cleanup 2019-11-27 11:50:29 +01:00
Ondřej Surý f020199925 Instead of sleeping for a fixed time, wait for named to log specific message in a loop 2019-11-27 11:50:29 +01:00
Ondřej Surý d9b3909a21 Use pre-prepared long command line for better portability 2019-11-27 11:50:29 +01:00
Ondřej Surý 340b1d2b6b Make runtime/tests.sh shellcheck and set -e clean
This mostly comprises of:

* using $(...) instead of `...`
* changing the directories in subshell and not ignoring `cd` return code
* handling every error gracefully instead of ignoring the return code
2019-11-27 11:50:29 +01:00
Ondřej Surý 8f539a8886 Further improve the runtime tests to look for a specific instead of generic error 2019-11-27 11:50:29 +01:00
Ondřej Surý c48d8e0d42 The PATH_MAX on macOS is 1024, we can't override conffile path to test for ellipsis 2019-11-27 11:50:29 +01:00
Ondřej Surý b5a18ac439 Fix couple of no-op tests to actually test something (configuration files were missing) 2019-11-27 11:50:29 +01:00
Ondřej Surý 00114e07ef Skip the runtime ellipsis test 2019-11-27 11:50:29 +01:00
Ondřej Surý ce86721bc3 runtime test: make the pidfiles match the names of configuration files 2019-11-27 11:50:29 +01:00
Ondřej Surý e9fa7b831b runtime test: use helper function that kills named and waits for the finish 2019-11-27 11:50:29 +01:00
Mark Andrews 2c0710d5e6 Merge branch '1350-threadsanitizer-data-race-rbt-c-1312-in-dns_rbt_addnode' into 'master'
Resolve "ThreadSanitizer: data race rbt.c:1312 in dns_rbt_addnode"

Closes #1350

See merge request isc-projects/bind9!2648
2019-11-27 10:47:04 +00:00
Mark Andrews 8f6aaa7230 add comments 'tree_lock(write) must be held' 2019-11-27 09:58:15 +00:00
Mark Andrews 7cad3b2e91 rbtnode->nsec needs to be read while holding the tree lock 2019-11-27 09:58:15 +00:00
Evan Hunt d744a6fc23 Merge branch '1399-recursive-limit-stat' into 'master'
Resolve "recursive-client limit should have a stat counter"

Closes #1399

See merge request isc-projects/bind9!2629
2019-11-26 19:15:18 +00:00
Evan Hunt 715afa9c57 add a stats counter for clients dropped due to recursive-clients limit 2019-11-26 17:55:06 +00:00
Ondřej Surý 0d7b3b9d73 Merge branch '1336-1404-netmgr-destroy-tsan-fixes' into 'master'
Fix minor shutdown issues detected by TSAN

Closes #1404 and #1336

See merge request isc-projects/bind9!2639
2019-11-26 17:32:31 +00:00
Witold Kręcicki bf2cc19b04 - Access netmgr worker->finished under worker lock only
- Join network worker thread to silence tsan
2019-11-26 15:21:25 +01:00
Ondřej Surý d0bc45be17 Merge branch '1354-threadsanitizer-data-race-message-c-3283-in-dns_message_sectiontotext' into 'master'
Resolve "ThreadSanitizer: data race message.c:3283 in dns_message_sectiontotext"

Closes #1354

See merge request isc-projects/bind9!2578
2019-11-26 13:00:01 +00:00
Mark AndrewsandOndřej Surý f269585de3 provide default yaml indent 2019-11-26 13:52:30 +01:00
Mark AndrewsandOndřej Surý 9936462f31 dns_master_indent and dns_master_indentstr must not be global
The indentation for dumping the master zone was driven by two
global variables dns_master_indent and dns_master_indentstr.  In
threaded mode, this becomes prone to data access races, so this commit
converts the global variables into a local per-context tuple that
consist of count and string.
2019-11-26 13:52:18 +01:00
Ondřej Surý caf18da7f6 Merge branch '1360-threadsanitizer-data-race-adb-c-2790-in-dns_adb_detach' into 'master'
Resolve "ThreadSanitizer: data race adb.c:2790 in dns_adb_detach"

Closes #1360

See merge request isc-projects/bind9!2595
2019-11-26 12:16:59 +00:00
Ondřej Surý 21eab267df Fix missing adb->{e,i}refcnt locking 2019-11-26 13:07:12 +01:00
Witold KręcickiandOndřej Surý bad5a523c2 lib/dns/adb.c: Use atomics for adb quota values and reference counting 2019-11-26 13:07:12 +01:00
Ondřej SurýandOndřej Surý b9f4ba19a6 Use integer fast type for mutexatomic shim type 2019-11-26 13:07:12 +01:00
Ondřej Surý 70e9068432 Merge branch '1383-kasp-test-fails-with-unexpected-cds-record' into 'master'
kasp: Fix the reading of CDS keys to use stricter awk

Closes #1383

See merge request isc-projects/bind9!2608
2019-11-26 11:59:32 +00:00
Ondřej Surý d4163e2e97 kasp: Employ awk to make CDS checks stricter 2019-11-26 12:54:27 +01:00
Ondřej Surý ac1f0d9d61 Merge branch '1403-when-configuration-loading-fails-named-could-assert' into 'master'
Request exclusive access when crashing via fatal()

Closes #1403

See merge request isc-projects/bind9!2635
2019-11-26 11:51:02 +00:00
Ondřej Surý 952d7fde63 Request exclusive access when crashing via fatal()
When loading the configuration fails, there might be already other tasks
running and calling OpenSSL library functions.  The OpenSSL on_exit
handler is called when exiting the main process and there's a timing
race between the on_exit function that destroys OpenSSL allocated
resources (threads, locks, ...) and other tasks accessing the very same
resources leading to a crash in the system threading library. Therefore,
the fatal() function needs to request exlusive access to the task
manager to finish the already running tasks and exit only when no other
tasks are running.
2019-11-26 12:47:01 +01:00
Ondřej Surý bfc041def1 Merge branch 'ondrej/detect-cores-in-system-tests-on-FreeBSD' into 'master'
Detect cores on FreeBSD

See merge request isc-projects/bind9!2634
2019-11-26 11:44:22 +00:00
Ondřej Surý 38277ddb0b Detect cores on FreeBSD 2019-11-26 12:42:16 +01:00
Ondřej Surý eb524d27d9 Merge branch '1380-autosign-jitter-test-fails-with-no-nsec3param-found-in-axfr' into 'master'
Tune the performance of the autosign test

Closes #1385, #1384, and #1380

See merge request isc-projects/bind9!2601
2019-11-26 11:41:48 +00:00
Ondřej Surý 4b2911a45a Reduce the minimal numbers of days in jitter test to 5 2019-11-26 12:07:01 +01:00
Ondřej Surý 76eac9a691 Tune the performance of CDS/CDNSKEY deletion test 2019-11-26 12:07:01 +01:00
Ondřej Surý 519b047362 Tune the performance of oldsigs test
The oldsigs test was checking only for the validity of the A
a.oldsigs.example. resource record and associated DNSSEC signature while
the zone might not have been fully signed yet leading to validation
failures because of bogus signatures on the validation path.

This commit changes the test to test that all old signatures in the
oldsigs.example. zone were replaced and the zone is fully resigned
before running the main check.
2019-11-26 12:07:01 +01:00
Ondřej Surý ffb7ae8beb Tune the performance of the jitter test 2019-11-26 12:07:01 +01:00
Ondřej Surý 434c4e99f3 Merge branch 'ondrej/add-retry_quiet-function-to-conf.sh.common' into 'master'
Add retry_quiet() function to retry quietly for an event to occur

See merge request isc-projects/bind9!2630
2019-11-26 08:19:07 +00:00
Ondřej Surý 31264a7e00 Add retry_quiet() function to retry quietly for an event to occur 2019-11-26 09:17:32 +01:00
Mark Andrews 3e912d9aa7 Merge branch '1367-threadsanitizer-data-race-dispatch-c-901-in-free_buffer' into 'master'
Resolve "ThreadSanitizer: data race dispatch.c:901 in free_buffer"

Closes #1367

See merge request isc-projects/bind9!2613
2019-11-26 00:48:31 +00:00
Mark Andrews 26a93d77aa move maxbuffers test to allocate_udp_buffer 2019-11-25 23:39:45 +00:00
Mark Andrews 011af4de71 Lock dispatch manager buffer_lock before accessing buffers;
Only test buffers for UDP dispatches.
2019-11-25 23:39:45 +00:00
Mark Andrews afc7389ce8 lock disp->mgr before reading disp->mgr->buffers 2019-11-25 23:39:45 +00:00
Mark Andrews 545e1391fa Merge branch '1397-install-isc-python-module' into 'master'
Resolve "Install ISC python module"

Closes #1397

See merge request isc-projects/bind9!2620
2019-11-25 23:00:47 +00:00
Mark Andrews 8bbafeb5ef add CHANGES and note in README.md 2019-11-26 09:55:05 +11:00
Mark Andrews 50e1bf3800 check for 'distutils.core setup' 2019-11-25 22:46:48 +00:00
Evan Hunt 909dc1a1ab Merge branch 'each-notes' into 'master'
cleanup release notes text

See merge request isc-projects/bind9!2622
2019-11-25 21:18:51 +00:00
Evan Hunt fa70fc8731 cleanup release notes text 2019-11-25 13:17:35 -08:00
Ondřej Surý 3b2850f4d9 Merge branch 'ondrej/add-missing-header-guards' into 'master'
Add missing header guard to new header files

See merge request isc-projects/bind9!2621
2019-11-25 08:13:31 +00:00
Ondřej Surý 3ce6708be2 Add missing header guard to new header files 2019-11-25 09:10:29 +01:00
Mark Andrews 6eed126051 Merge branch '1373-threadsanitizer-data-race-rbtdb-c-5193-in-detachnode' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:5193 in detachnode"

Closes #1373

See merge request isc-projects/bind9!2598
2019-11-25 05:46:55 +00:00
Mark Andrews 6ce39f64d9 remove DNS_RBT_REFLENGTH as it is no longer needed 2019-11-25 16:21:52 +11:00
Mark Andrews b8bb1e02ad Split access to wild and dirty from locknum to silence TSAN warnings. 2019-11-25 16:21:52 +11:00
Evan Hunt 2515825a2b Merge branch '1312-netmgr-tcp-fixes' into 'master'
Resolve "netmgr hangs on shutdown when TCP connections are still active"

Closes #1312

See merge request isc-projects/bind9!2617
2019-11-23 01:47:18 +00:00
Evan Hunt 8bdb5f586a CHANGES 2019-11-22 16:46:32 -08:00
Evan Hunt d484b66ae1 improve system tests
- increase prefetch test timing tolerance.
- remove five-second pause and explicit connection closing in tcp test
  as they are no longer necessary.
2019-11-22 16:46:32 -08:00
Evan Hunt 00333a5c97 netmgr: add shutdown function
- new function isc_nm_shutdown() shuts down all active TCP connections,
  but does not destroy the netmgr.
2019-11-22 16:46:32 -08:00
Witold KręcickiandEvan Hunt d6c5052f7e netmgr: actively close all sockets when shutting down server
without this change, named could sometimes lag for a while on shutdown
while it waited for open TCP connections to time out.
2019-11-22 16:46:32 -08:00
Witold KręcickiandEvan Hunt 37354ee225 netmgr: fix TCP backlog and client quota count
- add support for TCP backlog, using the value provided by config.
 - don't attach to TCP client quota for listening sockets, only
   connected sockets.
2019-11-22 16:46:32 -08:00
Evan Hunt c4ad0466d6 netmgr: log TCP connection errors 2019-11-22 16:46:32 -08:00
Evan Hunt 0260d31d26 netmgr: performance improvement
- use memory pools for ievent and uvreq objects.
2019-11-22 16:46:31 -08:00
Evan Hunt 199bd6b623 netmgr: make TCP timeouts configurable
- restore support for tcp-initial-timeout, tcp-idle-timeout,
  tcp-keepalive-timeout and tcp-advertised-timeout configuration
  options, which were ineffective previously.
2019-11-22 16:46:31 -08:00
Witold KręcickiandEvan Hunt b7a72b1667 netmgr: TCP improvements
- add timeout support for TCP and TCPDNS connections to protect against
  slowloris style attacks. currently, all timeouts are hard-coded.
- rework and simplify the TCPDNS state machine.
2019-11-22 16:46:31 -08:00
Mark Andrews 751ad12dea Merge branch '1334-threadsanitizer-data-race-dispatch-c-1339-in-tcp_recv' into 'master'
Resolve "ThreadSanitizer: data race dispatch.c:1339 in tcp_recv"

Closes #1334

See merge request isc-projects/bind9!2612
2019-11-22 21:23:10 +00:00
Mark Andrews 3075445ed6 lock dispatch before reporting state 2019-11-22 19:52:14 +00:00
Mark Andrews caf073dbe7 Merge branch '1394-incoming-zone-transfer-messages-logged-to-wrong-category' into 'master'
Resolve "Incoming zone transfer messages logged to wrong category"

Closes #1394

See merge request isc-projects/bind9!2611
2019-11-22 19:37:51 +00:00
Mark Andrews ab71b29098 add CHANGES 2019-11-22 13:14:54 +00:00
Mark Andrews 444d742a94 change log category of some messages to DNS_LOGCATEGORY_XFER_IN 2019-11-22 13:14:54 +00:00
Mark Andrews eb21ecf55c Merge branch '1315-yaml-is-not-listed-in-the-man-page-or-the-h-listing-for-either-dig-or-delv' into 'master'
Resolve "+yaml is not listed in the man page or the -h listing for either dig or delv"

Closes #1315

See merge request isc-projects/bind9!2560
2019-11-22 13:13:05 +00:00
Mark Andrews e98157b7fe add +[no]yaml to usage() 2019-11-23 00:02:52 +11:00
Mark Andrews fdcd58d404 Merge branch '1317-alphabetise-delv-s-usage' into 'master'
Resolve "alphabetise delv's usage."

Closes #1317

See merge request isc-projects/bind9!2561
2019-11-22 13:00:14 +00:00
Mark Andrews 78685ed173 alphabetise delv's usage. 2019-11-22 12:38:20 +00:00
Witold Krecicki 9113ed840c Merge branch 'wpk/fix-mkeys-bug' into 'master'
Fix a bug in trust anchors verification.

See merge request isc-projects/bind9!2609
2019-11-21 19:13:55 +00:00
Witold Kręcicki 6030cadef0 CHANGES note 2019-11-21 18:43:47 +01:00
Witold Kręcicki 58db2d1d18 Fix a bug in trust anchors verification.
We were not reseting the keynode value when iterating over DNSKEYs in
RRSET, so we weren't checking all DNSKEYs against all trust anchors. This
commit fixes the issue by resetting keynode with every loop.
2019-11-21 18:18:56 +01:00
Evan Hunt cadbc158f0 Merge branch 'merge-v9_15_6' into 'master'
merge 9.15.6 into master branch

See merge request isc-projects/bind9!2604
2019-11-20 21:37:26 +00:00
Evan Hunt 7bd3205c61 Merge tag 'v9_15_6' into merge-v9_15_6 2019-11-20 13:34:25 -08:00
Ondřej Surý cd3e34de8f Merge branch 'ondrej/get-the-backtraces-out-of-system-test-coredumps' into 'master'
Get the backtraces out of system test coredumps

See merge request isc-projects/bind9!2602
2019-11-20 19:04:02 +00:00
Ondřej Surý d0a0c22433 Get better stack traces 2019-11-21 02:05:47 +08:00
Ondřej SurýandOndřej Surý 512dadc8d1 Dump the backtrace to stdout when core is found in systest directory 2019-11-21 02:05:47 +08:00
Michal Nowak 081326929f Merge branch 'mnowak/537_Add_CI_step_to_test_named_-u' into 'master'
Verifying that named switches UID

Closes #537

See merge request isc-projects/bind9!2374
2019-11-20 10:37:24 +00:00
Michal Nowak b00360537e Verifying that named switches UID
This test runs only under root, which is required for the user-switch
`-u` option to work.

Closes #537.
2019-11-20 10:56:21 +01:00
Mark Andrews 584c1da066 Merge branch 'marka-placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!2597
2019-11-20 01:03:37 +00:00
Mark Andrews c727c59663 placeholder 2019-11-20 11:57:54 +11:00
Ondřej Surý 097328db7a Merge branch '1341-threadsanitizer-data-race-rbtdb-c-5756-in-add32' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:5756 in add32"

Closes #1341

See merge request isc-projects/bind9!2577
2019-11-19 16:54:50 +00:00
Mark AndrewsandOndřej Surý 4534fb5ec1 add CHANGES 2019-11-20 00:17:51 +08:00
Mark AndrewsandOndřej Surý 7d4d64340e use update_recordsandbytes in rbt_datafixer 2019-11-20 00:17:51 +08:00
Mark AndrewsandOndřej Surý 0cda448248 always obtain write lock when updating version->{records,bytes} 2019-11-20 00:17:51 +08:00
Michał Kępień 7e6d76e7db Merge branch '1308-fail-the-tcp-system-test-when-ans6-fails' into 'master'
Fail the "tcp" system test when ans6 fails

Closes #1308

See merge request isc-projects/bind9!2566
2019-11-19 14:51:01 +00:00
Michał Kępień b50ced528d Fail the "tcp" system test when ans6 fails
Make the "tcp" system test fail if the Python tool used for establishing
TCP connections (ans6) logs a result different than "OK" after
processing a command sent to it (as that means the tool was unable to
successfully perform the requested action), with the exception of
cleanup errors at the end of the test which can be safely ignored.  Note
that the tool not returning any result at all in 10 seconds is still a
fatal error in all cases.
2019-11-19 15:26:56 +01:00
Ondřej Surý 304c1b6439 Merge branch '1377-threadsanitizer-data-race-astack-c-64-in-isc_astack_pop' into 'master'
Fix missing lock around pos and destroy mutex in isc_astack_destroy

Closes #1377

See merge request isc-projects/bind9!2588
2019-11-19 10:03:09 +00:00
Mark Andrews 9b6e023f84 Merge branch '1299-parse-commandline-code-should-be-done-in-alphabetical-order' into 'master'
Resolve "Parse commandline code should be done in alphabetical order"

Closes #1299

See merge request isc-projects/bind9!2559
2019-11-19 09:31:52 +00:00
Ondřej SurýandOndřej Surý bcfc07e3d3 Fix missing lock around pos and destroy mutex in isc_astack_destroy 2019-11-19 10:31:07 +01:00
Mark Andrews ca83a66618 alphabetize command line switch 2019-11-19 08:21:26 +00:00
Mark Andrews 6fe28d92c4 Merge branch '1344-threadsanitizer-data-race-rbtdb-c-2987-in-bind_rdataset' into 'master'
Resolve "ThreadSanitizer: data race rbtdb.c:2987 in bind_rdataset"

Closes #1344

See merge request isc-projects/bind9!2587
2019-11-19 08:20:08 +00:00
Mark Andrews 419aa15cd1 add CHANGES 2019-11-19 17:38:35 +11:00
Mark Andrews fcb6dbcdd7 make header->count atomic 2019-11-19 17:29:20 +11:00
Ondřej Surý eba576dddf Merge branch 'ondrej/dont-call-dns_adb_endupdfetch-for-TCP-queries' into 'master'
lib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries

See merge request isc-projects/bind9!2580
2019-11-18 19:47:53 +00:00
Ondřej SurýandOndřej Surý a5189eefa5 lib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries
The dns_adb_beginudpfetch() is called only for UDP queries, but
the dns_adb_endudpfetch() is called for all queries, including
TCP.  This messages the quota counting in adb.c.
2019-11-19 02:53:56 +08:00
Ondřej Surý 55d82ced78 Merge branch 'ondrej/switch-coccinelle-job-to-buster' into 'master'
Switch coccinelle job to buster

See merge request isc-projects/bind9!2582
2019-11-18 17:58:54 +00:00
Ondřej Surý 0946db13de Installing coccinelle on Debian sid is broken, switch to Debian buster 2019-11-19 01:54:20 +08:00
Ondřej Surý c17bc7387c Merge branch '1368-threadsanitizer-can-t-handle-more-than-64-mutexes' into 'master'
lib/dns/adb.c:

Closes #1368

See merge request isc-projects/bind9!2579
2019-11-18 07:30:35 +00:00
Witold KręcickiandOndřej Surý 7d93371581 lib/dns/adb.c: don't use more than 64 lock simultaneously when run under TSAN
- TSAN can't handle more than 64 locks in one thread, lock ADB bucket-by-bucket
   in TSAN mode. This means that the dump won't be consistent but it's good
   enough for testing

 - Use proper order when unlocking adb->namelocks and adb->entrylocks when
   dumping ADB.
2019-11-18 06:51:30 +01:00
Tinderbox UserandEvan Hunt fa2f16db89 Merge branch 'prep-release' into security-master 2019-11-17 18:59:41 -08:00
Evan Hunt a48814906f Merge branch 'security-client-connection-limit' into security-master 2019-11-17 18:59:41 -08:00
Tinderbox UserandEvan Hunt 767a2aef43 prep 9.15.6 2019-11-17 18:59:41 -08:00
Evan Hunt 7c54199fe1 CHANGES, release note. 2019-11-17 18:59:40 -08:00
Evan Hunt 73cafd9d57 clean up comments 2019-11-17 18:59:40 -08:00
Witold KręcickiandEvan Hunt 70f80a3ec7 fix a problem with the mem_test unit test
isc_mem_traceflag_test messes with stdout/stderr, which can cause
problems with subsequent tests (no output, libuv problems).  Moving that
test case to the end ensures there are no side effects.
2019-11-17 18:59:40 -08:00
Witold KręcickiandEvan Hunt 62a8405fa2 netmgr: close uv_loop properly
close the uv_handle for the worker async channel, and call
uv_loop_close() on shutdown to ensure that the event loop's
internal resources are properly freed.
2019-11-17 18:59:40 -08:00
Witold KręcickiandEvan Hunt 6718a4ef8b ensure isc_queue_t is aligned to double-cacheline size 2019-11-17 18:59:40 -08:00
Evan Hunt 123ee350dc place a limit on pipelined queries that can be processed simultaneously
when the TCPDNS_CLIENTS_PER_CONN limit has been exceeded for a TCP
DNS connection, switch to sequential mode to ensure that memory cannot
be exhausted by too many simultaneous queries.
2019-11-17 18:59:39 -08:00
Evan Hunt 20bb812148 Merge branch 'each-ds-anchor-mirror-zones' into 'master'
add support for DS trust anchors in mirror zone verification

See merge request isc-projects/bind9!2576
2019-11-18 02:59:08 +00:00
Evan Hunt 0f9d8eb7b5 add support for DS trust anchors in mirror zone verification 2019-11-17 17:44:17 -08:00
Evan Hunt c5b6f21515 Merge branch '1119-make-lib/ns-thread-sanitizer-clean' into 'master'
Make lib/ns Thread Sanitizer clean

See merge request isc-projects/bind9!2366
2019-11-18 01:43:06 +00:00
Ondřej SurýandEvan Hunt e95af30b23 Make lib/ns Thread Sanitizer clean 2019-11-17 17:42:41 -08:00
Evan Hunt dad10c0fd0 Merge branch '1119-tsan-lib/dns/tests/zt_test.c' into 'master'
Use atomic_bool for variables shared among threads to make zt_test.c thread-safe

See merge request isc-projects/bind9!2361
2019-11-18 01:40:59 +00:00
Ondřej Surý 7b9084d45d Use atomic_bool for variables shared among threads to make zt_test.c thread-safe 2019-11-18 08:39:12 +08:00
Ondřej Surý 6858ef9adc Merge branch '1119-tsan-lib/isc/tests/socket_test.c' into 'master'
Change the shared completion->done variable to atomic_bool in socket_test.c

See merge request isc-projects/bind9!2362
2019-11-17 14:55:24 +00:00
Ondřej Surý 23964dbbbc Change the shared completion->done variable to atomic_bool in socket_test.c 2019-11-17 09:38:36 +08:00
Ondřej Surý 76d1e95f4e Merge branch '1313-master-failing-to-build-on-macos-high-sierra' into 'master'
Resolve "master failing to build on MacOS High Sierra"

Closes #1313

See merge request isc-projects/bind9!2562
2019-11-16 05:22:05 +00:00
Mark AndrewsandOndřej Surý 00605058b4 conditionally test based on USE_LIBTOOL or LD_WRAP 2019-11-16 11:46:06 +08:00
Mark AndrewsandOndřej Surý c7b20f3c40 specify the install name when building libwrap 2019-11-16 11:21:41 +08:00
Mark AndrewsandOndřej Surý b88faee181 MacOS portability
-Wl,-z,interpose is not supported.
-Wl,rpath=<path> is not supported use -Wl,rpath,<path> instead.
Use @SO@ for loadable extension.
Use -L <path> -l libwrap instead of libwrap.sa.
2019-11-16 11:21:41 +08:00
Evan Hunt ac65f56774 Merge branch '622-ds-anchor' into 'master'
support "initial-ds" in managed-keys

Closes #622

See merge request isc-projects/bind9!1762
2019-11-16 02:32:12 +00:00
Evan Hunt d97e628f81 CHANGES, release notes 2019-11-15 15:47:57 -08:00
Evan Hunt c29ccae2a6 Document initial-ds and static-ds keywords 2019-11-15 15:47:57 -08:00
Evan Hunt 54a682ea50 use DS style trust anchors in all system tests
this adds functions in conf.sh.common to create DS-style trust anchor
files. those functions are then used to create nearly all of the trust
anchors in the system tests.

there are a few exceptions:
 - some tests in dnssec and mkeys rely on detection of unsupported
   algorithms, which only works with key-style trust anchors, so those
   are used for those tests in particular.
 - the mirror test had a problem with the use of a CSK without a
   SEP bit, which still needs addressing

in the future, some of these tests should be changed back to using
traditional trust anchors, so that both types will be exercised going
forward.
2019-11-15 15:47:57 -08:00
Evan Hunt 342cc9b168 add support for DS trust anchors in delv 2019-11-15 15:47:57 -08:00
Evan Hunt edafbf1c0f fix root key sentinel code to send the correct key ID for DS trust anchors 2019-11-15 15:47:57 -08:00
Evan Hunt 8aaee26548 add validator support for static DS-style trust anchors 2019-11-15 15:47:56 -08:00
Evan Hunt 4d3ed3f4ea refactor create_keydata
use empty placeholder KEYDATA records for all trust anchors, not just
DS-style trust anchors.

this revealed a pre-existing bug: keyfetch_done() skips keys without
the SEP bit when populating the managed-keys zone. consequently, if a
zone only has a single ZSK which is configured as trust anchor and no
KSKs, then no KEYDATA record is ever written to the managed-keys zone
when keys are refreshed.

that was how the root server in the dnssec system test was configured.
however, previously, the KEYDATA was created when the key was
initialized; this prevented us from noticing the bug until now.

configuring a ZSK as an RFC 5011 trust anchor is not forbidden by the
spec, but it is highly unusual and not well defined.  so for the time
being, I have modified the system test to generate both a KSK and ZSK
for the root zone, enabling the test to pass.

we should consider adding code to detect this condition and allow keys
without the SEP bit to be used as trust anchors if no key with the SEP
bit is available, or at minimum, log a warning.
2019-11-15 15:47:56 -08:00
Evan Hunt a8f89e9a9f use DS-style trust anchor to verify 5011 key refresh query
note: this also needs further refactoring.

- when initializing RFC 5011 for a name, we populate the managed-keys
  zone with KEYDATA records derived from the initial-key trust anchors.

  however, with initial-ds trust anchors, there is no key. but the
  managed-keys zone still must have a KEYDATA record for the name,
  otherwise zone_refreshkeys() won't refresh that key. so, for
  initial-ds trust anchors, we now add an empty KEYDATA record and set
  the key refresh timer so that the real keys will be looked up as soon
  as possible.

- when a key refresh query is done, we verify it against the
  trust anchor; this is done in two ways, one with the DS RRset
  set up during configuration if present, or with the keys linked
  from each keynode in the list if not.  because there are two different
  verification methods, the loop structure is overly complex and should
  be simplified.

- the keyfetch_done() and sync_keyzone() functions are both too long
  and should be broken into smaller functions.
2019-11-15 15:47:56 -08:00
Evan Hunt 854af5a353 allow DS trust anchors to be set in keytable
note: this is a frankensteinian kluge which needs further refactoring.

the keytable started as an RBT where the node->data points to a list of
dns_keynode structures, each of which points to a single dst_key.
later it was modified so that the list could instead point to a single
"null" keynode structure, which does not reference a key; this means
a trust anchor has been configured but the RFC 5011 refresh failed.

in this branch it is further updated to allow the first keynode in
the list to point to an rdatalist of DS-style trust anchors.  these will
be used by the validator to populate 'val->dsset' when validating a zone
key.

a DS style trust anchor can be updated as a result of RFC 5011
processing to contain DST keys instead; this results in the DS list
being freed.  the reverse is not possible; attempting to add a DS-style
trust anchor if a key-style trust anchor is already in place results
in an error.

later, this should be refactored to use rdatalists for both DS-style
and key-style trust anchors, but we're keeping the existing code for
old-style trust anchors for now.
2019-11-15 15:47:56 -08:00
Evan Hunt 1a8348e2b4 disallow use of DS- and key-style trust anchors for the same name 2019-11-15 15:47:41 -08:00
Evan Hunt feba480527 read DS trust anchors in named.conf
(but they aren't used for anything yet)
2019-11-15 15:47:17 -08:00
Evan Hunt 3fede8a7e9 add "static-ds" and "initial-ds" keywords to config parser 2019-11-15 15:47:17 -08:00
Evan Hunt ac0d3c21c6 add a global function to match a DS rdata to a DNSKEY 2019-11-15 15:47:17 -08:00
Evan Hunt f75328b178 Merge branch '622-validator-refactoring' into 'master'
preliminary validator refactoring

See merge request isc-projects/bind9!2346
2019-11-15 23:46:36 +00:00
Evan Hunt 11cd9d86e4 CHANGES, release note 2019-11-15 14:26:08 -08:00
Evan Hunt 692c879e3c remove unneeded members from dns_validator
- val->keynode and val->seensig were set but never used.
- val->nearest, val->soaset, val->soaname, val->nsecset and val->nsec3set
  were never used at all.
2019-11-15 14:26:08 -08:00
Evan Hunt 3a4334636b simplify validate_dnskey and seek_ds
- pull out the code that checks whether a key was signed by a trust
  anchor into a separate function, anchor_signed().
- pull out the code that looks up a DS while validating a zone key
  into a separate function, get_dsset().
- check in create_validator() whether the sigrdataset is bound, so that
  we can always pass in &val->fsigrdataset during an insecurity proof;
  this will allow a reduction of code duplication.
2019-11-15 14:26:08 -08:00
Evan Hunt 9119dc25fe continue renaming functions for clarity
- also simplified some calls: don't pass siginfo where val->siginfo
  is sufficient, don't INSIST where returning false is sufficient.
- also added header comments to several local functions.
2019-11-15 14:26:07 -08:00
Evan Hunt 22aa668b7d convert if to switch in get_key 2019-11-15 14:26:07 -08:00
Evan Hunt 9150688efd rename fetch/validator callback functions for consistency and clarity 2019-11-15 14:26:07 -08:00
Evan Hunt edc9c79c9c reorder switch in validatezonekey to similar order as seek_ds 2019-11-15 14:26:07 -08:00
Evan Hunt d0f8c50618 convert if statement to switch 2019-11-15 14:26:07 -08:00
Evan Hunt ea1d4d11fc refactor dsfetched/dsfetched2 into a common function 2019-11-15 14:26:06 -08:00
Evan Hunt 3659cca624 rename some functions for better clarity 2019-11-15 14:26:06 -08:00
Evan Hunt 54710873a7 move some duplicate code into validate_neg_rrset() 2019-11-15 14:26:06 -08:00
Evan Hunt 6dc5343d6d move the 'mustbesecure' checks into markanswer() 2019-11-15 14:26:06 -08:00
Evan Hunt 61456d886e split proveunsecure() 2019-11-15 14:26:06 -08:00
Evan Hunt 34d7776f14 reduce redundant code 2019-11-15 14:10:56 -08:00
Evan Hunt 32d1cc1562 style, braces, whitespace 2019-11-15 14:10:56 -08:00
Mark Andrews 95817d8bbb Merge branch '1323-reenable-lib-ns-unittests' into 'master'
Properly disable lib/ns tests when run under ASAN

Closes #1323

See merge request isc-projects/bind9!2568
2019-11-15 05:50:14 +00:00
Ondřej SurýandMark Andrews d50322ed95 Properly disable lib/ns tests when run under ASAN 2019-11-15 05:09:52 +00:00
Mark Andrews abe8fa5253 Merge branch '1327-update-solution-dependencies-host-and-nslookup-depend-on-libirs' into 'master'
Resolve "Update solution dependencies: 'dig', 'host' and 'nslookup' depend on libirs."

Closes #1327

See merge request isc-projects/bind9!2573
2019-11-15 01:09:16 +00:00
Mark Andrews 72ca05c966 Add dependancy on libirs to dig, host, and nslookup. 2019-11-15 11:22:35 +11:00
Ondřej Surý 7101eae6f4 Merge branch 'ondrej/fix-timer-test' into 'master'
Fix the crash in the timer test

See merge request isc-projects/bind9!2557
2019-11-13 14:29:49 +00:00
Evan HuntandOndřej Surý bd9f5c3c19 fix netmgr setup/teardown issues; setup and teardown only once in timer_test
- the netmgr was not correctly being specified when creating the task
  manager, and was cleaned up in the wrong order when shutting down.
- on freebsd, timer_test appears to be prone to failure if the
  netmgr is set up and torn down before and after ever test case, but
  less so if it's only set up once at the beginning and once at the
  end.
2019-11-13 14:47:47 +01:00
Ondřej Surý aca0f88750 Remove the assertions from subthreads and use global errcnt to record errors 2019-11-13 14:47:47 +01:00
Ondřej Surý 2c3589e22a Lock the lasttime variable that's concurrently accessed between threads 2019-11-13 14:47:47 +01:00
Ondřej Surý b9cb4c94fa Directly embed ../timer.c in timer_test.c for better assertion testing 2019-11-13 14:47:47 +01:00
Ondřej Surý 8de64964a3 Refactor the way we use memory context from isctest.c
This commit renames isctest {mctx,lctx} to test_{mctx,lctx} and cleans
up their usage in the individual unit tests.  This allows embedding
library .c files directly into the unit tests.
2019-11-13 14:47:47 +01:00
Witold Krecicki 229b7d85e8 Merge branch 'wpk/fix-accidental-task-unpause' into 'master'
Fix implicit task unpause when going from 'running' to 'idle'.

See merge request isc-projects/bind9!2571
2019-11-13 13:45:09 +00:00
Witold Kręcicki 5ce4b04b50 If a task is running and we call isc_task_pause it can
be implicitly unpaused when we switch from 'running' to
'idle' state. Fix it by not switching to 'idle' when paused.
2019-11-13 12:32:17 +00:00
Michał Kępień 3d92f5e95a Merge branch 'fix-url-in-readme' into 'master'
updated a broken link for newer release notes.

See merge request isc-projects/bind9!2567
2019-11-13 11:59:11 +00:00
Vicky RiskandMichał Kępień c830a9116d Update broken release notes link 2019-11-13 12:56:05 +01:00
Michał Kępień b4a015ebcd Merge branch 'michal/fix-libuv.dll-handling' into 'master'
Fix libuv.dll handling

See merge request isc-projects/bind9!2556
2019-11-12 11:24:41 +00:00
Michał KępieńandOndřej Surý d8768bd143 Fix libuv.dll handling
Make sure libuv.dll gets copied to the proper directory in the Release
build configuration and that the BIND installer on Windows installs
libuv.dll.
2019-11-12 09:14:59 +00:00
Ondřej Surý fadd39dc83 Merge branch 'ondrej/cleanup-PATH_MAX-and-NAME_MAX-ifdefs' into 'master'
Cleanup the {PATH,NAME}_MAX stray #ifdefs

See merge request isc-projects/bind9!2565
2019-11-12 09:13:25 +00:00
Ondřej Surý bd80969b11 Cleanup the {PATH,NAME}_MAX stray #ifdefs 2019-11-12 09:36:08 +01:00
Ondřej Surý e879490f10 Merge branch 'hurd' into 'master'
hurd: Fix build

See merge request isc-projects/bind9!2558
2019-11-12 08:09:03 +00:00
Samuel Thibault d10fbdec84 hurd: Fix build
Move PATH_MAX, NAME_MAX, IOV_MAX default definitions to the common
<isc/platform.h>.
2019-11-10 20:14:17 +00:00
Michał Kępień 9e2da86ab9 Merge branch '1134-add-missing-dnssec-keygen-dependency-on-libisccfg' into 'master'
Add missing dnssec-keygen dependency on libisccfg

Closes #1134

See merge request isc-projects/bind9!2555
2019-11-08 12:42:50 +00:00
Michał Kępień 47e14c4d17 Add missing dnssec-keygen dependency on libisccfg
Commit 09ac224c5c made dnssec-keygen
depend on libisccfg but the Visual Studio solution file was not updated
to reflect that change.  Make sure the dnssec-keygen Visual Studio
project depends on the libisccfg project to prevent compilation issues
during parallel builds.
2019-11-08 12:56:09 +01:00
Michał Kępień 7df491e819 Merge branch 'michal/split-release-notes-into-per-version-sections' into 'master'
Split release notes into per-version sections

See merge request isc-projects/bind9!2524
2019-11-08 11:16:02 +00:00
Michał Kępień 8729c56cd8 Rebuild output files 2019-11-08 12:06:31 +01:00
Michał Kępień dfc312ac56 Update URLs used in release notes
Some URLs used in release notes became outdated.  Make sure they point
to currently available resources.
2019-11-08 12:05:54 +01:00
Michał Kępień 2f37ab1dac Split release notes into per-version sections
Intertwining release notes from different BIND releases in a single XML
file has caused confusion in the past due to different (and often
arbitrary) approaches to keeping/removing release notes from older
releases on different BIND branches.  Divide doc/arm/notes.xml into
per-version sections to simplify determining the set of changes
introduced by a given release and to make adding/reviewing release notes
less error-prone.
2019-11-08 12:05:52 +01:00
Ondřej Surý 86b10eff81 Merge branch '1256-fix-the-jitter-test-2' into 'master'
Wait a little bit longer for autosign, bail out on not enough categories

See merge request isc-projects/bind9!2554
2019-11-08 07:43:50 +00:00
Ondřej Surý f1cbdc5498 Wait a little bit longer for autosign, bail out on not enough categories 2019-11-08 07:43:33 +01:00
Ondřej Surý d6f68fc4f0 Adjust the jitter range to +-3*stddev 2019-11-08 07:05:02 +01:00
Ondřej Surý 46eaa854d2 Merge branch '1256-fix-the-jitter-test' into 'master'
Check if the RRSIG jitter falls <mean-2.5*stddev;mean+2.5*stddev>

Closes #1309

See merge request isc-projects/bind9!2553
2019-11-08 06:01:47 +00:00
Ondřej Surý 02050bc506 Revert "temporarily disable jitter tests in the 'autosign' system test"
This reverts commit e17b7ee05a.
2019-11-08 07:00:08 +01:00
Ondřej Surý 0480a95ddf Check if the RRSIG jitter falls into mean+-2.5*stddev range 2019-11-08 06:59:40 +01:00
Witold Krecicki 25800c892f Merge branch '29-libuv-network-manager' into 'master'
libuv-based network manager

Closes #29

See merge request isc-projects/bind9!2528
2019-11-07 21:32:28 +00:00
Evan Hunt 129fb63db6 CHANGES, README, release note 2019-11-07 12:42:14 -08:00
Evan Hunt 24510a1fda adjust system tests to deal with possible timing issues
With the netmgr in use, named may start answering queries before zones
are loaded. This can cause transient failures in system tests after
servers are restarted or reconfigured. This commit adds retry loops
and sleep statements where needed to address this problem.

Also incidentally silenced a clang warning.
2019-11-07 12:42:14 -08:00
Evan Hunt b9a5508e52 remove ISC_QUEUE as it is no longer used 2019-11-07 11:55:37 -08:00
Evan Hunt 53f0b6c34d convert ns_client and related objects to use netmgr
- ns__client_request() is now called by netmgr with an isc_nmhandle_t
  parameter. The handle can then be permanently associated with an
  ns_client object.
- The task manager is paused so that isc_task events that may be
  triggred during client processing will not fire until after the netmgr is
  finished with it. Before any asynchronous event, the client MUST
  call isc_nmhandle_ref(client->handle), to prevent the client from
  being reset and reused while waiting for an event to process. When
  the asynchronous event is complete, isc_nmhandle_unref(client->handle)
  must be called to ensure the handle can be reused later.
- reference counting of client objects is now handled in the nmhandle
  object.  when the handle references drop to zero, the client's "reset"
  callback is used to free temporary resources and reiniialize it,
  whereupon the handle (and associated client) is placed in the
  "inactive handles" queue.  when the sysstem is shutdown and the
  handles are cleaned up, the client's "put" callback is called to free
  all remaining resources.
- because client allocation is no longer handled in the same way,
  the '-T clienttest' option has now been removed and is no longer
  used by any system tests.
- the unit tests require wrapping the isc_nmhandle_unref() function;
  when LD_WRAP is supported, that is used. otherwise we link a
  libwrap.so interposer library and use that.
2019-11-07 11:55:37 -08:00
Witold KręcickiandEvan Hunt 33bf90331b use clock_gettime() instead of gettimeofday() for isc_itme functions 2019-11-07 11:55:37 -08:00
Witold KręcickiandEvan Hunt a85a65f96e add atomic_exchange operations to mutexatomic.h and win32 stdatomic.h 2019-11-07 11:55:37 -08:00
Evan Hunt 59c64fa4bd add isc_task_pause() and isc_task_unpause() functions
This allows a task to be temporary disabled so that objects won't be
processed simultaneously by libuv events and isc_task events. When a
task is paused, currently running events may complete, but no further
event will added to the run queue will be executed until the task is
unpaused.
2019-11-07 11:55:37 -08:00
Evan Hunt 36ee430327 optionally associate a netmgr with a task manager when creating
When a task manager is created, we can now specify an `isc_nm`
object to associate with it; thereafter when the task manager is
placed into exclusive mode, the network manager will be paused.
2019-11-07 11:55:37 -08:00
Witold KręcickiandEvan Hunt f188d00227 disable leak detection in ASAN; libuv has some problems with that 2019-11-07 11:55:37 -08:00
Evan Hunt 48d003edf7 use netmgr in libisc unit tests 2019-11-07 11:55:37 -08:00
Witold KręcickiandEvan Hunt 70397f9d92 netmgr: libuv-based network manager
This is a replacement for the existing isc_socket and isc_socketmgr
implementation. It uses libuv for asynchronous network communication;
"networker" objects will be distributed across worker threads reading
incoming packets and sending them for processing.

UDP listener sockets automatically create an array of "child" sockets
so each worker can listen separately.

TCP sockets are shared amongst worker threads.

A TCPDNS socket is a wrapper around a TCP socket, which handles the
the two-byte length field at the beginning of DNS messages over TCP.

(Other wrapper socket types can be implemented in the future to handle
DNS over TLS, DNS over HTTPS, etc.)
2019-11-07 11:55:37 -08:00
Evan Hunt a8c814cb2f implement fixed-size array stack data structure 2019-11-07 11:55:37 -08:00
Witold KręcickiandEvan Hunt 402969bf95 implement fetch-and-add array queue data structure
this is a lockless queue based on hazard pointers.
2019-11-07 11:55:37 -08:00
Evan Hunt 64e1a4a398 temporarily move ISC_QUEUE to list.h
The double-locked queue implementation is still currently in use
in ns_client, but will be replaced by a fetch-and-add array queue.
This commit moves it from queue.h to list.h so that queue.h can be
used for the new data structure, and clean up dependencies between
list.h and types.h. Later, when the ISC_QUEUE is no longer is use,
it will be removed completely.
2019-11-07 11:55:37 -08:00
Witold KręcickiandEvan Hunt aa57fa7090 implement hazard pointer data structure
this is a mechanism to allow safe lock-free data structures.
2019-11-07 11:55:37 -08:00
Witold KręcickiandEvan Hunt ae202e0e7c Preliminary netmgr design documentation 2019-11-07 11:55:37 -08:00
Witold KręcickiandEvan Hunt a5f8374400 add isc_sockaddr_fromsockaddr function
This converts from struct sockaddr to isc_sockaddr_t
2019-11-07 11:55:37 -08:00
Evan Hunt 949103c14f Merge branch '1308-fix-tcp-system-test' into 'master'
Fix "tcp" system test

Closes #1308

See merge request isc-projects/bind9!2549
2019-11-07 19:55:04 +00:00
Evan Hunt 18c9a20f32 make send_command wait for any result, rather than specifically result=OK 2019-11-07 11:32:59 -08:00
Michał KępieńandEvan Hunt 23ca0ec55b Address ShellCheck warnings
Address all outstanding warnings that ShellCheck reports for
bin/tests/system/tcp/tests.sh.
2019-11-07 11:31:57 -08:00
Michał KępieńandEvan Hunt 9841635b7f Use "set -e" in the "tcp" system test
Ensure any unexpected failure in the "tcp" system test causes it to be
immediately interrupted with an error to make the aforementioned test
more reliable.  Since the exit code for "expr 0 + 0" is 1, the status
variable needs to be updated using arithmetic expansion.
2019-11-07 11:31:57 -08:00
Michał KępieńandEvan Hunt 46df363a0d Ensure all "tcp" system test errors are caught
Ensure any "rndc stats" failure causes the "tcp" system test to fail.
Do not hide "rndc stats" output.
2019-11-07 11:31:57 -08:00
Michał KępieńandEvan Hunt 2f4877d11c Make all "tcp" system test checks numbered
Ensure all checks in the "tcp" system test are numbered, so that
forensic data is preserved in case of any failure.
2019-11-07 11:31:57 -08:00
Michał KępieńandEvan Hunt 6bd1f68bef Fix argument order in assert_int_equal()
assert_int_equal() calls in bin/tests/system/tcp/tests.sh pass the found
value as the first argument and the expected value as the second
argument, while the function interprets its arguments the other way
round.  Fix argument handling in assert_int_equal() to make sure the
error messages printed by that function are correct.
2019-11-07 11:31:57 -08:00
Michał KępieńandEvan Hunt 1e22e052d0 Allow retries when checking TCP high-water stats
In the TCP high-water checks, "rndc stats" is run after ans6 reports
that it opened the requested number of TCP connections.  However, we
fail to account for the fact that ns5 might not yet have called accept()
for these connections, in which case the counts output by "rndc stats"
will be off.  To prevent intermittent "tcp" system test failures, allow
the relevant connection count checks to be retried (just once, after one
second, as that should be enough for any system to accept() a dozen TCP
connections under any circumstances).
2019-11-07 11:31:57 -08:00
Evan Hunt 69f8f65323 Merge branch 'each-disable-jitter-test' into 'master'
temporarily disable jitter tests in the 'autosign' system test

See merge request isc-projects/bind9!2551
2019-11-07 18:25:36 +00:00
Evan Hunt e17b7ee05a temporarily disable jitter tests in the 'autosign' system test
the current method used for testing distribution of signatures
is failure-prone. we need to replace it with something both
effective and portable, but in the meantime we're commenting
out the jitter test.
2019-11-07 10:01:58 -08:00
Ondřej Surý 65860c8000 Merge branch '1134-fix-bashisms-in-kasp-test' into 'master'
Fix the bashisms in kasp/tests.sh and make the script shellcheck clean

See merge request isc-projects/bind9!2548
2019-11-07 12:52:14 +00:00
Ondřej Surý d5f00f8303 Use better '\#' quoting in ns3/setup.sh 2019-11-07 12:12:24 +01:00
Ondřej Surý e9df8f4e8e Relax the requirement for check_next_key_event() to <-60;60>
The original requirement for the check to pass was <-10;10> interval and
the first test was failing by 1 second.  As the minimum interval for
checking is 7200 seconds, the commit relaxes the requirement to <-60;60>
interval, which is still sane, but not that draconic.
2019-11-07 12:08:20 +01:00
Ondřej Surý 88bfce0993 Fix the get_keyids() usage as it could return multiple key ids
The get_keyids() function can return multiple keyids, when the
return value was not quoted, only the first keyid would be checked
with check_key() function.  This MR fixes both the error that came
with quoting the "$id" with value "12345 54321", and the code now
checks all returned keyids.
2019-11-07 12:08:20 +01:00
Ondřej Surý 91498f8b9b Clean the rest of the shellcheck errors 2019-11-07 12:08:20 +01:00
Ondřej Surý ec9d6ab64c Use the shellcheck -f diff to autofix certain classes of sh errors 2019-11-07 12:08:20 +01:00
Ondřej Surý 3a9de38eb6 Replace bash array with concatenated evaluated shell variables 2019-11-07 10:44:30 +01:00
Evan Hunt 8afcffaa86 Merge branch 'each-kasp-relnotes' into 'master'
KASP release notes

See merge request isc-projects/bind9!2547
2019-11-07 04:12:36 +00:00
Evan Hunt 45d6239829 CHANGES, REAMDE, release note 2019-11-06 20:06:36 -08:00
Evan Hunt 18454a0b9d add 'kasp' to test list 2019-11-06 19:54:02 -08:00
Matthijs Mekking e7a9f52f50 Merge branch '1134-dnssec-made-easy' into 'master'
DNSSEC Made Easy

Closes #1134

See merge request isc-projects/bind9!2458
2019-11-06 22:40:53 +00:00
Matthijs Mekking bae0edbf02 Fix checkconf test 2019-11-06 22:36:21 +01:00
Matthijs Mekking 5f464d15a0 dnssec-policy inheritance from options/view
'dnssec-policy' can now also be set on the options and view level and
a zone that does not set 'dnssec-policy' explicitly will inherit it
from the view or options level.

This requires a new keyword to be introduced: 'none'.  If set to
'none' the zone will not be DNSSEC maintained, in other words it will
stay unsigned.  You can use this to break the inheritance.  Of course
you can also break the inheritance by referring to a different
policy.

The keywords 'default' and 'none' are not allowed when configuring
your own dnssec-policy statement.

Add appropriate tests for checking the configuration (checkconf)
and add tests to the kasp system test to verify the inheritance
works.

Edit the kasp system test such that it can deal with unsigned zones
and views (so setting a TSIG on the query).
2019-11-06 22:36:21 +01:00
Mark AndrewsandMatthijs Mekking ce1c1631b3 move appending kasp to the list until we can't fail; document why we don't detach 2019-11-06 22:36:21 +01:00
Mark AndrewsandMatthijs Mekking 5eedd365d4 Insist that kasp is not linked. 2019-11-06 22:36:21 +01:00
Matthijs Mekking f11ce44818 Make kasp opaque 2019-11-06 22:36:21 +01:00
Matthijs Mekking 70da58c871 kasp.c: return parenthesis (style) and REQUIRE
This code was missing a lot of return parenthesis (violating our
style guide) and a missing REQUIRE in 'dns_kasplist_find()'.
2019-11-06 22:36:21 +01:00
Matthijs Mekking c3e0ac865f Add tests for CDS/CDNSKEY publication
The kasp system tests are updated with 'check_cds' calls that will
verify that the correct CDS and CDNSKEY records are published during
a rollover and that they are signed with the correct KSK.

This requires a change in 'dnssec.c' to check the kasp key states
whether the CDS/CDNSKEY of a key should be published or not.  If no
kasp state exist, fall back to key timings.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 2e46dcbbce sign_apex() should also consider CDS/CDNSKEY
The 'sign_apex()' function has special processing for signing the
DNSKEY RRset such that it will always be signed with the active
KSK.  Since CDS and CDNSKEY are also signed with the KSK, it
should have the same special processing.  The special processing is
moved into a new function 'tickle_apex_rrset()' and is applied to
all three RR types (DNSKEY, CDS, CDNSKEY).

In addition, when kasp is involved, update the DNSKEY TTL accordingly
to what is in the policy.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 1211c348bb Add dst_key_copy_metadata function.
When updating DNSSEC keys we would like to be able to copy the
metadata from one key to another.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 29e6ec3181 KASP timings all uint32_t
Get rid of the warnings in the Windows build.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 9fbc869108 Test CSK rollover
Test two CSK rollover scenarios, one where the DS is swapped before the zone
signatures are all replaced, and one where the signatures are replaced sooner
than the DS is swapped.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 67033bfd3d Code changes for CSK
Update dns_dnssec_keyactive to differentiate between the roles ZSK
and KSK.  A key is active if it is signing but that differs per role.
A ZSK is signing if its ZRRSIG state is in RUMOURED or OMNIPRESENT,
a KSK is signing if its KRRSIG state is in RUMOURED or OMNIPRESENT.

This means that a key can be actively signing for one role but not
the other.  Add checks in inline signing (zone.c and update.c) to
cover the case where a CSK is active in its KSK role but not the ZSK
role.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 6468ffc336 Use keywords in dnssec-policy keys configuration
Add keywords 'lifetime' and 'algorithm' to make the key configuration
more clear.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 36c72bf3c3 Test ZSK and KSK rollover
Add tests for ZSK Pre-Publication and KSK Double-KSK rollover.

Includes tests for next key event is scheduled at the right time.
2019-11-06 22:36:21 +01:00
Matthijs Mekking c9f1ec8380 Add kasp tests
Add more tests for kasp:

- Add tests for different algorithms.

- Add a test to ensure that an edit in an unsigned zone is
  picked up and properly signed.

- Add two tests that ensures that a zone gets signed when it is
  configured as so-called 'inline-signing'.  In other words, a
  secondary zone that is configured with a 'dnssec-policy'.  A zone
  that is transferred over AXFR or IXFR will get signed.

- Add a test to ensure signatures are reused if they are still
  fresh enough.

- Adds two more tests to verify that expired and unfresh signatures
  will be regenerated.

- Add tests for various cases with keys already available in the
  key-directory.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 7c783ab909 Refactor kasp system test
A significant refactor of the kasp system test in an attempt to
make the test script somewhat brief.  When writing a test case,
you can/should use the functions 'zone_properties',
'key_properties', and 'key_timings' to set the expected values
when checking a key with 'check_key'. All these four functions
can be used to set environment variables that come in handy when
testing output.
2019-11-06 22:36:21 +01:00
Matthijs Mekking c125b721ef Adjust signing code to use kasp
Update the signing code in lib/dns/zone.c and lib/dns/update.c to
use kasp logic if a dnssec-policy is enabled.

This means zones with dnssec-policy should no longer follow
'update-check-ksk' and 'dnssec-dnskey-kskonly' logic, instead the
KASP keys configured dictate which RRset gets signed with what key.

Also use the next rekey event from the key manager rather than
setting it to one hour.

Mark the zone dynamic, as otherwise a zone with dnssec-policy is
not eligble for automatic DNSSEC maintenance.
2019-11-06 22:36:21 +01:00
Matthijs Mekking fcf14b2b47 DNSSEC hints use dst_key functions and key states
Update dns_dnssec_get_hints and dns_dnssec_keyactive to use dst_key
functions and thus if dnssec-policy/KASP is used the key states are
being considered.

Add a new variable to 'struct dns_dnsseckey' to signal whether this
key is a zone-signing key (it is no longer true that ksk == !zsk).

Also introduce a hint for revoke.

Update 'dns_dnssec_findzonekeys' and 'dns_dnssec_findmatchingkeys'
to also read the key state file, if available.

Remove 'allzsk' from 'dns_dnssec_updatekeys' as this was only a
hint for logging.

Also make get_hints() (now dns_dnssec_get_hints()) public so that
we can use it in the key manager.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 09990672d9 Update zoneconf to use kasp config
If a zone has a dnssec-policy set, use signature validity,
dnskey signature validity, and signature refresh from
dnssec-policy.

Zones configured with 'dnssec-policy' will allow 'named' to create
DNSSEC keys (similar to dnssec-keymgr) if not available.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 7e7aa5387c Introduce keymgr in named
Add a key manager to named.  If a 'dnssec-policy' is set, 'named'
will run a key manager on the matching keys.  This will do a couple
of things:

1. Create keys when needed (in case of rollover for example)
   according to the set policy.

2. Retire keys that are in excess of the policy.

3. Maintain key states according to "Flexible and Robust Key
   Rollover" [1]. After key manager ran, key files will be saved to
   disk.

   [1] https://matthijsmekking.nl/static/pdf/satin2012-Schaeffer.pdf

KEY GENERATION

Create keys according to DNSSEC policy.  Zones configured with
'dnssec-policy' will allow 'named' to create DNSSEC keys (similar
to dnssec-keymgr) if not available.

KEY ROLLOVER

Rather than determining the desired state from timing metadata,
add a key state goal.  Any keys that are created or picked from the
key ring and selected to be a successor has its key state goal set
to OMNIPRESENT (this key wants to be signing!). At the same time,
a key that is being retired has its key state goal set to HIDDEN.

The keymgr state machine with the three rules will make sure no
introduction or withdrawal of DNSSEC records happens too soon.

KEY TIMINGS

All timings are based on RFC 7583.

The keymgr will return when the next action is happening so
that the zone can set the proper rekey event. Prior to this change
the rekey event will run every hour by default (configurable),
but with kasp we can determine exactly when we need to run again.

The prepublication time is derived from policy.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 314b90dfdd Useful dst_key functions
Add a couple of dst_key functions for determining hints that
consider key states if they are available.
- dst_key_is_unused:
  A key has no timing metadata set other than Created.
- dst_key_is_published:
  A key has publish timing metadata <= now, DNSKEY state in
  RUMOURED or OMNIPRESENT.
- dst_key_is_active:
  A key has active timing metadata <= now, RRSIG state in
  RUMOURED or OMNIPRESENT.
- dst_key_is_signing:
  KSK is_signing and is_active means different things than
  for a ZSK. A ZSK is active means it is also signing, but
  a KSK always signs its DNSKEY RRset but is considered
  active if its DS is present (rumoured or omnipresent).
- dst_key_is_revoked:
  A key has revoke timing metadata <= now.
- dst_key_is_removed:
  A key has delete timing metadata <= now, DNSKEY state in
  UNRETENTIVE or HIDDEN.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 1f0d6296a1 kasp: Expose more key timings
When doing rollover in a timely manner we need to have access to the
relevant kasp configured durations.

Most of these are simple get functions, but 'dns_kasp_signdelay'
will calculate the maximum time that is needed with this policy to
resign the complete zone (taking into account the refresh interval
and signature validity).

Introduce parent-propagation-delay, parent-registration-delay,
parent-ds-ttl, zone-max-ttl, zone-propagation-delay.
2019-11-06 22:36:21 +01:00
Matthijs Mekking dcf79ce61f keygen/settime: Write out successor/predecessor
When creating a successor key, or calculating time for a successor
key, write out the successor and predecessor metadata to the
related files.
2019-11-06 22:36:21 +01:00
Matthijs Mekking da0ae5299f arm: Update DNSSEC documentation 2019-11-06 22:36:21 +01:00
Matthijs Mekking 53e76f888b Allow DNSSEC records in kasp enabled zone
When signing a zone with dnssec-policy, we don't mind DNSSEC records.
This is useful for testing purposes, and perhaps it is better to
signal this behavior with a different configuration option.
2019-11-06 22:36:21 +01:00
Matthijs Mekking 72042a06d6 dnssec-settime: Allow manipulating state files
Introduce a new option '-s' for dnssec-settime that when manipulating
timing metadata, it also updates the key state file.

For testing purposes, add options to dnssec-settime to set key
states and when they last changed.

The dst code adds ways to write and read the new key states and
timing metadata. It updates the parsing code for private key files
to not parse the newly introduced metadata (these are for state
files only).

Introduce key goal (the state the key wants to be in).
2019-11-06 22:31:45 +01:00
Matthijs Mekking c55625b035 Add functionality to read key state from disk
When reading a key from file, you can set the DST_TYPE_STATE option
to also read the key state.

This expects the Algorithm and Length fields go above the metadata,
so update the write functionality to do so accordingly.

Introduce new DST metadata types for KSK, ZSK, Lifetime and the
timing metadata used in state files.
2019-11-06 22:31:45 +01:00
Matthijs Mekking 2924b19a9d Parse dnssec-policy config into kasp
Add code that actually stores the configuration into the kasp
structure and attach it to the appropriate zone.
2019-11-06 22:31:45 +01:00
Matthijs Mekking 09ac224c5c dnssec-keygen can create keys given dnssec-policy
This commit adds code for generating keys with dnssec-keygen given
a specific dnssec-policy.

The dnssec-policy can be set with a new option '-k'. The '-l'
option can be used to set a configuration file that contains a
specific dnssec-policy.

Because the dnssec-policy dictates how the keys should look like,
many of the existing dnssec-keygen options cannot be used together
with '-k'.

If the dnssec-policy lists multiple keys, dnssec-keygen has now the
possibility to generate multiple keys at one run.

Add two tests for creating keys with '-k': One with the default
policy, one with multiple keys from the configuration.
2019-11-06 22:31:45 +01:00
Matthijs Mekking 97a5698e06 Add various get functions for kasp
Write functions to access various elements of the kasp structure,
and the kasp keys. This in preparation of code in dnssec-keygen,
dnssec-settime, named...
2019-11-06 22:31:45 +01:00
Matthijs Mekking 77d2895a5a Update dst key code to maintain key state
Add a number of metadata variables (lifetime, ksk and zsk role).

For the roles we add a new type of metadata (booleans).

Add a function to write the state of the key to a separate file.

Only write out known metadata to private file.  With the
introduction of the numeric metadata "Lifetime", adjust the write
private key file functionality to only write out metadata it knows
about.
2019-11-06 22:31:45 +01:00
Matthijs Mekking 7f4d1dbddf Nit: fix typo in documentation dst_key_getnum 2019-11-06 22:31:44 +01:00
Matthijs Mekking 68e8741c98 Fix: nums type in dst_keys
This was isc_stdtime_t but should be uint32_t.
2019-11-06 22:31:44 +01:00
Matthijs Mekking e6ee5486ca Nit: fix typo (dnsssec-signzone) 2019-11-06 22:31:44 +01:00
Matthijs Mekking 7bfac50336 Add code for creating kasp from config
Add code for creating, configuring, and destroying KASP keys.  When
using the default policy, create one CSK, no rollover.
2019-11-06 22:31:44 +01:00
Matthijs Mekking 1a9692f5c8 dnssec-keygen: Move keygen function above main
This is done in a separate commit to make diff easier.
2019-11-06 22:31:44 +01:00
Matthijs Mekking 2829e29410 dnssec-keygen: Move key gen code in own function
In preparation for key generation with dnssec-policy, where multiple
keys may be created.
2019-11-06 22:31:44 +01:00
Matthijs Mekking 48ce026dc9 Sync options in dnssec-keygen
Code and documentation were not in line:
- Remove -z option from code
- Remove -k option from docbook
- Add -d option to docbook
- Add -T option to docbook
2019-11-06 22:31:44 +01:00
Matthijs Mekking e9ccebd94e Introduce kasp structure
This stores the dnssec-policy configuration and adds methods to
create, destroy, and attach/detach, as well as find a policy with
the same name in a list.

Also, add structures and functions for creating and destroying
kasp keys.
2019-11-06 22:31:44 +01:00
Matthijs Mekking a50d707fdc Introduce dnssec-policy configuration
This commit introduces the initial `dnssec-policy` configuration
statement. It has an initial set of options to deal with signature
and key maintenance.

Add some checks to ensure that dnssec-policy is configured at the
right locations, and that policies referenced to in zone statements
actually exist.

Add some checks that when a user adds the new `dnssec-policy`
configuration, it will no longer contain existing DNSSEC
configuration options.  Specifically: `inline-signing`,
`auto-dnssec`, `dnssec-dnskey-kskonly`, `dnssec-secure-to-insecure`,
`update-check-ksk`, `dnssec-update-mode`, `dnskey-sig-validity`,
and `sig-validity-interval`.

Test a good kasp configuration, and some bad configurations.
2019-11-06 22:31:44 +01:00
Matthijs Mekking 1fbd8bb1b3 Design documentation 'dnssec-policy'
Initial design document.
2019-11-06 22:31:44 +01:00
Matthijs Mekking b7c5bfb203 Extend ttlval to accept ISO 8601 durations
The ttlval configuration types are replaced by duration configuration
types. The duration is an ISO 8601 duration that is going to be used
for DNSSEC key timings such as key lifetimes, signature resign
intervals and refresh periods, etc. But it is also still allowed to
use the BIND ttlval ways of configuring intervals (number plus
optional unit).

A duration is stored as an array of 7 different time parts.
A duration can either be expressed in weeks, or in a combination of
the other datetime indicators.

Add several unit tests to ensure the correct value is parsed given
different string values.
2019-11-06 22:31:44 +01:00
Matthijs Mekking c67379fb92 Change indentation in doc/arm/dnssec.xml
This commit does not change anything significant, it just makes
the file more readable in preparation for upcoming changes related
to the `dnssec-policy` configuration option.
2019-11-06 22:31:44 +01:00
Michał Kępień 799e95b132 Merge branch '1206-fix-tcp-high-water-release-note' into 'master'
Fix TCP high-water release note

Closes #1206

See merge request isc-projects/bind9!2541
2019-11-06 15:28:55 +00:00
Michał Kępień d0a3273d4d Fix TCP high-water release note
Add missing GitLab issue number to the TCP high-water release note.
2019-11-06 16:25:55 +01:00
Michał Kępień db670fcdc8 Merge branch '1298-do-not-use-sys-sysctl.h-on-linux' into 'master'
Do not use <sys/sysctl.h> on Linux

Closes #1298

See merge request isc-projects/bind9!2525
2019-11-06 14:49:42 +00:00
Michał Kępień 65a8b53bd0 Do not use <sys/sysctl.h> on Linux
glibc 2.30 deprecated the <sys/sysctl.h> header [1].  However, that
header is still used on other Unix-like systems, so only prevent it from
being used on Linux, in order to prevent compiler warnings from being
triggered.

[1] https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html
2019-11-06 15:32:04 +01:00
Michał Kępień 89f874e6ee Merge branch '1206-add-assert_int_equal-shell-function' into 'master'
Add assert_int_equal() shell function

Closes #1206

See merge request isc-projects/bind9!2535
2019-11-06 14:31:02 +00:00
Michał Kępień 8bb7f1f2a1 Add assert_int_equal() shell function
Add a shell function which is used in the "tcp" system test, but has
been accidentally omitted from !2425.  Make sure the function does not
change the value of "ret" itself, so that the caller can decide what to
do with the function's return value.
2019-11-06 15:24:15 +01:00
Ondřej Surý 54b92a04b1 Merge branch '1256-jitter-dynamically-updated-signatures' into 'master'
Resolve "Signature Expiration Jitter not working for dynamic NSEC3 zones"

Closes #1256

See merge request isc-projects/bind9!2451
2019-11-06 14:01:19 +00:00
Ondřej SurýandMatthijs Mekking 00569e0dfa Add CHANGES 2019-11-06 13:31:25 +01:00
Matthijs Mekking 540b90fd6c Test jitter distribution
Test jitter distribution in NSEC3 dynamic zone and for a zone that has old
signatures.  In both cases the generated signatures should be spread nicely.
2019-11-06 13:31:25 +01:00
Witold KręcickiandMatthijs Mekking 6b2fd40269 Jitter signatures times when adding dynamic records.
When doing regular signing expiry time is jittered to make sure
that the re-signing times are not clumped together. This expands
this behaviour to expiry times of dynamically added records.

When incrementally re-signing a zone use the full jitter range if
the server appears to have been offline for greater than 5 minutes
otherwise use a small jitter range of 3600 seconds.  This will stop
the signatures becoming more clustered if the server has been off
line for a significant period of time (> 5 minutes).
2019-11-06 13:31:25 +01:00
Ondřej Surý 7c7f5884e5 Merge branch '1206-tcp-high-water-stats-fix-type' into 'master'
Avoid an extra atomic_load call when doing atomic_compare_exchange_loop

See merge request isc-projects/bind9!2531
2019-11-06 11:31:31 +00:00
Ondřej Surý b4df5a6ecb Avoid an extra atomic_load() call 2019-11-06 11:30:36 +01:00
Ondřej Surý 3361247519 Merge branch '1285-documentation-update-to-sortlist-feature-bugs-42615' into 'master'
arm: Add a sentence about overlaping selectors in sortlist statement

Closes #1285

See merge request isc-projects/bind9!2517
2019-11-06 10:05:27 +00:00
Ondřej Surý ebc61946b2 arm: Add a sentence about overlaping selectors in sortlist statement 2019-11-06 11:04:20 +01:00
Ondřej Surý 9abcff9ce3 Merge branch '1206-tcp-high-water-stats' into 'master'
Added tcp-high-water statistics variable.

Closes #1206

See merge request isc-projects/bind9!2425
2019-11-06 08:47:19 +00:00
Diego FronzaandOndřej Surý ba3fe75e65 Added TCP high-water entry to CHANGES 2019-11-06 09:18:27 +01:00
Diego FronzaandOndřej Surý dd492b64d9 Added TCP high-water entry to release notes 2019-11-06 09:18:27 +01:00
Diego FronzaandOndřej Surý 29be224a04 Added TCP high-water system tests
Note: ans6/ans6.py is a helper script that allows tests.sh to open/close
TCP connections to some BIND instance.
2019-11-06 09:18:27 +01:00
Diego FronzaandOndřej Surý 66fe8627de Added TCP high-water statistics variable
This variable will report the maximum number of simultaneous tcp clients
that BIND has served while running.

It can be verified by running rndc status, then inspect "tcp high-water:
count", or by generating statistics file, rndc stats, then inspect the
line with "TCP connection high-water" text.

The tcp-highwater variable is atomically updated based on an existing
tcp-quota system handled in ns/client.c.
2019-11-06 09:18:27 +01:00
Diego FronzaandOndřej Surý a544e2e300 Add functions for collecting high-water counters
Add {isc,ns}_stats_{update_if_greater,get_counter}() functions that
are used to set and collect high-water type of statistics.
2019-11-06 09:11:20 +01:00
Diego FronzaandOndřej Surý eb5611a770 Change the isc_stat_t type to isc__atomic_statcounter_t
The isc_stat_t type was too similar to isc_stats_t type, so the name was
changed to something more distinguishable.
2019-11-06 09:09:45 +01:00
Diego FronzaandOndřej Surý 0fc98ef2d5 Change the isc_statscounter_t type from int to C99 int_fast64_t type
For TCP high-water work, we need to keep the used integer types widths
in sync.

Note: int_fast32_t is used on WIN32 platform
2019-11-06 08:43:46 +01:00
Mark Andrews 5d4182c945 Merge branch '1301-geoip2-default-data-path' into 'master'
Resolve "geoip2 default data path"

Closes #1301

See merge request isc-projects/bind9!2520
2019-11-05 23:50:12 +00:00
Mark Andrews 7b10faf108 Add CHANGES note 2019-11-06 10:23:33 +11:00
Mark Andrews 51fb42edcb Regenerate configure. 2019-11-06 10:23:29 +11:00
Mark Andrews 2eaa75c380 Have 'named -V' report geoip-directory 2019-11-06 10:20:16 +11:00
Mark Andrews fcd765a59d The default geoip-directory should be <MAXMINDDB_PREFIX>/share/GeoIP 2019-11-06 10:20:16 +11:00
Mark Andrews e0fe33506c MAXMINDDB_LIBS should end with '/lib' not '/libs' 2019-11-06 10:20:16 +11:00
Ondřej Surý ae33c75d06 Merge branch '664-fetches-per-server-quota-docs' into 'master'
Describe the polynomial backoff curve used in the quota adjustment

Closes #664

See merge request isc-projects/bind9!2519
2019-11-05 08:50:01 +00:00
Ondřej Surý 56ef09c3a1 Describe the polynomial backoff curve used in the quota adjustment 2019-11-05 09:48:15 +01:00
Ondřej Surý 5fc8130822 Merge branch '45-integrate-llvm-scan-build-to-gitlab-ci-workflow' into 'master'
Add LLVM/Clang scan-build checks into the GitLab CI

Closes #45

See merge request isc-projects/bind9!2452
2019-11-04 16:00:56 +00:00
Ondřej Surý e9acad638e libdns: add missing checks for return values in dnstap unit test
Related scan-build report:

dnstap_test.c:169:2: warning: Value stored to 'result' is never read
        result = dns_test_makeview("test", &view);
        ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dnstap_test.c:193:2: warning: Value stored to 'result' is never read
        result = dns_compress_init(&cctx, -1, dt_mctx);
        ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
2019-11-04 16:15:22 +01:00
Ondřej Surý 6decd14592 named: remove named_g_defaultdnstap global variable
The named_g_defaultdnstap was never used as the dnstap requires
explicit configuration of the output file.

Related scan-build report:

./server.c:3476:14: warning: Value stored to 'dpath' during its initialization is never read
        const char *dpath = named_g_defaultdnstap;
                    ^~~~~   ~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
2019-11-04 16:15:22 +01:00
Ondřej Surý 64cf5144a6 libdns: Change check_dnskey_sigs() return type to void to match the reality how the function is used 2019-11-04 16:15:22 +01:00
Ondřej Surý 309dca417c tests: Resolve scan-build false positive by adding extra assertion 2019-11-04 16:15:22 +01:00
Ondřej Surý 6bbb0b8e42 dnssec: don't qsort() empty hashlist 2019-11-04 16:15:22 +01:00
Ondřej Surý 6bf364aec8 named: Add INSIST() after bindkeysfile configuration load to silence scan-build FP 2019-11-04 16:15:22 +01:00
Ondřej Surý 7aa7f8592c tests: Workaround scan-build false positive with FD_ZERO/FD_SET 2019-11-04 16:15:22 +01:00
Ondřej Surý 80b55d25de libdns: Remove useless checks for ISC_R_MEMORY, which cannot happen now 2019-11-04 16:15:22 +01:00
Ondřej Surý 5f584310bc ci: Add LLVM/Clang scan-build checks into the GitLab CI 2019-11-04 16:15:22 +01:00
Ondřej Surý d2fdebe02e Merge branch 'u/fanf2/rndc-validation-status-noflush' into 'master'
Do not flush the cache for `rndc validation status`

See merge request isc-projects/bind9!2462
2019-10-31 15:19:57 -04:00
Ondřej Surý 9de062ae76 Add CHANGES 2019-10-31 13:32:00 -05:00
Tony FinchandOndřej Surý b612e38af1 Do not flush the cache for rndc validation status
And add a note to the man page that `rndc validation` flushes the
cache when the validation state is changed. (It is necessary to flush
the cache when turning on validation, to avoid continuing to use
cryptographically invalid data. It is probably wise to flush the cache
when turning off validation to recover from lameness problems.)
2019-10-31 13:31:41 -05:00
Ondřej Surý de368cdf1c Merge branch 'u/fanf2/rndc-validation-status-views' into 'master'
Include all views in output of `rndc validation status`

See merge request isc-projects/bind9!2461
2019-10-31 14:29:43 -04:00
Tony FinchandOndřej Surý a7bcca50c1 Add CHANGES 2019-10-31 11:28:00 -05:00
Tony FinchandOndřej Surý bebeadc8e6 Include all views in output of rndc validation status
The implementation of `rndc validation status` iterates over all the
views to print their validation status. It takes care to print newlines
in between, but it also used put a nul byte at the end of the first view
which truncated the output.

After this change, the nul byte is added at the end so that it prints
the validation status in all views. The `_bind` view is skipped
because its validation status is irrelevant.
2019-10-31 11:28:00 -05:00
Michal Nowak ebbe199715 Merge branch 'mnowak/1244-extra-quotes-around-TESTSOCK6/master' into 'master'
digdelv: Extra quotes prevent IPv6 runs

See merge request isc-projects/bind9!2390
2019-10-31 12:26:46 -04:00
Michal Nowak 1b6419f8a7 digdelv: Extra quotes prevent IPv6 runs
Portion of the digdelv test are skipped on IPv6 due to extra quotes
around $TESTSOCK6: "I:digdelv:IPv6 unavailable; skipping".

Researched by @michal.

Regressed with 351efd8812.
2019-10-31 16:52:28 +01:00
Ondřej Surý b7ed939659 Merge branch 'ondrej/update-git-replay-merge' into 'master'
Update the git-replay-merge to use the latest GitLab -o options

See merge request isc-projects/bind9!2503
2019-10-31 10:18:44 -04:00
Ondřej Surý 0d61b73958 Update the git-replay-merge to use the latest GitLab -o options 2019-10-31 09:18:01 -05:00
Ondřej Surý ecdbc14035 Merge branch '876-documentation-feedback' into 'master'
Minor documentation updates

Closes #876

See merge request isc-projects/bind9!2483
2019-10-31 10:05:49 -04:00
Ondřej Surý e0618174b6 arm: add more text describing interaction between automatic-interface-scan and interface-interval 2019-10-31 09:04:01 -05:00
Ondřej Surý f7eea400a8 arm: Fix the default for the lock-file command, it's 'none' 2019-10-31 09:04:01 -05:00
Brian ConryandOndřej Surý c6f91f8bd0 arm: Add an explanation on the effect of 'require-server-cookie yes;' 2019-10-31 09:04:01 -05:00
Mark AndrewsandOndřej Surý c5453ea328 arm: add why when to set 'require-server-cookie yes;' 2019-10-31 09:04:01 -05:00
Mark AndrewsandOndřej Surý 1ea6aadf6f arm: document resolver-nonbackoff-tries and resolver-retry-interval 2019-10-31 09:04:01 -05:00
Mark AndrewsandOndřej Surý d8abf4f5b6 arm: add default values for require-server-cookie and send-cookie options 2019-10-31 09:04:01 -05:00
Michał Kępień 18dff8e031 Merge branch '1059-prevent-tcp-failures-from-affecting-edns-stats' into 'master'
Prevent TCP failures from affecting EDNS stats

See merge request isc-projects/bind9!2501
2019-10-31 05:36:50 -04:00
Michał Kępień 36d3c66e4e Add CHANGES entry
5310.	[bug]		TCP failures were affecting EDNS statistics. [GL #1059]
2019-10-31 09:54:07 +01:00
Michał Kępień fce3c93ea2 Prevent TCP failures from affecting EDNS stats
EDNS mechanisms only apply to DNS over UDP.  Thus, errors encountered
while sending DNS queries over TCP must not influence EDNS timeout
statistics.
2019-10-31 09:54:05 +01:00
Michał Kępień 7346e6d3b5 Merge branch '1059-prevent-query-loops-for-misbehaving-servers' into 'master'
Prevent query loops for misbehaving servers

See merge request isc-projects/bind9!2500
2019-10-31 04:45:50 -04:00
Michał Kępień 6cd115994e Prevent query loops for misbehaving servers
If a TCP connection fails while attempting to send a query to a server,
the fetch context will be restarted without marking the target server as
a bad one.  If this happens for a server which:

  - was already marked with the DNS_FETCHOPT_EDNS512 flag,
  - responds to EDNS queries with the UDP payload size set to 512 bytes,
  - does not send response packets larger than 512 bytes,

and the response for the query being sent is larger than 512 byes, then
named will pointlessly alternate between sending UDP queries with EDNS
UDP payload size set to 512 bytes (which are responded to with truncated
answers) and TCP connections until the fetch context retry limit is
reached.  Prevent such query loops by marking the server as bad for a
given fetch context if the advertised EDNS UDP payload size for that
server gets reduced to 512 bytes and it is impossible to reach it using
TCP.
2019-10-31 08:48:35 +01:00
Michał Kępień 9fd89c0587 Merge branch 'michal/placeholder-2476' into 'master'
Add a CHANGES placeholder

See merge request isc-projects/bind9!2502
2019-10-30 11:12:37 -04:00
Michał Kępień 3c29291842 Add a CHANGES placeholder
See [GL !2476].
2019-10-30 16:10:39 +01:00
Mark Andrews cea2b533fe Merge branch '1288-log-dns_r_unchanged-from-sync_secure_journal-at-info-level-in-receive_secure_serial' into 'master'
Resolve "Log DNS_R_UNCHANGED from sync_secure_journal at info level in receive_secure_serial."

Closes #1288

See merge request isc-projects/bind9!2490
2019-10-29 20:58:44 -04:00
Mark Andrews e6ef7858c3 add CHANGES 2019-10-30 11:19:34 +11:00
Mark Andrews 8eb09f3232 Log DNS_R_UNCHANGED from sync_secure_journal() at info level in receive_secure_serial() 2019-10-30 11:15:46 +11:00
Mark Andrews c79077894a Merge branch 'u/fanf2/compilezone-hang' into 'master'
Fix hang in `named-compilezone | head`

See merge request isc-projects/bind9!2481
2019-10-29 19:42:08 -04:00
Tony FinchandOndřej Surý 548f29a4d9 CHANGES 2019-10-29 10:57:48 -05:00
Tony FinchandOndřej Surý a87ccea032 Fix hang in named-compilezone | head
I was truncating zone files for experimental purposes when I found
that `named-compilezone | head` got stuck. The full command line that
exhibited the problem was:

	dig axfr dotat.at |
	named-compilezone -o /dev/stdout dotat.at /dev/stdin |
	head

This requires a large enough zone to exhibit the problem, more than
about 70000 bytes of plain text output from named-compilezone.
I was running the command on Debian Stretch amd64.

This was puzzling since it looked like something was suppressing the
SIGPIPE. I used `strace` to examine what was happening at the hang.
The program was just calling write() a lot to print the zone file, and
the last write() hanged until I sent it a SIGINT.

During some discussion with friends, Ian Jackson guessed that opening
/dev/stdout O_RDRW might be the problem, and after some tests we found
that this does in fact suppress SIGPIPE.

Since `named-compilezone` only needs to write to its output file, the
fix is to omit the stdio "+" update flag.
2019-10-29 10:56:56 -05:00
Ondřej Surý 89ee56e1c0 Merge branch 'placeholder-tcp-highwater' into 'master'
placeholder.

See merge request isc-projects/bind9!2495
2019-10-29 10:34:01 -04:00
Diego Fronza 478831964e placeholder. 2019-10-29 11:19:32 -03:00
Ondřej Surý d091772279 Merge branch 'ondrej/update-list-of-supported-platforms-for-9.16' into 'master'
Update the list of supported and unsupported PLATFORMS for BIND 9.15

See merge request isc-projects/bind9!2486
2019-10-29 08:28:30 -04:00
Ondřej Surý cb9553d9e5 Add 'Community Maintained' section to PLATFORMS.md 2019-10-29 06:41:55 -05:00
Ondřej Surý 67166b7ddd Update the list of supported and unsupported PLATFORMS for BIND 9.15 2019-10-29 06:41:55 -05:00
Ondřej Surý 82f07b2c6d Merge branch '1265-disable-synth-from-dnssec-by-default-workaround' into 'master'
Disable synth-from-dnssec by default

See merge request isc-projects/bind9!2491
2019-10-29 05:55:08 -04:00
Ondřej Surý 4a778cfa45 Add CHANGES note 2019-10-29 04:10:12 -05:00
Ondřej Surý fce5a01a63 Add release notes. 2019-10-29 04:10:12 -05:00
Ondřej Surý 800d7843af Adjust synthfromdnssec system test to the changed defaults 2019-10-29 04:10:12 -05:00
Ondřej Surý a20c42dca6 Disable NSEC Aggressive Cache (synth-from-dnssec) by default
It was found that NSEC Aggressive Caching has a significant performance impact
on BIND 9 when used as recursor.  This commit disables the synth-from-dnssec
configuration option by default to provide immediate remedy for people running
BIND 9.12+.  The NSEC Aggressive Cache will be enabled again after a proper fix
will be prepared.
2019-10-29 04:10:12 -05:00
Michał Kępień 7abd918d73 Merge branch 'michal/revamp-the-release-checklist' into 'master'
Revamp the release checklist

See merge request isc-projects/bind9!2488
2019-10-29 04:30:12 -04:00
Michał Kępień a8910de835 Revamp the release checklist
Make the release checklist match the current release process better by
adding missing steps, rearranging existing ones, reassigning
responsibilities, and dividing the list into sections (by due date).
2019-10-29 09:29:05 +01:00
Michał Kępień 35169151d3 Merge branch 'michal/add-centos-8-to-gitlab-ci' into 'master'
Add CentOS 8 to GitLab CI

See merge request isc-projects/bind9!2489
2019-10-29 04:22:34 -04:00
Michał Kępień dce1c05042 Add CentOS 8 to GitLab CI
Ensure BIND can be tested on CentOS 8 in GitLab CI to more quickly catch
build and test errors on that operating system.
2019-10-25 16:56:32 +02:00
Mark Andrews 765312b655 Merge branch '876-documentation-feedback-2' into 'master'
"dnskey-sig-validity 0;" was not accepted

Closes #876

See merge request isc-projects/bind9!2484
2019-10-24 16:08:28 -04:00
Mark Andrews 918f020f9f add named-checkconf tests for dnskey-sig-validity at range limits 2019-10-24 23:16:21 +11:00
Mark Andrews 20647657f9 accept 0 for dnskey-sig-validity (indicates off) 2019-10-24 23:15:09 +11:00
Mark Andrews e33f345c4b Merge branch 'marka-placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!2485
2019-10-24 04:19:45 -04:00
Mark Andrews 0706e626e0 placeholder 2019-10-24 19:14:43 +11:00
Ondřej Surý c77037943d Merge branch '5-update-coding-style' into 'master'
Update the coding style to reflect the year 2019 and C99/C11 standard

Closes #5

See merge request isc-projects/bind9!2148
2019-10-22 06:19:36 -04:00
Ondřej Surý 212e267b05 Update the coding style to reflect the year 2019 and C11 standard 2019-10-22 12:19:14 +02:00
Mark Andrews 5fbab0071a Merge branch '1281-dnstap-per-view-configuration' into 'master'
Resolve "dnstap per view configuration"

Closes #1281

See merge request isc-projects/bind9!2477
2019-10-21 17:20:48 -04:00
Mark Andrews 6ce1e2e731 add CHANGES 2019-10-22 08:03:15 +11:00
Mark Andrews c2fcc9f16f check for relationship between dnstap and dnstap-output seperately 2019-10-21 11:08:06 +11:00
Mark Andrews f3d53630c3 add more dnstap/dnstap-output combinations 2019-10-21 11:06:21 +11:00
Tinderbox User 8c573fc3fd Merge branch 'security-master' 2019-10-19 23:30:23 +00:00
Michał Kępień 2bda78425b Merge branch 'michal/address-cppcheck-1.89-warnings' into 'master'
Address cppcheck 1.89 warnings

See merge request isc-projects/bind9!2472
2019-10-17 05:50:06 -04:00
Michał Kępień db7fd16346 Suppress cppcheck 1.89 false positive
cppcheck 1.89 emits a false positive for lib/dns/spnego_asn1.c:

    lib/dns/spnego_asn1.c:698:9: error: Uninitialized variable: data [uninitvar]
     memset(data, 0, sizeof(*data));
            ^
    lib/dns/spnego.c:1707:47: note: Calling function 'decode_NegTokenResp', 3rd argument '&resp' value is <Uninit>
     ret = decode_NegTokenResp(buf + taglen, len, &resp, NULL);
                                                  ^
    lib/dns/spnego_asn1.c:698:9: note: Uninitialized variable: data
     memset(data, 0, sizeof(*data));
            ^

This message started appearing with cppcheck 1.89 [1], but it will be
gone in the next release [2], so just suppress it for the time being.

[1] https://github.com/danmar/cppcheck/commit/af214e8212efa303e664920a468de00ee0b1fe3d

[2] https://github.com/danmar/cppcheck/commit/2595b826349a7ffbe1c958b806498b6e336bea33
2019-10-16 22:23:41 +02:00
Michał Kępień abfde3d543 Fix cppcheck 1.89 warnings
cppcheck 1.89 enabled certain value flow analysis mechanisms [1] which
trigger null pointer dereference false positives in lib/dns/rpz.c:

    lib/dns/rpz.c:582:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1419:44: note: Calling function 'adj_trigger_cnt', 4th argument 'NULL' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:582:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:596:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1419:44: note: Calling function 'adj_trigger_cnt', 4th argument 'NULL' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:596:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:610:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1419:44: note: Calling function 'adj_trigger_cnt', 4th argument 'NULL' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:610:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^

It seems that cppcheck no longer treats at least some REQUIRE()
assertion failures as fatal, so add extra assertion macro definitions to
lib/isc/include/isc/util.h that are only used when the CPPCHECK
preprocessor macro is defined; these definitions make cppcheck 1.89
behave as expected.

There is an important requirement for these custom definitions to work:
cppcheck must properly treat abort() as a function which does not
return.  In order for that to happen, the __GNUC__ macro must be set to
a high enough number (because system include directories are used and
system headers compile attributes away if __GNUC__ is not high enough).
__GNUC__ is thus set to the major version number of the GCC compiler
used, which is what that latter does itself during compilation.

[1] https://github.com/danmar/cppcheck/commit/aaeec462e6d96bb70c2b1cf030979d09e2d7c959
2019-10-16 22:23:36 +02:00
Michał Kępień 15b8f92a5a Merge branch 'michal/cleanup-with-cc-alg-remnants' into 'master'
Remove remnants of the --with-cc-alg option

See merge request isc-projects/bind9!2436
2019-10-15 16:35:11 -04:00
Michał Kępień 428dcf3b49 Remove remnants of the --with-cc-alg option
Commit afa81ee4e4 omitted some spots in
the source tree which are still referencing the removed --with-cc-alg
"configure" option.  Make sure the latter is removed completely.
2019-10-15 21:57:58 +02:00
Michał Kępień 2007a7d2db Merge branch 'michal/limit-triggers-for-openbsd-system-test-jobs' into 'master'
Limit triggers for OpenBSD system test jobs

See merge request isc-projects/bind9!2468
2019-10-15 15:52:33 -04:00
Michał Kępień 603e04563b Limit triggers for OpenBSD system test jobs
When a GitLab CI runner is not under load, a single OpenBSD system test
job completes in about 12 minutes, which is considered decent.  However,
such jobs are usually multiplexed with other system test jobs on the
same host, which causes each of them to take even 40 minutes to
complete.  Taking retries into account, this is completely unacceptable
for everyday use, so only start OpenBSD system test jobs for pipelines
created through GitLab's web interface and for pipelines created for Git
tags.
2019-10-15 21:47:47 +02:00
Michał Kępień 818d2bed31 Merge branch 'michal/minor-gitlab-ci-tweaks' into 'master'
Minor GitLab CI tweaks

See merge request isc-projects/bind9!2435
2019-10-15 15:45:54 -04:00
Michał Kępień dd97dfdc14 Tweak dependencies for the Windows build job
Since the Windows build job does not use the files created as a result
of running "autoreconf -fi" in the "autoreconf:sid:amd64" job, set its
dependencies to an empty list.

Since it is currently not possible to use "needs: []" for jobs which do
not belong to the first stage of a pipeline, set the "needs" key for the
Windows build job to the "autoreconf:sid:amd64" job so that all build
jobs are started at the same time (without this change, the Windows
build job does not start until all jobs in the "precheck" stage are
finished).

As a side note, these changes also attempt to eliminate intermittent,
bogus GitLab error messages ("There has been a missing dependency
failure").
2019-10-15 20:49:08 +02:00
Michał Kępień e83b322f7f Fix artifacts created by the "autoreconf" CI job
The intended purpose of the "autoreconf:sid:amd64" GitLab CI job is to
run "autoreconf -fi" and then pass the updated files on to subsequent
non-Windows build jobs.  However, the artifacts currently created by
that job only include files which are not tracked by Git.  Since we
currently do track e.g. "configure" with Git, the aforementioned job is
essentially a no-op.  Fix by manually specifying the files generated by
the "autoreconf:sid:amd64" job that should be passed on to subsequent
build jobs.
2019-10-15 20:49:08 +02:00
Michał Kępień 175d096e1e Merge branch 'michal/add-openbsd-to-gitlab-ci' into 'master'
Add OpenBSD to GitLab CI

Closes #148

See merge request isc-projects/bind9!2434
2019-10-15 14:44:40 -04:00
Michał Kępień 07d2fcb544 Add OpenBSD to GitLab CI
Ensure BIND can be tested on OpenBSD in GitLab CI to more quickly catch
build and test errors on that operating system.

Some notes:

  - While GCC is packaged for OpenBSD, only old versions (4.2.1, 4.9.4)
    are readily available and none of them is the default system
    compiler, so we are only doing Clang builds in GitLab CI.

  - Unit tests are currently not run on OpenBSD because it ships with an
    old version of kyua which does not handle skipped tests properly.
    These jobs will be added when we move away from using kyua in the
    future as the test code itself works fine.

  - All OpenBSD jobs are run inside QEMU virtual machines, using GitLab
    Runner Custom executor.
2019-10-15 16:38:04 +02:00
Michał Kępień 6b5426e1a7 Work around an OpenBSD "make" quirk
Consider the following Makefile:

    foo:
    	false

On OpenBSD, the following happens for this Makefile:

  - "make foo" returns 1,
  - "make -k foo" returns 0,
  - "make -k -j6 foo" returns 1.

However, if the .NOTPARALLEL pseudo-target is added to this Makefile,
"make -k -j6 foo" will return 0 as well.

Since bin/tests/Makefile contains the .NOTPARALLEL pseudo-target,
running "make -k -j6 test" from bin/tests/ on OpenBSD prevents any
errors from being reported through that command's exit code.

Work around the issue by running "make -k -j6 test" in the
bin/tests/system/ directory instead as bin/tests/system/Makefile does
not contain the .NOTPARALLEL pseudo-target and thus things work as
expected there.
2019-10-15 16:38:04 +02:00
Mark Andrews 69b023e862 Merge branch '1143-a-minor-documentation-issue-consideration-of-parsing-inconsistencies-in-ipv4s-in-address-match-lists-and-in-a-controls-inet-statement' into 'master'
Resolve "A minor documentation issue & consideration of parsing inconsistencies in IPv4s in address match lists and in a controls/inet statement"

Closes #1143

See merge request isc-projects/bind9!2152
2019-10-13 10:27:38 -04:00
Mark Andrews fb87e669fb Detect partial prefixes / incomplete IPv4 address in acls. 2019-10-14 00:28:07 +11:00
Ondřej Surý 67cb24b9ce Merge branch 'u/fanf2/dsdigest-abbr' into 'master'
cleanup: more consistent abbreviated DS digest type mnemonics

See merge request isc-projects/bind9!2440
2019-10-10 15:58:17 -04:00
Tony FinchandOndřej Surý b770ea976d cleanup: more consistent abbreviated DS digest type mnemonics
BIND supports the non-standard DNSKEY algorithm mnemonic ECDSA256
everywhere ECDSAP256SHA256 is allowed, and allows algorithm numbers
interchangeably with mnemonics. This is all done in one place by the
dns_secalg_fromtext() function.

DS digest types were less consistent: the rdata parser does not allow
abbreviations like SHA1, but the dnssec-* command line tools do; and
the command line tools do not alow numeric types though that is the
norm in rdata.

The command line tools now use the dns_dsdigest_fromtext() function
instead of rolling their own variant, and dns_dsdigest_fromtext() now
knows about abbreviated digest type mnemonics.
2019-10-10 12:31:39 -04:00
Ondřej Surý 8c33b12741 Merge branch 'ondrej/1-week-artifact-expiration' into 'master'
Synchronize the lifetime of artifact to 1 week

See merge request isc-projects/bind9!2448
2019-10-10 01:44:33 -04:00
Tinderbox User e59212e54b Merge branch 'fix-doc' into security-master 2019-10-09 20:46:01 +00:00
Tinderbox User 59a245077d regenerate doc 2019-10-09 20:45:13 +00:00
Ondřej Surý 85c0bede78 Synchronize the lifetime of artifact to 1 week 2019-10-09 21:46:48 +02:00
Ondřej Surý 5309987df7 Merge branch '1119-tsan-lib/dns/view.c-attributes' into 'master'
Convert struct dns_view->attributes to atomic_uint to prevent some locking

See merge request isc-projects/bind9!2368
2019-10-09 02:51:24 -04:00
Ondřej Surý 8b8826f403 Merge branch 'security-master-issue-numbers' into 'security-master'
Fix the GitLab issue numbers in CHANGES and notes.xml

See merge request isc-private/bind9!121
2019-10-09 02:38:48 -04:00
Ondřej Surý db63c2a700 Convert struct dns_view->attributes to atomic_uint to prevent some locking 2019-10-09 08:09:44 +02:00
Ondřej Surý 4bd5d76beb Fix the GitLab issue numbers in CHANGES and notes.xml 2019-10-09 08:03:07 +02:00
Tinderbox User 38270b7900 regen master 2019-10-06 03:16:14 +00:00
Ondřej Surý f2eeff0342 Merge branch 'ondrej/cleanup-copyrights' into 'master'
Cleanup the COPYRIGHTS file

See merge request isc-projects/bind9!2377
2019-10-04 02:40:56 -04:00
Ondřej Surý fc997e571d Remove The OpenSSL Project from COPYRIGHT, the OpenSSL patches were removed 2019-10-04 08:39:20 +02:00
Ondřej Surý f761a80842 Cleanup the last bits copyrighted to RSA Security and remove them from COPYRIGHT file 2019-10-04 08:39:20 +02:00
Ondřej Surý 52c10b78f1 Remove Doug Rabson and Jake Burkholder from COPYRIGHT, the code was removed 2019-10-04 08:36:45 +02:00
Ondřej Surý e179d083d4 Remove Aaron D. Gifford from COPYRIGHT, the code was removed 2019-10-04 08:36:45 +02:00
Ondřej Surý acf1cfe15d Remove Rice University from COPYRIGHT, the code was removed 2019-10-04 08:36:45 +02:00
Ondřej Surý 37b677ca59 Remove Japan Network Information Center from COPYRIGHT, the code was removed 2019-10-04 08:36:45 +02:00
Ondřej Surý 86f4191405 Merge branch 'ondrej/remove-rsa-pkcs11-header-remnants' into 'master'
Remove unused RSA Security copyrighted cryptoki.h header

See merge request isc-projects/bind9!2445
2019-10-04 02:35:58 -04:00
Ondřej Surý 635e5293b2 Remove unused RSA Security copyrighted cryptoki.h header 2019-10-04 08:35:45 +02:00
Evan Hunt 841d1b6ab5 Merge branch '1226-yaml-empty-edns-options' into 'master'
Resolve "dig: EDNS options in requests cause bad YAML output"

Closes #1226

See merge request isc-projects/bind9!2345
2019-10-04 02:16:14 -04:00
Evan Hunt bba7855e68 CHANGES 2019-10-03 22:52:17 -07:00
Evan Hunt 877b463bcc fix digdelv KEY-TAG test
also incidentally added several missing ret=0 statements,
and removed some duplicates.
2019-10-03 22:52:16 -07:00
Evan Hunt 8e9a58eaa7 TCP KEEPALIVE was missing from yaml output 2019-10-03 22:52:16 -07:00
Evan Hunt 69322c7357 always print a colon after EDNS option names in text output
make the same change as in the previous commit to non-YAML text output,
for better readability and consistency between formats.
2019-10-03 22:52:16 -07:00
Evan Hunt ed1b328186 always print a colon after EDNS option names in YAML output
previously, if the option was empty, then it was printed without a
colon, which could not be parsed as YAML. adding a colon in all cases
addresses this problem.
2019-10-03 22:52:16 -07:00
Mark Andrews b22bb64c31 Merge branch 'marka-silence-clang' into 'master'
silence clang warning by using local variable.

See merge request isc-projects/bind9!2419
2019-10-03 21:31:11 -04:00
Mark AndrewsandEvan Hunt 1b27ab8642 silence clang warning by using local variable.
'isc_commandline_index' is a global variable so it can theoretically
change result between if expressions.  Save 'argv[isc_commandline_index]'
to local variable 'arg1' and use 'arg1 == NULL' in if expressions
instead of 'argc < isc_commandline_index + 1'.  This allows clang
to correctly determine what code is reachable.
2019-10-03 15:02:59 -07:00
Ondřej Surý 52f0009be6 Merge branch 'ondrej/cppcheck-suppressions-list' into 'master'
Use util/suppressions.txt for Cppcheck suppressions list

See merge request isc-projects/bind9!2437
2019-10-03 10:10:14 -04:00
Ondřej Surý 4926099490 Use util/suppressions.txt for Cppcheck suppressions list 2019-10-03 15:28:38 +02:00
Ondřej Surý fb14852ede Merge branch 'ondrej/enable-cppcheck' into 'master'
Add Cppcheck job to the CI

See merge request isc-projects/bind9!2403
2019-10-03 03:32:28 -04:00
Ondřej Surý a0d3614a60 Remove randomly scattered additional style check suppressions that caused unmatchedSuppression 2019-10-03 09:04:27 +02:00
Ondřej Surý d1f035bbba lib/ns/query.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 09:04:27 +02:00
Ondřej Surý 033f3eb580 lib/ns/interfacemgr.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 09:04:27 +02:00
Ondřej Surý b4a42a286f lib/ns/client.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 09:04:27 +02:00
Ondřej Surý f855f09a55 lib/isccfg/parser.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 09:04:27 +02:00
Ondřej Surý 09232213d7 lib/isccfg/aclconf.c: Suppress nullPointerRedundantCheck false positive 2019-10-03 09:04:27 +02:00
Ondřej Surý 026cf2ff4f lib/isc/unix/socket.c: Suppress preprocessorErrorDirective error from Cppcheck 2019-10-03 09:04:27 +02:00
Ondřej Surý c662969da1 lib/isc/task.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 09:04:27 +02:00
Ondřej Surý e8948fd9b4 lib/isc/pkc11.c: Fix possible NULL pointer dereference in push_attribute() 2019-10-03 09:04:27 +02:00
Ondřej Surý e9f30fc211 lib/isc/buffer.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 09:04:27 +02:00
Ondřej Surý 8f2ad12d0a lib/dns/tsig.c: Suppress Cppcheck false positive error uninitStructMember 2019-10-03 09:04:27 +02:00
Ondřej Surý 14c174d921 lib/dns/tests/rbt_serialize_test.c: Fix dereference before DbC check 2019-10-03 09:04:27 +02:00
Ondřej Surý 269d507ccc Instead of declaring unused va_list, just don't declare it at all 2019-10-03 09:04:27 +02:00
Ondřej Surý 5fc7e98d29 lib/dns/rdatalist.c: Fix dereference before DbC check 2019-10-03 09:04:26 +02:00
Ondřej Surý 66af8713d8 lib/dns/rdata/*/*.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck
Cppcheck gets confused by:

void bar(void *arg) {
    foo *data = arg;
    REQUIRE(source != NULL);
    REQUIRE(data->member != NULL);
}

and for consistency the DbC check needs to be changed to

void bar(void *arg) {
    foo *data = arg;
    REQUIRE(data != NULL);
    REQUIRE(data->member != NULL);
}
2019-10-03 09:04:26 +02:00
Ondřej Surý e68333aa67 lib/dns/rdata.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck 2019-10-03 09:04:26 +02:00
Ondřej Surý d508ce4036 lib/dns/rbtdb.c: Add DbC check to safely dereference rbtdb in rbt_datafixer() 2019-10-03 09:04:26 +02:00
Ondřej Surý 8be5c3fcfc lib/dns/rbt.c: Suppress nullPointerRedundantCheck warnings from Cppcheck 2019-10-03 09:04:26 +02:00
Ondřej Surý 0f5860aad3 lib/dns/name.c: Fix dereference before DbC check reported by Cppcheck 2019-10-03 09:04:26 +02:00
Ondřej Surý cea871464f lib/dns/gssapi_link.c: Fix %d -> %u formatting when printing unsigned integers 2019-10-03 09:04:26 +02:00
Ondřej Surý d8879af877 Fix passing NULL after the last typed argument to a variadic function leads to undefined behaviour.
From Cppcheck:

Passing NULL after the last typed argument to a variadic function leads to
undefined behaviour.  The C99 standard, in section 7.15.1.1, states that if the
type used by va_arg() is not compatible with the type of the actual next
argument (as promoted according to the default argument promotions), the
behavior is undefined.  The value of the NULL macro is an implementation-defined
null pointer constant (7.17), which can be any integer constant expression with
the value 0, or such an expression casted to (void*) (6.3.2.3). This includes
values like 0, 0L, or even 0LL.In practice on common architectures, this will
cause real crashes if sizeof(int) != sizeof(void*), and NULL is defined to 0 or
any other null pointer constant that promotes to int.  To reproduce you might be
able to use this little code example on 64bit platforms. If the output includes
"ERROR", the sentinel had only 4 out of 8 bytes initialized to zero and was not
detected as the final argument to stop argument processing via
va_arg(). Changing the 0 to (void*)0 or 0L will make the "ERROR" output go away.

void f(char *s, ...) {
    va_list ap;
    va_start(ap,s);
    for (;;) {
        char *p = va_arg(ap,char*);
        printf("%018p, %s\n", p, (long)p & 255 ? p : "");
        if(!p) break;
    }
    va_end(ap);
}

void g() {
    char *s2 = "x";
    char *s3 = "ERROR";

    // changing 0 to 0L for the 7th argument (which is intended to act as
    // sentinel) makes the error go away on x86_64
    f("first", s2, s2, s2, s2, s2, 0, s3, (char*)0);
}

void h() {
    int i;
    volatile unsigned char a[1000];
    for (i = 0; i<sizeof(a); i++)
        a[i] = -1;
}

int main() {
    h();
    g();
    return 0;
}
2019-10-03 09:04:26 +02:00
Ondřej Surý 91cc6b9eb9 lib/dns/ecdb.c: Fix couple of DbC conditions reported by Cppcheck 2019-10-03 09:04:26 +02:00
Ondřej Surý fa7475b77a Fix the constification of the dns_name_t * result variable for dns_tsig_identity() 2019-10-03 09:04:26 +02:00
Ondřej Surý 43925b2a8b bin/named/zoneconf.c: Reset dns_name_t *tsig on every view iteration 2019-10-03 09:04:26 +02:00
Ondřej Surý 2e304b0b7f Change dns_tsigkey_identity from macro to a function and const argument and result 2019-10-03 09:04:26 +02:00
Ondřej Surý 4d2697b31c Constify dns_name_t *signer argument to dns_acl_allowed() 2019-10-03 09:04:26 +02:00
Ondřej Surý 476277a6e6 bin/named/server.c: Fix couple of DbC conditions reported by Cppcheck 2019-10-03 09:04:26 +02:00
Ondřej Surý 9366ca769f bin/dig/dighost.c: Fix REQUIRE(!= NULL) condition after the variable has been dereferenced 2019-10-03 09:04:26 +02:00
Ondřej Surý 9ab16d10d4 bin/delv/delv.c: Fix invalid logic operation in REQUIRE() condition 2019-10-03 09:04:26 +02:00
Ondřej Surý f55dc51f42 Add Cppcheck job to the CI
This MR changes the default Debian sid build to wrap make with bear
that creates compilation database and use the compilation database
to run Cppcheck on the source files systematically.

The job is currently set to be allowed to fail as it will take some
time to fix all the Cppcheck detected issues.
2019-10-03 09:04:26 +02:00
Ondřej Surý 5be620bd35 Merge branch '1119-disable-time-consuming-tests-benchmarks-when-tsan-is-enabled' into 'master'
Disable time consuming tests when compiling with Thread Sanitizer

See merge request isc-projects/bind9!2365
2019-10-02 08:49:00 -04:00
Ondřej Surý 2230b9d55d Disable benchmark tests when Thread Sanitizer is enabled 2019-10-02 14:09:33 +02:00
Ondřej Surý 8828a41077 Declare __SANITIZE_THREAD__ in isc/util.h when clang ThreadSanitizer is used 2019-10-02 14:09:33 +02:00
Ondřej Surý 86983405f2 Merge branch '1119-tsan-lib/isc/tests/timer_test.c' into 'master'
Convert all variables accessed between multiple threads to atomic

See merge request isc-projects/bind9!2364
2019-10-02 08:06:13 -04:00
Ondřej Surý e06a34674a Convert all variables accessed between multiple threads to atomic 2019-10-02 13:41:45 +02:00
Ondřej Surý 3a0a69a9cd Merge branch '1119-tsan-lib/isc/tests/task_test.c' into 'master'
Convert all variables accessed between multiple threads to atomic

See merge request isc-projects/bind9!2363
2019-10-02 07:38:10 -04:00
Ondřej Surý 07879f354c Properly initialize atomic variables 2019-10-02 13:09:33 +02:00
Ondřej Surý 76e954124a lib/isc/tests/task_test.c: Convert all variables accessed between multiple threads to atomic 2019-10-02 13:09:28 +02:00
Ondřej Surý 91e2deede6 Merge branch '1119-tsan-lib/dns/zone.c-flags' into 'master'
Convert the dns_zone_t flags, options and keyopts to stdatomic

See merge request isc-projects/bind9!2359
2019-10-02 07:08:35 -04:00
Ondřej Surý 9b0d4f520e Convert DNS_ZONEKEY_, DNS_ZONEFLG_ and DNS_ZONELOADFLAG_ #defines to enums 2019-10-02 12:41:12 +02:00
Ondřej Surý 679ef8bb95 Fix miscelaneous zone object validity checking errors (missing REQUIRE(), out of order REQUIRE()) 2019-10-02 12:41:12 +02:00
Ondřej Surý 2638337826 Convert the flags, options, and keyopts of dns_zone_t structure to 64-bit stdatomic types
...and use atomic_fetch_or and atomic_fetch_and to set and clear the flags
2019-10-02 12:41:12 +02:00
Ondřej Surý e1b24a4dfe Merge branch '1119-tsan-dispatch_test.c' into 'master'
lib/dns/tests/dispatch_test.c: Convert global responses variable to atomic to prevent data race

See merge request isc-projects/bind9!2355
2019-10-02 06:39:28 -04:00
Ondřej Surý 55a3217fe7 Convert global variables to atomic to prevent possible data race 2019-10-02 12:09:44 +02:00
Stephen Morris 2aec2e6425 Merge branch 'stephen/update-release-template' into 'master'
Update release checklist template

See merge request isc-projects/bind9!2428
2019-10-02 05:15:26 -04:00
Stephen Morris 27b98a1e78 Update release template
Include a step stating that tags for the published releases must
be created in the public repository.
2019-10-02 09:28:21 +01:00
Tinderbox User 87676a6ac0 Merge branch 'prep-release' into security-master 2019-10-02 06:09:11 +00:00
Tinderbox User 0729d194c9 prep 9.15.5 2019-10-02 06:08:59 +00:00
Evan Hunt b1e2902228 Merge branch '16-security-mirror-key-check' into security-master 2019-10-01 22:38:16 -07:00
Evan Hunt 03278d6062 CHANGES, release note 2019-10-01 22:37:58 -07:00
Evan Hunt bc727e5ccc fix mirror zone trust anchor check
- compare key data when checking for a trust anchor match.
- allow for the possibility of multiple trust anchors with the same key ID
  so we don't overlook possible matches.
2019-10-01 22:36:44 -07:00
Evan Hunt 6923a80357 Merge branch 'marka-forward-to-non-recursive' into security-master 2019-10-01 22:13:05 -07:00
Mark AndrewsandEvan Hunt b7442e4389 add release note entry 2019-10-01 22:09:40 -07:00
Mark AndrewsandEvan Hunt 21553af7cc add CHANGES 2019-10-01 22:09:40 -07:00
Mark AndrewsandEvan Hunt 622bef6aec reset fctx->qmindcname and fctx->qminname after processing a delegation 2019-10-01 22:09:04 -07:00
Mark AndrewsandEvan Hunt 47d285a7d6 check recovery from forwarding to a non-recursive server 2019-10-01 22:09:04 -07:00
Evan Hunt 9c0262f1c9 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!2427
2019-10-02 01:08:05 -04:00
Evan Hunt 0d65990741 placeholder 2019-10-01 22:07:31 -07:00
Evan Hunt 3520d62b07 Merge branch '1191-qmin-fetch-failure' into 'master'
SERVFAIL if a prior qmin fetch has not been canceled when a new one starts

See merge request isc-projects/bind9!2416
2019-10-02 00:13:07 -04:00
Evan Hunt 1d741c5c0f CHANGES 2019-10-01 20:47:45 -07:00
Evan Hunt 488cb4da10 SERVFAIL if a prior qmin fetch has not been canceled when a new one starts 2019-10-01 20:41:53 -07:00
Ondřej Surý 879c0f4cf6 Merge branch 'ondrej/fix-coccinelle-detected-issues' into 'master'
Various little fixes found by coccinelle

See merge request isc-projects/bind9!2325
2019-10-01 11:17:45 -04:00
Ondřej Surý 288f5a4b52 Various little fixes found by coccinelle
The coccinellery repository provides many little semantic patches to fix common
problems in the code.  The number of semantic patches in the coccinellery
repository is high and most of the semantic patches apply only for Linux, so it
doesn't make sense to run them on regular basis as the processing takes a lot of
time.

The list of issue found in BIND 9, by no means complete, includes:

- double assignment to a variable
- `continue` at the end of the loop
- double checks for `NULL`
- useless checks for `NULL` (cannot be `NULL`, because of earlier return)
- using `0` instead of `NULL`
- useless extra condition (`if (foo) return; if (!foo) { ...; }`)
- removing & in front of static functions passed as arguments
2019-10-01 16:48:55 +02:00
Ondřej Surý c2e8a111f5 Merge branch 'ondrej/fix-gitlab-ci-for-master-branch-v2' into 'master'
Fix the triggering rule for autoreconf job (take 2)

See merge request isc-projects/bind9!2424
2019-10-01 10:43:56 -04:00
Ondřej Surý afa6d88e21 Fix the triggering rule for autoreconf job (take 2) 2019-10-01 16:42:33 +02:00
Ondřej Surý 7b33f048b0 Merge branch 'ondrej/fix-gitlab-ci-for-master-branch' into 'master'
Fix docs -> autoreconf dependencies in the .gitlab-ci.yml

See merge request isc-projects/bind9!2423
2019-10-01 10:32:27 -04:00
Ondřej Surý 978476934c Fix docs -> autoreconf dependencies in the .gitlab-ci.yml 2019-10-01 16:29:33 +02:00
Ondřej Surý 7b554b0e46 Merge branch 'ondrej/use-%zu-for-sizeof-formatting' into 'master'
lib/dns/ssu_external.c: Use %zu for formatting sizeof() output

See merge request isc-projects/bind9!2415
2019-10-01 10:25:22 -04:00
Ondřej Surý 395741f9ad lib/dns/ssu_external.c: Use %zu for formatting sizeof() output 2019-10-01 16:24:29 +02:00
Mark Andrews e7f0a252a1 Merge branch 'marka-placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!2422
2019-10-01 09:12:09 -04:00
Mark Andrews 738e4cb0fe placeholder 2019-10-01 22:56:53 +10:00
Mark Andrews cca33260f2 Merge branch 'marka-remove-unused-variable' into 'master'
remove unused variable

See merge request isc-projects/bind9!2418
2019-09-30 23:11:52 -04:00
Mark Andrews dfcc9e18cb remove unused variable 2019-10-01 12:47:26 +10:00
Mark Andrews 066e860f8f Merge branch 'marka-missing-runtime-check' into 'master'
missing RUNTIME_CHECK

See merge request isc-projects/bind9!2265
2019-09-30 21:10:28 -04:00
Mark Andrews 346624fe38 add CHANGES 2019-10-01 10:44:06 +10:00
Ondřej SurýandMark Andrews 69ecc711ac Move the failure handling block closer to the only place where it could fail 2019-10-01 10:43:26 +10:00
Ondřej SurýandMark Andrews c2dad0dcb2 Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf()
Use the semantic patch from the previous commit to replace all the calls to
dns_name_copy() with NULL as third argument with dns_name_copynf().
2019-10-01 10:43:26 +10:00
Ondřej SurýandMark Andrews ac26ecf540 Add semantic patch to replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf 2019-10-01 10:43:26 +10:00
Ondřej SurýandMark Andrews f7aef3738a Split dns_name_copy() into dns_name_copy() and dns_name_copynf()
The dns_name_copy() function followed two different semanitcs that was driven
whether the last argument was or wasn't NULL.  This commit splits the function
in two where now third argument to dns_name_copy() can't be NULL and
dns_name_copynf() doesn't have third argument.
2019-10-01 10:43:26 +10:00
Ondřej SurýandMark Andrews 5efa29e03a The final round of adding RUNTIME_CHECK() around dns_name_copy() calls
This commit was done by hand to add the RUNTIME_CHECK() around stray
dns_name_copy() calls with NULL as third argument.  This covers the edge cases
that doesn't make sense to write a semantic patch since the usage pattern was
unique or almost unique.
2019-10-01 10:43:26 +10:00
Ondřej SurýandMark Andrews 89b269b0d2 Add RUNTIME_CHECK() around result = dns_name_copy(..., NULL) calls
This second commit uses second semantic patch to replace the calls to
dns_name_copy() with NULL as third argument where the result was stored in a
isc_result_t variable.  As the dns_name_copy(..., NULL) cannot fail gracefully
when the third argument is NULL, it was just a bunch of dead code.

Couple of manual tweaks (removing dead labels and unused variables) were
manually applied on top of the semantic patch.
2019-10-01 10:43:26 +10:00
Ondřej SurýandMark Andrews 35bd7e4da0 Add RUNTIME_CHECK() around plain dns_name_copy(..., NULL) calls using spatch
This commit add RUNTIME_CHECK() around all simple dns_name_copy() calls where
the third argument is NULL using the semantic patch from the previous commit.
2019-10-01 10:43:26 +10:00
Ondřej SurýandMark Andrews 406eba0c41 Add semantic patches to correctly check dns_name_copy(..., NULL) return code
The dns_name_copy() function cannot fail gracefully when the last argument
(target) is NULL.  Add RUNTIME_CHECK()s around such calls.

The first semantic patch adds RUNTIME_CHECK() around any call that ignores the
return value and is very safe to apply.

The second semantic patch attempts to properly add RUNTIME_CHECK() to places
where the return value from `dns_name_copy()` is recorded into `result`
variable.  The result of this semantic patch needs to be reviewed by hand.

Both patches misses couple places where the code surrounding the
`dns_name_copy(..., NULL)` usage is more complicated and is better suited to be
fixed by a human being that understands the surrounding code.
2019-10-01 10:43:26 +10:00
Ondřej Surý 98886bab43 Merge branch '846-dig-idn-alabel-fallback' into 'master'
Resolve "dig cannot display ACE query if locale is not unicode"

Closes #846

See merge request isc-projects/bind9!1418
2019-09-30 05:49:01 -04:00
Ondřej Surý dccec984c0 Add CHANGES for GL #846 2019-09-30 11:47:39 +02:00
Ondřej Surý c42e3583f9 Test of valid A-label in locale that cannot display it only with non-broken idn2
The libidn2 library on Ubuntu Bionic is broken and idn2_to_unicode_8zlz() does't
fail when it should.  This commit ensures that we don't run the system test for
valid A-label in locale that cannot display with the buggy libidn2 as it would
break the tests.
2019-09-30 11:47:39 +02:00
Petr MenšíkandOndřej Surý 21371abd72 Emit warning on IDN output failure
Warning is emitted before any dig headers.
2019-09-30 08:52:13 +02:00
Petr MenšíkandOndřej Surý ac0cf85f09 Modify idna test to fallback to ACE
Test valid A-label on input would be displayed as A-label on output if
locale does not allow U-label.
2019-09-30 08:52:13 +02:00
Petr MenšíkandOndřej Surý c8a871e908 Fallback to ASCII on output IDN conversion error
It is possible dig used ACE encoded name in locale, which does not
support converting it to unicode. Instead of fatal error, fallback to
ACE name on output.
2019-09-30 08:52:13 +02:00
Mark Andrews 06b1af798f Merge branch 'marka-correct-list' into 'master'
use correct list

See merge request isc-projects/bind9!2410
2019-09-28 20:50:55 -04:00
Mark Andrews 9cd308ac5e Address cut-and-paste error where list name was not changed in one instance for change 5292. 2019-09-29 10:48:59 +10:00
Michał Kępień c8925fe4d6 Merge branch '147-add-windows-to-gitlab-ci' into 'master'
Add Windows to GitLab CI

Closes #327 and #147

See merge request isc-projects/bind9!2383
2019-09-27 06:59:49 -04:00
Michał Kępień 646fcb733e Update Windows-specific documentation
Bring the files describing Windows-specific aspects of building and
installing BIND up to date.  Remove the parts which are either outdated
(e.g. 32-bit build instructions), already included elsewhere (e.g. the
list of Windows systems BIND is known to run on), or inconvenient to
keep up to date in the long run (e.g. ARM chapter numbers).
2019-09-26 15:11:15 +02:00
Michał Kępień ca36405a3d Add Windows to GitLab CI
Ensure BIND can be tested on Windows in GitLab to more quickly catch
build and test errors on that operating system.

Some notes:

  - While build jobs are triggered for all pipelines, system test jobs
    are not - due to the time it takes to run the complete system test
    suite on Windows (about 20 minutes), the latter are only run for
    pipelines created through GitLab's web interface and for pipelines
    created for Git tags.

  - Only the "Release" build configuration is currently used.  Adding
    "Debug" builds is a matter of extending .gitlab-ci.yml, but it was
    not done for the time being due to questionable usefulness of
    performing such builds in GitLab CI.

  - Only a 64-bit build is performed.  Adding support for 32-bit builds
    is not planned to be implemented.

  - Unit tests are still not run on Windows, but adding support for that
    is on the roadmap.

  - All Windows GitLab CI jobs are run inside Windows Server containers,
    using the Custom executor feature of GitLab Runner as Windows Server
    2016 is not supported by GitLab Runner's native Docker on Windows
    executor and Windows Server 2019 is not yet widely available from
    hosting providers.

  - The Windows Docker image used by GitLab CI is not stored in the
    GitLab Container Registry as it is over 27 GB in size and thus
    passing it between GitLab and its runners is impractical.

  - There is no vcvarsall.bat variant written in PowerShell and batch
    scripts are no longer supported by GitLab Runner Custom executor, so
    the environment variables set by vcvarsall.bat are injected back
    into the PowerShell environment by processing the output of "set".

  - Visual Studio parallel builds are a bit different than "make -jX"
    builds as parallelization happens in two tiers: project parallelism
    (controlled by the "/maxCpuCount" msbuild.exe switch) and compiler
    parallelism (controlled by the "/MP" cl.exe switch).  To limit the
    total number of compiler processes spawned concurrently to a value
    similar to the one used for Unix builds, msbuild.exe is allowed to
    build at most 2 projects at once, each of which can spawn up to half
    of BUILD_PARALLEL_JOBS worth of compiler processes.  Using such
    parameters is a fairly arbitrary decision taken to solve the
    trade-off between compilation speed and runner load.

  - Configuring network addresses in Windows Server containers is
    tricky.  Adding 10.53.0.1/24 and similar addresses to the vEthernet
    interface created by Docker never causes ifconfig.bat to fail, but
    in fact only one container can have any given IP address configured
    at any given time (the request to add the same address in another
    container is silently ignored).  Thus, in order to allow multiple
    system test jobs to be run in parallel, the addresses used in system
    tests are configured on the loopback interfaces.  Interestingly
    enough, the addresses set on the loopback interfaces... persist
    between containers.  Fortunately, this is acceptable for the time
    being and only requires ifconfig.bat failures to be ignored (as
    ifconfig.bat will fail if it attempts to configure an already
    existing address on an interface).  We also need to wait for a brief
    moment after calling ifconfig.bat as the addresses the latter
    attempts to configure may not be immediately available after it
    returns (and that causes runall.sh to error out).  Finally, for some
    reason we also need to signal that the DNS servers on each loopback
    interface are to be configured using DHCP or else ifconfig.bat will
    fail to add the requested addresses.

  - Since named.pid files created by named instances used in system
    tests contain Windows PIDs instead of Cygwin PIDs and various
    versions of Cygwin "kill" react differently when passed Windows PIDs
    without the -W switch, all "kill" invocations in GitLab CI need to
    use that switch (otherwise they would print error messages which
    would cause stop.pl to assume the process being killed died
    prematurely).  However, to preserve compatibility with older Cygwin
    versions used in our other Windows test environments, we alter the
    relevant scripts "on the fly" rather than in the Git repository.

  - In the containers used for running system tests, Windows Error
    Reporting is configured to automatically create crash dumps in
    C:\CrashDumps.  This directory is examined after the test suite is
    run to ensure no crashes went under stop.pl's radar.
2019-09-26 15:11:15 +02:00
Michał Kępień 4deb2a48d9 Fix the "statschannel" system test on Windows
The SYSTEMTESTTOP variable is set by bin/tests/system/run.sh.  When
system tests are run on Windows, that variable will contain an absolute
Cygwin path.  In the case of the "statschannel" system test, using the
unmodified SYSTEMTESTTOP variable in tests.sh causes the RNDCCMD
variable to contain an invocation of a native Windows application with
an absolute Cygwin path passed as a parameter, which prevents rndc from
working in that system test.  Until we have a cleaner solution, override
SYSTEMTESTTOP with a relative path to work around the issue and thus fix
the "statschannel" system test on Windows.
2019-09-26 15:11:15 +02:00
Michał Kępień fed397c04b Fix system test error reporting on Windows
Make sure the CYGWIN environment variable is set whenever system tests
are run on Windows to prevent stop.pl from making incorrect assumptions
about the environment it is running in, which triggers e.g. false
reports about named instances crashing on shutdown when system tests are
run on Windows.  This issue has not been caught earlier because the
CYGWIN environment variable was incidentally being set on a higher level
in our Windows test environments.

Error reporting for parallel system tests on Windows has been broken all
along: since all parallel.mk targets generated by parallel.sh pipe their
output through "tee", the return code from run.sh is lost and thus
running "make -f parallel.mk check" will not yield a non-zero return
code if some system tests fail.  The same applies to runsequential.sh.
Yet, runall.sh on Windows only sets its return code to a non-zero value
if either "make -f parallel.mk check" or runsequential.sh returns a
non-zero return code.  Fix by making runall.sh yield a non-zero return
code when testsummary.sh fails, which is the same approach as the one
used in the "test" target in bin/tests/system/Makefile.
2019-09-26 15:11:15 +02:00
Michał Kępień 0476e8f1ac Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.
2019-09-26 15:11:15 +02:00
Michał Kępień 1d5259b0a0 Enable building dnssec-cds.exe
Build configuration for the dnssec-cds Visual Studio project is absent
from the solution file template, which means the solution needs to be
upgraded using "devenv bind9.sln /upgrade" in order for the dnssec-cds
project to be built.  Add the build configuration for dnssec-cds to the
solution file template so that upgrading the solution is not necessary
for building that project.
2019-09-26 15:11:15 +02:00
Michał Kępień 918ebd9830 Drop named-checkzone dependency on libbind9
named-checkzone does not use libbind9.  Update the Visual Studio project
file template for named-checkzone to reflect that, thus preventing
compilation issues during parallel builds.
2019-09-26 15:11:15 +02:00
Michał Kępień de1859422e Add missing nsupdate dependency on libirs
When commit 8eb88aafee removed liblwres,
it also modified nsupdate to use libirs instead of liblwres, but the
Visual Studio project files were not updated to reflect that change.
Make sure the nsupdate Visual Studio project depends on the libirs
project to prevent compilation issues during parallel builds.
2019-09-26 15:11:15 +02:00
Ondřej Surý 22e487a584 Merge branch 'ondrej/fix-clang-10-error' into 'master'
Silence false positive warning from Clang 10 in random_test.c

See merge request isc-projects/bind9!2404
2019-09-26 09:06:14 -04:00
Ondřej Surý 9ff02c8170 Silence false positive warning from Clang 10 in random_test.c 2019-09-26 14:58:18 +02:00
Michał Kępień c313c9f33b Merge branch 'michal/prevent-unbuffered-stderr-io-on-windows' into 'master'
Prevent unbuffered stderr I/O on Windows

See merge request isc-projects/bind9!2398
2019-09-26 08:00:51 -04:00
Michał Kępień c72da3497d Prevent unbuffered stderr I/O on Windows
Make stderr fully buffered on Windows to improve named performance when
it is logging to stderr, which happens e.g. in system tests.  Note that:

  - line buffering (_IOLBF) is unavailable on Windows,

  - fflush() is called anyway after each log message gets written to the
    default stderr logging channels created by libisc.
2019-09-26 13:53:03 +02:00
Ondřej Surý 27cd2c7c23 Merge branch '1246-tsan-add-atomic_fetch_and+or_to_isc/stdatomic.h' into 'master'
Add atomic_fetch_add and atomic_fetch_or convenience macros and unix and win32 shims

Closes #1246

See merge request isc-projects/bind9!2397
2019-09-26 06:59:54 -04:00
Ondřej Surý 5a788adb1c Add ATOMIC_VAR_INIT initializer to mutexatomics.h 2019-09-26 11:37:35 +02:00
Ondřej Surý 728fc0ca25 Add atomic_fetch_add and atomic_fetch_or convenience macros and unix and win32 shims 2019-09-26 11:37:35 +02:00
Ondřej Surý 52064809b4 Fix the wrong function for the atomic_fetch_add_explicit64 shim on non-WIN64 build 2019-09-26 11:36:48 +02:00
Michał Kępień 6b3cf36032 Merge branch 'michal/prevent-cygwin-from-concealing-non-abort-crashes' into 'master'
Prevent Cygwin from concealing non-abort() crashes

See merge request isc-projects/bind9!2387
2019-09-26 04:38:04 -04:00
Michał Kępień 3d4b17806f Prevent Cygwin from concealing non-abort() crashes
BIND system tests are run in a Cygwin environment.  Apparently Cygwin
shell sets the SEM_NOGPFAULTERRORBOX bit in its process error mode which
is then inherited by all spawned child processes.  This bit prevents the
Windows Error Reporting dialog from being displayed, which I assume is
part of an effort to contain memory handling errors triggered by Cygwin
binaries in the Cygwin environment.  Unfortunately, this also prevents
automatic crash dump creation by Windows Error Reporting and Cygwin
itself does not handle memory errors in native Windows processes spawned
from a Cygwin shell.

Fix by clearing the SEM_NOGPFAULTERRORBOX bit inside named if it is
started in a Cygwin environment, thus overriding the Cygwin-set process
error mode in order to enable Windows Error Reporting to handle all
named crashes.
2019-09-26 10:34:01 +02:00
Michał Kępień 5a55e95b05 Merge branch '1245-properly-initialize-libxml2' into 'master'
Properly initialize libxml2

Closes #1245

See merge request isc-projects/bind9!2391
2019-09-26 04:31:48 -04:00
Michał Kępień b5bcd4b8d6 Add CHANGES entry
5293.	[bug]		On Windows, named crashed upon any attempt to fetch XML
			statistics from it. [GL #1245]
2019-09-26 10:20:26 +02:00
Michał Kępień a3c0b00ef6 Properly initialize libxml2
When libxml2 is to be used in a multi-threaded application, the
xmlInitThreads() function must be called before any other libxml2
function.  This function does different things on various platforms and
thus one can get away without calling it on Unix systems, but not on
Windows, where it initializes critical section objects used for
synchronizing access to data structures shared between threads.  Add the
missing xmlInitThreads() call to prevent crashes on affected systems.

Also add a matching xmlCleanupThreads() call to properly release the
resources set up by xmlInitThreads().
2019-09-26 10:20:26 +02:00
Mark Andrews 7102250d15 Merge branch 'marka-resolver-fix' into 'master'
use test specific shell variables

See merge request isc-projects/bind9!2382
2019-09-26 03:54:29 -04:00
Mark Andrews 4a5400c1b7 use test specific shell variables 2019-09-26 03:30:43 -04:00
Ondřej Surý 83a2db79fb Merge branch '1119-tsan-lib/dns/rbt.c' into 'master'
Prevent TSAN being trigged when DNS_RBTFIND_EMPTYDATA is set

See merge request isc-projects/bind9!2369
2019-09-25 14:30:26 -04:00
Mark AndrewsandOndřej Surý 7f30540727 prevent TSAN being trigged when DNS_RBTFIND_EMPTYDATA is set 2019-09-25 14:05:12 -04:00
Ondřej Surý 9b5969eab0 Merge branch '1119-tsan-bin/rndc/rndc.c' into 'master'
Protect globally accessed variables in rndc.c by making them atomic

See merge request isc-projects/bind9!2370
2019-09-25 08:05:10 -04:00
Ondřej Surý 0aa8c078e4 Protect globally accessed variables in rndc.c by making them atomic 2019-09-25 13:39:04 +02:00
Ondřej Surý 16fbd0f204 Merge branch '1119-tsan-lib/dns/rbtdb.c' into 'master'
Fix unprotected access to rbtnode in lib/dns/rbtdb.c:add32()

See merge request isc-projects/bind9!2371
2019-09-25 07:10:22 -04:00
Ondřej Surý e307273307 Fix unprotected access to rbtnode in lib/dns/rbtdb.c:add32() 2019-09-25 12:29:13 +02:00
Ondřej Surý 6a39627355 Merge branch '1119-tsan-lib/isc/unix/socket.c' into 'master'
lib/isc/unix/socket.c: Convert couple isc__socket_t members to atomic to prevent data race

See merge request isc-projects/bind9!2356
2019-09-24 15:32:38 -04:00
Ondřej SurýandOndřej Surý 718a317dc7 Fix unprotected access to thread->epoll_events[fd] in unwatch_fd() 2019-09-24 08:11:50 -04:00
Ondřej SurýandOndřej Surý 9808d7360e Move the lock from internal_{accept,connect,recv,send} to global level to protect more socket variables 2019-09-24 08:11:50 -04:00
Ondřej SurýandOndřej Surý 43f3b3211f Convert couple isc__socket_t members to atomic to prevent data race (from TSAN) 2019-09-24 08:11:50 -04:00
Mark Andrews 8f2dd1ac71 Merge branch '1205-named-crashes-when-setting-nsec3param' into 'master'
Resolve "named crashes when setting nsec3param"

Closes #1205

See merge request isc-projects/bind9!2300
2019-09-23 21:21:15 -04:00
Mark Andrews 31c8f66f25 add CHANGES 2019-09-24 10:48:59 +10:00
Mark Andrews 456888c00f Queue nsec3param setting until receive_secure_serial has completed. 2019-09-24 10:45:49 +10:00
Mark Andrews 4e686f40e0 Move dns_zone_setdb() to after the db is created.
Addresses the database changing w/o the changes being done under task lock.
Fix: build the database before assigning it to the zone.
2019-09-24 10:45:24 +10:00
Michał Kępień 6aec894c4c Merge branch 'michal/run-freebsd-jobs-automatically-for-all-pipelines' into 'master'
Run FreeBSD jobs automatically for all pipelines

See merge request isc-projects/bind9!2350
2019-09-17 14:26:12 -04:00
Michał Kępień f7bc95409d Run FreeBSD jobs automatically for all pipelines
No problems have been observed on the FreeBSD GitLab CI runner during
the burn-in period, when FreeBSD jobs needed to be triggered manually.
Thus, make the FreeBSD jobs run automatically along other GitLab CI
jobs.
2019-09-17 20:24:12 +02:00
Michal Nowak 90835966dc Merge branch 'mnowak/Red_Hat_find_docbook-xsl' into 'master'
Find docbook-xsl and dblatex templates on Red Hat/Fedora

See merge request isc-projects/bind9!2324
2019-09-17 10:45:42 -04:00
Michal Nowak c871dda0aa Remove unused configure checks for dblatex 2019-09-17 16:42:16 +02:00
Michal Nowak 0055b9616e Find docbook-xsl and dblatex templates on Red Hat/Fedora
`/usr/share/sgml/docbook/xsl-stylesheets` and `/usr/share/dblatex` are
places where docbook-style-xsl and, respectively, dblatex packages on
Red Hat systems put their XSL templates. Unless we hint this place it
has to be added to `./configure` manually (`--with-docbook-xsl=...`):
https://src.fedoraproject.org/rpms/bind/blob/master/f/bind.spec#_691.

On Fedora 30:

Before
```
./configure
...
checking for Docbook-XSL path... auto
checking for html/docbook.xsl... "not found"
checking for xhtml/docbook.xsl... "not found"
checking for manpages/docbook.xsl... "not found"
checking for html/chunk.xsl... "not found"
checking for xhtml/chunk.xsl... "not found"
checking for html/chunktoc.xsl... "not found"
checking for xhtml/chunktoc.xsl... "not found"
checking for html/maketoc.xsl... "not found"
checking for xhtml/maketoc.xsl... "not found"
checking for xsl/docbook.xsl... "not found"
checking for xsl/latex_book_fast.xsl... "not found"
```

After:
```
./configure
...
checking for Docbook-XSL path... auto
checking for html/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl
checking for xhtml/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl
checking for manpages/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
checking for html/chunk.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl
checking for xhtml/chunk.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunk.xsl
checking for html/chunktoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/chunktoc.xsl
checking for xhtml/chunktoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunktoc.xsl
checking for html/maketoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/maketoc.xsl
checking for xhtml/maketoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/maketoc.xsl
checking for xsl/docbook.xsl... /usr/share/dblatex/xsl/docbook.xsl
checking for xsl/latex_book_fast.xsl... /usr/share/dblatex/xsl/latex_book_fast.xsl
```
2019-09-17 16:42:15 +02:00
Ondřej Surý 12142cbeb6 Merge branch 'ondrej/improve-flycheck-configuration' into 'master'
Remove the current directory from the flycheck configuration

See merge request isc-projects/bind9!2347
2019-09-17 07:30:59 -04:00
Ondřej Surý 265039effc Remove the current directory from the flycheck configuration 2019-09-17 13:05:10 +02:00
Ondřej Surý c3d684cf9e Merge branch '414-use-p11-kit-headers' into 'master'
Resolve "Legal issue with pkcs11 headers"

Closes #414

See merge request isc-projects/bind9!2251
2019-09-16 09:22:33 -04:00
Ondřej SurýandOndřej Surý f6922d6e78 Use standard PKCS#11 standard error codes instead of custom error codes
* CKR_CRYPTOKI_ALREADY_INITIALIZED: This value can only be returned by
  `C_Initialize`. It means that the Cryptoki library has already been
  initialized (by a previous call to `C_Initialize` which did not have a
  matching `C_Finalize` call).

* CKR_FUNCTION_NOT_SUPPORTED: The requested function is not supported by this
  Cryptoki library. Even unsupported functions in the Cryptoki API should have a
  “stub” in the library; this stub should simply return the value
  CKR_FUNCTION_NOT_SUPPORTED.

* CKR_LIBRARY_LOAD_FAILED: The Cryptoki library could not load a dependent
  shared library.
2019-09-16 04:47:50 -04:00
Ondřej SurýandOndřej Surý c47fad2431 Replace the OASIS PKCS#11 header file with one from p11-kit
The OASIS pkcs11.h header has a restrictive license.  Replace the
pkcs11.h pkcs11f.h and pkcs11t.h headers with pkcs11.h from p11-kit.

For source distribution, the license for the OASIS headers itself
doesn't pose any licensing problem when combined with MPL license, but
it possibly creates problem for downstream distributors of BIND 9.
2019-09-16 04:47:50 -04:00
Ondřej Surý 3699545dac Merge branch 'ondrej/check-for-return-values-in-mutexatomics.h' into 'master'
Check isc_mutex_{lock,unlock}() return values in mutexatomic.h shim

See merge request isc-projects/bind9!2343
2019-09-13 04:55:55 -04:00
Ondřej Surý aea3631fd5 Check isc_mutex_{lock,unlock}() return values in mutexatomic.h shim 2019-09-13 10:55:14 +02:00
Mark Andrews 7300866778 Merge branch '1184-invalid-reference-counting' into 'master'
Resolve "Invalid reference counting"

Closes #1184

See merge request isc-projects/bind9!2266
2019-09-12 23:40:11 -04:00
Mark Andrews 9edcaa0832 Convert cache->live_tasks to reference counter. 2019-09-13 12:45:06 +10:00
Ondřej SurýandMark Andrews ed494fe29d Unify how we use isc_refcount_decrement() to destroy object
The isc_refcount_decrement() was either used as:

    if (isc_refcount_decrement() == 1) { destroy(); }

or

    if (isc_refcount_decrement() != 1) { return; } destroy();

This commits eradicates the last usage of the later, so the code is unified to
use the former.
2019-09-13 12:44:49 +10:00
Mark Andrews c3bcb4d47a Remove potential use after free (fctx) in rctx_resend. 2019-09-13 12:44:12 +10:00
Mark Andrews b125b7031c Use reference counts instead of ISC_LIST_EMPTY to determine when to destroy ecdb. 2019-09-13 12:43:52 +10:00
Michal Nowak 6ba5a08c8a Merge branch 'mnowak_README_fixes' into 'master'
Various README.md and README fixes

See merge request isc-projects/bind9!2323
2019-09-12 12:15:41 -04:00
Michal NowakandMichał Kępień 4e2fdd7ee9 Various README.md and README fixes
Fixing typos, typographical glitches. Added backticks around binaries,
modules, and libraries so it's more consistent. Added a paragraph with
ISC Security Policy.
2019-09-12 16:11:01 +02:00
Michał Kępień 7a3896ef1a Merge branch 'michal/add-freebsd-to-ci' into 'master'
Add FreeBSD to CI

See merge request isc-projects/bind9!2242
2019-09-12 08:58:24 -04:00
Michał Kępień 51af91d007 Add FreeBSD to GitLab CI
Ensure BIND can be tested on FreeBSD in GitLab to more quickly catch
build and test errors on that operating system.  Make the relevant jobs
optional until the CI environment supporting them is deemed stable
enough for continuous use.

FreeBSD jobs are run using the Custom executor feature of GitLab Runner.
Unlike the Docker executor, the Custom executor does not support the
"image" option and thus some way of informing the runner about the OS
version to use for a given job is necessary.  Arguably the simplest way
of doing that without a lot of code duplication in .gitlab-ci.yml would
be to use a YAML template with a "variables" block specifying the
desired FreeBSD release to use, but including such a template in a job
definition would cause issues in case other variables also needed to be
set for that job (e.g. CFLAGS or EXTRA_CONFIGURE for build jobs).  Thus,
only one FreeBSD YAML template is defined instead and the Custom
executor scripts on FreeBSD runners extract the OS version to use from
the CI job name.  This allows .gitlab-ci.yml variables to be defined for
FreeBSD jobs in the same way as for Docker-based jobs.
2019-09-12 14:25:57 +02:00
Michał Kępień 154f2ca6f6 Tweak lib/dns/tests/tkey_test requirements
Currently, the lib/dns/tests/tkey_test unit test is only run when the
linker supports the --wrap option.  However, linker support for that
option is only needed for static builds.  As a result, the unit test
mentioned before is not being run everywhere it can be run as even for
builds done using --with-libtool, the test is not run unless the linker
supports the --wrap option.

Tweak preprocessor directives in lib/dns/tests/tkey_test.c so that this
test is run:

  - for all builds using --with-libtool,
  - for static builds done using a linker supporting the --wrap option.
2019-09-12 14:25:57 +02:00
Michał Kępień 119f3e0c2e Make lib/dns/tests/tkey_test.c more portable
Weak symbols are handled differently by different dynamic linkers.  With
glibc, lib/dns/tests/tkey_test works as expected no matter whether
--with-libtool is used or not: __attribute__((weak)) prevents a static
build from failing and it just so happens that the desired symbols are
picked at runtime for dynamic builds.  However, with BSD libc, the
libdns functions called from lib/dns/tests/tkey_test.c use the "real"
memory allocation functions from libisc, thus breaking that unit test.
(Note: similar behavior can be reproduced with glibc by setting the
LD_DYNAMIC_WEAK environment variable.)

The simplest way to make lib/dns/tests/tkey_test work reliably is to
drop all uses of __attribute__((weak)) in it - this way, the memory
functions inside lib/dns/tests/tkey_test.c will always be used instead
of the "real" libisc ones for dynamic builds.  However, this would not
work with static builds as it would result in multiple strong symbols
with the same name being present in a single binary.

Work around the problem by only compiling in the overriding definitions
of memory functions when building using --with-libtool.  For static
builds, keep relying on the --wrap linker option for replacing calls to
the functions we are interested in.
2019-09-12 14:25:57 +02:00
Michał Kępień 1bffa602ba Set --logfile for all kyua invocations
When kyua is called without the --logfile command line option, the log
file is created at a default location which is derived from the HOME
environment variable.  On FreeBSD GitLab CI runners, /home is a
read-only directory and thus kyua invocations not using the --logfile
option fail when HOME is set to something beneath /home.  Set --logfile
to /dev/null for all kyua invocations whose logs are irrelevant in order
to prevent kyua failures caused by HOME being non-writable.
2019-09-12 14:25:57 +02:00
Michał Kępień 87018ce225 Merge branch 'michal/misc-doc-fixes' into 'master'
Miscellaneous documentation fixes

See merge request isc-projects/bind9!2329
2019-09-12 08:01:31 -04:00
Michał KępieńandMark Andrews 995d6b7417 Fix latest BIND version number in CHANGES
BIND version number in CHANGES was not updated when the 9.15.4 release
was prepared.  Make sure the correct version number is used.
2019-09-12 13:57:24 +02:00
Michał KępieńandMark Andrews b0ee065e65 Fix <command> XML tag
Restore proper spelling of the <command> XML tag to prevent release note
text from getting mangled.
2019-09-12 13:57:24 +02:00
Michał KępieńandMark Andrews 5af0b1d1d3 README: do not mention /usr/include on macOS
For newer versions of Xcode, "xcode-select --install" no longer installs
system headers into /usr/include (instead, they are installed in the
Xcode directory tree), so do not mention that path in the macOS section
of README to prevent confusion.
2019-09-12 13:57:24 +02:00
Mark Andrews 0023060dc0 Merge branch 'marka-split-notes-master' into 'master'
split notes.xml into sections

See merge request isc-projects/bind9!2326
2019-09-12 05:53:41 -04:00
Mark Andrews 0d51dec350 split notes.xml into sections 2019-09-12 05:53:09 -04:00
Mark Andrews 44fa4d20dd Merge branch '1043-cppcheck-detected-code-issues' into 'master'
Resolve "cppcheck-detected code issues"

Closes #1043

See merge request isc-projects/bind9!2239
2019-09-12 04:29:02 -04:00
Mark Andrews b59fe46e76 address or suppress cppcheck warnings 2019-09-12 17:59:28 +10:00
Ondřej Surý 30b6e93a70 Merge branch 'ondrej/refactor-and-cleanup-isc_mem_create' into 'master'
Refactor and cleanup isc_mem_create()

See merge request isc-projects/bind9!2315
2019-09-12 03:50:22 -04:00
Ondřej Surý aeea5ece97 Remove now useless ISC_MEMFLAG_NOLOCK memflag
Previously the libisc allocator had ability to run unlocked when threading was
disabled.  As the threading is now always on, remove the ISC_MEMFLAG_NOLOCK
memory flag as it serves no purpose.
2019-09-12 09:26:09 +02:00
Ondřej Surý 19fbdef31e Remove unused isc_mem_createx() function
The isc_mem_createx() function was only used in the tests to eliminate using the
default flags (which as of writing this commit message was ISC_MEMFLAG_INTERNAL
and ISC_MEMFLAG_FILL).  This commit removes the isc_mem_createx() function from
the public API.
2019-09-12 09:26:09 +02:00
Ondřej Surý 4957255d13 Use the semantic patch to change the usage isc_mem_create() to new API 2019-09-12 09:26:09 +02:00
Ondřej Surý 6bd2eb06cb Add a semantic patch to make refactor the isc_mem_create() 2019-09-12 09:26:09 +02:00
Ondřej Surý 1b716a39f5 Simplify isc_mem_create() to always use defaults and never fail
Previously, the isc_mem_create() and isc_mem_createx() functions took `max_size`
and `target_size` as first two arguments.  Those values were never used in the
BIND 9 code.  The refactoring removes those arguments and let BIND 9 always use
the default values.

Previously, the isc_mem_create() and isc_mem_createx() functions could have
failed because of failed memory allocation.  As this was no longer true and the
functions have always returned ISC_R_SUCCESS, the have been refactored to return
void.
2019-09-12 09:26:09 +02:00
933 changed files with 40676 additions and 21799 deletions
+30 -4
View File
@@ -15,9 +15,6 @@
(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"))
@@ -25,11 +22,16 @@
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/netmgr"))
;; libdns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns"))
;; libisccc
(expand-file-name
@@ -51,6 +53,30 @@
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
;; bin
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/check"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/confgen"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/dig/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/named/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/named/unix/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/dnssec/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/named/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/rndc/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/opt/json-c/include/json-c/")
+8
View File
@@ -1,2 +1,10 @@
*.sln.in eol=crlf
*.vcxproj.* eol=crlf
.gitignore export-ignore
/conftools export-ignore
/doc/design export-ignore
/doc/dev export-ignore
/util/** export-ignore
/util/bindkeys.pl -export-ignore
/util/mksymtbl.pl -export-ignore
+5
View File
@@ -10,6 +10,7 @@
*.rej
*.so
*_test
*.ipch # vscode/intellisense precompiled header
*~
.ccache/
.cproject
@@ -56,3 +57,7 @@ kyua.log
named.memstats
named.run
timestamp
/compile_commands.json
/cppcheck_html/
/cppcheck.results
/tsan
+506 -49
View File
@@ -11,9 +11,24 @@ variables:
# VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"
GIT_DEPTH: 1
BUILD_PARALLEL_JOBS: 6
TEST_PARALLEL_JOBS: 6
MAKE: make
CONFIGURE: ./configure
SCAN_BUILD: scan-build-9
SYMBOLIZER: /usr/lib/llvm-9/bin/llvm-symbolizer
ASAN_SYMBOLIZER_PATH: "$SYMBOLIZER"
CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra
# Pass run-time flags to AddressSanitizer to get core dumps on error.
ASAN_OPTIONS_COMMON: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1
TARBALL_COMPRESSOR: xz
TARBALL_EXTENSION: xz
stages:
- precheck
- build
@@ -21,9 +36,18 @@ stages:
- system
- docs
- push
- postcheck
- release
### Runner Tag Templates
# Note: BSD runners extract the operating system version to use from job name
.freebsd-amd64: &freebsd_amd64
tags:
- freebsd
- amd64
.linux-amd64: &linux_amd64
tags:
- linux
@@ -34,6 +58,11 @@ stages:
- linux
- i386
.openbsd-amd64: &openbsd_amd64
tags:
- openbsd
- amd64
### Docker Image Templates
# Alpine Linux
@@ -52,6 +81,10 @@ stages:
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
<<: *linux_amd64
.centos-centos8-amd64: &centos_centos8_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos8-amd64"
<<: *linux_amd64
# Debian
.debian-jessie-amd64: &debian_jessie_amd64_image
@@ -68,7 +101,7 @@ stages:
.debian-buster-amd64: &debian_buster_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
<<: *linux_i386
<<: *linux_amd64
.debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
@@ -80,8 +113,8 @@ stages:
# Fedora
.fedora-30-amd64: &fedora_30_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-30-amd64"
.fedora-31-amd64: &fedora_31_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-31-amd64"
<<: *linux_amd64
# Ubuntu
@@ -109,6 +142,16 @@ stages:
- merge_requests
- tags
- web
- schedules
.release-branch-triggering-rules: &release_branch_triggering_rules
only:
- merge_requests
- tags
- web
- schedules
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
.precheck: &precheck_job
<<: *default_triggering_rules
@@ -116,17 +159,21 @@ stages:
stage: precheck
.autoconf: &autoconf_job
<<: *default_triggering_rules
<<: *release_branch_triggering_rules
<<: *debian_sid_amd64_image
stage: precheck
script:
- autoreconf -fi
artifacts:
untracked: true
expire_in: "1 hour"
paths:
- aclocal.m4
- configure
- ltmain.sh
- m4/libtool.m4
expire_in: "1 week"
.configure: &configure |
./configure \
${CONFIGURE} \
--disable-maintainer-mode \
--enable-developer \
--with-libtool \
@@ -138,7 +185,7 @@ stages:
--without-make-clean \
$EXTRA_CONFIGURE \
|| cat config.log
.build: &build_job
<<: *default_triggering_rules
stage: build
@@ -146,7 +193,7 @@ stages:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
script:
- *configure
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- ${MAKE} -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install
dependencies:
- autoreconf:sid:amd64
@@ -154,7 +201,37 @@ stages:
- autoreconf:sid:amd64
artifacts:
untracked: true
expire_in: "1 hour"
expire_in: "1 week"
.windows_build: &windows_build_job
stage: build
tags:
- windows
- amd64
script:
- 'Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"'
- '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
- 'Pop-Location'
- 'Set-Location win32utils'
- '& "C:/Strawberry/perl/bin/perl.exe" Configure
"with-tools-version=15.0"
"with-platform-toolset=v141"
"with-platform-version=10.0.17763.0"
"with-vcredist=C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Redist/MSVC/14.16.27012/vcredist_x64.exe"
"with-openssl=C:/OpenSSL"
"with-libxml2=C:/libxml2"
"with-libuv=C:/libuv"
"without-python"
"with-system-tests"
x64'
- 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"'
- '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln'
dependencies: []
needs:
- autoreconf:sid:amd64
artifacts:
untracked: true
expire_in: "1 week"
.setup_interfaces: &setup_interfaces |
if [ "$(id -u)" -eq "0" ]; then
@@ -164,17 +241,16 @@ stages:
fi
.setup_softhsm: &setup_softhsm |
sh -x util/prepare-softhsm2.sh
sh -x bin/tests/prepare-softhsm2.sh
.system_test: &system_test_job
<<: *default_triggering_rules
stage: system
retry: 2
before_script:
- *setup_interfaces
- *setup_softhsm
script:
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output
artifacts:
untracked: true
@@ -182,12 +258,36 @@ stages:
when: on_failure
.kyua_report: &kyua_report_html |
kyua report-html \
kyua --logfile /dev/null report-html \
--force \
--results-file "$KYUA_RESULT" \
--results-filter "" \
--output kyua_html
.windows_system_test: &windows_system_test_job
stage: system
tags:
- windows
- amd64
script:
- 'Push-Location bin/tests/system'
- '$ifIndex = Get-NetIPInterface -AddressFamily IPv4 -InterfaceMetric 75 | Select-Object -ExpandProperty ifIndex'
- '& C:/tools/cygwin/bin/sed.exe -i "s/^exit.*/netsh interface ipv4 set dnsservers $ifIndex dhcp/; s/\(name\|interface\)=Loopback/$ifIndex/;" ifconfig.bat'
- '& C:/tools/cygwin/bin/sed.exe -i "s/kill -f/kill -W/;" conf.sh stop.pl'
- '& cmd.exe /C ifconfig.bat up; ""'
- 'Start-Sleep 2'
- '$Env:Path = "C:/tools/cygwin/bin;$Env:Path"'
- '& sh.exe runall.sh $TEST_PARALLEL_JOBS'
- 'If (Test-Path C:/CrashDumps/*) { dir C:/CrashDumps; Throw }'
artifacts:
untracked: true
expire_in: "1 week"
when: on_failure
only:
- schedules
- tags
- web
.unit_test: &unit_test_job
<<: *default_triggering_rules
stage: unit
@@ -205,6 +305,44 @@ stages:
expire_in: "1 week"
when: on_failure
.cppcheck_args: &run_cppcheck |
cppcheck --enable=warning,performance,portability,information,missingInclude \
--include=config.h \
--quiet \
--std=c11 \
--language=c \
--project=compile_commands.json \
--error-exitcode=2 \
-j ${TEST_PARALLEL_JOBS:-1} \
--xml \
--output-file=cppcheck.results \
--relative-paths="$CI_PROJECT_DIR" \
--inline-suppr \
--suppressions-list=util/suppressions.txt
.cppcheck_report: &cppcheck_report_html |
cppcheck-htmlreport --title="BIND 9 ($CI_COMMIT_SHORT_SHA) Cppcheck Report" \
--file=cppcheck.results \
--report-dir=cppcheck_html/
.cppcheck: &cppcheck_job
<<: *default_triggering_rules
stage: postcheck
before_script:
- export GCC_VERSION=$(gcc --version | sed -n 's/.*\([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
- sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json
script:
- *run_cppcheck
after_script:
- *cppcheck_report_html
artifacts:
paths:
- compile_commands.json
- cppcheck.results
- cppcheck_html/
expire_in: "1 week"
when: on_failure
### Job Definitions
# Jobs in the precheck stage
@@ -238,13 +376,32 @@ misc:sid:amd64:
🐞:sid:amd64:
<<: *precheck_job
<<: *debian_buster_amd64_image
script:
- util/check-cocci
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
tarball-create:sid:amd64:
<<: *debian_sid_amd64_image
stage: precheck
script:
- source version
- export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
- git archive --prefix="${BIND_DIRECTORY}/" --output="${BIND_DIRECTORY}.tar" HEAD
- mkdir "${BIND_DIRECTORY}"
- echo "SRCID=$(git rev-list --max-count=1 HEAD | cut -b1-7)" > "${BIND_DIRECTORY}/srcid"
- tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/srcid"
- ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar"
artifacts:
paths:
- bind-*.tar.${TARBALL_EXTENSION}
only:
- tags
# Jobs for doc builds on Debian Sid (amd64)
docs:sid:amd64:
<<: *release_branch_triggering_rules
<<: *debian_sid_amd64_image
stage: docs
script:
@@ -259,12 +416,6 @@ docs:sid:amd64:
paths:
- doc/arm/
expire_in: "1 month"
only:
- merge_requests
- tags
- web
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
push:docs:sid:amd64:
<<: *debian_sid_amd64_image
@@ -281,7 +432,7 @@ push:docs:sid:amd64:
gcc:alpine3.10:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap"
<<: *alpine_3_10_amd64_image
<<: *build_job
@@ -305,7 +456,7 @@ unit:gcc:alpine3.10:amd64:
gcc:centos6:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
<<: *centos_centos6_amd64_image
<<: *build_job
@@ -329,7 +480,7 @@ unit:gcc:centos6:amd64:
gcc:centos7:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
<<: *centos_centos7_amd64_image
<<: *build_job
@@ -348,12 +499,36 @@ unit:gcc:centos7:amd64:
- gcc:centos7:amd64
needs: ["gcc:centos7:amd64"]
# Jobs for regular GCC builds on CentOS 8 (amd64)
gcc:centos8:amd64:
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *centos_centos8_amd64_image
<<: *build_job
system:gcc:centos8:amd64:
<<: *centos_centos8_amd64_image
<<: *system_test_job
dependencies:
- gcc:centos8:amd64
needs: ["gcc:centos8:amd64"]
unit:gcc:centos8:amd64:
<<: *centos_centos8_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos8:amd64
needs: ["gcc:centos8:amd64"]
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)
gcc:jessie:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -O2"
EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
<<: *debian_jessie_amd64_image
<<: *build_job
@@ -377,7 +552,7 @@ unit:gcc:jessie:amd64:
gcc:stretch:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -O2"
<<: *debian_stretch_amd64_image
<<: *build_job
@@ -400,7 +575,7 @@ unit:gcc:stretch:amd64:
gcc:buster:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
<<: *debian_buster_amd64_image
<<: *build_job
@@ -418,14 +593,47 @@ unit:gcc:buster:amd64:
- gcc:buster:amd64
needs: ["gcc:buster:amd64"]
# Jobs for scan-build builds on Debian Buster (amd64)
.scan_build: &scan_build |
${SCAN_BUILD} --html-title="BIND 9 ($CI_COMMIT_SHORT_SHA)" \
--keep-cc \
--status-bugs \
--keep-going \
-o scan-build.reports \
make -j${BUILD_PARALLEL_JOBS:-1} all V=1
scan-build:buster:amd64:
<<: *default_triggering_rules
<<: *debian_buster_amd64_image
stage: postcheck
variables:
CC: clang-9
CFLAGS: "${CFLAGS_COMMON}"
CONFIGURE: "${SCAN_BUILD} ./configure"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
script:
- *configure
- *scan_build
dependencies:
- autoreconf:sid:amd64
needs:
- autoreconf:sid:amd64
artifacts:
paths:
- scan-build.reports/
expire_in: "1 week"
when: on_failure
# Jobs for regular GCC builds on Debian Sid (amd64)
gcc:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O3 -g"
CFLAGS: "${CFLAGS_COMMON} -O3"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
MAKE: bear make
<<: *debian_sid_amd64_image
<<: *build_job
@@ -443,12 +651,61 @@ unit:gcc:sid:amd64:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
cppcheck:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *cppcheck_job
dependencies:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
# Jobs for tarball GCC builds on Debian Sid (amd64)
tarball:sid:amd64:
variables:
CC: gcc
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
<<: *debian_sid_amd64_image
<<: *build_job
before_script:
- tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
- rm -f bind-*.tar.${TARBALL_EXTENSION}
- cd bind-*
dependencies:
- tarball-create:sid:amd64
needs: ["tarball-create:sid:amd64"]
only:
- tags
system:tarball:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
before_script:
- cd bind-*
- *setup_interfaces
dependencies:
- tarball:sid:amd64
needs: ["tarball:sid:amd64"]
only:
- tags
unit:tarball:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
before_script:
- cd bind-*
dependencies:
- tarball:sid:amd64
needs: ["tarball:sid:amd64"]
only:
- tags
# Jobs for regular GCC builds on Debian Sid (i386)
gcc:sid:i386:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O3 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
<<: *debian_sid_i386_image
<<: *build_job
@@ -467,36 +724,36 @@ unit:gcc:sid:i386:
- gcc:sid:i386
needs: ["gcc:sid:i386"]
# Jobs for regular GCC builds on Fedora 30 (amd64)
# Jobs for regular GCC builds on Fedora 31 (amd64)
gcc:fedora30:amd64:
gcc:fedora31:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -O1"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *fedora_30_amd64_image
<<: *fedora_31_amd64_image
<<: *build_job
system:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
system:gcc:fedora31:amd64:
<<: *fedora_31_amd64_image
<<: *system_test_job
dependencies:
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
- gcc:fedora31:amd64
needs: ["gcc:fedora31:amd64"]
unit:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
unit:gcc:fedora31:amd64:
<<: *fedora_31_amd64_image
<<: *unit_test_job
dependencies:
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
- gcc:fedora31:amd64
needs: ["gcc:fedora31:amd64"]
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
gcc:xenial:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -O2"
EXTRA_CONFIGURE: "--disable-geoip"
<<: *ubuntu_xenial_amd64_image
<<: *build_job
@@ -520,7 +777,7 @@ unit:gcc:xenial:amd64:
gcc:bionic:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -Og"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *ubuntu_bionic_amd64_image
<<: *build_job
@@ -544,13 +801,15 @@ unit:gcc:bionic:amd64:
asan:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
LDFLAGS: "-fsanitize=address,undefined"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *build_job
system:asan:sid:amd64:
variables:
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
@@ -558,16 +817,75 @@ system:asan:sid:amd64:
needs: ["asan:sid:amd64"]
unit:asan:sid:amd64:
variables:
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- asan:sid:amd64
needs: ["asan:sid:amd64"]
# Jobs for GCC builds with TSAN enabled on Debian Sid (amd64)
tsan:buster:amd64:
<<: *debian_buster_amd64_image
<<: *build_job
variables:
CC: clang-9
CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread -DISC_MEM_USE_INTERNAL_MALLOC=0"
LDFLAGS: "-fsanitize=thread"
EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
system:tsan:buster:amd64:
variables:
TSAN_OPTIONS: "second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=$SYMBOLIZER exitcode=0"
before_script:
- *setup_interfaces
- echo $TSAN_OPTIONS
<<: *debian_buster_amd64_image
<<: *system_test_job
dependencies:
- tsan:buster:amd64
needs: ["tsan:buster:amd64"]
allow_failure: true
after_script:
- find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
artifacts:
expire_in: "1 week"
paths:
- bin/tests/system/*/tsan.*
- bin/tests/system/*/*/tsan.*
- tsan/
when: on_failure
unit:tsan:buster:amd64:
variables:
TSAN_OPTIONS: "second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=$SYMBOLIZER"
before_script:
- echo $TSAN_OPTIONS
- lib/isc/tests/result_test
<<: *debian_buster_amd64_image
<<: *unit_test_job
dependencies:
- tsan:buster:amd64
needs: ["tsan:buster:amd64"]
allow_failure: true
after_script:
- find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
artifacts:
expire_in: "1 week"
paths:
- lib/*/tests/tsan.*
- tsan/
- kyua.log
- kyua.results
- kyua_html/
when: on_failure
rwlock:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
CFLAGS: "${CFLAGS_COMMON} -Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
<<: *debian_sid_amd64_image
<<: *build_job
@@ -590,7 +908,7 @@ unit:rwlock:sid:amd64:
mutexatomics:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
CFLAGS: "${CFLAGS_COMMON} -DISC_MEM_USE_INTERNAL_MALLOC=0"
EXTRA_CONFIGURE: "--with-libidn2 --enable-mutex-atomics"
<<: *debian_sid_amd64_image
<<: *build_job
@@ -615,7 +933,7 @@ mutexatomics:sid:amd64:
clang:stretch:amd64:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion"
EXTRA_CONFIGURE: "--with-python=python3"
<<: *debian_stretch_amd64_image
<<: *build_job
@@ -632,7 +950,7 @@ unit:clang:stretch:amd64:
clang:stretch:i386:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
CFLAGS: "${CFLAGS_COMMON} -Wenum-conversion"
EXTRA_CONFIGURE: "--with-python=python2"
<<: *debian_stretch_i386_image
<<: *build_job
@@ -642,7 +960,7 @@ clang:stretch:i386:
pkcs11:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
<<: *debian_sid_amd64_image
<<: *build_job
@@ -661,12 +979,76 @@ unit:pkcs11:sid:amd64:
- pkcs11:sid:amd64
needs: ["pkcs11:sid:amd64"]
# Jobs for Clang builds on FreeBSD 11.3 (amd64)
clang:freebsd11.3:amd64:
variables:
CFLAGS: "${CFLAGS_COMMON}"
<<: *freebsd_amd64
<<: *build_job
system:clang:freebsd11.3:amd64:
<<: *freebsd_amd64
<<: *system_test_job
dependencies:
- clang:freebsd11.3:amd64
needs: ["clang:freebsd11.3:amd64"]
unit:clang:freebsd11.3:amd64:
<<: *freebsd_amd64
<<: *unit_test_job
dependencies:
- clang:freebsd11.3:amd64
needs: ["clang:freebsd11.3:amd64"]
# Jobs for Clang builds on FreeBSD 12.0 (amd64)
clang:freebsd12.0:amd64:
variables:
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--enable-dnstap"
<<: *freebsd_amd64
<<: *build_job
system:clang:freebsd12.0:amd64:
<<: *freebsd_amd64
<<: *system_test_job
dependencies:
- clang:freebsd12.0:amd64
needs: ["clang:freebsd12.0:amd64"]
unit:clang:freebsd12.0:amd64:
<<: *freebsd_amd64
<<: *unit_test_job
dependencies:
- clang:freebsd12.0:amd64
needs: ["clang:freebsd12.0:amd64"]
# Jobs for Clang builds on OpenBSD 6.5 (amd64)
clang:openbsd6.5:amd64:
variables:
CC: clang
<<: *openbsd_amd64
<<: *build_job
system:clang:openbsd6.5:amd64:
<<: *openbsd_amd64
<<: *system_test_job
dependencies:
- clang:openbsd6.5:amd64
needs: ["clang:openbsd6.5:amd64"]
only:
- schedules
- tags
- web
# Jobs with libtool disabled
nolibtool:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -Og -g"
CFLAGS: "${CFLAGS_COMMON}"
EXTRA_CONFIGURE: "--with-libidn2 --without-libtool --with-dlopen"
<<: *debian_sid_amd64_image
<<: *build_job
@@ -684,3 +1066,78 @@ unit:nolibtool:sid:amd64:
dependencies:
- nolibtool:sid:amd64
needs: ["nolibtool:sid:amd64"]
# Jobs for Visual Studio 2017 builds on Windows (amd64)
msvc:windows:amd64:
<<: *windows_build_job
<<: *default_triggering_rules
variables:
VSCONF: Release
system:msvc:windows:amd64:
<<: *windows_system_test_job
variables:
VSCONF: Release
dependencies:
- msvc:windows:amd64
needs: ["msvc:windows:amd64"]
msvc-debug:windows:amd64:
<<: *windows_build_job
variables:
VSCONF: Debug
only:
- schedules
- tags
- web
system:msvc-debug:windows:amd64:
<<: *windows_system_test_job
variables:
VSCONF: Debug
dependencies:
- msvc-debug:windows:amd64
needs: ["msvc-debug:windows:amd64"]
# Job producing a release tarball
release:sid:amd64:
<<: *debian_sid_amd64_image
stage: release
script:
# Determine BIND version
- source version
- export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
# Remove redundant files and system test utilities from Windows build artifacts
- find Build/Release/ -name "*.pdb" -print -delete
- find Build/Debug/ \( -name "*.bsc" -o -name "*.idb" \) -print -delete
- find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete
# Create Windows zips
- openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256
- ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * )
- ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * )
# Prepare release tarball contents (tarballs + zips + documentation)
- mkdir -p release/doc/arm
- pushd release
- mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip .
- tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}"
- mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README,srcid} .
- mv "${BIND_DIRECTORY}"/doc/arm/{Bv9ARM{*.html,.pdf},man.*,notes.{html,pdf,txt}} doc/arm/
- rm -rf "${BIND_DIRECTORY}"
- cp doc/arm/notes.html "RELEASE-NOTES-${BIND_DIRECTORY}.html"
- cp doc/arm/notes.pdf "RELEASE-NOTES-${BIND_DIRECTORY}.pdf"
- cp doc/arm/notes.txt "RELEASE-NOTES-${BIND_DIRECTORY}.txt"
- popd
# Create release tarball
- tar --create --file="${CI_COMMIT_TAG}.tar.gz" --gzip release/
dependencies:
- tarball-create:sid:amd64
- msvc:windows:amd64
- msvc-debug:windows:amd64
only:
- tags
artifacts:
paths:
- "*.tar.gz"
expire_in: "1 week"
+65
View File
@@ -0,0 +1,65 @@
## Release Schedule
**Tagging Deadline:**
**Public Release:**
## Release Checklist
## 2 Working Days Before the Tagging Deadline
- [ ] ***(QA)*** Check whether all issues assigned to the release milestone are resolved[^1].
- [ ] ***(QA)*** Ensure that there are no outstanding merge requests in the private repository[^1] (Subscription Edition only).
- [ ] ***(QA)*** Ensure all merge requests marked for backporting have been indeed backported.
## Before the Tagging Deadline
- [ ] ***(QA)*** Inform Support/Marketing of impending release (and give estimated release dates).
- [ ] ***(QA)*** Check Perflab to ensure there has been no unexplained drop in performance for the versions being released.
- [ ] ***(SwEng)*** Update API files for libraries with new version information.
- [ ] ***(SwEng)*** Change software version and library versions in `configure.ac` (new major release only).
- [ ] ***(SwEng)*** Rebuild `configure` using Autoconf on `docs.isc.org`.
- [ ] ***(SwEng)*** Update `CHANGES`.
- [ ] ***(SwEng)*** Update `CHANGES.SE` (Subscription Edition only).
- [ ] ***(SwEng)*** Update `README.md`.
- [ ] ***(SwEng)*** Update `version`.
- [ ] ***(SwEng)*** Build documentation on `docs.isc.org`.
- [ ] ***(QA)*** Check that all the above steps were performed correctly.
- [ ] ***(QA)*** Check that the contents of release notes match the merge requests comprising the releases.
- [ ] ***(QA)*** Check that the formatting is correct for text, PDF, and HTML versions of release notes.
- [ ] ***(SwEng)*** Tag the releases[^2]. (Tags may only be pushed to the public repository for releases which are *not* security releases.)
- [ ] ***(SwEng)*** If this is the first tag for a release (e.g. beta), create a release branch named `release_v9_X_Y` to allow development to continue on the maintenance branch whilst release engineering continues.
## Before the ASN Deadline (for ASN Releases) or the Public Release Date (for Regular Releases)
- [ ] ***(QA)*** Verify GitLab CI results for the tags created and prepare a QA report for the releases to be published.
- [ ] ***(QA)*** Request signatures for the tarballs, providing their location and checksums.
- [ ] ***(Signers)*** Validate tarball checksums, sign tarballs, and upload signatures.
- [ ] ***(QA)*** Verify tarball signatures and check tarball checksums again.
- [ ] ***(Support)*** Pre-publish ASN and/or Subscription Edition tarballs so that packages can be built.
- [ ] ***(QA)*** Build and test ASN and/or Subscription Edition packages.
- [ ] ***(QA)*** Notify Support that the releases have been prepared.
- [ ] ***(Support)*** Send out ASNs (if applicable).
## On the Day of Public Release
- [ ] ***(Support)*** Wait for clearance from Security Officer to proceed with the public release (if applicable).
- [ ] ***(Support)*** Place tarballs in public location on FTP site.
- [ ] ***(Support)*** Publish links to downloads on ISC website.
- [ ] ***(Support)*** Write release email to *bind-announce*.
- [ ] ***(Support)*** Write email to *bind-users* (if a major release).
- [ ] ***(Support)*** Update tickets in case of waiting support customers.
- [ ] ***(QA)*** Build and test any outstanding private packages.
- [ ] ***(QA)*** Build public packages (`*.deb`, RPMs).
- [ ] ***(QA)*** Inform Marketing of the release.
- [ ] ***(QA)*** Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
- [ ] ***(Marketing)*** Post short note to Twitter.
- [ ] ***(Marketing)*** Update [Wikipedia entry for BIND](https://en.wikipedia.org/wiki/BIND).
- [ ] ***(Marketing)*** Write blog article (if a major release).
- [ ] ***(QA)*** Ensure all new tags are annotated and signed.
- [ ] ***(SwEng)*** Push tags for the published releases to the public repository.
- [ ] ***(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`).
[^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone.
[^2]: Preferred command line: `git tag -u <DEVELOPER_KEYID> -a -s -m "BIND 9.X.Y[alphatag]" v9_X_Y[alphatag]`, where `[alphatag]` is an optional string such as `b1`, `rc1`, etc.
-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).
+182 -4
View File
@@ -1,4 +1,182 @@
--- 9.15.3 released ---
5337. [func] 'named -V' now reports maxminddb and protobuf-c
versions. [GL !2686]
--- 9.15.7 released ---
5336. [bug] The TCP high-water statistic could report an
incorrect value on startup. [GL #1392]
5335. [func] Make TCP listening code multithreaded. [GL !2659]
5334. [doc] Update documentation with dnssec-policy clarifications.
Also change some defaults. [GL !2711]
5333. [bug] Fix duration printing on Solaris when value is not
an ISO 8601 duration. [GL #1460]
5332. [func] Renamed "dnssec-keys" configuration statement
to the more descriptive "trust-anchors". [GL !2702]
5331. [func] Use compiler-provided mechanisms for thread local
storage, and make the requirement for such mechanisms
explicit in configure. [GL #1444]
5330. [bug] 'configure --without-python' was ineffective if
PYTHON was set in the environment. [GL #1434]
5329. [bug] Reconfiguring named caused memory to be leaked when any
GeoIP2 database was in use. [GL #1445]
5328. [bug] rbtdb.c:rdataset_{get,set}ownercase failed to obtain
a node lock. [GL #1417]
5327. [func] Added a statistics counter to track queries
dropped because the recursive-clients quota was
exceeded. [GL #1399]
5326. [bug] Add Python dependency on 'distutils.core' to configure.
'distutils.core' is required for installation.
[GL #1397]
5325. [bug] Addressed several issues with TCP connections in
the netmgr: restored support for TCP connection
timeouts, restored TCP backlog support, actively
close all open sockets during shutdown. [GL #1312]
5324. [bug] Change the category of some log messages from general
to the more appopriate catergory of xfer-in. [GL #1394]
5323. [bug] Fix a bug in DNSSEC trust anchor verification.
[GL !2609]
5322. [placeholder]
5321. [bug] Obtain write lock before updating version->records
and version->bytes. [GL #1341]
5320. [cleanup] Silence TSAN on header->count. [GL #1344]
--- 9.15.6 released ---
5319. [func] Trust anchors can now be configured using DS
format to represent a key digest, by using the
new "initial-ds" or "static-ds" keywords in
the "dnssec-keys" statement.
Note: DNSKEY-format and DS-format trust anchors
cannot both be used for the same domain name.
[GL #622]
5318. [cleanup] The DNSSEC validation code has been refactored
for clarity and to reduce code duplication.
[GL #622]
5317. [func] A new asynchronous network communications system
based on libuv is now used for listening for
incoming requests and responding to them. (The
old isc_socket API remains in use for sending
iterative queries and processing responses; this
will be changed too in a later release.)
This change will make it easier to improve
performance and implement new protocol layers
(e.g., DNS over TLS) in the future. [GL #29]
5316. [func] A new "dnssec-policy" option has been added to
named.conf to implement a key and signing policy
(KASP) for zones. When this option is in use,
named can generate new keys as needed and
automatically roll both ZSK and KSK keys. (Note
that the syntax for this statement differs from
the dnssec policy used by dnssec-keymgr.)
See the ARM for configuration details. [GL #1134]
5315. [bug] Apply the inital RRSIG expiration spread fixed
to all dynamically created records in the zone
including NSEC3. Also fix the signature clusters
when the server has been offline for prolonged
period of times. [GL #1256]
5314. [func] Added a new statistics variable "tcp-highwater"
that reports the maximum number of simultaneous TCP
clients BIND has handled while running. [GL #1206]
5313. [bug] The default GeoIP2 database location did not match
the ARM. 'named -V' now reports the default
location. [GL #1301]
5312. [bug] Do not flush the cache for `rndc validation status`.
Thanks to Tony Finch. [GL !2462]
5311. [cleanup] Include all views in output of `rndc validation status`.
Thanks to Tony Finch. [GL !2461]
5310. [bug] TCP failures were affecting EDNS statistics. [GL #1059]
5309. [placeholder]
5308. [bug] Don't log DNS_R_UNCHANGED from sync_secure_journal()
at ERROR level in receive_secure_serial(). [GL #1288]
5307. [bug] Fix hang when named-compilezone output is sent to pipe.
Thanks to Tony Finch. [GL !2481]
5306. [security] Set a limit on number of simultaneous pipelined TCP
queries. (CVE-2019-6477) [GL #1264]
5305. [bug] NSEC Aggressive Cache ("synth-from-dnssec") has been
disabled by default because it was found to have
a significant performance impact on the recursive
service. [GL #1265]
5304. [bug] "dnskey-sig-validity 0;" was not being accepted.
[GL #876]
5303. [placeholder]
5302. [bug] Fix checking that "dnstap-output" is defined when
"dnstap" is specified in a view. [GL #1281]
5301. [bug] Detect partial prefixes / incomplete IPv4 address in
acls. [GL #1143]
5300. [bug] dig/mdig/delv: Add a colon after EDNS option names,
even when the option is empty, to improve
readability and allow correct parsing of YAML
output. [GL #1226]
--- 9.15.5 released ---
5299. [security] A flaw in DNSSEC verification when transferring
mirror zones could allow data to be incorrectly
marked valid. (CVE-2019-6475) [GL #1252]
5298. [security] Named could assert if a forwarder returned a
referral, rather than resolving the query, when QNAME
minimization was enabled. (CVE-2019-6476) [GL #1051]
5297. [bug] Check whether a previous QNAME minimization fetch
is still running before starting a new one; return
SERVFAIL and log an error if so. [GL #1191]
5296. [placeholder]
5295. [cleanup] Split dns_name_copy() calls into dns_name_copy() and
dns_name_copynf() for those calls that can potentially
fail and those that should not fail respectively.
[GL !2265]
5294. [func] Fallback to ACE name on output in locale, which does not
support converting it to unicode. [GL #846]
5293. [bug] On Windows, named crashed upon any attempt to fetch XML
statistics from it. [GL #1245]
5292. [bug] Queue 'rndc nsec3param' requests while signing inline
zone changes. [GL #1205]
--- 9.15.4 released ---
5291. [placeholder]
@@ -7,7 +185,7 @@
5289. [bug] Address NULL pointer dereference in rpz.c:rpz_detach.
[GL #1210]
5288. [bug] dnssec-must-be-secure was not always honoured.
5288. [bug] dnssec-must-be-secure was not always honored.
[GL #1209]
5287. [placeholder]
@@ -84,7 +262,7 @@
5268. [placeholder]
5267. [func] Allow statistics groups display to be toggleable.
5267. [func] Allow statistics groups display to be toggle-able.
[GL #1030]
5266. [bug] named-checkconf failed to report dnstap-output
@@ -192,7 +370,7 @@
code in a high-load cold-cache resolver scenario.
[GL #943]
5242. [bug] In relaxed qname minimizatiom mode, fall back to
5242. [bug] In relaxed qname minimization mode, fall back to
normal resolution when encountering a lame
delegation, and use _.domain/A queries rather
than domain/NS. [GL #1055]
+1 -226
View File
@@ -1,4 +1,4 @@
Copyright (C) 1996-2019 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 1996-2020 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
@@ -181,67 +181,6 @@ SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1998 Doug Rabson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright ((c)) 2002, Rice University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Rice University (RICE) nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
This software is provided by RICE and the contributors on an "as is"
basis, without any representations or warranties of any kind, express
or implied including, but not limited to, representations or
warranties of non-infringement, merchantability or fitness for a
particular purpose. In no event shall RICE or contributors be liable
for any direct, indirect, incidental, special, exemplary, or
consequential damages (including, but not limited to, procurement of
substitute goods or services; loss of use, data, or profits; or
business interruption) however caused and on any theory of liability,
whether in contract, strict liability, or tort (including negligence
or otherwise) arising in any way out of the use of this software, even
if advised of the possibility of such damage.
-----------------------------------------------------------------------------
Copyright (c) 1993 by Digital Equipment Corporation.
Permission to use, copy, modify, and distribute this software for any
@@ -262,61 +201,6 @@ SOFTWARE.
-----------------------------------------------------------------------------
Copyright 2000 Aaron D. Gifford. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1998 Doug Rabson.
Copyright (c) 2001 Jake Burkholder.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
All rights reserved.
@@ -363,49 +247,6 @@ SOFTWARE.
-----------------------------------------------------------------------------
Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved.
By using this file, you agree to the terms and conditions set forth bellow.
LICENSE TERMS AND CONDITIONS
The following License Terms and Conditions apply, unless a different
license is obtained from Japan Network Information Center ("JPNIC"),
a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
Chiyoda-ku, Tokyo 101-0047, Japan.
1. Use, Modification and Redistribution (including distribution of any
modified or derived work) in source and/or binary forms is permitted
under this License Terms and Conditions.
2. Redistribution of source code must retain the copyright notices as they
appear in each source code file, this License Terms and Conditions.
3. Redistribution in binary form must reproduce the Copyright Notice,
this License Terms and Conditions, in the documentation and/or other
materials provided with the distribution. For the purposes of binary
distribution the "Copyright Notice" refers to the following language:
"Copyright (c) 2000-2002 Japan Network Information Center. All rights
reserved."
4. The name of JPNIC may not be used to endorse or promote products
derived from this Software without specific prior written approval of
JPNIC.
5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-----------------------------------------------------------------------------
Copyright (C) 2004 Nominet, Ltd.
Permission to use, copy, modify, and distribute this software for any
@@ -422,24 +263,6 @@ PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Portions Copyright RSA Security Inc.
License to copy and use this software is granted provided that it is
identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
(Cryptoki)" in all material mentioning or referencing this software.
License is also granted to make and use derivative works provided that
such works are identified as "derived from the RSA Security Inc. PKCS #11
Cryptographic Token Interface (Cryptoki)" in all material mentioning or
referencing the derived work.
RSA Security Inc. makes no representations concerning either the
merchantability of this software or the suitability of this software for
any particular purpose. It is provided "as is" without express or implied
warranty of any kind.
-----------------------------------------------------------------------------
Copyright (c) 1996, David Mazieres <dm@uun.org>
Copyright (c) 2008, Damien Miller <djm@openbsd.org>
@@ -457,54 +280,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
endorse or promote products derived from this software without
prior written permission. For written permission, please contact
licensing@OpenSSL.org.
5. Products derived from this software may not be called "OpenSSL"
nor may "OpenSSL" appear in their names without prior written
permission of the OpenSSL Project.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1995, 1997, 1998 The NetBSD Foundation, Inc.
All rights reserved.
+50 -26
View File
@@ -3,11 +3,30 @@ PLATFORMS
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.
system with a C11-compliant C compiler, BSD-style sockets with
RFC-compliant IPv6 support, POSIX-compliant threads, the libuv
asynchronous I/O library, and the OpenSSL cryptography library.
The following C11 features are used in BIND 9:
* 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.
* Thread Local Storage support from the compiler is needed, either in
the form of C11 _Thread_local/thread_local, the __thread GCC
extension, or the __declspec(thread) MSVC extension on Windows.
BIND 9.15 requires a fairly recent version of libuv (at least 1.x). For
some of the older systems listed below, you will have to install an
updated libuv package from sources such as EPEL, PPA, or other native
sources for updated packages. The other option is to build and install
libuv from source.
Certain optional BIND features have additional library dependencies. These
include libxml2 and libjson-c for statistics, libmaxminddb for
geolocation, libfstrm and libprotobuf-c for DNSTAP, and libidn2 for
internationalized domain name conversion.
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
@@ -15,15 +34,16 @@ offer support on a "best effort" basis for some.
Regularly tested platforms
As of Feb 2019, BIND 9.15 is fully supported and regularly tested on the
As of Dec 2019, BIND 9.15 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
* Debian 9, 10
* Ubuntu LTS 16.04, 18.04
* Fedora 31
* Red Hat Enterprise Linux / CentOS 7, 8
* FreeBSD 11.3, 12.0
* OpenBSD 6.5
* Alpine Linux
The amd64, i386, armhf and arm64 CPU architectures are all fully
supported.
@@ -40,17 +60,30 @@ Server 2012 R2, none of these are tested regularly by ISC.
* 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+
+ Ubuntu 19.04+
+ Gentoo
+ Arch Linux
+ Alpine Linux
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
Community maintained
These systems may not all have the required dependencies for building BIND
easily available, although it will be possible in many cases to compile
those directly from source. The community and interested parties may wish
to help with maintenance, and we welcome patch contributions, although we
cannot guarantee that we will accept them. All contributions will be
assessed against the risk of adverse effect on officially supported
platforms.
* Platforms past or close to their respective EOL dates, such as:
+ Ubuntu 14.04, 18.10
+ CentOS 6
+ Debian Jessie
+ FreeBSD 10.x
Unsupported platforms
These are platforms on which BIND 9.15 is known not to build or run:
@@ -63,13 +96,4 @@ These are platforms on which BIND 9.15 is known not to build or run:
* Platforms that don't support atomic operations (via compiler or
library)
* Linux without NPTL (Native POSIX Thread Library)
Platform quirks
NetBSD 6 i386
The i386 build of NetBSD requires the libatomic library, available from
the gcc5-libs package. Because this library is in a non-standard path, its
location must be specified in the configure command line:
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
* Platforms on which libuv cannot be compiled
+50 -28
View File
@@ -11,11 +11,30 @@
## 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.
system with a C11-compliant C compiler, BSD-style sockets with RFC-compliant
IPv6 support, POSIX-compliant threads, the `libuv` asynchronous I/O library,
and the OpenSSL cryptography library.
The following C11 features are used in BIND 9:
* 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.
* Thread Local Storage support from the compiler is needed, either in the form
of C11 `_Thread_local`/`thread_local`, the `__thread` GCC extension, or
the `__declspec(thread)` MSVC extension on Windows.
BIND 9.15 requires a fairly recent version of `libuv` (at least 1.x). For
some of the older systems listed below, you will have to install an updated
`libuv` package from sources such as EPEL, PPA, or other native sources for
updated packages. The other option is to build and install `libuv` from
source.
Certain optional BIND features have additional library dependencies.
These include `libxml2` and `libjson-c` for statistics, `libmaxminddb` for
geolocation, `libfstrm` and `libprotobuf-c` for DNSTAP, and `libidn2` for
internationalized domain name conversion.
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
@@ -23,15 +42,16 @@ offer support on a "best effort" basis for some.
### Regularly tested platforms
As of Feb 2019, BIND 9.15 is fully supported and regularly tested on the
As of Dec 2019, BIND 9.15 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
* Debian 9, 10
* Ubuntu LTS 16.04, 18.04
* Fedora 31
* Red Hat Enterprise Linux / CentOS 7, 8
* FreeBSD 11.3, 12.0
* OpenBSD 6.5
* Alpine Linux
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
@@ -47,17 +67,30 @@ Server 2012 R2, none of these are tested regularly by ISC.
* 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+
* Ubuntu 19.04+
* Gentoo
* Arch Linux
* Alpine Linux
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
### Community maintained
These systems may not all have the required dependencies for building BIND
easily available, although it will be possible in many cases to compile
those directly from source. The community and interested parties may wish
to help with maintenance, and we welcome patch contributions, although we
cannot guarantee that we will accept them. All contributions will be
assessed against the risk of adverse effect on officially supported
platforms.
* Platforms past or close to their respective EOL dates, such as:
* Ubuntu 14.04, 18.10
* CentOS 6
* Debian Jessie
* FreeBSD 10.x
## Unsupported platforms
These are platforms on which BIND 9.15 is known *not* to build or run:
@@ -69,15 +102,4 @@ These are platforms on which BIND 9.15 is known *not* to build or run:
* 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
### NetBSD 6 i386
The i386 build of NetBSD requires the `libatomic` library, available from
the `gcc5-libs` package. Because this library is in a non-standard path,
its location must be specified in the `configure` command line:
```
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
```
* Platforms on which `libuv` cannot be compiled
+45 -36
View File
@@ -48,8 +48,8 @@ the file HISTORY.
For a detailed list of changes made throughout the history of BIND 9, see
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 up-to-date versions and release notes, see https://www.isc.org/
download/.
For information about supported platforms, see PLATFORMS.
@@ -71,6 +71,9 @@ If the bug you are reporting is a potential security issue, such as an
assertion failure or other crash in named, please do NOT use GitLab to
report it. Instead, please send mail to security-officer@isc.org.
For a general overview of ISC security policies, read the Knowledge Base
article at https://kb.isc.org/docs/aa-00861.
Professional support and training for BIND are available from ISC at
https://www.isc.org/support.
@@ -91,7 +94,7 @@ General information: CONTRIBUTING.md - Code of Conduct: CODE_OF_CONDUCT.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
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.
By default, external contributors don't have ability to fork BIND in the
@@ -108,27 +111,33 @@ BIND 9.15 features
BIND 9.15 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.14 and earlier releases. New features include:
* New "dnssec-policy" statement to configure a key and signing policy
for zones, enabling automatic key regeneration and rollover.
* New new network manager based on libuv.
* Support for the new GeoIP2 geolocation API
* Improved DNSSEC key configuration using dnssec-keys
* Improved DNSSEC trust anchor configuration using the trust-anchors
statement, permitting configuration of trust anchors in DS as well as
DNSKEY format.
* YAML output for dig, mdig, and delv.
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.
basic POSIX support, and a 64-bit integer type. BIND also requires the
libuv asynchronous I/O library, and 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 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.
Successful builds have been observed on many versions of Linux and UNIX,
including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware,
Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE,
HP-UX, and OpenWRT.
BIND is also available for Windows 2008 and higher. See win32utils/
readme1st.txt for details on building for Windows systems.
BIND is also available for Windows Server 2008 and higher. See win32utils/
build.txt for details on building for Windows systems.
To build on a UNIX or Linux system, use:
@@ -156,26 +165,25 @@ STD_CDEFINES Defaults to empty string. For a list of possible settings,
LDFLAGS Linker flags. Defaults to empty string.
BUILD_CC Needed when cross-compiling: the native C compiler to use
when building for the target system.
BUILD_CFLAGS Optional, used for cross-compiling
BUILD_CPPFLAGS
BUILD_LDFLAGS
BUILD_LIBS
BUILD_CFLAGS CFLAGS for the target system during cross-compiling.
BUILD_CPPFLAGS CPPFLAGS for the target system during cross-compiling.
BUILD_LDFLAGS LDFLAGS for the target system during cross-compiling.
BUILD_LIBS LIBS for the target system during cross-compiling.
macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/ or
if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and
other tools so that they can be easily found.
if you have Xcode already installed you can run xcode-select --install.
Dependencies
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
'argparse' and 'ply' modules to be available. 'argparse' is a standard
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
pypi.python.org/pypi/ply.
argparse, ply and distutils.core modules to be available. argparse is a
standard module as of Python 2.7 and Python 3.2. ply is available from
https://pypi.python.org/pypi/ply. distutils.core is required for
installation.
Compile-time options
@@ -193,8 +201,9 @@ operations, specify the path to the PKCS#11 provider library using
--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://
github.com/json-c. If these are installed at a nonstandard location, then:
least one of the following libraries: libxml2 http://xmlsoft.org or json-c
https://github.com/json-c/json-c. If these are installed at a nonstandard
location, then:
* for libxml2, specify the prefix using --with-libxml2=/prefix,
* for json-c, adjust PKG_CONFIG_PATH.
@@ -227,8 +236,8 @@ 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.
or libcap-devel package. 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
@@ -262,7 +271,7 @@ ifconfig.sh up as root.
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
and will be skipped if these are not available. Some tests require Python
and the 'dnspython' module and will be skipped if these are not available.
and the dnspython module and will be skipped if these are not available.
See bin/tests/system/README for further details.
Unit tests are implemented using the CMocka unit testing framework. To
@@ -273,7 +282,7 @@ tests can be run via make test or make unit.
Documentation
The BIND 9 Administrator Reference Manual is included with the source
distribution, in DocBook XML, HTML and PDF format, in the doc/arm
distribution, in DocBook XML, HTML, and PDF format, in the doc/arm
directory.
Some of the programs in the BIND 9 distribution have man pages in their
@@ -328,16 +337,16 @@ issue number. Prior to 2018, these were usually of the form [RT #NNN] and
referred to entries in the "bind9-bugs" RT database, which was not open to
the public. More recent entries use the form [GL #NNN] or, less often, [GL
!NNN], which, respectively, refer to issues or merge requests in the
Gitlab database. Most of these are publicly readable, unless they include
information which is confidential or security senstive.
GitLab database. Most of these are publicly readable, unless they include
information which is confidential or security sensitive.
To look up a Gitlab issue by its number, use the URL https://
To look up a GitLab issue by its number, use the URL https://
gitlab.isc.org/isc-projects/bind9/issues/NNN. To look up a merge request,
use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN.
In rare cases, an issue or merge request number may be followed with the
letter "P". This indicates that the information is in the private ISC
Gitlab instance, which is not visible to the public.
GitLab instance, which is not visible to the public.
Acknowledgments
+59 -48
View File
@@ -57,8 +57,8 @@ For a detailed list of changes made throughout the history of BIND 9, see
the file [CHANGES](CHANGES). See [below](#changes) for details on the
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 up-to-date versions and release notes, see
[https://www.isc.org/download/](https://www.isc.org/download/).
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
@@ -82,6 +82,9 @@ assertion failure or other crash in `named`, please do *NOT* use GitLab to
report it. Instead, please send mail to
[security-officer@isc.org](mailto:security-officer@isc.org).
For a general overview of ISC security policies, read the Knowledge Base
article at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
Professional support and training for BIND are available from
ISC at [https://www.isc.org/support](https://www.isc.org/support).
@@ -104,7 +107,7 @@ Information for BIND contributors can be found in the following files:
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
Patches for BIND may be submitted as
[Merge Requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
[merge requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
in the [ISC GitLab server](https://gitlab.isc.org) at
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
@@ -124,27 +127,34 @@ BIND 9.15 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.14 and earlier releases. New features
include:
* New "dnssec-policy" statement to configure a key and signing policy
for zones, enabling automatic key regeneration and rollover.
* New new network manager based on libuv.
* Support for the new GeoIP2 geolocation API
* Improved DNSSEC key configuration using `dnssec-keys`
* YAML output for dig, mdig, and delv.
* Improved DNSSEC trust anchor configuration using the `trust-anchors`
statement, permitting configuration of trust anchors in DS as well as
DNSKEY format.
* YAML output for `dig`, `mdig`, and `delv`.
### <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.
basic POSIX support, and a 64-bit integer type. BIND also requires the
`libuv` asynchronous I/O library, and 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 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.
Successful builds have been observed on many versions of Linux and
UNIX, including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE,
Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris,
OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
BIND is also available for Windows 2008 and higher. See
`win32utils/readme1st.txt` for details on building for Windows
BIND is also available for Windows Server 2008 and higher. See
`win32utils/build.txt` for details on building for Windows
systems.
To build on a UNIX or Linux system, use:
@@ -166,26 +176,26 @@ affect compilation:
|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).|
|`LDFLAGS`|Linker flags. Defaults to empty string.|
|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|`BUILD_CFLAGS`|Optional, used for cross-compiling|
|`BUILD_CPPFLAGS`||
|`BUILD_LDFLAGS`||
|`BUILD_LIBS`||
|`BUILD_CFLAGS`|`CFLAGS` for the target system during cross-compiling.|
|`BUILD_CPPFLAGS`|`CPPFLAGS` for the target system during cross-compiling.|
|`BUILD_LDFLAGS`|`LDFLAGS` for the target system during cross-compiling.|
|`BUILD_LIBS`|`LIBS` for the target system during cross-compiling.|
#### <a name="macos"> macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/
or if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and other
tools so that they can be easily found.
This can be downloaded from [https://developer.apple.com/download/more/](https://developer.apple.com/download/more/)
or if you have Xcode already installed you can run `xcode-select --install`.
### <a name="dependencies"/> Dependencies
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the 'argparse' and 'ply' modules to be available.
'argparse' is a standard module as of Python 2.7 and Python 3.2.
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
system tests, require the `argparse`, `ply` and `distutils.core` modules
to be available.
`argparse` is a standard module as of Python 2.7 and Python 3.2.
`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
`distutils.core` is required for installation.
#### <a name="opts"/> Compile-time options
@@ -203,16 +213,16 @@ path to the PKCS#11 provider library using `--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](http://xmlsoft.org) or json-c
[https://github.com/json-c](https://github.com/json-c). If these are
installed at a nonstandard location, then:
least one of the following libraries: `libxml2`
[http://xmlsoft.org](http://xmlsoft.org) or `json-c`
[https://github.com/json-c/json-c](https://github.com/json-c/json-c).
If these are installed at a nonstandard location, then:
* for libxml2, specify the prefix using `--with-libxml2=/prefix`,
* for json-c, adjust `PKG_CONFIG_PATH`.
* for `libxml2`, specify the prefix using `--with-libxml2=/prefix`,
* for `json-c`, adjust `PKG_CONFIG_PATH`.
To support compression on the HTTP statistics channel, the server must be
linked against libzlib. If this is installed in a nonstandard location,
linked against `libzlib`. If this is installed in a nonstandard location,
specify the prefix using `--with-zlib=/prefix`.
To support storing configuration data for runtime-added zones in an LMDB
@@ -225,9 +235,9 @@ found; if the library is installed in a nonstandard location,
specify the prefix using `--with-maxminddb=/prefix`. GeoIP2 support
can be switched off with `--disable-geoip`.
For DNSTAP packet logging, you must have installed libfstrm
For DNSTAP packet logging, you must have installed `libfstrm`
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
and libprotobuf-c
and `libprotobuf-c`
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with `--enable-dnstap`.
@@ -240,7 +250,7 @@ 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
the `libcap-dev` or `libcap-devel` package. 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
@@ -273,20 +283,21 @@ multiple servers to run locally and communicate with one another). These
IP addresses can be configured by running the command
`bin/tests/system/ifconfig.sh up` as root.
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
Some tests require Perl and the `Net::DNS` and/or `IO::Socket::INET6` modules,
and will be skipped if these are not available. Some tests require Python
and the 'dnspython' module and will be skipped if these are not available.
and the `dnspython` module and will be skipped if these are not available.
See bin/tests/system/README for further details.
Unit tests are implemented using the CMocka unit testing framework.
Unit tests are implemented using the [CMocka unit testing framework](https://cmocka.org/).
To build them, use `configure --with-cmocka`. Execution of tests is done
by the Kyua test execution engine; if the `kyua` command is available,
then unit tests can be run via `make test` or `make unit`.
by the [Kyua test execution engine](https://github.com/jmmv/kyua); if the
`kyua` command is available, then unit tests can be run via `make test`
or `make unit`.
### <a name="doc"/> Documentation
The *BIND 9 Administrator Reference Manual* is included with the source
distribution, in DocBook XML, HTML and PDF format, in the `doc/arm`
distribution, in DocBook XML, HTML, and PDF format, in the `doc/arm`
directory.
Some of the programs in the BIND 9 distribution have man pages in their
@@ -336,17 +347,17 @@ issue number. Prior to 2018, these were usually of the form `[RT #NNN]`
and referred to entries in the "bind9-bugs" RT database, which was not open
to the public. More recent entries use the form `[GL #NNN]` or, less often,
`[GL !NNN]`, which, respectively, refer to issues or merge requests in the
Gitlab database. Most of these are publicly readable, unless they include
information which is confidential or security senstive.
GitLab database. Most of these are publicly readable, unless they include
information which is confidential or security sensitive.
To look up a Gitlab issue by its number, use the URL
To look up a GitLab issue by its number, use the URL
[https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
To look up a merge request, use
[https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
In rare cases, an issue or merge request number may be followed with the
letter "P". This indicates that the information is in the private ISC
Gitlab instance, which is not visible to the public.
GitLab instance, which is not visible to the public.
### <a name="ack"/> Acknowledgments
+2 -4
View File
@@ -127,9 +127,7 @@ add(char *key, int value) {
isc_symvalue_t symvalue;
if (sym_mctx == NULL) {
result = isc_mem_create(0, 0, &sym_mctx);
if (result != ISC_R_SUCCESS)
return;
isc_mem_create(&sym_mctx);
}
if (symtab == NULL) {
@@ -718,7 +716,7 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
FILE *output = stdout;
const char *flags;
flags = (fileformat == dns_masterformat_text) ? "w+" : "wb+";
flags = (fileformat == dns_masterformat_text) ? "w" : "wb";
if (debug) {
if (filename != NULL && strcmp(filename, "-") != 0)
+2 -4
View File
@@ -421,7 +421,7 @@ configure_zone(const char *vclass, const char *view,
obj = NULL;
if (get_maps(maps, "max-zone-ttl", &obj)) {
maxttl = cfg_obj_asuint32(obj);
maxttl = cfg_obj_asduration(obj);
zone_options |= DNS_ZONEOPT_CHECKTTL;
}
@@ -585,7 +585,7 @@ main(int argc, char **argv) {
}
isc_commandline_reset = true;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
isc_mem_create(&mctx);
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
switch (c) {
@@ -709,8 +709,6 @@ main(int argc, char **argv) {
cfg_parser_destroy(&parser);
dns_name_destroy();
isc_log_destroy(&logc);
isc_mem_destroy(&mctx);
+1
View File
@@ -41,6 +41,7 @@
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+3 -3
View File
@@ -85,9 +85,9 @@ usage(void) {
static void
destroy(void) {
if (zone != NULL)
if (zone != NULL) {
dns_zone_detach(&zone);
dns_name_destroy();
}
}
/*% main processing routine */
@@ -517,7 +517,7 @@ main(int argc, char **argv) {
InitSockets();
#endif
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
isc_mem_create(&mctx);
if (!quiet)
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
== ISC_R_SUCCESS);
+1
View File
@@ -44,6 +44,7 @@
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checkconf</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -17,18 +17,21 @@
<ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checktool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+10 -7
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checkzone</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -63,15 +66,15 @@
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<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>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
@@ -97,7 +100,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
@@ -106,8 +109,8 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<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>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<PostBuildEvent>
+1 -1
View File
@@ -207,7 +207,7 @@ main(int argc, char **argv) {
/* Use canonical algorithm name */
algname = alg_totext(alg);
DO("create memory context", isc_mem_create(0, 0, &mctx));
isc_mem_create(&mctx);
if (keyname == NULL) {
const char *suffix = NULL;
+1
View File
@@ -38,6 +38,7 @@
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1 -1
View File
@@ -209,7 +209,7 @@ main(int argc, char **argv) {
keysize = alg_bits(alg);
algname = alg_totext(alg);
DO("create memory context", isc_mem_create(0, 0, &mctx));
isc_mem_create(&mctx);
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
generate_key(mctx, alg, keysize, &key_txtbuffer);
+1
View File
@@ -45,6 +45,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{64964B03-4815-41F0-9057-E766A94AF197}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>confgentool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>ddnsconfgen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{1E2C1635-3093-4D59-80E7-4743AC10F22F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>rndcconfgen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+1 -1
View File
@@ -144,7 +144,7 @@ options\&.
Note: When reading the trust anchor file,
\fBdelv\fR
treats
\fBdnssec\-keys\fR\fBinitial\-key\fR
\fBtrust\-anchors\fR\fBinitial\-key\fR
and
\fBstatic\-key\fR
entries identically\&. That is, even if a key is configured with
+155 -75
View File
@@ -33,8 +33,10 @@
#include <isc/app.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/hex.h>
#include <isc/lib.h>
#include <isc/log.h>
#include <isc/md.h>
#include <isc/mem.h>
#ifdef WIN32
#include <isc/ntpaths.h>
@@ -138,7 +140,7 @@ static dns_fixedname_t afn;
static dns_name_t *anchor_name = NULL;
/* Default bind.keys contents */
static char anchortext[] = DNSSEC_KEYS;
static char anchortext[] = TRUST_ANCHORS;
/*
* Static function prototypes
@@ -158,43 +160,44 @@ usage(void) {
" q-class is one of (in,hs,ch,...) [default: in]\n"
" q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a]\n"
" q-opt is one of:\n"
" -x dot-notation (shortcut for reverse lookups)\n"
" -d level (set debugging level)\n"
" -4 (use IPv4 query transport only)\n"
" -6 (use IPv6 query transport only)\n"
" -a anchor-file (specify root trust anchor)\n"
" -b address[#port] (bind to source address/port)\n"
" -c class (option included for compatibility;\n"
" -d level (set debugging level)\n"
" -h (print help and exit)\n"
" -i (disable DNSSEC validation)\n"
" -m (enable memory usage debugging)\n"
" -p port (specify port number)\n"
" -q name (specify query name)\n"
" -t type (specify query type)\n"
" -c class (option included for compatibility;\n"
" only IN is supported)\n"
" -4 (use IPv4 query transport only)\n"
" -6 (use IPv6 query transport only)\n"
" -i (disable DNSSEC validation)\n"
" -m (enable memory usage debugging)\n"
" -v (print version and exit)\n"
" -x dot-notation (shortcut for reverse lookups)\n"
" d-opt is of the form +keyword[=value], where keyword is:\n"
" +[no]all (Set or clear all display flags)\n"
" +[no]class (Control display of class)\n"
" +[no]comments (Control display of comment lines)\n"
" +[no]crypto (Control display of cryptographic\n"
" fields in records)\n"
" +[no]dlv (Obsolete)\n"
" +[no]dnssec (Display DNSSEC records)\n"
" +[no]mtrace (Trace messages received)\n"
" +[no]multiline (Print records in an expanded format)\n"
" +[no]comments (Control display of comment lines)\n"
" +[no]root (DNSSEC validation trust anchor)\n"
" +[no]rrcomments (Control display of per-record "
"comments)\n"
" +[no]unknownformat (Print RDATA in RFC 3597 "
"\"unknown\" format)\n"
" +[no]rtrace (Trace resolver fetches)\n"
" +[no]short (Short form answer)\n"
" +[no]split=## (Split hex/base64 fields into chunks)\n"
" +[no]tcp (TCP mode)\n"
" +[no]ttl (Control display of ttls in records)\n"
" +[no]trust (Control display of trust level)\n"
" +[no]rtrace (Trace resolver fetches)\n"
" +[no]mtrace (Trace messages received)\n"
" +[no]unknownformat (Print RDATA in RFC 3597 "
"\"unknown\" format)\n"
" +[no]vtrace (Trace validation process)\n"
" +[no]dlv (Obsolete)\n"
" +[no]root (DNSSEC validation trust anchor)\n"
" +[no]dnssec (Display DNSSEC records)\n"
" -h (print help and exit)\n"
" -v (print version and exit)\n",
" +[no]yaml (Present the results as YAML)\n",
stderr);
exit(1);
}
@@ -495,14 +498,17 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
dns_rdata_reset(&rdata);
}
} else {
dns_indent_t indent = { " ", 2 };
if (!yaml && (rdataset->attributes &
DNS_RDATASETATTR_NEGATIVE) != 0)
{
isc_buffer_putstr(&target, "; ");
}
result = dns_master_rdatasettotext(owner, rdataset,
style, &target);
style,
yaml ? &indent :
NULL,
&target);
}
if (result == ISC_R_NOSPACE) {
@@ -529,13 +535,11 @@ setup_style(dns_master_style_t **stylep) {
isc_result_t result;
dns_master_style_t *style = NULL;
REQUIRE(stylep != NULL || *stylep == NULL);
REQUIRE(stylep != NULL && *stylep == NULL);
styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (yaml) {
styleflags |= DNS_STYLEFLAG_YAML;
dns_master_indentstr = " ";
dns_master_indent = 2;
} else {
if (showcomments) {
styleflags |= DNS_STYLEFLAG_COMMENT;
@@ -608,11 +612,12 @@ convert_name(dns_fixedname_t *fn, dns_name_t **name, const char *text) {
static isc_result_t
key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
dns_rdata_dnskey_t keystruct;
uint32_t flags, proto, alg;
const char *keystr, *keynamestr;
unsigned char keydata[4096];
isc_buffer_t keydatabuf;
dns_rdata_dnskey_t dnskey;
dns_rdata_ds_t ds;
uint32_t rdata1, rdata2, rdata3;
const char *datastr = NULL, *keynamestr = NULL, *atstr = NULL;
unsigned char data[4096];
isc_buffer_t databuf;
unsigned char rrdata[4096];
isc_buffer_t rrdatabuf;
isc_region_t r;
@@ -620,6 +625,13 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
dns_name_t *keyname;
isc_result_t result;
bool match_root = false;
enum {
INITIAL_KEY,
STATIC_KEY,
INITIAL_DS,
STATIC_DS,
TRUSTED
} anchortype;
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
CHECK(convert_name(&fkeyname, &keyname, keynamestr));
@@ -635,55 +647,125 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
if (!match_root) {
return (ISC_R_SUCCESS);
}
if (!root_validation && match_root) {
if (!root_validation) {
return (ISC_R_SUCCESS);
}
if (match_root) {
delv_log(ISC_LOG_DEBUG(3), "adding trust anchor %s",
trust_anchor);
delv_log(ISC_LOG_DEBUG(3), "adding trust anchor %s", trust_anchor);
/* if DNSKEY, flags; if DS, key tag */
rdata1 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata1"));
/* if DNSKEY, protocol; if DS, algorithm */
rdata2 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata2"));
/* if DNSKEY, algorithm; if DS, digest type */
rdata3 = cfg_obj_asuint32(cfg_tuple_get(key, "rdata3"));
/* What type of trust anchor is this? */
atstr = cfg_obj_asstring(cfg_tuple_get(key, "anchortype"));
if (strcasecmp(atstr, "static-key") == 0) {
anchortype = STATIC_KEY;
} else if (strcasecmp(atstr, "static-ds") == 0) {
anchortype = STATIC_DS;
} else if (strcasecmp(atstr, "initial-key") == 0) {
anchortype = INITIAL_KEY;
} else if (strcasecmp(atstr, "initial-ds") == 0) {
anchortype = INITIAL_DS;
} else {
delv_log(ISC_LOG_ERROR,
"key '%s': invalid initialization method '%s'",
keynamestr, atstr);
result = ISC_R_FAILURE;
goto cleanup;
}
flags = cfg_obj_asuint32(cfg_tuple_get(key, "flags"));
proto = cfg_obj_asuint32(cfg_tuple_get(key, "protocol"));
alg = cfg_obj_asuint32(cfg_tuple_get(key, "algorithm"));
keystruct.common.rdclass = dns_rdataclass_in;
keystruct.common.rdtype = dns_rdatatype_dnskey;
/*
* The key data in keystruct is not dynamically allocated.
*/
keystruct.mctx = NULL;
ISC_LINK_INIT(&keystruct.common, link);
if (flags > 0xffff)
CHECK(ISC_R_RANGE);
if (proto > 0xff)
CHECK(ISC_R_RANGE);
if (alg > 0xff)
CHECK(ISC_R_RANGE);
keystruct.flags = (uint16_t)flags;
keystruct.protocol = (uint8_t)proto;
keystruct.algorithm = (uint8_t)alg;
isc_buffer_init(&keydatabuf, keydata, sizeof(keydata));
isc_buffer_init(&databuf, data, sizeof(data));
isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
keystr = cfg_obj_asstring(cfg_tuple_get(key, "key"));
CHECK(isc_base64_decodestring(keystr, &keydatabuf));
isc_buffer_usedregion(&keydatabuf, &r);
keystruct.datalen = r.length;
keystruct.data = r.base;
if (rdata1 > 0xffff) {
CHECK(ISC_R_RANGE);
}
if (rdata2 > 0xff) {
CHECK(ISC_R_RANGE);
}
if (rdata3 > 0xff) {
CHECK(ISC_R_RANGE);
}
CHECK(dns_rdata_fromstruct(NULL,
keystruct.common.rdclass,
keystruct.common.rdtype,
&keystruct, &rrdatabuf));
switch (anchortype) {
case STATIC_KEY:
case INITIAL_KEY:
case TRUSTED:
dnskey.common.rdclass = dns_rdataclass_in;
dnskey.common.rdtype = dns_rdatatype_dnskey;
dnskey.mctx = NULL;
ISC_LINK_INIT(&dnskey.common, link);
dnskey.flags = (uint16_t)rdata1;
dnskey.protocol = (uint8_t)rdata2;
dnskey.algorithm = (uint8_t)rdata3;
datastr = cfg_obj_asstring(cfg_tuple_get(key, "data"));
CHECK(isc_base64_decodestring(datastr, &databuf));
isc_buffer_usedregion(&databuf, &r);
dnskey.datalen = r.length;
dnskey.data = r.base;
CHECK(dns_rdata_fromstruct(NULL, dnskey.common.rdclass,
dnskey.common.rdtype,
&dnskey, &rrdatabuf));
CHECK(dns_client_addtrustedkey(client, dns_rdataclass_in,
dns_rdatatype_dnskey,
keyname, &rrdatabuf));
break;
case INITIAL_DS:
case STATIC_DS:
ds.common.rdclass = dns_rdataclass_in;
ds.common.rdtype = dns_rdatatype_ds;
ds.mctx = NULL;
ISC_LINK_INIT(&ds.common, link);
ds.key_tag = (uint16_t)rdata1;
ds.algorithm = (uint8_t)rdata2;
ds.digest_type = (uint8_t)rdata3;
datastr = cfg_obj_asstring(cfg_tuple_get(key, "data"));
CHECK(isc_hex_decodestring(datastr, &databuf));
isc_buffer_usedregion(&databuf, &r);
switch (ds.digest_type) {
case DNS_DSDIGEST_SHA1:
if (r.length != ISC_SHA1_DIGESTLENGTH) {
CHECK(ISC_R_UNEXPECTEDEND);
}
break;
case DNS_DSDIGEST_SHA256:
if (r.length != ISC_SHA256_DIGESTLENGTH) {
CHECK(ISC_R_UNEXPECTEDEND);
}
break;
case DNS_DSDIGEST_SHA384:
if (r.length != ISC_SHA384_DIGESTLENGTH) {
CHECK(ISC_R_UNEXPECTEDEND);
}
break;
}
ds.length = r.length;
ds.digest = r.base;
CHECK(dns_rdata_fromstruct(NULL, ds.common.rdclass,
ds.common.rdtype,
&ds, &rrdatabuf));
CHECK(dns_client_addtrustedkey(client, dns_rdataclass_in,
dns_rdatatype_ds,
keyname, &rrdatabuf));
};
CHECK(dns_client_addtrustedkey(client, dns_rdataclass_in,
keyname, &rrdatabuf));
num_keys++;
cleanup:
@@ -737,7 +819,7 @@ setup_dnsseckeys(dns_client_t *client) {
cfg_parser_t *parser = NULL;
const cfg_obj_t *trusted_keys = NULL;
const cfg_obj_t *managed_keys = NULL;
const cfg_obj_t *dnssec_keys = NULL;
const cfg_obj_t *trust_anchors = NULL;
cfg_obj_t *bindkeys = NULL;
const char *filename = anchorfile;
@@ -796,7 +878,7 @@ setup_dnsseckeys(dns_client_t *client) {
INSIST(bindkeys != NULL);
cfg_map_get(bindkeys, "trusted-keys", &trusted_keys);
cfg_map_get(bindkeys, "managed-keys", &managed_keys);
cfg_map_get(bindkeys, "dnssec-keys", &dnssec_keys);
cfg_map_get(bindkeys, "trust-anchors", &trust_anchors);
if (trusted_keys != NULL) {
CHECK(load_keys(trusted_keys, client));
@@ -804,8 +886,8 @@ setup_dnsseckeys(dns_client_t *client) {
if (managed_keys != NULL) {
CHECK(load_keys(managed_keys, client));
}
if (dnssec_keys != NULL) {
CHECK(load_keys(dnssec_keys, client));
if (trust_anchors != NULL) {
CHECK(load_keys(trust_anchors, client));
}
result = ISC_R_SUCCESS;
@@ -1642,9 +1724,7 @@ main(int argc, char *argv[]) {
if (result != ISC_R_SUCCESS)
fatal("dns_lib_init failed: %d", result);
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("failed to create mctx");
isc_mem_create(&mctx);
CHECK(isc_appctx_create(mctx, &actx));
CHECK(isc_taskmgr_createinctx(mctx, 1, 0, &taskmgr));
+2 -1
View File
@@ -40,6 +40,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -215,7 +216,7 @@
</para>
<para>
Note: When reading the trust anchor file,
<command>delv</command> treats <option>dnssec-keys</option>
<command>delv</command> treats <option>trust-anchors</option>
<option>initial-key</option> and <option>static-key</option>
entries identically. That is, even if a key is configured
with <command>initial-key</command>, indicating that it is
+1 -1
View File
@@ -197,7 +197,7 @@
</p>
<p>
Note: When reading the trust anchor file,
<span class="command"><strong>delv</strong></span> treats <code class="option">dnssec-keys</code>
<span class="command"><strong>delv</strong></span> treats <code class="option">trust-anchors</code>
<code class="option">initial-key</code> and <code class="option">static-key</code>
entries identically. That is, even if a key is configured
with <span class="command"><strong>initial-key</strong></span>, indicating that it is
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>delv</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+19 -15
View File
@@ -54,7 +54,7 @@
dig_lookup_t *default_lookup = NULL;
static char *batchname = NULL;
static atomic_uintptr_t batchname = ATOMIC_VAR_INIT(0);
static FILE *batchfp = NULL;
static char *argv0;
static int addresscount = 0;
@@ -239,6 +239,7 @@ help(void) {
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" "
"format)\n"
" +[no]vc (TCP mode (+[no]tcp))\n"
" +[no]yaml (Present the results as YAML)\n"
" +[no]zflag (Set Z flag in query)\n"
" global d-opts and servers (before host name) affect all queries.\n"
" local d-opts and servers (after host name) affect only that lookup.\n"
@@ -486,8 +487,8 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (yaml) {
dns_master_indentstr = " ";
dns_master_indent = 3;
msg->indent.string = " ";
msg->indent.count = 3;
styleflags |= DNS_STYLEFLAG_YAML;
} else {
if (query->lookup->comments) {
@@ -1873,7 +1874,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
value);
return (value_from_next);
case 'f':
batchname = value;
atomic_store(&batchname, (uintptr_t)value);
return (value_from_next);
case 'k':
strlcpy(keyfile, value, sizeof(keyfile));
@@ -2326,13 +2327,15 @@ parse_args(bool is_batchfile, bool config_only,
* first entry, then trust the callback in dighost_shutdown
* to get the rest
*/
if ((batchname != NULL) && !(is_batchfile)) {
if (strcmp(batchname, "-") == 0)
char *filename = (char *)atomic_load(&batchname);
if ((filename != NULL) && !(is_batchfile)) {
if (strcmp(filename, "-") == 0) {
batchfp = stdin;
else
batchfp = fopen(batchname, "r");
} else {
batchfp = fopen(filename, "r");
}
if (batchfp == NULL) {
perror(batchname);
perror(filename);
if (exitcode < 8)
exitcode = 8;
fatal("couldn't open specified batch file");
@@ -2387,14 +2390,14 @@ query_finished(void) {
int bargc;
char *bargv[16];
if (batchname == NULL) {
if (atomic_load(&batchname) == 0) {
isc_app_shutdown();
return;
}
fflush(stdout);
if (feof(batchfp)) {
batchname = NULL;
atomic_store(&batchname, 0);
isc_app_shutdown();
if (batchfp != stdin)
fclose(batchfp);
@@ -2408,7 +2411,7 @@ query_finished(void) {
parse_args(true, false, bargc, (char **)bargv);
start_lookup();
} else {
batchname = NULL;
atomic_store(&batchname, 0);
if (batchfp != stdin)
fclose(batchfp);
isc_app_shutdown();
@@ -2538,10 +2541,11 @@ void dig_query_start()
void
dig_shutdown() {
destroy_lookup(default_lookup);
if (batchname != NULL) {
if (batchfp != stdin)
if (atomic_load(&batchname) != 0) {
if (batchfp != stdin) {
fclose(batchfp);
batchname = NULL;
}
atomic_store(&batchname, 0);
}
cancel_all();
destroy_libs();
+1
View File
@@ -53,6 +53,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+36 -22
View File
@@ -649,7 +649,6 @@ make_empty_lookup(void) {
looknew->use_usec = false;
looknew->nocrypto = false;
looknew->ttlunits = false;
looknew->ttlunits = false;
looknew->expandaaaa = false;
looknew->qr = false;
looknew->accept_reply_unexpected_src = false;
@@ -836,8 +835,8 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
memmove(looknew->ecs_addr, lookold->ecs_addr, len);
}
dns_name_copy(dns_fixedname_name(&lookold->fdomain),
dns_fixedname_name(&looknew->fdomain), NULL);
dns_name_copynf(dns_fixedname_name(&lookold->fdomain),
dns_fixedname_name(&looknew->fdomain));
if (servers)
clone_server_list(lookold->my_server_list,
@@ -1365,8 +1364,7 @@ setup_libs(void) {
if (!have_ipv6 && !have_ipv4)
fatal("can't find either v4 or v6 networking");
result = isc_mem_create(0, 0, &mctx);
check_result(result, "isc_mem_create");
isc_mem_create(&mctx);
isc_mem_setname(mctx, "dig", NULL);
result = isc_log_create(mctx, &lctx, &logconfig);
@@ -1381,7 +1379,7 @@ setup_libs(void) {
isc_log_setdebuglevel(lctx, 0);
result = isc_taskmgr_create(mctx, 1, 0, &taskmgr);
result = isc_taskmgr_create(mctx, 1, 0, NULL, &taskmgr);
check_result(result, "isc_taskmgr_create");
result = isc_task_create(taskmgr, 0, &global_task);
@@ -1843,7 +1841,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
if (lookup->ns_search_only)
lookup->recurse = false;
domain = dns_fixedname_name(&lookup->fdomain);
dns_name_copy(name, domain, NULL);
dns_name_copynf(name, domain);
}
debug("adding server %s", namestr);
num = getaddresses(lookup, namestr, &lresult);
@@ -2047,6 +2045,9 @@ setup_lookup(dig_lookup_t *lookup) {
char cookiebuf[256];
char *origin = NULL;
char *textname = NULL;
REQUIRE(lookup != NULL);
#ifdef HAVE_LIBIDN2
char idn_origin[MXNAME], idn_textname[MXNAME];
@@ -2055,7 +2056,6 @@ setup_lookup(dig_lookup_t *lookup) {
check_result(result, "dns_name_settotextfilter");
#endif /* HAVE_LIBIDN2 */
REQUIRE(lookup != NULL);
INSIST(!free_now);
debug("setup_lookup(%p)", lookup);
@@ -2156,22 +2156,26 @@ setup_lookup(dig_lookup_t *lookup) {
isc_buffer_init(&b, textname, len);
isc_buffer_add(&b, len);
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
if (result == ISC_R_SUCCESS &&
!dns_name_isabsolute(name))
result = dns_name_concatenate(name,
lookup->oname,
lookup->name,
&lookup->namebuf);
else if (result == ISC_R_SUCCESS)
result = dns_name_copy(name, lookup->name,
&lookup->namebuf);
if (result == ISC_R_SUCCESS) {
if (!dns_name_isabsolute(name)) {
result = dns_name_concatenate(name,
lookup->oname,
lookup->name,
&lookup->namebuf);
} else {
result = dns_name_copy(name,
lookup->name,
&lookup->namebuf);
}
}
if (result != ISC_R_SUCCESS) {
dns_message_puttempname(lookup->sendmsg,
&lookup->name);
dns_message_puttempname(lookup->sendmsg,
&lookup->oname);
if (result == DNS_R_NAMETOOLONG)
if (result == DNS_R_NAMETOOLONG) {
return (false);
}
fatal("'%s' is not in legal name syntax (%s)",
lookup->textname,
isc_result_totext(result));
@@ -4248,7 +4252,6 @@ destroy_libs(void) {
result = dns_name_settotextfilter(NULL);
check_result(result, "dns_name_settotextfilter");
#endif /* HAVE_LIBIDN2 */
dns_name_destroy();
if (commctx != NULL) {
debug("freeing commctx");
@@ -4422,9 +4425,20 @@ idn_ace_to_locale(const char *src, char **dst) {
*/
res = idn2_to_unicode_8zlz(utf8_src, &local_src, 0);
if (res != IDN2_OK) {
fatal("Cannot represent '%s' in the current locale (%s), "
"use +noidnout or a different locale",
src, idn2_strerror(res));
static bool warned = false;
res = idn2_to_ascii_8z(utf8_src, &local_src, 0);
if (res != IDN2_OK) {
fatal("Cannot represent '%s' "
"in the current locale nor ascii (%s), "
"use +noidnout or a different locale",
src, idn2_strerror(res));
} else if (!warned) {
fprintf(stderr, ";; Warning: cannot represent '%s' "
"in the current locale",
local_src);
warned = true;
}
}
/*
+2 -2
View File
@@ -394,7 +394,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
dns_rdataset_current(rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &cname, NULL);
check_result(result, "dns_rdata_tostruct");
dns_name_copy(&cname.cname, qname, NULL);
dns_name_copynf(&cname.cname, qname);
dns_rdata_freestruct(&cname);
}
}
@@ -456,7 +456,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
/* Add AAAA and MX lookups. */
name = dns_fixedname_initname(&fixed);
dns_name_copy(query->lookup->name, name, NULL);
dns_name_copynf(query->lookup->name, name);
chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, false);
+1
View File
@@ -48,6 +48,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+2 -2
View File
@@ -423,7 +423,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
dns_rdataset_current(rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &cname, NULL);
check_result(result, "dns_rdata_tostruct");
dns_name_copy(&cname.cname, qname, NULL);
dns_name_copynf(&cname.cname, qname);
dns_rdata_freestruct(&cname);
}
}
@@ -481,7 +481,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
/* Add AAAA lookup. */
name = dns_fixedname_initname(&fixed);
dns_name_copy(query->lookup->name, name, NULL);
dns_name_copynf(query->lookup->name, name);
chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, false);
+1
View File
@@ -72,6 +72,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{F938F9B8-D395-4A40-BEC7-0122D289C692}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dig</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{140DE800-E552-43CC-B0C7-A33A92E368CA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dighost</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{BA1048A8-6961-4A20-BE12-08BE20611C9D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>host</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>nslookup</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+8 -6
View File
@@ -15,24 +15,26 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
${OPENSSL_CFLAGS}
CDEFINES = -DVERSION=\"${VERSION}\"
CDEFINES = -DVERSION=\"${VERSION}\" -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
DEPLIBS = ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS}
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
LIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @LIBS@
NOSYMLIBS = ${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@
NOSYMLIBS = ${DNSLIBS} ${ISCCFGLIBS} ${ISCNOSYMLIBS} @LIBS@
# Alphabetically
TARGETS = dnssec-cds@EXEEXT@ dnssec-dsfromkey@EXEEXT@ \
@@ -48,7 +50,7 @@ SRCS = dnssec-cds.c dnssec-dsfromkey.c dnssec-importkey.c \
dnssec-settime.c dnssec-signzone.c dnssec-verify.c \
dnssectool.c
MANPAGES = dnssec-cds.8 dnssec-dsfromkey.8 dnssec-importkey.8 \
MANPAGES = dnssec-cds.8 dnssec-dsfromkey.8 dnssec-importkey.8 \
dnssec-keyfromlabel.8 dnssec-keygen.8 dnssec-revoke.8 \
dnssec-settime.8 dnssec-signzone.8 dnssec-verify.8
+2 -5
View File
@@ -372,7 +372,7 @@ formatset(dns_rdataset_t *rdataset) {
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
check_result(result, "printing DS records");
result = dns_master_rdatasettotext(name, rdataset, style, buf);
result = dns_master_rdatasettotext(name, rdataset, style, NULL, buf);
if ((result == ISC_R_SUCCESS) && isc_buffer_availablelength(buf) < 1) {
result = ISC_R_NOSPACE;
@@ -1074,10 +1074,7 @@ main(int argc, char *argv[]) {
int ch;
char *endp;
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS) {
fatal("out of memory");
}
isc_mem_create(&mctx);
#if USE_PKCS11
pk11_result_register();
+1
View File
@@ -41,6 +41,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+15 -16
View File
@@ -200,9 +200,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
rdclass = dst_key_class(key);
name = dns_fixedname_initname(&fixed);
result = dns_name_copy(dst_key_name(key), name, NULL);
if (result != ISC_R_SUCCESS)
fatal("can't copy name");
dns_name_copynf(dst_key_name(key), name);
dst_key_free(&key);
}
@@ -334,7 +332,7 @@ int
main(int argc, char **argv) {
char *classname = NULL;
char *filename = NULL, *dir = NULL, *namestr;
char *endp;
char *endp, *arg1;
int ch;
bool cds = false;
bool usekeyset = false;
@@ -350,10 +348,7 @@ main(int argc, char **argv) {
usage();
}
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS) {
fatal("out of memory");
}
isc_mem_create(&mctx);
#if USE_PKCS11
pk11_result_register();
@@ -449,10 +444,15 @@ main(int argc, char **argv) {
dtype[0] = DNS_DSDIGEST_SHA256;
}
if (argc < isc_commandline_index + 1 && filename == NULL) {
/*
* Use local variable arg1 so that clang can correctly analyse
* reachable paths rather than 'argc < isc_commandline_index + 1'.
*/
arg1 = argv[isc_commandline_index];
if (arg1 == NULL && filename == NULL) {
fatal("the key file name was not specified");
}
if (argc > isc_commandline_index + 1) {
if (arg1 != NULL && argv[isc_commandline_index + 1] != NULL) {
fatal("extraneous arguments");
}
@@ -467,11 +467,11 @@ main(int argc, char **argv) {
dns_rdataset_init(&rdataset);
if (usekeyset || filename != NULL) {
if (argc < isc_commandline_index + 1 && filename != NULL) {
/* using zone name as the zone file name */
if (arg1 == NULL) {
/* using file name as the zone name */
namestr = filename;
} else {
namestr = argv[isc_commandline_index];
namestr = arg1;
}
result = initname(namestr);
@@ -482,6 +482,7 @@ main(int argc, char **argv) {
if (usekeyset) {
result = loadkeyset(dir, &rdataset);
} else {
INSIST(filename != NULL);
result = loadset(filename, &rdataset);
}
@@ -506,8 +507,7 @@ main(int argc, char **argv) {
} else {
unsigned char key_buf[DST_KEY_MAXSIZE];
loadkey(argv[isc_commandline_index], key_buf,
DST_KEY_MAXSIZE, &rdata);
loadkey(arg1, key_buf, DST_KEY_MAXSIZE, &rdata);
emits(showall, cds, &rdata);
}
@@ -517,7 +517,6 @@ main(int argc, char **argv) {
}
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10) {
isc_mem_stats(mctx, stdout);
}
+1
View File
@@ -42,6 +42,7 @@
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+2 -7
View File
@@ -174,9 +174,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
rdclass = dst_key_class(key);
name = dns_fixedname_initname(&fixed);
result = dns_name_copy(dst_key_name(key), name, NULL);
if (result != ISC_R_SUCCESS)
fatal("can't copy name");
dns_name_copynf(dst_key_name(key), name);
dst_key_free(&key);
}
@@ -300,9 +298,7 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
isc_mem_create(&mctx);
#if USE_PKCS11
pk11_result_register();
@@ -443,7 +439,6 @@ main(int argc, char **argv) {
dns_rdataset_disassociate(&rdataset);
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
+1
View File
@@ -39,6 +39,7 @@
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1 -2
View File
@@ -163,7 +163,7 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
isc_mem_create(&mctx);
#if USE_PKCS11
pk11_result_register();
@@ -694,7 +694,6 @@ main(int argc, char **argv) {
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_free(mctx, label);
+1
View File
@@ -44,6 +44,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+23 -1
View File
@@ -39,7 +39,7 @@
dnssec-keygen \- DNSSEC key generation tool
.SH "SYNOPSIS"
.HP \w'\fBdnssec\-keygen\fR\ 'u
\fBdnssec\-keygen\fR [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
\fBdnssec\-keygen\fR [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-d\ \fR\fB\fIbits\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\fIpolicy\fR\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-l\ \fR\fB\fIfile\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-T\ \fR\fB\fIrrtype\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
.SH "DESCRIPTION"
.PP
\fBdnssec\-keygen\fR
@@ -109,6 +109,11 @@ option suppresses them\&.
Indicates that the DNS record containing the key should have the specified class\&. If not specified, class IN is used\&.
.RE
.PP
\-d \fIbits\fR
.RS 4
Key size in bits\&. For the algorithms RSASHA1, NSEC3RSASA1, RSASHA256 and RSASHA512 the key size must be in range 1024\-4096\&. DH size is between 128 and 4096\&. This option is ignored for algorithms ECDSAP256SHA256, ECDSAP384SHA384, ED25519 and ED448\&.
.RE
.PP
\-E \fIengine\fR
.RS 4
Specifies the cryptographic hardware to use, when applicable\&.
@@ -142,6 +147,17 @@ Prints a short summary of the options and arguments to
Sets the directory in which the key files are to be written\&.
.RE
.PP
\-k \fIpolicy\fR
.RS 4
Create keys for a specific dnssec\-policy\&. If a policy uses multiple keys,
\fBdnssec\-keygen\fR
will generate multiple keys\&. This will also create a "\&.state" file to keep track of the key state\&.
.sp
This option creates keys according to the dnssec\-policy configuration, hence it cannot be used together with many of the other options that
\fBdnssec\-keygen\fR
provides\&.
.RE
.PP
\-L \fIttl\fR
.RS 4
Sets the default TTL to use for this key when it is converted into a DNSKEY RR\&. If the key is imported into a zone, this is the TTL that will be used for it, unless there was already a DNSKEY RRset in place, in which case the existing TTL would take precedence\&. If this value is not set and there is no existing DNSKEY RRset, the TTL will default to the SOA TTL\&. Setting the default TTL to
@@ -151,6 +167,12 @@ none
is the same as leaving it unset\&.
.RE
.PP
\-l \fIfile\fR
.RS 4
Provide a configuration file that contains a dnssec\-policy statement (matching the policy set with
\fB\-k\fR)\&.
.RE
.PP
\-n \fInametype\fR
.RS 4
Specifies the owner type of the key\&. The value of
+817 -544
View File
File diff suppressed because it is too large Load Diff
+45 -1
View File
@@ -51,6 +51,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -66,6 +67,7 @@
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-D sync <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-d <replaceable class="parameter">bits</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">flag</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-G</option></arg>
@@ -74,8 +76,9 @@
<arg choice="opt" rep="norepeat"><option>-I <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-i <replaceable class="parameter">interval</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-k</option></arg>
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">policy</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">ttl</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">file</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-P sync <replaceable class="parameter">date/offset</replaceable></option></arg>
@@ -84,6 +87,7 @@
<arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">date/offset</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">rrtype</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
@@ -207,6 +211,18 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-d <replaceable class="parameter">bits</replaceable></term>
<listitem>
<para>
Key size in bits. For the algorithms RSASHA1, NSEC3RSASA1,
RSASHA256 and RSASHA512 the key size must be in range 1024-4096.
DH size is between 128 and 4096. This option is ignored for
algorithms ECDSAP256SHA256, ECDSAP384SHA384, ED25519 and ED448.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-E <replaceable class="parameter">engine</replaceable></term>
<listitem>
@@ -275,6 +291,24 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">policy</replaceable></term>
<listitem>
<para>
Create keys for a specific dnssec-policy. If a policy uses
multiple keys, <command>dnssec-keygen</command> will generate
multiple keys. This will also create a ".state" file to keep
track of the key state.
</para>
<para>
This option creates keys according to the dnssec-policy
configuration, hence it cannot be used together with many of
the other options that <command>dnssec-keygen</command>
provides.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-L <replaceable class="parameter">ttl</replaceable></term>
<listitem>
@@ -291,6 +325,16 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-l <replaceable class="parameter">file</replaceable></term>
<listitem>
<para>
Provide a configuration file that contains a dnssec-policy
statement (matching the policy set with <command>-k</command>).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-n <replaceable class="parameter">nametype</replaceable></term>
<listitem>
+35 -1
View File
@@ -41,6 +41,7 @@
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-D sync <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-d <em class="replaceable"><code>bits</code></em></code>]
[<code class="option">-E <em class="replaceable"><code>engine</code></em></code>]
[<code class="option">-f <em class="replaceable"><code>flag</code></em></code>]
[<code class="option">-G</code>]
@@ -49,8 +50,9 @@
[<code class="option">-I <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-i <em class="replaceable"><code>interval</code></em></code>]
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-k</code>]
[<code class="option">-k <em class="replaceable"><code>policy</code></em></code>]
[<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>]
[<code class="option">-l <em class="replaceable"><code>file</code></em></code>]
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
[<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-P sync <em class="replaceable"><code>date/offset</code></em></code>]
@@ -59,6 +61,7 @@
[<code class="option">-R <em class="replaceable"><code>date/offset</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>rrtype</code></em></code>]
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
[<code class="option">-V</code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
@@ -168,6 +171,15 @@
the specified class. If not specified, class IN is used.
</p>
</dd>
<dt><span class="term">-d <em class="replaceable"><code>bits</code></em></span></dt>
<dd>
<p>
Key size in bits. For the algorithms RSASHA1, NSEC3RSASA1,
RSASHA256 and RSASHA512 the key size must be in range 1024-4096.
DH size is between 128 and 4096. This option is ignored for
algorithms ECDSAP256SHA256, ECDSAP384SHA384, ED25519 and ED448.
</p>
</dd>
<dt><span class="term">-E <em class="replaceable"><code>engine</code></em></span></dt>
<dd>
<p>
@@ -218,6 +230,21 @@
Sets the directory in which the key files are to be written.
</p>
</dd>
<dt><span class="term">-k <em class="replaceable"><code>policy</code></em></span></dt>
<dd>
<p>
Create keys for a specific dnssec-policy. If a policy uses
multiple keys, <span class="command"><strong>dnssec-keygen</strong></span> will generate
multiple keys. This will also create a ".state" file to keep
track of the key state.
</p>
<p>
This option creates keys according to the dnssec-policy
configuration, hence it cannot be used together with many of
the other options that <span class="command"><strong>dnssec-keygen</strong></span>
provides.
</p>
</dd>
<dt><span class="term">-L <em class="replaceable"><code>ttl</code></em></span></dt>
<dd>
<p>
@@ -231,6 +258,13 @@
or <code class="literal">none</code> is the same as leaving it unset.
</p>
</dd>
<dt><span class="term">-l <em class="replaceable"><code>file</code></em></span></dt>
<dd>
<p>
Provide a configuration file that contains a dnssec-policy
statement (matching the policy set with <span class="command"><strong>-k</strong></span>).
</p>
</dd>
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
<dd>
<p>
+1 -3
View File
@@ -88,9 +88,7 @@ main(int argc, char **argv) {
if (argc == 1)
usage();
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("Out of memory");
isc_mem_create(&mctx);
#if HAVE_PKCS11
pk11_result_register();
+1
View File
@@ -39,6 +39,7 @@
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+53 -2
View File
@@ -39,7 +39,7 @@
dnssec-settime \- set the key timing metadata for a DNSSEC key
.SH "SYNOPSIS"
.HP \w'\fBdnssec\-settime\fR\ 'u
\fBdnssec\-settime\fR [\fB\-f\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\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\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-h\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] {keyfile}
\fBdnssec\-settime\fR [\fB\-f\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\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\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-h\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-s\fR] [\fB\-g\ \fR\fB\fIstate\fR\fR] [\fB\-d\ \fR\fB\fIstate\fR\fR\fB\ \fR\fB\fIdate/offset\fR\fR] [\fB\-k\ \fR\fB\fIstate\fR\fR\fB\ \fR\fB\fIdate/offset\fR\fR] [\fB\-r\ \fR\fB\fIstate\fR\fR\fB\ \fR\fB\fIdate/offset\fR\fR] [\fB\-z\ \fR\fB\fIstate\fR\fR\fB\ \fR\fB\fIdate/offset\fR\fR] {keyfile}
.SH "DESCRIPTION"
.PP
\fBdnssec\-settime\fR
@@ -59,7 +59,25 @@ simply prints the key timing metadata already stored in the key\&.
.PP
When key metadata fields are changed, both files of a key pair (Knnnn\&.+aaa+iiiii\&.key
and
Knnnn\&.+aaa+iiiii\&.private) are regenerated\&. Metadata fields are stored in the private file\&. A human\-readable description of the metadata is also placed in comments in the key file\&. The private file\*(Aqs permissions are always set to be inaccessible to anyone other than the owner (mode 0600)\&.
Knnnn\&.+aaa+iiiii\&.private) are regenerated\&.
.PP
Metadata fields are stored in the private file\&. A human\-readable description of the metadata is also placed in comments in the key file\&. The private file\*(Aqs permissions are always set to be inaccessible to anyone other than the owner (mode 0600)\&.
.PP
When working with state files, it is possible to update the timing metadata in those files as well with
\fB\-s\fR\&. If this option is used you can also update key states with
\fB\-d\fR
(DS),
\fB\-k\fR
(DNSKEY),
\fB\-r\fR
(RRSIG of KSK), or
\fB\-z\fR
(RRSIG of ZSK)\&. Allowed states are HIDDEN, RUMOURED, OMNIPRESENT, and UNRETENTIVE\&.
.PP
You can also set the goal state of the key with
\fB\-g\fR\&. This should be either HIDDEN or OMNIPRESENT (representing whether the key should be removed from the zone, or published)\&.
.PP
It is NOT RECOMMENDED to manipulate state files manually except for testing purposes\&.
.SH "OPTIONS"
.PP
\-f
@@ -156,6 +174,39 @@ If the key is being set to be an explicit successor to another key, then the def
.sp
As with date offsets, if the argument is followed by one of the suffixes \*(Aqy\*(Aq, \*(Aqmo\*(Aq, \*(Aqw\*(Aq, \*(Aqd\*(Aq, \*(Aqh\*(Aq, or \*(Aqmi\*(Aq, then the interval is measured in years, months, weeks, days, hours, or minutes, respectively\&. Without a suffix, the interval is measured in seconds\&.
.RE
.SH "KEY STATE OPTIONS"
.PP
Known key states are HIDDEN, RUMOURED, OMNIPRESENT and UNRETENTIVE\&. These should not be set manually except for testing purposes\&.
.PP
\-s
.RS 4
When setting key timing data, also update the state file\&.
.RE
.PP
\-g
.RS 4
Set the goal state for this key\&. Must be HIDDEN or OMNIPRESENT\&.
.RE
.PP
\-d
.RS 4
Set the DS state for this key, and when it was last changed\&.
.RE
.PP
\-k
.RS 4
Set the DNSKEY state for this key, and when it was last changed\&.
.RE
.PP
\-r
.RS 4
Set the RRSIG (KSK) state for this key, and when it was last changed\&.
.RE
.PP
\-z
.RS 4
Set the RRSIG (ZSK) state for this key, and when it was last changed\&.
.RE
.SH "PRINTING OPTIONS"
.PP
\fBdnssec\-settime\fR
+335 -161
View File
@@ -88,6 +88,15 @@ usage(void) {
fprintf(stderr, " -i <interval>: prepublication interval for "
"successor key "
"(default: 30 days)\n");
fprintf(stderr, "Key state options:\n");
fprintf(stderr, " -s: update key state file (default no)\n");
fprintf(stderr, " -g state: set the goal state for this key\n");
fprintf(stderr, " -d state date/[+-]offset: set the DS state\n");
fprintf(stderr, " -k state date/[+-]offset: set the DNSKEY state\n");
fprintf(stderr, " -r state date/[+-]offset: set the RRSIG (KSK) "
"state\n");
fprintf(stderr, " -z state date/[+-]offset: set the RRSIG (ZSK) "
"state\n");
fprintf(stderr, "Printing options:\n");
fprintf(stderr, " -p C/P/Psync/A/R/I/D/Dsync/all: print a "
"particular time value or values\n");
@@ -123,29 +132,87 @@ printtime(dst_key_t *key, int type, const char *tag, bool epoch,
}
}
static void
writekey(dst_key_t *key, const char *directory, bool write_state)
{
char newname[1024];
char keystr[DST_KEY_FORMATSIZE];
isc_buffer_t buf;
isc_result_t result;
int options = DST_TYPE_PUBLIC|DST_TYPE_PRIVATE;
if (write_state) {
options |= DST_TYPE_STATE;
}
isc_buffer_init(&buf, newname, sizeof(newname));
result = dst_key_buildfilename(key, DST_TYPE_PUBLIC, directory, &buf);
if (result != ISC_R_SUCCESS) {
fatal("Failed to build public key filename: %s",
isc_result_totext(result));
}
result = dst_key_tofile(key, options, directory);
if (result != ISC_R_SUCCESS) {
dst_key_format(key, keystr, sizeof(keystr));
fatal("Failed to write key %s: %s", keystr,
isc_result_totext(result));
}
printf("%s\n", newname);
isc_buffer_clear(&buf);
result = dst_key_buildfilename(key, DST_TYPE_PRIVATE, directory, &buf);
if (result != ISC_R_SUCCESS) {
fatal("Failed to build private key filename: %s",
isc_result_totext(result));
}
printf("%s\n", newname);
if (write_state) {
isc_buffer_clear(&buf);
result = dst_key_buildfilename(key, DST_TYPE_STATE, directory,
&buf);
if (result != ISC_R_SUCCESS) {
fatal("Failed to build key state filename: %s",
isc_result_totext(result));
}
printf("%s\n", newname);
}
}
int
main(int argc, char **argv) {
isc_result_t result;
const char *engine = NULL;
const char *filename = NULL;
char *directory = NULL;
char newname[1024];
char keystr[DST_KEY_FORMATSIZE];
char *endp, *p;
int ch;
const char *predecessor = NULL;
dst_key_t *prevkey = NULL;
dst_key_t *key = NULL;
isc_buffer_t buf;
dns_name_t *name = NULL;
dns_secalg_t alg = 0;
unsigned int size = 0;
uint16_t flags = 0;
int prepub = -1;
int options;
dns_ttl_t ttl = 0;
isc_stdtime_t now;
isc_stdtime_t dstime = 0, dnskeytime = 0;
isc_stdtime_t krrsigtime = 0, zrrsigtime = 0;
isc_stdtime_t pub = 0, act = 0, rev = 0, inact = 0, del = 0;
isc_stdtime_t prevact = 0, previnact = 0, prevdel = 0;
dst_key_state_t goal = DST_KEY_STATE_NA;
dst_key_state_t ds = DST_KEY_STATE_NA;
dst_key_state_t dnskey = DST_KEY_STATE_NA;
dst_key_state_t krrsig = DST_KEY_STATE_NA;
dst_key_state_t zrrsig = DST_KEY_STATE_NA;
bool setgoal = false, setds = false, setdnskey = false;
bool setkrrsig = false, setzrrsig = false;
bool setdstime = false, setdnskeytime = false;
bool setkrrsigtime = false, setzrrsigtime = false;
bool setpub = false, setact = false;
bool setrev = false, setinact = false;
bool setdel = false, setttl = false;
@@ -156,20 +223,21 @@ main(int argc, char **argv) {
bool printact = false, printrev = false;
bool printinact = false, printdel = false;
bool force = false;
bool epoch = false;
bool changed = false;
bool epoch = false;
bool changed = false;
bool write_state = false;
isc_log_t *log = NULL;
isc_stdtime_t syncadd = 0, syncdel = 0;
bool unsetsyncadd = false, setsyncadd = false;
bool unsetsyncdel = false, setsyncdel = false;
bool printsyncadd = false, printsyncdel = false;
options = DST_TYPE_PUBLIC|DST_TYPE_PRIVATE|DST_TYPE_STATE;
if (argc == 1)
usage();
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("Out of memory");
isc_mem_create(&mctx);
setup_logging(mctx, &log);
@@ -182,109 +250,9 @@ main(int argc, char **argv) {
isc_stdtime_get(&now);
#define CMDLINE_FLAGS "A:D:E:fhI:i:K:L:P:p:R:S:uv:V"
#define CMDLINE_FLAGS "A:D:d:E:fg:hI:i:K:k:L:P:p:R:r:S:suv:Vz:"
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) {
case 'E':
engine = isc_commandline_argument;
break;
case 'f':
force = true;
break;
case 'p':
p = isc_commandline_argument;
if (!strcasecmp(p, "all")) {
printcreate = true;
printpub = true;
printact = true;
printrev = true;
printinact = true;
printdel = true;
printsyncadd = true;
printsyncdel = true;
break;
}
do {
switch (*p++) {
case 'C':
printcreate = true;
break;
case 'P':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncadd = true;
break;
}
printpub = true;
break;
case 'A':
printact = true;
break;
case 'R':
printrev = true;
break;
case 'I':
printinact = true;
break;
case 'D':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncdel = true;
break;
}
printdel = true;
break;
case ' ':
break;
default:
usage();
break;
}
} while (*p != '\0');
break;
case 'u':
epoch = true;
break;
case 'K':
/*
* We don't have to copy it here, but do it to
* simplify cleanup later
*/
directory = isc_mem_strdup(mctx,
isc_commandline_argument);
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = true;
break;
case 'v':
verbose = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0')
fatal("-v must be followed by a number");
break;
case 'P':
/* -Psync ? */
if (isoptarg("sync", argv, usage)) {
if (unsetsyncadd || setsyncadd)
fatal("-P sync specified more than "
"once");
changed = true;
syncadd = strtotime(isc_commandline_argument,
now, now, &setsyncadd);
unsetsyncadd = !setsyncadd;
break;
}
(void)isoptarg("dnskey", argv, usage);
if (setpub || unsetpub)
fatal("-P specified more than once");
changed = true;
pub = strtotime(isc_commandline_argument,
now, now, &setpub);
unsetpub = !setpub;
break;
case 'A':
if (setact || unsetact)
fatal("-A specified more than once");
@@ -294,24 +262,6 @@ main(int argc, char **argv) {
now, now, &setact);
unsetact = !setact;
break;
case 'R':
if (setrev || unsetrev)
fatal("-R specified more than once");
changed = true;
rev = strtotime(isc_commandline_argument,
now, now, &setrev);
unsetrev = !setrev;
break;
case 'I':
if (setinact || unsetinact)
fatal("-I specified more than once");
changed = true;
inact = strtotime(isc_commandline_argument,
now, now, &setinact);
unsetinact = !setinact;
break;
case 'D':
/* -Dsync ? */
if (isoptarg("sync", argv, usage)) {
@@ -335,11 +285,37 @@ main(int argc, char **argv) {
now, now, &setdel);
unsetdel = !setdel;
break;
case 'S':
predecessor = isc_commandline_argument;
case 'd':
if (setds) {
fatal("-d specified more than once");
}
ds = strtokeystate(isc_commandline_argument);
setds = true;
/* time */
(void)isoptarg(isc_commandline_argument, argv, usage);
dstime = strtotime(isc_commandline_argument,
now, now, &setdstime);
break;
case 'i':
prepub = strtottl(isc_commandline_argument);
case 'E':
engine = isc_commandline_argument;
break;
case 'f':
force = true;
break;
case 'g':
if (setgoal) {
fatal("-g specified more than once");
}
goal = strtokeystate(isc_commandline_argument);
if (goal != DST_KEY_STATE_NA &&
goal != DST_KEY_STATE_HIDDEN &&
goal != DST_KEY_STATE_OMNIPRESENT) {
fatal("-g must be either none, hidden, or "
"omnipresent");
}
setgoal = true;
break;
case '?':
if (isc_commandline_option != '?')
@@ -349,10 +325,165 @@ main(int argc, char **argv) {
case 'h':
/* Does not return. */
usage();
case 'I':
if (setinact || unsetinact)
fatal("-I specified more than once");
changed = true;
inact = strtotime(isc_commandline_argument,
now, now, &setinact);
unsetinact = !setinact;
break;
case 'i':
prepub = strtottl(isc_commandline_argument);
break;
case 'K':
/*
* We don't have to copy it here, but do it to
* simplify cleanup later
*/
directory = isc_mem_strdup(mctx,
isc_commandline_argument);
break;
case 'k':
if (setdnskey) {
fatal("-k specified more than once");
}
dnskey = strtokeystate(isc_commandline_argument);
setdnskey = true;
/* time */
(void)isoptarg(isc_commandline_argument, argv, usage);
dnskeytime = strtotime(isc_commandline_argument,
now, now, &setdnskeytime);
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
setttl = true;
break;
case 'P':
/* -Psync ? */
if (isoptarg("sync", argv, usage)) {
if (unsetsyncadd || setsyncadd)
fatal("-P sync specified more than "
"once");
changed = true;
syncadd = strtotime(isc_commandline_argument,
now, now, &setsyncadd);
unsetsyncadd = !setsyncadd;
break;
}
(void)isoptarg("dnskey", argv, usage);
if (setpub || unsetpub)
fatal("-P specified more than once");
changed = true;
pub = strtotime(isc_commandline_argument,
now, now, &setpub);
unsetpub = !setpub;
break;
case 'p':
p = isc_commandline_argument;
if (!strcasecmp(p, "all")) {
printcreate = true;
printpub = true;
printact = true;
printrev = true;
printinact = true;
printdel = true;
printsyncadd = true;
printsyncdel = true;
break;
}
do {
switch (*p++) {
case 'A':
printact = true;
break;
case 'C':
printcreate = true;
break;
case 'D':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncdel = true;
break;
}
printdel = true;
break;
case 'I':
printinact = true;
break;
case 'P':
if (!strncmp(p, "sync", 4)) {
p += 4;
printsyncadd = true;
break;
}
printpub = true;
break;
case 'R':
printrev = true;
break;
case ' ':
break;
default:
usage();
break;
}
} while (*p != '\0');
break;
case 'R':
if (setrev || unsetrev)
fatal("-R specified more than once");
changed = true;
rev = strtotime(isc_commandline_argument,
now, now, &setrev);
unsetrev = !setrev;
break;
case 'r':
if (setkrrsig) {
fatal("-r specified more than once");
}
krrsig = strtokeystate(isc_commandline_argument);
setkrrsig = true;
/* time */
(void)isoptarg(isc_commandline_argument, argv, usage);
krrsigtime = strtotime(isc_commandline_argument,
now, now, &setkrrsigtime);
break;
case 'S':
predecessor = isc_commandline_argument;
break;
case 's':
write_state = true;
break;
case 'u':
epoch = true;
break;
case 'V':
/* Does not return. */
version(program);
case 'v':
verbose = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0')
fatal("-v must be followed by a number");
break;
case 'z':
if (setzrrsig) {
fatal("-z specified more than once");
}
zrrsig = strtokeystate(isc_commandline_argument);
setzrrsig = true;
(void)isoptarg(isc_commandline_argument, argv, usage);
zrrsigtime = strtotime(isc_commandline_argument,
now, now, &setzrrsigtime);
break;
default:
fprintf(stderr, "%s: unhandled option -%c\n",
@@ -367,6 +498,12 @@ main(int argc, char **argv) {
if (argc > isc_commandline_index + 1)
fatal("Extraneous arguments");
if ((setgoal || setds || setdnskey || setkrrsig || setzrrsig) &&
!write_state)
{
fatal("Options -g, -d, -k, -r and -z require -s to be set");
}
result = dst_lib_init(mctx, engine);
if (result != ISC_R_SUCCESS)
fatal("Could not initialize dst: %s",
@@ -383,9 +520,7 @@ main(int argc, char **argv) {
if (setact || unsetact)
fatal("-S and -A cannot be used together");
result = dst_key_fromnamedfile(predecessor, directory,
DST_TYPE_PUBLIC |
DST_TYPE_PRIVATE,
result = dst_key_fromnamedfile(predecessor, directory, options,
mctx, &prevkey);
if (result != ISC_R_SUCCESS)
fatal("Invalid keyfile %s: %s",
@@ -477,9 +612,8 @@ main(int argc, char **argv) {
isc_result_totext(result));
}
result = dst_key_fromnamedfile(filename, directory,
DST_TYPE_PUBLIC | DST_TYPE_PRIVATE,
mctx, &key);
result = dst_key_fromnamedfile(filename, directory, options, mctx,
&key);
if (result != ISC_R_SUCCESS)
fatal("Invalid keyfile %s: %s",
filename, isc_result_totext(result));
@@ -580,6 +714,11 @@ main(int argc, char **argv) {
if (setttl)
dst_key_setttl(key, ttl);
if (predecessor != NULL && prevkey != NULL) {
dst_key_setnum(prevkey, DST_NUM_SUCCESSOR, dst_key_id(key));
dst_key_setnum(key, DST_NUM_PREDECESSOR, dst_key_id(prevkey));
}
/*
* No metadata changes were made but we're forcing an upgrade
* to the new format anyway: use "-P now -A now" as the default
@@ -590,6 +729,63 @@ main(int argc, char **argv) {
changed = true;
}
/*
* Make sure the key state goals are written.
*/
if (write_state) {
if (setgoal) {
if (goal == DST_KEY_STATE_NA) {
dst_key_unsetstate(key, DST_KEY_GOAL);
} else {
dst_key_setstate(key, DST_KEY_GOAL, goal);
}
changed = true;
}
if (setds) {
if (ds == DST_KEY_STATE_NA) {
dst_key_unsetstate(key, DST_KEY_DS);
dst_key_unsettime(key, DST_TIME_DS);
} else {
dst_key_setstate(key, DST_KEY_DS, ds);
dst_key_settime(key, DST_TIME_DS, dstime);
}
changed = true;
}
if (setdnskey) {
if (dnskey == DST_KEY_STATE_NA) {
dst_key_unsetstate(key, DST_KEY_DNSKEY);
dst_key_unsettime(key, DST_TIME_DNSKEY);
} else {
dst_key_setstate(key, DST_KEY_DNSKEY, dnskey);
dst_key_settime(key, DST_TIME_DNSKEY,
dnskeytime);
}
changed = true;
}
if (setkrrsig) {
if (krrsig == DST_KEY_STATE_NA) {
dst_key_unsetstate(key, DST_KEY_KRRSIG);
dst_key_unsettime(key, DST_TIME_KRRSIG);
} else {
dst_key_setstate(key, DST_KEY_KRRSIG, krrsig);
dst_key_settime(key, DST_TIME_KRRSIG,
krrsigtime);
}
changed = true;
}
if (setzrrsig) {
if (zrrsig == DST_KEY_STATE_NA) {
dst_key_unsetstate(key, DST_KEY_ZRRSIG);
dst_key_unsettime(key, DST_TIME_ZRRSIG);
} else {
dst_key_setstate(key, DST_KEY_ZRRSIG, zrrsig);
dst_key_settime(key, DST_TIME_ZRRSIG,
zrrsigtime);
}
changed = true;
}
}
if (!changed && setttl)
changed = true;
@@ -623,32 +819,10 @@ main(int argc, char **argv) {
epoch, stdout);
if (changed) {
isc_buffer_init(&buf, newname, sizeof(newname));
result = dst_key_buildfilename(key, DST_TYPE_PUBLIC, directory,
&buf);
if (result != ISC_R_SUCCESS) {
fatal("Failed to build public key filename: %s",
isc_result_totext(result));
writekey(key, directory, write_state);
if (predecessor != NULL && prevkey != NULL) {
writekey(prevkey, directory, write_state);
}
result = dst_key_tofile(key, DST_TYPE_PUBLIC|DST_TYPE_PRIVATE,
directory);
if (result != ISC_R_SUCCESS) {
dst_key_format(key, keystr, sizeof(keystr));
fatal("Failed to write key %s: %s", keystr,
isc_result_totext(result));
}
printf("%s\n", newname);
isc_buffer_clear(&buf);
result = dst_key_buildfilename(key, DST_TYPE_PRIVATE, directory,
&buf);
if (result != ISC_R_SUCCESS) {
fatal("Failed to build private key filename: %s",
isc_result_totext(result));
}
printf("%s\n", newname);
}
if (prevkey != NULL)
+94
View File
@@ -41,6 +41,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -64,6 +65,12 @@
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s</option></arg>
<arg choice="opt" rep="norepeat"><option>-g <replaceable class="parameter">state</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-d <replaceable class="parameter">state</replaceable> <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">state</replaceable> <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">state</replaceable> <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-z <replaceable class="parameter">state</replaceable> <replaceable class="parameter">date/offset</replaceable></option></arg>
<arg choice="req" rep="norepeat">keyfile</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -88,11 +95,30 @@
When key metadata fields are changed, both files of a key
pair (<filename>Knnnn.+aaa+iiiii.key</filename> and
<filename>Knnnn.+aaa+iiiii.private</filename>) are regenerated.
</para>
<para>
Metadata fields are stored in the private file. A human-readable
description of the metadata is also placed in comments in the key
file. The private file's permissions are always set to be
inaccessible to anyone other than the owner (mode 0600).
</para>
<para>
When working with state files, it is possible to update the timing
metadata in those files as well with <option>-s</option>. If this
option is used you can also update key states with <option>-d</option>
(DS), <option>-k</option> (DNSKEY), <option>-r</option> (RRSIG of KSK),
or <option>-z</option> (RRSIG of ZSK). Allowed states are HIDDEN,
RUMOURED, OMNIPRESENT, and UNRETENTIVE.
</para>
<para>
You can also set the goal state of the key with <option>-g</option>.
This should be either HIDDEN or OMNIPRESENT (representing whether the
key should be removed from the zone, or published).
</para>
<para>
It is NOT RECOMMENDED to manipulate state files manually except for
testing purposes.
</para>
</refsection>
<refsection><info><title>OPTIONS</title></info>
@@ -319,6 +345,74 @@
</variablelist>
</refsection>
<refsection><info><title>KEY STATE OPTIONS</title></info>
<para>
Known key states are HIDDEN, RUMOURED, OMNIPRESENT and UNRETENTIVE.
These should not be set manually except for testing purposes.
</para>
<variablelist>
<varlistentry>
<term>-s</term>
<listitem>
<para>
When setting key timing data, also update the state file.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-g</term>
<listitem>
<para>
Set the goal state for this key. Must be HIDDEN or OMNIPRESENT.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-d</term>
<listitem>
<para>
Set the DS state for this key, and when it was last changed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-k</term>
<listitem>
<para>
Set the DNSKEY state for this key, and when it was last changed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-r</term>
<listitem>
<para>
Set the RRSIG (KSK) state for this key, and when it was last
changed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-z</term>
<listitem>
<para>
Set the RRSIG (ZSK) state for this key, and when it was last
changed.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><info><title>PRINTING OPTIONS</title></info>
<para>
+77 -2
View File
@@ -49,6 +49,12 @@
[<code class="option">-V</code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-E <em class="replaceable"><code>engine</code></em></code>]
[<code class="option">-s</code>]
[<code class="option">-g <em class="replaceable"><code>state</code></em></code>]
[<code class="option">-d <em class="replaceable"><code>state</code></em> <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-k <em class="replaceable"><code>state</code></em> <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-r <em class="replaceable"><code>state</code></em> <em class="replaceable"><code>date/offset</code></em></code>]
[<code class="option">-z <em class="replaceable"><code>state</code></em> <em class="replaceable"><code>date/offset</code></em></code>]
{keyfile}
</p></div>
</div>
@@ -74,11 +80,30 @@
When key metadata fields are changed, both files of a key
pair (<code class="filename">Knnnn.+aaa+iiiii.key</code> and
<code class="filename">Knnnn.+aaa+iiiii.private</code>) are regenerated.
</p>
<p>
Metadata fields are stored in the private file. A human-readable
description of the metadata is also placed in comments in the key
file. The private file's permissions are always set to be
inaccessible to anyone other than the owner (mode 0600).
</p>
<p>
When working with state files, it is possible to update the timing
metadata in those files as well with <code class="option">-s</code>. If this
option is used you can also update key states with <code class="option">-d</code>
(DS), <code class="option">-k</code> (DNSKEY), <code class="option">-r</code> (RRSIG of KSK),
or <code class="option">-z</code> (RRSIG of ZSK). Allowed states are HIDDEN,
RUMOURED, OMNIPRESENT, and UNRETENTIVE.
</p>
<p>
You can also set the goal state of the key with <code class="option">-g</code>.
This should be either HIDDEN or OMNIPRESENT (representing whether the
key should be removed from the zone, or published).
</p>
<p>
It is NOT RECOMMENDED to manipulate state files manually except for
testing purposes.
</p>
</div>
<div class="refsection">
@@ -262,7 +287,57 @@
</div>
<div class="refsection">
<a name="id-1.10"></a><h2>PRINTING OPTIONS</h2>
<a name="id-1.10"></a><h2>KEY STATE OPTIONS</h2>
<p>
Known key states are HIDDEN, RUMOURED, OMNIPRESENT and UNRETENTIVE.
These should not be set manually except for testing purposes.
</p>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term">-s</span></dt>
<dd>
<p>
When setting key timing data, also update the state file.
</p>
</dd>
<dt><span class="term">-g</span></dt>
<dd>
<p>
Set the goal state for this key. Must be HIDDEN or OMNIPRESENT.
</p>
</dd>
<dt><span class="term">-d</span></dt>
<dd>
<p>
Set the DS state for this key, and when it was last changed.
</p>
</dd>
<dt><span class="term">-k</span></dt>
<dd>
<p>
Set the DNSKEY state for this key, and when it was last changed.
</p>
</dd>
<dt><span class="term">-r</span></dt>
<dd>
<p>
Set the RRSIG (KSK) state for this key, and when it was last
changed.
</p>
</dd>
<dt><span class="term">-z</span></dt>
<dd>
<p>
Set the RRSIG (ZSK) state for this key, and when it was last
changed.
</p>
</dd>
</dl></div>
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>PRINTING OPTIONS</h2>
<p>
<span class="command"><strong>dnssec-settime</strong></span> can also be used to print the
@@ -298,7 +373,7 @@
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>SEE ALSO</h2>
<a name="id-1.12"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">dnssec-keygen</span>(8)
+12 -13
View File
@@ -197,7 +197,7 @@ savezonecut(dns_fixedname_t *fzonecut, dns_name_t *name) {
dns_name_t *result;
result = dns_fixedname_initname(fzonecut);
dns_name_copy(name, result, NULL);
dns_name_copynf(name, result);
return (result);
}
@@ -246,7 +246,8 @@ dumpnode(dns_name_t *name, dns_dbnode_t *node) {
for (;;) {
result = dns_master_rdatasettotext(name, &rds,
masterstyle, buffer);
masterstyle, NULL,
buffer);
if (result != ISC_R_NOSPACE)
break;
@@ -787,7 +788,10 @@ hashlist_comp(const void *a, const void *b) {
static void
hashlist_sort(hashlist_t *l) {
qsort(l->hashbuf, l->entries, l->length, hashlist_comp);
INSIST(l->hashbuf != NULL || l->length == 0);
if (l->length > 0) {
qsort(l->hashbuf, l->entries, l->length, hashlist_comp);
}
}
static bool
@@ -1706,7 +1710,6 @@ remove_records(dns_dbnode_t *node, dns_rdatatype_t which,
result = dns_db_deleterdataset(gdb, node, gversion,
type, covers);
check_result(result, "dns_db_deleterdataset()");
continue;
}
}
dns_rdatasetiter_destroy(&rdsiter);
@@ -2325,7 +2328,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
break;
}
if (result == ISC_R_NOMORE) {
dns_name_copy(gorigin, nextname, NULL);
dns_name_copynf(gorigin, nextname);
done = true;
} else if (result != ISC_R_SUCCESS)
fatal("iterating through the database failed: %s",
@@ -2459,7 +2462,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
break;
}
if (result == ISC_R_NOMORE) {
dns_name_copy(gorigin, nextname, NULL);
dns_name_copynf(gorigin, nextname);
done = true;
} else if (result != ISC_R_SUCCESS)
fatal("iterating through the database failed: %s",
@@ -2715,7 +2718,7 @@ build_final_keylist(void) {
* Update keylist with information from from the key repository.
*/
dns_dnssec_updatekeys(&keylist, &matchkeys, NULL, gorigin, keyttl,
&diff, ignore_kskflag, mctx, report);
&diff, mctx, report);
/*
* Update keylist with sync records.
@@ -3230,9 +3233,7 @@ main(int argc, char *argv[]) {
check_result(isc_app_start(), "isc_app_start");
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
isc_mem_create(&mctx);
#if USE_PKCS11
pk11_result_register();
@@ -3585,7 +3586,6 @@ main(int argc, char *argv[]) {
outputformat = dns_masterformat_raw;
} else if (strncasecmp(outputformatstr, "raw=", 4) == 0) {
char *end;
outputformat = dns_masterformat_raw;
outputformat = dns_masterformat_raw;
rawversion = strtol(outputformatstr + 4, &end, 10);
@@ -3798,7 +3798,7 @@ main(int argc, char *argv[]) {
print_time(outfp);
print_version(outfp);
result = isc_taskmgr_create(mctx, ntasks, 0, &taskmgr);
result = isc_taskmgr_create(mctx, ntasks, 0, NULL, &taskmgr);
if (result != ISC_R_SUCCESS)
fatal("failed to create task manager: %s",
isc_result_totext(result));
@@ -3922,7 +3922,6 @@ main(int argc, char *argv[]) {
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
+1
View File
@@ -51,6 +51,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+1 -4
View File
@@ -209,9 +209,7 @@ main(int argc, char *argv[]) {
isc_commandline_reset = true;
check_result(isc_app_start(), "isc_app_start");
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
isc_mem_create(&mctx);
#if USE_PKCS11
pk11_result_register();
@@ -337,7 +335,6 @@ main(int argc, char *argv[]) {
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
+1
View File
@@ -38,6 +38,7 @@
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+34 -19
View File
@@ -57,6 +57,11 @@
#include "dnssectool.h"
#define KEYSTATES_NVALUES 4
static const char *keystates[KEYSTATES_NVALUES] = {
"hidden", "rumoured", "omnipresent", "unretentive",
};
int verbose = 0;
bool quiet = false;
uint8_t dtype[8];
@@ -244,6 +249,21 @@ strtottl(const char *str) {
return (ttl);
}
dst_key_state_t
strtokeystate(const char *str) {
if (isnone(str)) {
return (DST_KEY_STATE_NA);
}
for (int i = 0; i < KEYSTATES_NVALUES; i++) {
if (keystates[i] != NULL &&
strcasecmp(str, keystates[i]) == 0) {
return (dst_key_state_t) i;
}
}
fatal("unknown key state");
}
isc_stdtime_t
strtotime(const char *str, int64_t now, int64_t base,
bool *setp)
@@ -314,35 +334,30 @@ dns_rdataclass_t
strtoclass(const char *str) {
isc_textregion_t r;
dns_rdataclass_t rdclass;
isc_result_t ret;
isc_result_t result;
if (str == NULL)
return dns_rdataclass_in;
DE_CONST(str, r.base);
r.length = strlen(str);
ret = dns_rdataclass_fromtext(&rdclass, &r);
if (ret != ISC_R_SUCCESS)
result = dns_rdataclass_fromtext(&rdclass, &r);
if (result != ISC_R_SUCCESS)
fatal("unknown class %s", str);
return (rdclass);
}
unsigned int
strtodsdigest(const char *algname) {
if (strcasecmp(algname, "SHA1") == 0 ||
strcasecmp(algname, "SHA-1") == 0)
{
return (DNS_DSDIGEST_SHA1);
} else if (strcasecmp(algname, "SHA256") == 0 ||
strcasecmp(algname, "SHA-256") == 0)
{
return (DNS_DSDIGEST_SHA256);
} else if (strcasecmp(algname, "SHA384") == 0 ||
strcasecmp(algname, "SHA-384") == 0)
{
return (DNS_DSDIGEST_SHA384);
} else {
fatal("unknown algorithm %s", algname);
}
strtodsdigest(const char *str) {
isc_textregion_t r;
dns_dsdigest_t alg;
isc_result_t result;
DE_CONST(str, r.base);
r.length = strlen(str);
result = dns_dsdigest_fromtext(&alg, &r);
if (result != ISC_R_SUCCESS)
fatal("unknown DS algorithm %s", str);
return (alg);
}
static int
+3 -4
View File
@@ -17,14 +17,11 @@
#include <stdbool.h>
#include <isc/log.h>
#include <isc/platform.h>
#include <isc/stdtime.h>
#include <dns/rdatastruct.h>
#include <dst/dst.h>
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
/*! verbosity: set by -v and -q option in each program, defined in dnssectool.c */
extern int verbose;
extern bool quiet;
@@ -71,6 +68,8 @@ cleanup_logging(isc_log_t **logp);
dns_ttl_t strtottl(const char *str);
dst_key_state_t strtokeystate(const char *str);
isc_stdtime_t
strtotime(const char *str, int64_t now, int64_t base,
bool *setp);
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{0EB1727E-2BBD-47A6-AD12-418F9DEB0531}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>cds</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -20,18 +20,21 @@
<ProjectGuid>{2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dnssectool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{6E6297F4-69D7-4533-85E1-BD17C30017C8}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>dsfromkey</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{AB6690A0-055E-458f-BAC5-BF38BCC5834F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>importkey</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{17455DC6-5FBB-47C3-8F44-7DB574A188D3}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>keyfromlabel</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+10 -7
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{0BF11E21-168C-4CAA-B784-429D126BBAE5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>keygen</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -63,15 +66,15 @@
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\win32;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<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>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libisccfg.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -91,7 +94,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\win32;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
@@ -101,8 +104,8 @@
<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>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libisccfg.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{D171F185-D3C2-4463-9CF3-ED1D0B1D6832}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>revoke</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{03FB7588-C5A7-4572-968F-14F1206BC69C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>settime</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{205ED8A9-2E4C-41CC-9385-F3613402AA90}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>signzone</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{FD653434-F1A8-44A9-85B2-A7468491DA6D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>verify</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+6 -7
View File
@@ -58,6 +58,7 @@ options {\n\
"\
# deallocate-on-exit <obsolete>;\n\
# directory <none>\n\
dnssec-policy \"none\";\n\
dump-file \"named_dump.db\";\n\
edns-udp-size 4096;\n\
# fake-iquery <obsolete>;\n"
@@ -65,7 +66,7 @@ options {\n\
" files unlimited;\n"
#endif
#if defined(HAVE_GEOIP2) && !defined(WIN32)
" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP2\";\n"
" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP\";\n"
#elif defined(HAVE_GEOIP2)
" geoip-directory \".\";\n"
#endif
@@ -193,7 +194,7 @@ options {\n\
# sortlist <none>\n\
stale-answer-enable false;\n\
stale-answer-ttl 1; /* 1 second */\n\
synth-from-dnssec yes;\n\
synth-from-dnssec no;\n\
# topology <none>\n\
transfer-format many-answers;\n\
v6-bias 50;\n\
@@ -295,7 +296,7 @@ view \"_bind\" chaos {\n\
# BEGIN DNSSEC KEYS\n"
/* Imported from bind.keys.h: */
DNSSEC_KEYS
TRUST_ANCHORS
"# END MANAGED KEYS\n\
\n\
@@ -799,10 +800,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
goto cleanup;
result = dns_name_dup(dns_fixedname_name(&fname), mctx,
keys[i - 1]);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_name_dup(dns_fixedname_name(&fname), mctx, keys[i - 1]);
}
if (pushed != 0) {
pushed--;
@@ -854,6 +852,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (stack != NULL)
isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
INSIST(dscpcount == addrcount);
INSIST(keycount == addrcount);
INSIST(keycount == dscpcount);
+5 -4
View File
@@ -142,7 +142,7 @@ fuzz_thread_client(void *arg) {
* Read the reply message from named to unclog it. Don't
* bother if there isn't a reply.
*/
recvfrom(sockfd, buf, 65536, MSG_DONTWAIT, NULL, NULL);
(void)recvfrom(sockfd, buf, 65536, MSG_DONTWAIT, NULL, NULL);
while (!ready)
pthread_cond_wait(&cond, &mutex);
@@ -412,8 +412,8 @@ fuzz_thread_resolver(void *arg) {
* Flush any pending data on the authoritative server.
*/
socklen = sizeof(recvaddr);
sent = recvfrom(listenfd, rbuf, 65536, MSG_DONTWAIT,
(struct sockaddr *) &recvaddr, &socklen);
(void)recvfrom(listenfd, rbuf, 65536, MSG_DONTWAIT,
(struct sockaddr *) &recvaddr, &socklen);
/*
* Send a fixed client query to named(resolver) of
@@ -511,7 +511,8 @@ fuzz_thread_resolver(void *arg) {
* to the client(query driver), so we're
* done.
*/
recvfrom(sockfd, buf, 65536, 0, NULL, NULL);
(void)recvfrom(sockfd, buf, 65536, 0, NULL,
NULL);
break;
}
+8 -4
View File
@@ -113,8 +113,7 @@ named_geoip_load(char *dir) {
#endif
}
void
named_geoip_shutdown(void) {
void named_geoip_unload(void) {
#ifdef HAVE_GEOIP2
if (named_g_geoip->country != NULL) {
MMDB_close(named_g_geoip->country);
@@ -136,7 +135,12 @@ named_geoip_shutdown(void) {
MMDB_close(named_g_geoip->domain);
named_g_geoip->domain = NULL;
}
#endif
}
void
named_geoip_shutdown(void) {
#ifdef HAVE_GEOIP2
named_geoip_unload();
#endif /* HAVE_GEOIP2 */
dns_geoip_shutdown();
}
+3
View File
@@ -19,5 +19,8 @@ named_geoip_init(void);
void
named_geoip_load(char *dir);
void
named_geoip_unload(void);
void
named_geoip_shutdown(void);
+2 -8
View File
@@ -19,6 +19,7 @@
#include <isc/rwlock.h>
#include <isc/log.h>
#include <isc/net.h>
#include <isc/netmgr.h>
#include <isccfg/aclconf.h>
#include <isccfg/cfg.h>
@@ -62,6 +63,7 @@ EXTERN bool named_g_run_done INIT(false);
*/
EXTERN isc_timermgr_t * named_g_timermgr INIT(NULL);
EXTERN isc_socketmgr_t * named_g_socketmgr INIT(NULL);
EXTERN isc_nm_t * named_g_nm INIT(NULL);
EXTERN cfg_parser_t * named_g_parser INIT(NULL);
EXTERN cfg_parser_t * named_g_addparser INIT(NULL);
EXTERN const char * named_g_version INIT(VERSION);
@@ -135,14 +137,6 @@ EXTERN const char * named_g_defaultpidfile INIT(NAMED_LOCALSTATEDIR
"/run/named.pid");
#endif
#ifdef HAVE_DNSTAP
EXTERN const char * named_g_defaultdnstap
INIT(NAMED_LOCALSTATEDIR "/run/named/"
"dnstap.sock");
#else
EXTERN const char * named_g_defaultdnstap INIT(NULL);
#endif /* HAVE_DNSTAP */
EXTERN const char * named_g_username INIT(NULL);
EXTERN const char * named_g_engine INIT(NULL);
+1
View File
@@ -64,6 +64,7 @@ struct named_server {
dns_loadmgr_t * loadmgr;
dns_zonemgr_t * zonemgr;
dns_viewlist_t viewlist;
dns_kasplist_t kasplist;
ns_interfacemgr_t * interfacemgr;
dns_db_t * in_roothints;
+4 -5
View File
@@ -27,19 +27,18 @@ ISC_LANG_BEGINDECLS
isc_result_t
named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
dns_zone_t *zone, dns_zone_t *raw);
dns_kasplist_t* kasplist, dns_zone_t *zone,
dns_zone_t *raw);
/*%<
* Configure or reconfigure a zone according to the named.conf
* data in 'cctx' and 'czone'.
* data.
*
* The zone origin is not configured, it is assumed to have been set
* at zone creation time.
*
* Require:
* \li 'lctx' to be initialized or NULL.
* \li 'cctx' to be initialized or NULL.
* \li 'ac' to point to an initialized cfg_aclconfctx_t.
* \li 'czone' to be initialized.
* \li 'kasplist' to be initialized.
* \li 'zone' to be initialized.
*/
+82 -19
View File
@@ -24,6 +24,7 @@
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/httpd.h>
#include <isc/netmgr.h>
#include <isc/os.h>
#include <isc/platform.h>
#include <isc/print.h>
@@ -58,6 +59,10 @@
#include <json_c_version.h>
#endif /* HAVE_JSON_C */
#ifdef HAVE_GEOIP2
#include <maxminddb.h>
#endif
/*
* Defining NAMED_MAIN provides storage declarations (rather than extern)
* for variables in named/globals.h.
@@ -67,6 +72,7 @@
#include <ns/interfacemgr.h>
#include <named/builtin.h>
#include <named/config.h>
#include <named/control.h>
#include <named/fuzz.h>
#include <named/globals.h> /* Explicit, though named/log.h includes it. */
@@ -114,7 +120,7 @@ LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_month;
static bool want_stats = false;
static char program_name[NAME_MAX] = "named";
static char absolute_conffile[PATH_MAX];
static char saved_command_line[8192] = { 0 };
static char saved_command_line[4096] = { 0 };
static char ellipsis[5] = { 0 };
static char version[512];
static unsigned int maxsocks = 0;
@@ -123,7 +129,6 @@ static int maxudp = 0;
/*
* -T options:
*/
static bool clienttest = false;
static bool dropedns = false;
static bool ednsformerr = false;
static bool ednsnotimp = false;
@@ -483,6 +488,12 @@ set_flags(const char *arg, struct flag_def *defs, unsigned int *ret) {
static void
printversion(bool verbose) {
char rndcconf[PATH_MAX], *dot = NULL;
#if defined(HAVE_GEOIP2)
isc_mem_t *mctx = NULL;
cfg_parser_t *parser = NULL;
cfg_obj_t *config = NULL;
const cfg_obj_t *defaults = NULL, *obj = NULL;
#endif
printf("%s %s%s%s <id:%s>\n",
named_g_product, named_g_version,
@@ -541,6 +552,17 @@ OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
ZLIB_VERSION);
printf("linked to zlib version: %s\n",
zlibVersion());
#endif
#if defined(HAVE_GEOIP2)
/* Unfortunately, no version define on link time */
printf("linked to maxminddb version: %s\n",
MMDB_lib_version());
#endif
#if defined(HAVE_DNSTAP)
printf("compiled with protobuf-c version: %s\n",
PROTOBUF_C_VERSION);
printf("linked to protobuf-c version: %s\n",
protobuf_c_version());
#endif
printf("threads support is enabled\n\n");
@@ -569,7 +591,20 @@ OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
printf(" nsupdate session key: %s\n", named_g_defaultsessionkeyfile);
printf(" named PID file: %s\n", named_g_defaultpidfile);
printf(" named lock file: %s\n", named_g_defaultlockfile);
#if defined(HAVE_GEOIP2)
#define RTC(x) RUNTIME_CHECK((x) == ISC_R_SUCCESS)
isc_mem_create(&mctx);
RTC(cfg_parser_create(mctx, named_g_lctx, &parser));
RTC(named_config_parsedefaults(parser, &config));
RTC(cfg_map_get(config, "options", &defaults));
RTC(cfg_map_get(defaults, "geoip-directory", &obj));
if (cfg_obj_isstring(obj)) {
printf(" geoip-directory: %s\n", cfg_obj_asstring(obj));
}
cfg_obj_destroy(parser, &config);
cfg_parser_destroy(&parser);
isc_mem_detach(&mctx);
#endif /* HAVE_GEOIP2 */
}
static void
@@ -602,17 +637,12 @@ parse_T_opt(char *option) {
/*
* force the server to behave (or misbehave) in
* specified ways for testing purposes.
*
* clienttest: make clients single shot with their
* own memory context.
* delay=xxxx: delay client responses by xxxx ms to
* simulate remote servers.
* dscp=x: check that dscp values are as
* expected and assert otherwise.
*/
if (!strcmp(option, "clienttest")) {
clienttest = true;
} else if (!strncmp(option, "delay=", 6)) {
if (!strncmp(option, "delay=", 6)) {
delay = atoi(option + 6);
} else if (!strcmp(option, "dropedns")) {
dropedns = true;
@@ -877,8 +907,15 @@ create_managers(void) {
"using %u UDP listener%s per interface",
named_g_udpdisp, named_g_udpdisp == 1 ? "" : "s");
named_g_nm = isc_nm_start(named_g_mctx, named_g_cpus);
if (named_g_nm == NULL) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_nm_start() failed");
return (ISC_R_UNEXPECTED);
}
result = isc_taskmgr_create(named_g_mctx, named_g_cpus, 0,
&named_g_taskmgr);
named_g_nm, &named_g_taskmgr);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_taskmgr_create() failed: %s",
@@ -903,6 +940,7 @@ create_managers(void) {
return (ISC_R_UNEXPECTED);
}
isc_socketmgr_maxudp(named_g_socketmgr, maxudp);
isc_nm_maxudp(named_g_nm, maxudp);
result = isc_socketmgr_getmaxsockets(named_g_socketmgr, &socks);
if (result == ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
@@ -916,11 +954,24 @@ create_managers(void) {
static void
destroy_managers(void) {
/*
* isc_taskmgr_destroy() will block until all tasks have exited,
* isc_nm_closedown() closes all active connections, freeing
* attached clients and other resources and preventing new
* connections from being established, but it not does not
* stop all processing or destroy the netmgr yet.
*/
isc_nm_closedown(named_g_nm);
/*
* isc_taskmgr_destroy() will block until all tasks have exited.
*/
isc_taskmgr_destroy(&named_g_taskmgr);
isc_timermgr_destroy(&named_g_timermgr);
isc_socketmgr_destroy(&named_g_socketmgr);
/*
* At this point is safe to destroy the netmgr.
*/
isc_nm_destroy(&named_g_nm);
}
static void
@@ -1234,8 +1285,6 @@ setup(void) {
/*
* Modify server context according to command line options
*/
if (clienttest)
ns_server_setoption(sctx, NS_SERVER_CLIENTTEST, true);
if (disable4)
ns_server_setoption(sctx, NS_SERVER_DISABLE4, true);
if (disable6)
@@ -1295,8 +1344,6 @@ cleanup(void) {
dlz_dlopen_clear();
#endif
dns_name_destroy();
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN,
ISC_LOG_NOTICE, "exiting");
@@ -1398,6 +1445,21 @@ main(int argc, char *argv[]) {
(void) ProfilerStart(NULL);
#endif
#ifdef WIN32
/*
* Prevent unbuffered I/O from crippling named performance on Windows
* when it is logging to stderr (e.g. in system tests). Use full
* buffering (_IOFBF) as line buffering (_IOLBF) is unavailable on
* Windows and fflush() is called anyway after each log message gets
* written to the default stderr logging channels created by libisc.
*/
setvbuf(stderr, NULL, _IOFBF, BUFSIZ);
#endif
#ifdef HAVE_LIBXML2
xmlInitThreads();
#endif /* HAVE_LIBXML2 */
/*
* Record version in core image.
* strings named.core | grep "named version:"
@@ -1462,10 +1524,7 @@ main(int argc, char *argv[]) {
named_g_chrootdir);
}
result = isc_mem_create(0, 0, &named_g_mctx);
if (result != ISC_R_SUCCESS)
named_main_earlyfatal("isc_mem_create() failed: %s",
isc_result_totext(result));
isc_mem_create(&named_g_mctx);
isc_mem_setname(named_g_mctx, "main", NULL);
setup();
@@ -1533,6 +1592,10 @@ main(int argc, char *argv[]) {
named_os_shutdown();
#ifdef HAVE_LIBXML2
xmlCleanupThreads();
#endif /* HAVE_LIBXML2 */
#ifdef HAVE_GPERFTOOLS_PROFILER
ProfilerStop();
#endif
+88 -59
View File
@@ -10,12 +10,12 @@
.\" Title: named.conf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2019-08-07
.\" Date: 2019-08-12
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "NAMED\&.CONF" "5" "2019\-08\-07" "ISC" "BIND9"
.TH "NAMED\&.CONF" "5" "2019\-08\-12" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -97,19 +97,6 @@ dlz \fIstring\fR {
.if n \{\
.RE
.\}
.SH "DNSSEC-KEYS"
.sp
.if n \{\
.RS 4
.\}
.nf
dnssec\-keys { \fIstring\fR ( static\-key |
initial\-key ) \fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
.fi
.if n \{\
.RE
.\}
.SH "DYNDB"
.sp
.if n \{\
@@ -163,16 +150,16 @@ logging {
.\}
.SH "MANAGED-KEYS"
.PP
Deprecated \- see DNSSEC\-KEYS\&.
Deprecated \- see TRUST\-ANCHORS\&.
.sp
.if n \{\
.RS 4
.\}
.nf
managed\-keys { \fIstring\fR ( static\-key
| initial\-key ) \fIinteger\fR
\fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. }; deprecated
| initial\-key | static\-ds |
initial\-ds ) \fIinteger\fR \fIinteger\fR
\fIinteger\fR \fIquoted_string\fR; \&.\&.\&. }; deprecated
.fi
.if n \{\
.RE
@@ -230,7 +217,7 @@ options {
[ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [ port
\fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
\fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIttlval\fR ]; \&.\&.\&. };
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIduration\fR ]; \&.\&.\&. };
check\-dup\-records ( fail | warn | ignore );
check\-integrity \fIboolean\fR;
check\-mx ( fail | warn | ignore );
@@ -312,18 +299,18 @@ options {
fstrm\-set\-output\-notify\-threshold \fIinteger\fR;
fstrm\-set\-output\-queue\-model ( mpsc | spsc );
fstrm\-set\-output\-queue\-size \fIinteger\fR;
fstrm\-set\-reopen\-interval \fIttlval\fR;
fstrm\-set\-reopen\-interval \fIduration\fR;
geoip\-directory ( \fIquoted_string\fR | none );
glue\-cache \fIboolean\fR;
heartbeat\-interval \fIinteger\fR;
hostname ( \fIquoted_string\fR | none );
inline\-signing \fIboolean\fR;
interface\-interval \fIttlval\fR;
interface\-interval \fIduration\fR;
ixfr\-from\-differences ( primary | master | secondary | slave |
\fIboolean\fR );
keep\-response\-order { \fIaddress_match_element\fR; \&.\&.\&. };
key\-directory \fIquoted_string\fR;
lame\-ttl \fIttlval\fR;
lame\-ttl \fIduration\fR;
listen\-on [ port \fIinteger\fR ] [ dscp
\fIinteger\fR ] {
\fIaddress_match_element\fR; \&.\&.\&. };
@@ -337,28 +324,28 @@ options {
masterfile\-style ( full | relative );
match\-mapped\-addresses \fIboolean\fR;
max\-cache\-size ( default | unlimited | \fIsizeval\fR | \fIpercentage\fR );
max\-cache\-ttl \fIttlval\fR;
max\-cache\-ttl \fIduration\fR;
max\-clients\-per\-query \fIinteger\fR;
max\-journal\-size ( default | unlimited | \fIsizeval\fR );
max\-ncache\-ttl \fIttlval\fR;
max\-ncache\-ttl \fIduration\fR;
max\-records \fIinteger\fR;
max\-recursion\-depth \fIinteger\fR;
max\-recursion\-queries \fIinteger\fR;
max\-refresh\-time \fIinteger\fR;
max\-retry\-time \fIinteger\fR;
max\-rsa\-exponent\-size \fIinteger\fR;
max\-stale\-ttl \fIttlval\fR;
max\-stale\-ttl \fIduration\fR;
max\-transfer\-idle\-in \fIinteger\fR;
max\-transfer\-idle\-out \fIinteger\fR;
max\-transfer\-time\-in \fIinteger\fR;
max\-transfer\-time\-out \fIinteger\fR;
max\-udp\-size \fIinteger\fR;
max\-zone\-ttl ( unlimited | \fIttlval\fR );
max\-zone\-ttl ( unlimited | \fIduration\fR );
memstatistics \fIboolean\fR;
memstatistics\-file \fIquoted_string\fR;
message\-compression \fIboolean\fR;
min\-cache\-ttl \fIttlval\fR;
min\-ncache\-ttl \fIttlval\fR;
min\-cache\-ttl \fIduration\fR;
min\-ncache\-ttl \fIduration\fR;
min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR;
minimal\-any \fIboolean\fR;
@@ -375,8 +362,8 @@ options {
notify\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * ) ]
[ dscp \fIinteger\fR ];
notify\-to\-soa \fIboolean\fR;
nta\-lifetime \fIttlval\fR;
nta\-recheck \fIttlval\fR;
nta\-lifetime \fIduration\fR;
nta\-recheck \fIduration\fR;
nxdomain\-redirect \fIstring\fR;
pid\-file ( \fIquoted_string\fR | none );
port \fIinteger\fR;
@@ -423,13 +410,13 @@ options {
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
\fIinteger\fR;
response\-policy { zone \fIstring\fR [ add\-soa \fIboolean\fR ] [ log
\fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval
\fIttlval\fR ] [ policy ( cname | disabled | drop | given | no\-op |
\fIboolean\fR ] [ max\-policy\-ttl \fIduration\fR ] [ min\-update\-interval
\fIduration\fR ] [ policy ( cname | disabled | drop | given | no\-op |
nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ add\-soa \fIboolean\fR ] [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [
min\-update\-interval \fIttlval\fR ] [ min\-ns\-dots \fIinteger\fR ] [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIduration\fR ] [
min\-update\-interval \fIduration\fR ] [ min\-ns\-dots \fIinteger\fR ] [
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
[ recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ] [ dnsrps\-enable \fIboolean\fR ] [
@@ -443,7 +430,7 @@ options {
serial\-query\-rate \fIinteger\fR;
serial\-update\-method ( date | increment | unixtime );
server\-id ( \fIquoted_string\fR | none | hostname );
servfail\-ttl \fIttlval\fR;
servfail\-ttl \fIduration\fR;
session\-keyalg \fIstring\fR;
session\-keyfile ( \fIquoted_string\fR | none );
session\-keyname \fIstring\fR;
@@ -454,7 +441,7 @@ options {
sortlist { \fIaddress_match_element\fR; \&.\&.\&. };
stacksize ( default | unlimited | \fIsizeval\fR );
stale\-answer\-enable \fIboolean\fR;
stale\-answer\-ttl \fIttlval\fR;
stale\-answer\-ttl \fIduration\fR;
startup\-notify\-rate \fIinteger\fR;
statistics\-file \fIquoted_string\fR;
synth\-from\-dnssec \fIboolean\fR;
@@ -564,9 +551,23 @@ statistics\-channels {
.if n \{\
.RE
.\}
.SH "TRUST-ANCHORS"
.sp
.if n \{\
.RS 4
.\}
.nf
trust\-anchors { \fIstring\fR ( static\-key |
initial\-key | static\-ds | initial\-ds )
\fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
.fi
.if n \{\
.RE
.\}
.SH "TRUSTED-KEYS"
.PP
Deprecated \- see DNSSEC\-KEYS\&.
Deprecated \- see TRUST\-ANCHORS\&.
.sp
.if n \{\
.RS 4
@@ -612,7 +613,7 @@ view \fIstring\fR [ \fIclass\fR ] {
[ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [ port
\fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
\fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIttlval\fR ]; \&.\&.\&. };
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIduration\fR ]; \&.\&.\&. };
check\-dup\-records ( fail | warn | ignore );
check\-integrity \fIboolean\fR;
check\-mx ( fail | warn | ignore );
@@ -654,9 +655,6 @@ view \fIstring\fR [ \fIclass\fR ] {
dnsrps\-options { \fIunspecified\-text\fR };
dnssec\-accept\-expired \fIboolean\fR;
dnssec\-dnskey\-kskonly \fIboolean\fR;
dnssec\-keys { \fIstring\fR ( static\-key |
initial\-key ) \fIinteger\fR \fIinteger\fR
\fIinteger\fR \fIquoted_string\fR; \&.\&.\&. };
dnssec\-loadkeys\-interval \fIinteger\fR;
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
dnssec\-secure\-to\-insecure \fIboolean\fR;
@@ -690,10 +688,11 @@ view \fIstring\fR [ \fIclass\fR ] {
secret \fIstring\fR;
};
key\-directory \fIquoted_string\fR;
lame\-ttl \fIttlval\fR;
lame\-ttl \fIduration\fR;
lmdb\-mapsize \fIsizeval\fR;
managed\-keys { \fIstring\fR (
static\-key | initial\-key
| static\-ds | initial\-ds
) \fIinteger\fR \fIinteger\fR
\fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. }; deprecated
@@ -703,25 +702,25 @@ view \fIstring\fR [ \fIclass\fR ] {
match\-destinations { \fIaddress_match_element\fR; \&.\&.\&. };
match\-recursive\-only \fIboolean\fR;
max\-cache\-size ( default | unlimited | \fIsizeval\fR | \fIpercentage\fR );
max\-cache\-ttl \fIttlval\fR;
max\-cache\-ttl \fIduration\fR;
max\-clients\-per\-query \fIinteger\fR;
max\-journal\-size ( default | unlimited | \fIsizeval\fR );
max\-ncache\-ttl \fIttlval\fR;
max\-ncache\-ttl \fIduration\fR;
max\-records \fIinteger\fR;
max\-recursion\-depth \fIinteger\fR;
max\-recursion\-queries \fIinteger\fR;
max\-refresh\-time \fIinteger\fR;
max\-retry\-time \fIinteger\fR;
max\-stale\-ttl \fIttlval\fR;
max\-stale\-ttl \fIduration\fR;
max\-transfer\-idle\-in \fIinteger\fR;
max\-transfer\-idle\-out \fIinteger\fR;
max\-transfer\-time\-in \fIinteger\fR;
max\-transfer\-time\-out \fIinteger\fR;
max\-udp\-size \fIinteger\fR;
max\-zone\-ttl ( unlimited | \fIttlval\fR );
max\-zone\-ttl ( unlimited | \fIduration\fR );
message\-compression \fIboolean\fR;
min\-cache\-ttl \fIttlval\fR;
min\-ncache\-ttl \fIttlval\fR;
min\-cache\-ttl \fIduration\fR;
min\-ncache\-ttl \fIduration\fR;
min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR;
minimal\-any \fIboolean\fR;
@@ -737,8 +736,8 @@ view \fIstring\fR [ \fIclass\fR ] {
notify\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * ) ]
[ dscp \fIinteger\fR ];
notify\-to\-soa \fIboolean\fR;
nta\-lifetime \fIttlval\fR;
nta\-recheck \fIttlval\fR;
nta\-lifetime \fIduration\fR;
nta\-recheck \fIduration\fR;
nxdomain\-redirect \fIstring\fR;
plugin ( query ) \fIstring\fR [ {
\fIunspecified\-text\fR } ];
@@ -780,13 +779,13 @@ view \fIstring\fR [ \fIclass\fR ] {
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
\fIinteger\fR;
response\-policy { zone \fIstring\fR [ add\-soa \fIboolean\fR ] [ log
\fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval
\fIttlval\fR ] [ policy ( cname | disabled | drop | given | no\-op |
\fIboolean\fR ] [ max\-policy\-ttl \fIduration\fR ] [ min\-update\-interval
\fIduration\fR ] [ policy ( cname | disabled | drop | given | no\-op |
nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ add\-soa \fIboolean\fR ] [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [
min\-update\-interval \fIttlval\fR ] [ min\-ns\-dots \fIinteger\fR ] [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIduration\fR ] [
min\-update\-interval \fIduration\fR ] [ min\-ns\-dots \fIinteger\fR ] [
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
[ recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ] [ dnsrps\-enable \fIboolean\fR ] [
@@ -831,14 +830,14 @@ view \fIstring\fR [ \fIclass\fR ] {
\fIinteger\fR | * ) ] [ dscp \fIinteger\fR ];
transfers \fIinteger\fR;
};
servfail\-ttl \fIttlval\fR;
servfail\-ttl \fIduration\fR;
sig\-signing\-nodes \fIinteger\fR;
sig\-signing\-signatures \fIinteger\fR;
sig\-signing\-type \fIinteger\fR;
sig\-validity\-interval \fIinteger\fR [ \fIinteger\fR ];
sortlist { \fIaddress_match_element\fR; \&.\&.\&. };
stale\-answer\-enable \fIboolean\fR;
stale\-answer\-ttl \fIttlval\fR;
stale\-answer\-ttl \fIduration\fR;
synth\-from\-dnssec \fIboolean\fR;
transfer\-format ( many\-answers | one\-answer );
transfer\-source ( \fIipv4_address\fR | * ) [ port ( \fIinteger\fR | * ) ] [
@@ -846,6 +845,10 @@ view \fIstring\fR [ \fIclass\fR ] {
transfer\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * )
] [ dscp \fIinteger\fR ];
trust\-anchor\-telemetry \fIboolean\fR; // experimental
trust\-anchors { \fIstring\fR ( static\-key |
initial\-key | static\-ds | initial\-ds
) \fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
trusted\-keys { \fIstring\fR
\fIinteger\fR \fIinteger\fR
\fIinteger\fR
@@ -890,6 +893,7 @@ view \fIstring\fR [ \fIclass\fR ] {
dnskey\-sig\-validity \fIinteger\fR;
dnssec\-dnskey\-kskonly \fIboolean\fR;
dnssec\-loadkeys\-interval \fIinteger\fR;
dnssec\-policy \fIstring\fR;
dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign );
file \fIquoted_string\fR;
@@ -915,7 +919,7 @@ view \fIstring\fR [ \fIclass\fR ] {
max\-transfer\-idle\-out \fIinteger\fR;
max\-transfer\-time\-in \fIinteger\fR;
max\-transfer\-time\-out \fIinteger\fR;
max\-zone\-ttl ( unlimited | \fIttlval\fR );
max\-zone\-ttl ( unlimited | \fIduration\fR );
min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR;
multi\-master \fIboolean\fR;
@@ -996,6 +1000,7 @@ zone \fIstring\fR [ \fIclass\fR ] {
dnskey\-sig\-validity \fIinteger\fR;
dnssec\-dnskey\-kskonly \fIboolean\fR;
dnssec\-loadkeys\-interval \fIinteger\fR;
dnssec\-policy \fIstring\fR;
dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign );
file \fIquoted_string\fR;
@@ -1020,7 +1025,7 @@ zone \fIstring\fR [ \fIclass\fR ] {
max\-transfer\-idle\-out \fIinteger\fR;
max\-transfer\-time\-in \fIinteger\fR;
max\-transfer\-time\-out \fIinteger\fR;
max\-zone\-ttl ( unlimited | \fIttlval\fR );
max\-zone\-ttl ( unlimited | \fIduration\fR );
min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR;
multi\-master \fIboolean\fR;
@@ -1062,6 +1067,30 @@ zone \fIstring\fR [ \fIclass\fR ] {
.if n \{\
.RE
.\}
.SH "DNSSEC-POLICY"
.sp
.if n \{\
.RS 4
.\}
.nf
dnssec\-policy \fIstring\fR {
dnskey\-ttl \fIduration\fR;
keys { ( csk | ksk | zsk ) key\-directory lifetime \fIduration\fR algorithm \fIinteger\fR [ \fIinteger\fR ] ; \&.\&.\&. };
parent\-ds\-ttl \fIduration\fR;
parent\-propagation\-delay \fIduration\fR;
parent\-registration\-delay \fIduration\fR;
publish\-safety \fIduration\fR;
retire\-safety \fIduration\fR;
signatures\-refresh \fIduration\fR;
signatures\-validity \fIduration\fR;
signatures\-validity\-dnskey \fIduration\fR;
zone\-max\-ttl \fIduration\fR;
zone\-propagation\-delay \fIduration\fR;
};
.fi
.if n \{\
.RE
.\}
.SH "FILES"
.PP
/etc/named\&.conf
+79 -53
View File
@@ -13,7 +13,7 @@
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf">
<info>
<date>2019-08-07</date>
<date>2019-08-12</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
@@ -49,6 +49,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -110,14 +111,6 @@ dlz <replaceable>string</replaceable> {
</literallayout>
</refsection>
<refsection><info><title>DNSSEC-KEYS</title></info>
<literallayout class="normal">
dnssec-keys { <replaceable>string</replaceable> ( static-key |
initial-key ) <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
</literallayout>
</refsection>
<refsection><info><title>DYNDB</title></info>
<literallayout class="normal">
dyndb <replaceable>string</replaceable> <replaceable>quoted_string</replaceable> {
@@ -155,12 +148,12 @@ logging {
</refsection>
<refsection><info><title>MANAGED-KEYS</title></info>
<para>Deprecated - see DNSSEC-KEYS.</para>
<para>Deprecated - see TRUST-ANCHORS.</para>
<literallayout class="normal">
managed-keys { <replaceable>string</replaceable> ( static-key
| initial-key ) <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... }; deprecated
| initial-key | static-ds |
initial-ds ) <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; ... }; deprecated
</literallayout>
</refsection>
@@ -208,7 +201,7 @@ options {
[ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ port
<replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [
in-memory <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ]; ... };
in-memory <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>duration</replaceable> ]; ... };
check-dup-records ( fail | warn | ignore );
check-integrity <replaceable>boolean</replaceable>;
check-mx ( fail | warn | ignore );
@@ -290,18 +283,18 @@ options {
fstrm-set-output-notify-threshold <replaceable>integer</replaceable>;
fstrm-set-output-queue-model ( mpsc | spsc );
fstrm-set-output-queue-size <replaceable>integer</replaceable>;
fstrm-set-reopen-interval <replaceable>ttlval</replaceable>;
fstrm-set-reopen-interval <replaceable>duration</replaceable>;
geoip-directory ( <replaceable>quoted_string</replaceable> | none );
glue-cache <replaceable>boolean</replaceable>;
heartbeat-interval <replaceable>integer</replaceable>;
hostname ( <replaceable>quoted_string</replaceable> | none );
inline-signing <replaceable>boolean</replaceable>;
interface-interval <replaceable>ttlval</replaceable>;
interface-interval <replaceable>duration</replaceable>;
ixfr-from-differences ( primary | master | secondary | slave |
<replaceable>boolean</replaceable> );
keep-response-order { <replaceable>address_match_element</replaceable>; ... };
key-directory <replaceable>quoted_string</replaceable>;
lame-ttl <replaceable>ttlval</replaceable>;
lame-ttl <replaceable>duration</replaceable>;
listen-on [ port <replaceable>integer</replaceable> ] [ dscp
<replaceable>integer</replaceable> ] {
<replaceable>address_match_element</replaceable>; ... };
@@ -315,28 +308,28 @@ options {
masterfile-style ( full | relative );
match-mapped-addresses <replaceable>boolean</replaceable>;
max-cache-size ( default | unlimited | <replaceable>sizeval</replaceable> | <replaceable>percentage</replaceable> );
max-cache-ttl <replaceable>ttlval</replaceable>;
max-cache-ttl <replaceable>duration</replaceable>;
max-clients-per-query <replaceable>integer</replaceable>;
max-journal-size ( default | unlimited | <replaceable>sizeval</replaceable> );
max-ncache-ttl <replaceable>ttlval</replaceable>;
max-ncache-ttl <replaceable>duration</replaceable>;
max-records <replaceable>integer</replaceable>;
max-recursion-depth <replaceable>integer</replaceable>;
max-recursion-queries <replaceable>integer</replaceable>;
max-refresh-time <replaceable>integer</replaceable>;
max-retry-time <replaceable>integer</replaceable>;
max-rsa-exponent-size <replaceable>integer</replaceable>;
max-stale-ttl <replaceable>ttlval</replaceable>;
max-stale-ttl <replaceable>duration</replaceable>;
max-transfer-idle-in <replaceable>integer</replaceable>;
max-transfer-idle-out <replaceable>integer</replaceable>;
max-transfer-time-in <replaceable>integer</replaceable>;
max-transfer-time-out <replaceable>integer</replaceable>;
max-udp-size <replaceable>integer</replaceable>;
max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> );
max-zone-ttl ( unlimited | <replaceable>duration</replaceable> );
memstatistics <replaceable>boolean</replaceable>;
memstatistics-file <replaceable>quoted_string</replaceable>;
message-compression <replaceable>boolean</replaceable>;
min-cache-ttl <replaceable>ttlval</replaceable>;
min-ncache-ttl <replaceable>ttlval</replaceable>;
min-cache-ttl <replaceable>duration</replaceable>;
min-ncache-ttl <replaceable>duration</replaceable>;
min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>;
minimal-any <replaceable>boolean</replaceable>;
@@ -353,8 +346,8 @@ options {
notify-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * ) ]
[ dscp <replaceable>integer</replaceable> ];
notify-to-soa <replaceable>boolean</replaceable>;
nta-lifetime <replaceable>ttlval</replaceable>;
nta-recheck <replaceable>ttlval</replaceable>;
nta-lifetime <replaceable>duration</replaceable>;
nta-recheck <replaceable>duration</replaceable>;
nxdomain-redirect <replaceable>string</replaceable>;
pid-file ( <replaceable>quoted_string</replaceable> | none );
port <replaceable>integer</replaceable>;
@@ -401,13 +394,13 @@ options {
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
<replaceable>integer</replaceable>;
response-policy { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>duration</replaceable> ] [ min-update-interval
<replaceable>duration</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
min-update-interval <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>duration</replaceable> ] [
min-update-interval <replaceable>duration</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
[ recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ] [ dnsrps-enable <replaceable>boolean</replaceable> ] [
@@ -421,7 +414,7 @@ options {
serial-query-rate <replaceable>integer</replaceable>;
serial-update-method ( date | increment | unixtime );
server-id ( <replaceable>quoted_string</replaceable> | none | hostname );
servfail-ttl <replaceable>ttlval</replaceable>;
servfail-ttl <replaceable>duration</replaceable>;
session-keyalg <replaceable>string</replaceable>;
session-keyfile ( <replaceable>quoted_string</replaceable> | none );
session-keyname <replaceable>string</replaceable>;
@@ -432,7 +425,7 @@ options {
sortlist { <replaceable>address_match_element</replaceable>; ... };
stacksize ( default | unlimited | <replaceable>sizeval</replaceable> );
stale-answer-enable <replaceable>boolean</replaceable>;
stale-answer-ttl <replaceable>ttlval</replaceable>;
stale-answer-ttl <replaceable>duration</replaceable>;
startup-notify-rate <replaceable>integer</replaceable>;
statistics-file <replaceable>quoted_string</replaceable>;
synth-from-dnssec <replaceable>boolean</replaceable>;
@@ -526,8 +519,17 @@ statistics-channels {
</literallayout>
</refsection>
<refsection><info><title>TRUST-ANCHORS</title></info>
<literallayout class="normal">
trust-anchors { <replaceable>string</replaceable> ( static-key |
initial-key | static-ds | initial-ds )
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
</literallayout>
</refsection>
<refsection><info><title>TRUSTED-KEYS</title></info>
<para>Deprecated - see DNSSEC-KEYS.</para>
<para>Deprecated - see TRUST-ANCHORS.</para>
<literallayout class="normal">
trusted-keys { <replaceable>string</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
@@ -564,7 +566,7 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
[ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ port
<replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [
in-memory <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ]; ... };
in-memory <replaceable>boolean</replaceable> ] [ min-update-interval <replaceable>duration</replaceable> ]; ... };
check-dup-records ( fail | warn | ignore );
check-integrity <replaceable>boolean</replaceable>;
check-mx ( fail | warn | ignore );
@@ -606,9 +608,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
dnsrps-options { <replaceable>unspecified-text</replaceable> };
dnssec-accept-expired <replaceable>boolean</replaceable>;
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
dnssec-keys { <replaceable>string</replaceable> ( static-key |
initial-key ) <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; ... };
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
@@ -642,10 +641,11 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
secret <replaceable>string</replaceable>;
};
key-directory <replaceable>quoted_string</replaceable>;
lame-ttl <replaceable>ttlval</replaceable>;
lame-ttl <replaceable>duration</replaceable>;
lmdb-mapsize <replaceable>sizeval</replaceable>;
managed-keys { <replaceable>string</replaceable> (
static-key | initial-key
| static-ds | initial-ds
) <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... }; deprecated
@@ -655,25 +655,25 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
match-destinations { <replaceable>address_match_element</replaceable>; ... };
match-recursive-only <replaceable>boolean</replaceable>;
max-cache-size ( default | unlimited | <replaceable>sizeval</replaceable> | <replaceable>percentage</replaceable> );
max-cache-ttl <replaceable>ttlval</replaceable>;
max-cache-ttl <replaceable>duration</replaceable>;
max-clients-per-query <replaceable>integer</replaceable>;
max-journal-size ( default | unlimited | <replaceable>sizeval</replaceable> );
max-ncache-ttl <replaceable>ttlval</replaceable>;
max-ncache-ttl <replaceable>duration</replaceable>;
max-records <replaceable>integer</replaceable>;
max-recursion-depth <replaceable>integer</replaceable>;
max-recursion-queries <replaceable>integer</replaceable>;
max-refresh-time <replaceable>integer</replaceable>;
max-retry-time <replaceable>integer</replaceable>;
max-stale-ttl <replaceable>ttlval</replaceable>;
max-stale-ttl <replaceable>duration</replaceable>;
max-transfer-idle-in <replaceable>integer</replaceable>;
max-transfer-idle-out <replaceable>integer</replaceable>;
max-transfer-time-in <replaceable>integer</replaceable>;
max-transfer-time-out <replaceable>integer</replaceable>;
max-udp-size <replaceable>integer</replaceable>;
max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> );
max-zone-ttl ( unlimited | <replaceable>duration</replaceable> );
message-compression <replaceable>boolean</replaceable>;
min-cache-ttl <replaceable>ttlval</replaceable>;
min-ncache-ttl <replaceable>ttlval</replaceable>;
min-cache-ttl <replaceable>duration</replaceable>;
min-ncache-ttl <replaceable>duration</replaceable>;
min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>;
minimal-any <replaceable>boolean</replaceable>;
@@ -689,8 +689,8 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
notify-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * ) ]
[ dscp <replaceable>integer</replaceable> ];
notify-to-soa <replaceable>boolean</replaceable>;
nta-lifetime <replaceable>ttlval</replaceable>;
nta-recheck <replaceable>ttlval</replaceable>;
nta-lifetime <replaceable>duration</replaceable>;
nta-recheck <replaceable>duration</replaceable>;
nxdomain-redirect <replaceable>string</replaceable>;
plugin ( query ) <replaceable>string</replaceable> [ {
<replaceable>unspecified-text</replaceable> } ];
@@ -732,13 +732,13 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
<replaceable>integer</replaceable>;
response-policy { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>duration</replaceable> ] [ min-update-interval
<replaceable>duration</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
min-update-interval <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>duration</replaceable> ] [
min-update-interval <replaceable>duration</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
[ recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ] [ dnsrps-enable <replaceable>boolean</replaceable> ] [
@@ -783,14 +783,14 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
<replaceable>integer</replaceable> | * ) ] [ dscp <replaceable>integer</replaceable> ];
transfers <replaceable>integer</replaceable>;
};
servfail-ttl <replaceable>ttlval</replaceable>;
servfail-ttl <replaceable>duration</replaceable>;
sig-signing-nodes <replaceable>integer</replaceable>;
sig-signing-signatures <replaceable>integer</replaceable>;
sig-signing-type <replaceable>integer</replaceable>;
sig-validity-interval <replaceable>integer</replaceable> [ <replaceable>integer</replaceable> ];
sortlist { <replaceable>address_match_element</replaceable>; ... };
stale-answer-enable <replaceable>boolean</replaceable>;
stale-answer-ttl <replaceable>ttlval</replaceable>;
stale-answer-ttl <replaceable>duration</replaceable>;
synth-from-dnssec <replaceable>boolean</replaceable>;
transfer-format ( many-answers | one-answer );
transfer-source ( <replaceable>ipv4_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * ) ] [
@@ -798,6 +798,10 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
transfer-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * )
] [ dscp <replaceable>integer</replaceable> ];
trust-anchor-telemetry <replaceable>boolean</replaceable>; // experimental
trust-anchors { <replaceable>string</replaceable> ( static-key |
initial-key | static-ds | initial-ds
) <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
trusted-keys { <replaceable>string</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable>
@@ -842,6 +846,7 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
dnskey-sig-validity <replaceable>integer</replaceable>;
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
dnssec-policy <replaceable>string</replaceable>;
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
dnssec-update-mode ( maintain | no-resign );
file <replaceable>quoted_string</replaceable>;
@@ -867,7 +872,7 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
max-transfer-idle-out <replaceable>integer</replaceable>;
max-transfer-time-in <replaceable>integer</replaceable>;
max-transfer-time-out <replaceable>integer</replaceable>;
max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> );
max-zone-ttl ( unlimited | <replaceable>duration</replaceable> );
min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>;
multi-master <replaceable>boolean</replaceable>;
@@ -943,6 +948,7 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
dnskey-sig-validity <replaceable>integer</replaceable>;
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
dnssec-policy <replaceable>string</replaceable>;
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
dnssec-update-mode ( maintain | no-resign );
file <replaceable>quoted_string</replaceable>;
@@ -967,7 +973,7 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
max-transfer-idle-out <replaceable>integer</replaceable>;
max-transfer-time-in <replaceable>integer</replaceable>;
max-transfer-time-out <replaceable>integer</replaceable>;
max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> );
max-zone-ttl ( unlimited | <replaceable>duration</replaceable> );
min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>;
multi-master <replaceable>boolean</replaceable>;
@@ -1008,6 +1014,26 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
</literallayout>
</refsection>
<refsection><info><title>DNSSEC-POLICY</title></info>
<literallayout class="normal">
dnssec-policy <replaceable>string</replaceable> {
dnskey-ttl <replaceable>duration</replaceable>;
keys { ( csk | ksk | zsk ) key-directory lifetime <replaceable>duration</replaceable> algorithm <replaceable>integer</replaceable> [ <replaceable>integer</replaceable> ] ; ... };
parent-ds-ttl <replaceable>duration</replaceable>;
parent-propagation-delay <replaceable>duration</replaceable>;
parent-registration-delay <replaceable>duration</replaceable>;
publish-safety <replaceable>duration</replaceable>;
retire-safety <replaceable>duration</replaceable>;
signatures-refresh <replaceable>duration</replaceable>;
signatures-validity <replaceable>duration</replaceable>;
signatures-validity-dnskey <replaceable>duration</replaceable>;
zone-max-ttl <replaceable>duration</replaceable>;
zone-propagation-delay <replaceable>duration</replaceable>;
};
</literallayout>
</refsection>
<refsection><info><title>FILES</title></info>
<para><filename>/etc/named.conf</filename>
+90 -64
View File
@@ -92,16 +92,7 @@ dlz
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>DNSSEC-KEYS</h2>
<div class="literallayout"><p><br>
dnssec-keys { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.12"></a><h2>DYNDB</h2>
<a name="id-1.11"></a><h2>DYNDB</h2>
<div class="literallayout"><p><br>
dyndb <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>quoted_string</code></em> {<br>
    <em class="replaceable"><code>unspecified-text</code></em> };<br>
@@ -109,7 +100,7 @@ dyndb
</div>
<div class="refsection">
<a name="id-1.13"></a><h2>KEY</h2>
<a name="id-1.12"></a><h2>KEY</h2>
<div class="literallayout"><p><br>
key <em class="replaceable"><code>string</code></em> {<br>
algorithm <em class="replaceable"><code>string</code></em>;<br>
@@ -119,7 +110,7 @@ key
</div>
<div class="refsection">
<a name="id-1.14"></a><h2>LOGGING</h2>
<a name="id-1.13"></a><h2>LOGGING</h2>
<div class="literallayout"><p><br>
logging {<br>
category <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>; ... };<br>
@@ -140,18 +131,18 @@ logging
</div>
<div class="refsection">
<a name="id-1.15"></a><h2>MANAGED-KEYS</h2>
<p>Deprecated - see DNSSEC-KEYS.</p>
<a name="id-1.14"></a><h2>MANAGED-KEYS</h2>
<p>Deprecated - see TRUST-ANCHORS.</p>
<div class="literallayout"><p><br>
managed-keys { <em class="replaceable"><code>string</code></em> ( static-key<br>
    | initial-key ) <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
    | initial-key | static-ds |<br>
    initial-ds ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.16"></a><h2>MASTERS</h2>
<a name="id-1.15"></a><h2>MASTERS</h2>
<div class="literallayout"><p><br>
masters <em class="replaceable"><code>string</code></em> [ port <em class="replaceable"><code>integer</code></em> ] [ dscp<br>
    <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
@@ -161,7 +152,7 @@ masters
</div>
<div class="refsection">
<a name="id-1.17"></a><h2>OPTIONS</h2>
<a name="id-1.16"></a><h2>OPTIONS</h2>
<div class="literallayout"><p><br>
options {<br>
allow-new-zones <em class="replaceable"><code>boolean</code></em>;<br>
@@ -196,7 +187,7 @@ options
    [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
    <em class="replaceable"><code>string</code></em> ]; ... } ] [ zone-directory <em class="replaceable"><code>quoted_string</code></em> ] [<br>
    in-memory <em class="replaceable"><code>boolean</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ]; ... };<br>
    in-memory <em class="replaceable"><code>boolean</code></em> ] [ min-update-interval <em class="replaceable"><code>duration</code></em> ]; ... };<br>
check-dup-records ( fail | warn | ignore );<br>
check-integrity <em class="replaceable"><code>boolean</code></em>;<br>
check-mx ( fail | warn | ignore );<br>
@@ -278,18 +269,18 @@ options
fstrm-set-output-notify-threshold <em class="replaceable"><code>integer</code></em>;<br>
fstrm-set-output-queue-model ( mpsc | spsc );<br>
fstrm-set-output-queue-size <em class="replaceable"><code>integer</code></em>;<br>
fstrm-set-reopen-interval <em class="replaceable"><code>ttlval</code></em>;<br>
fstrm-set-reopen-interval <em class="replaceable"><code>duration</code></em>;<br>
geoip-directory ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
glue-cache <em class="replaceable"><code>boolean</code></em>;<br>
heartbeat-interval <em class="replaceable"><code>integer</code></em>;<br>
hostname ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
inline-signing <em class="replaceable"><code>boolean</code></em>;<br>
interface-interval <em class="replaceable"><code>ttlval</code></em>;<br>
interface-interval <em class="replaceable"><code>duration</code></em>;<br>
ixfr-from-differences ( primary | master | secondary | slave |<br>
    <em class="replaceable"><code>boolean</code></em> );<br>
keep-response-order { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
key-directory <em class="replaceable"><code>quoted_string</code></em>;<br>
lame-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
lame-ttl <em class="replaceable"><code>duration</code></em>;<br>
listen-on [ port <em class="replaceable"><code>integer</code></em> ] [ dscp<br>
    <em class="replaceable"><code>integer</code></em> ] {<br>
    <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
@@ -303,28 +294,28 @@ options
masterfile-style ( full | relative );<br>
match-mapped-addresses <em class="replaceable"><code>boolean</code></em>;<br>
max-cache-size ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> | <em class="replaceable"><code>percentage</code></em> );<br>
max-cache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
max-cache-ttl <em class="replaceable"><code>duration</code></em>;<br>
max-clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
max-journal-size ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
max-ncache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
max-ncache-ttl <em class="replaceable"><code>duration</code></em>;<br>
max-records <em class="replaceable"><code>integer</code></em>;<br>
max-recursion-depth <em class="replaceable"><code>integer</code></em>;<br>
max-recursion-queries <em class="replaceable"><code>integer</code></em>;<br>
max-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
max-retry-time <em class="replaceable"><code>integer</code></em>;<br>
max-rsa-exponent-size <em class="replaceable"><code>integer</code></em>;<br>
max-stale-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
max-stale-ttl <em class="replaceable"><code>duration</code></em>;<br>
max-transfer-idle-in <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-idle-out <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-time-in <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-time-out <em class="replaceable"><code>integer</code></em>;<br>
max-udp-size <em class="replaceable"><code>integer</code></em>;<br>
max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br>
max-zone-ttl ( unlimited | <em class="replaceable"><code>duration</code></em> );<br>
memstatistics <em class="replaceable"><code>boolean</code></em>;<br>
memstatistics-file <em class="replaceable"><code>quoted_string</code></em>;<br>
message-compression <em class="replaceable"><code>boolean</code></em>;<br>
min-cache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
min-ncache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
min-cache-ttl <em class="replaceable"><code>duration</code></em>;<br>
min-ncache-ttl <em class="replaceable"><code>duration</code></em>;<br>
min-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
minimal-any <em class="replaceable"><code>boolean</code></em>;<br>
@@ -341,8 +332,8 @@ options
notify-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> | * ) ]<br>
    [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
notify-to-soa <em class="replaceable"><code>boolean</code></em>;<br>
nta-lifetime <em class="replaceable"><code>ttlval</code></em>;<br>
nta-recheck <em class="replaceable"><code>ttlval</code></em>;<br>
nta-lifetime <em class="replaceable"><code>duration</code></em>;<br>
nta-recheck <em class="replaceable"><code>duration</code></em>;<br>
nxdomain-redirect <em class="replaceable"><code>string</code></em>;<br>
pid-file ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
port <em class="replaceable"><code>integer</code></em>;<br>
@@ -389,13 +380,13 @@ options
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
    <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ add-soa <em class="replaceable"><code>boolean</code></em> ] [ log<br>
    <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
    <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>duration</code></em> ] [ min-update-interval<br>
    <em class="replaceable"><code>duration</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
    nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
    recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ add-soa <em class="replaceable"><code>boolean</code></em> ] [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [<br>
    min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>duration</code></em> ] [<br>
    min-update-interval <em class="replaceable"><code>duration</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
    [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsdname-enable <em class="replaceable"><code>boolean</code></em> ] [ dnsrps-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
@@ -409,7 +400,7 @@ options
serial-query-rate <em class="replaceable"><code>integer</code></em>;<br>
serial-update-method ( date | increment | unixtime );<br>
server-id ( <em class="replaceable"><code>quoted_string</code></em> | none | hostname );<br>
servfail-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
servfail-ttl <em class="replaceable"><code>duration</code></em>;<br>
session-keyalg <em class="replaceable"><code>string</code></em>;<br>
session-keyfile ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
session-keyname <em class="replaceable"><code>string</code></em>;<br>
@@ -420,7 +411,7 @@ options
sortlist { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
stacksize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
stale-answer-enable <em class="replaceable"><code>boolean</code></em>;<br>
stale-answer-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
stale-answer-ttl <em class="replaceable"><code>duration</code></em>;<br>
startup-notify-rate <em class="replaceable"><code>integer</code></em>;<br>
statistics-file <em class="replaceable"><code>quoted_string</code></em>;<br>
synth-from-dnssec <em class="replaceable"><code>boolean</code></em>;<br>
@@ -460,7 +451,7 @@ options
</div>
<div class="refsection">
<a name="id-1.18"></a><h2>PLUGIN</h2>
<a name="id-1.17"></a><h2>PLUGIN</h2>
<div class="literallayout"><p><br>
plugin ( query ) <em class="replaceable"><code>string</code></em> [ { <em class="replaceable"><code>unspecified-text</code></em><br>
    } ];<br>
@@ -468,7 +459,7 @@ plugin
</div>
<div class="refsection">
<a name="id-1.19"></a><h2>SERVER</h2>
<a name="id-1.18"></a><h2>SERVER</h2>
<div class="literallayout"><p><br>
server <em class="replaceable"><code>netprefix</code></em> {<br>
bogus <em class="replaceable"><code>boolean</code></em>;<br>
@@ -506,7 +497,7 @@ server
</div>
<div class="refsection">
<a name="id-1.20"></a><h2>STATISTICS-CHANNELS</h2>
<a name="id-1.19"></a><h2>STATISTICS-CHANNELS</h2>
<div class="literallayout"><p><br>
statistics-channels {<br>
inet ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> |<br>
@@ -517,9 +508,19 @@ statistics-channels
</p></div>
</div>
<div class="refsection">
<a name="id-1.20"></a><h2>TRUST-ANCHORS</h2>
<div class="literallayout"><p><br>
trust-anchors { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key | static-ds | initial-ds )<br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.21"></a><h2>TRUSTED-KEYS</h2>
<p>Deprecated - see DNSSEC-KEYS.</p>
<p>Deprecated - see TRUST-ANCHORS.</p>
<div class="literallayout"><p><br>
trusted-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
@@ -557,7 +558,7 @@ view
    [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] ) [ key<br>
    <em class="replaceable"><code>string</code></em> ]; ... } ] [ zone-directory <em class="replaceable"><code>quoted_string</code></em> ] [<br>
    in-memory <em class="replaceable"><code>boolean</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ]; ... };<br>
    in-memory <em class="replaceable"><code>boolean</code></em> ] [ min-update-interval <em class="replaceable"><code>duration</code></em> ]; ... };<br>
check-dup-records ( fail | warn | ignore );<br>
check-integrity <em class="replaceable"><code>boolean</code></em>;<br>
check-mx ( fail | warn | ignore );<br>
@@ -599,9 +600,6 @@ view
dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br>
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-keys { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
dnssec-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
dnssec-must-be-secure <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
@@ -635,10 +633,11 @@ view
secret <em class="replaceable"><code>string</code></em>;<br>
};<br>
key-directory <em class="replaceable"><code>quoted_string</code></em>;<br>
lame-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
lame-ttl <em class="replaceable"><code>duration</code></em>;<br>
lmdb-mapsize <em class="replaceable"><code>sizeval</code></em>;<br>
managed-keys { <em class="replaceable"><code>string</code></em> (<br>
    static-key | initial-key<br>
    | static-ds | initial-ds<br>
    ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
@@ -648,25 +647,25 @@ view
match-destinations { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
match-recursive-only <em class="replaceable"><code>boolean</code></em>;<br>
max-cache-size ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> | <em class="replaceable"><code>percentage</code></em> );<br>
max-cache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
max-cache-ttl <em class="replaceable"><code>duration</code></em>;<br>
max-clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
max-journal-size ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
max-ncache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
max-ncache-ttl <em class="replaceable"><code>duration</code></em>;<br>
max-records <em class="replaceable"><code>integer</code></em>;<br>
max-recursion-depth <em class="replaceable"><code>integer</code></em>;<br>
max-recursion-queries <em class="replaceable"><code>integer</code></em>;<br>
max-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
max-retry-time <em class="replaceable"><code>integer</code></em>;<br>
max-stale-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
max-stale-ttl <em class="replaceable"><code>duration</code></em>;<br>
max-transfer-idle-in <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-idle-out <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-time-in <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-time-out <em class="replaceable"><code>integer</code></em>;<br>
max-udp-size <em class="replaceable"><code>integer</code></em>;<br>
max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br>
max-zone-ttl ( unlimited | <em class="replaceable"><code>duration</code></em> );<br>
message-compression <em class="replaceable"><code>boolean</code></em>;<br>
min-cache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
min-ncache-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
min-cache-ttl <em class="replaceable"><code>duration</code></em>;<br>
min-ncache-ttl <em class="replaceable"><code>duration</code></em>;<br>
min-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
minimal-any <em class="replaceable"><code>boolean</code></em>;<br>
@@ -682,8 +681,8 @@ view
notify-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> | * ) ]<br>
    [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
notify-to-soa <em class="replaceable"><code>boolean</code></em>;<br>
nta-lifetime <em class="replaceable"><code>ttlval</code></em>;<br>
nta-recheck <em class="replaceable"><code>ttlval</code></em>;<br>
nta-lifetime <em class="replaceable"><code>duration</code></em>;<br>
nta-recheck <em class="replaceable"><code>duration</code></em>;<br>
nxdomain-redirect <em class="replaceable"><code>string</code></em>;<br>
plugin ( query ) <em class="replaceable"><code>string</code></em> [ {<br>
    <em class="replaceable"><code>unspecified-text</code></em> } ];<br>
@@ -725,13 +724,13 @@ view
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
    <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ add-soa <em class="replaceable"><code>boolean</code></em> ] [ log<br>
    <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
    <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>duration</code></em> ] [ min-update-interval<br>
    <em class="replaceable"><code>duration</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
    nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
    recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ add-soa <em class="replaceable"><code>boolean</code></em> ] [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [<br>
    min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>duration</code></em> ] [<br>
    min-update-interval <em class="replaceable"><code>duration</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
    [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsdname-enable <em class="replaceable"><code>boolean</code></em> ] [ dnsrps-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
@@ -776,14 +775,14 @@ view
    <em class="replaceable"><code>integer</code></em> | * ) ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
transfers <em class="replaceable"><code>integer</code></em>;<br>
};<br>
servfail-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
servfail-ttl <em class="replaceable"><code>duration</code></em>;<br>
sig-signing-nodes <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-signatures <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-type <em class="replaceable"><code>integer</code></em>;<br>
sig-validity-interval <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ];<br>
sortlist { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
stale-answer-enable <em class="replaceable"><code>boolean</code></em>;<br>
stale-answer-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
stale-answer-ttl <em class="replaceable"><code>duration</code></em>;<br>
synth-from-dnssec <em class="replaceable"><code>boolean</code></em>;<br>
transfer-format ( many-answers | one-answer );<br>
transfer-source ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> | * ) ] [<br>
@@ -791,6 +790,10 @@ view
transfer-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> | * )<br>
    ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
trust-anchor-telemetry <em class="replaceable"><code>boolean</code></em>; // experimental<br>
trust-anchors { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key | static-ds | initial-ds<br>
    ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
trusted-keys { <em class="replaceable"><code>string</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em><br>
@@ -835,6 +838,7 @@ view
dnskey-sig-validity <em class="replaceable"><code>integer</code></em>;<br>
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
dnssec-policy <em class="replaceable"><code>string</code></em>;<br>
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br>
file <em class="replaceable"><code>quoted_string</code></em>;<br>
@@ -860,7 +864,7 @@ view
max-transfer-idle-out <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-time-in <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-time-out <em class="replaceable"><code>integer</code></em>;<br>
max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br>
max-zone-ttl ( unlimited | <em class="replaceable"><code>duration</code></em> );<br>
min-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
multi-master <em class="replaceable"><code>boolean</code></em>;<br>
@@ -937,6 +941,7 @@ zone
dnskey-sig-validity <em class="replaceable"><code>integer</code></em>;<br>
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
dnssec-policy <em class="replaceable"><code>string</code></em>;<br>
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br>
file <em class="replaceable"><code>quoted_string</code></em>;<br>
@@ -961,7 +966,7 @@ zone
max-transfer-idle-out <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-time-in <em class="replaceable"><code>integer</code></em>;<br>
max-transfer-time-out <em class="replaceable"><code>integer</code></em>;<br>
max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br>
max-zone-ttl ( unlimited | <em class="replaceable"><code>duration</code></em> );<br>
min-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
multi-master <em class="replaceable"><code>boolean</code></em>;<br>
@@ -1003,14 +1008,35 @@ zone
</div>
<div class="refsection">
<a name="id-1.24"></a><h2>FILES</h2>
<a name="id-1.24"></a><h2>DNSSEC-POLICY</h2>
<div class="literallayout"><p><br>
dnssec-policy <em class="replaceable"><code>string</code></em> {<br>
dnskey-ttl <em class="replaceable"><code>duration</code></em>;<br>
keys { ( csk | ksk | zsk ) key-directory lifetime <em class="replaceable"><code>duration</code></em> algorithm <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ] ; ... };<br>
parent-ds-ttl <em class="replaceable"><code>duration</code></em>;<br>
parent-propagation-delay <em class="replaceable"><code>duration</code></em>;<br>
parent-registration-delay <em class="replaceable"><code>duration</code></em>;<br>
publish-safety <em class="replaceable"><code>duration</code></em>;<br>
retire-safety <em class="replaceable"><code>duration</code></em>;<br>
signatures-refresh <em class="replaceable"><code>duration</code></em>;<br>
signatures-validity <em class="replaceable"><code>duration</code></em>;<br>
signatures-validity-dnskey <em class="replaceable"><code>duration</code></em>;<br>
zone-max-ttl <em class="replaceable"><code>duration</code></em>;<br>
zone-propagation-delay <em class="replaceable"><code>duration</code></em>;<br>
};<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.25"></a><h2>FILES</h2>
<p><code class="filename">/etc/named.conf</code>
</p>
</div>
<div class="refsection">
<a name="id-1.25"></a><h2>SEE ALSO</h2>
<a name="id-1.26"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">ddns-confgen</span>(8)
+1
View File
@@ -49,6 +49,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+538 -268
View File
File diff suppressed because it is too large Load Diff
+6
View File
@@ -241,6 +241,8 @@ init_desc(void) {
SET_NSSTATDESC(invalidsig, "requests with invalid signature",
"ReqBadSIG");
SET_NSSTATDESC(requesttcp, "TCP requests received", "ReqTCP");
SET_NSSTATDESC(tcphighwater, "TCP connection high-water",
"TCPConnHighWater");
SET_NSSTATDESC(authrej, "auth queries rejected", "AuthQryRej");
SET_NSSTATDESC(recurserej, "recursive queries rejected", "RecQryRej");
SET_NSSTATDESC(xfrrej, "transfer requests rejected", "XfrRej");
@@ -322,6 +324,10 @@ init_desc(void) {
"QryUsedStale");
SET_NSSTATDESC(prefetch, "queries triggered prefetch", "Prefetch");
SET_NSSTATDESC(keytagopt, "Keytag option received", "KeyTagOpt");
SET_NSSTATDESC(reclimitdropped,
"queries dropped due to recursive client limit",
"RecLimitDropped");
INSIST(i == ns_statscounter_max);
/* Initialize resolver statistics */
+1 -2
View File
@@ -85,7 +85,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
tctx->domain = isc_mem_get(mctx, sizeof(dns_name_t));
dns_name_init(tctx->domain, NULL);
RETERR(dns_name_dup(name, mctx, tctx->domain));
dns_name_dup(name, mctx, tctx->domain);
}
obj = NULL;
@@ -114,4 +114,3 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
dns_tkeyctx_destroy(&tctx);
return (result);
}
+1 -3
View File
@@ -225,9 +225,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return (ISC_R_FAILURE);
}
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
return (result);
isc_mem_create(&mctx);
cd = isc_mem_get(mctx, sizeof(*cd));
memset(cd, 0, sizeof(*cd));
+1 -1
View File
@@ -224,7 +224,7 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return (ISC_R_FAILURE);
}
isc_mem_create(0, 0, &mctx);
isc_mem_create(&mctx);
cd = isc_mem_get(mctx, sizeof(*cd));
memset(cd, 0, sizeof(*cd));
+4 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
@@ -14,18 +14,21 @@
<ProjectGuid>{723C65DA-A96C-4BA3-A34E-44F11CA346F9}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>named</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
+10 -1
View File
@@ -59,7 +59,6 @@ named_paths_init(void) {
named_g_keyfile = isc_ntpaths_get(RNDC_KEY_PATH);
named_g_defaultsessionkeyfile = isc_ntpaths_get(SESSION_KEY_PATH);
named_g_defaultbindkeys = isc_ntpaths_get(BIND_KEYS_PATH);
named_g_defaultdnstap = NULL;
Initialized = TRUE;
}
@@ -109,6 +108,16 @@ named_os_init(const char *progname) {
* ntservice_init();
*/
version_check(progname);
/*
* If running in a Cygwin environment, clear the SEM_NOGPFAULTERRORBOX
* bit in the process error mode to prevent Cygwin from concealing
* non-abort() crashes, giving Windows Error Reporting a chance to
* handle such crashes. This is done to ensure all crashes triggered
* by system tests can be detected.
*/
if (getenv("CYGWIN") != NULL) {
SetErrorMode(GetErrorMode() & ~SEM_NOGPFAULTERRORBOX);
}
}
void
+119 -81
View File
@@ -25,6 +25,7 @@
#include <dns/ipkeylist.h>
#include <dns/fixedname.h>
#include <dns/journal.h>
#include <dns/kasp.h>
#include <dns/log.h>
#include <dns/name.h>
#include <dns/masterdump.h>
@@ -258,16 +259,8 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
dns_fixedname_init(&fname);
if (usezone) {
result = dns_name_copy(dns_zone_getorigin(zone),
dns_fixedname_name(&fname),
NULL);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(identity, named_g_lctx,
ISC_LOG_ERROR,
"error copying origin: %s",
isc_result_totext(result));
goto cleanup;
}
dns_name_copynf(dns_zone_getorigin(zone),
dns_fixedname_name(&fname));
} else {
str = cfg_obj_asstring(dname);
isc_buffer_constinit(&b, str, strlen(str));
@@ -549,7 +542,8 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
RETERR(dns_db_create(mctx, dbtype, dns_zone_getorigin(zone),
dns_dbtype_stub, dns_zone_getclass(zone),
0, NULL, &db));
dns_zone_setdb(zone, db);
dns_rdataset_init(&rdataset);
dns_rdatalist_init(&rdatalist_ns);
rdatalist_ns.rdclass = dns_zone_getclass(zone);
@@ -571,23 +565,19 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
result = cfg_map_get(zconfig, "server-addresses", &obj);
if (result == ISC_R_SUCCESS) {
INSIST(obj != NULL);
result = configure_staticstub_serveraddrs(obj, zone,
&rdatalist_ns,
&rdatalist_a,
&rdatalist_aaaa);
if (result != ISC_R_SUCCESS)
goto cleanup;
CHECK(configure_staticstub_serveraddrs(obj, zone,
&rdatalist_ns,
&rdatalist_a,
&rdatalist_aaaa));
}
obj = NULL;
result = cfg_map_get(zconfig, "server-names", &obj);
if (result == ISC_R_SUCCESS) {
INSIST(obj != NULL);
result = configure_staticstub_servernames(obj, zone,
&rdatalist_ns,
zname);
if (result != ISC_R_SUCCESS)
goto cleanup;
CHECK(configure_staticstub_servernames(obj, zone,
&rdatalist_ns,
zname));
}
/*
@@ -608,34 +598,26 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
* First open a new version for the add operation and get a pointer
* to the apex node (all RRs are of the apex name).
*/
result = dns_db_newversion(db, &dbversion);
if (result != ISC_R_SUCCESS)
goto cleanup;
CHECK(dns_db_newversion(db, &dbversion));
dns_name_init(&apexname, NULL);
dns_name_clone(dns_zone_getorigin(zone), &apexname);
result = dns_db_findnode(db, &apexname, false, &apexnode);
if (result != ISC_R_SUCCESS)
goto cleanup;
CHECK(dns_db_findnode(db, &apexname, false, &apexnode));
/* Add NS RRset */
dns_rdataset_init(&rdataset);
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_ns, &rdataset)
== ISC_R_SUCCESS);
result = dns_db_addrdataset(db, apexnode, dbversion, 0, &rdataset,
0, NULL);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0, &rdataset,
0, NULL));
dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
/* Add glue A RRset, if any */
if (!ISC_LIST_EMPTY(rdatalist_a.rdata)) {
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_a, &rdataset)
== ISC_R_SUCCESS);
result = dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL));
dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
/* Add glue AAAA RRset, if any */
@@ -643,22 +625,29 @@ configure_staticstub(const cfg_obj_t *zconfig, dns_zone_t *zone,
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdatalist_aaaa,
&rdataset)
== ISC_R_SUCCESS);
result = dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL);
CHECK(dns_db_addrdataset(db, apexnode, dbversion, 0,
&rdataset, 0, NULL));
dns_rdataset_disassociate(&rdataset);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
dns_db_closeversion(db, &dbversion, true);
dns_zone_setdb(zone, db);
result = ISC_R_SUCCESS;
cleanup:
if (apexnode != NULL)
if (dns_rdataset_isassociated(&rdataset)) {
dns_rdataset_disassociate(&rdataset);
}
if (apexnode != NULL) {
dns_db_detachnode(db, &apexnode);
if (dbversion != NULL)
dns_db_closeversion(db, &dbversion, true);
if (db != NULL)
}
if (dbversion != NULL) {
dns_db_closeversion(db, &dbversion, false);
}
if (db != NULL) {
dns_db_detach(&db);
}
for (i = 0; rdatalists[i] != NULL; i++) {
while ((rdata = ISC_LIST_HEAD(rdatalists[i]->rdata)) != NULL) {
ISC_LIST_UNLINK(rdatalists[i]->rdata, rdata, link);
@@ -770,7 +759,6 @@ isself(dns_view_t *myview, dns_tsigkey_t *mykey,
dns_aclenv_t *env = ns_interfacemgr_getaclenv(interfacemgr);
dns_view_t *view;
dns_tsigkey_t *key = NULL;
dns_name_t *tsig = NULL;
isc_netaddr_t netsrc;
isc_netaddr_t netdst;
@@ -785,7 +773,9 @@ isself(dns_view_t *myview, dns_tsigkey_t *mykey,
for (view = ISC_LIST_HEAD(named_g_server->viewlist);
view != NULL;
view = ISC_LIST_NEXT(view, link)) {
view = ISC_LIST_NEXT(view, link))
{
const dns_name_t *tsig = NULL;
if (view->matchrecursiveonly)
continue;
@@ -851,8 +841,9 @@ process_notifytype(dns_notifytype_t ntype, dns_zonetype_t ztype,
isc_result_t
named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
dns_zone_t *zone, dns_zone_t *raw)
const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
dns_kasplist_t *kasplist, dns_zone_t *zone,
dns_zone_t *raw)
{
isc_result_t result;
const char *zname;
@@ -864,6 +855,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
const cfg_obj_t *options = NULL;
const cfg_obj_t *obj;
const char *filename = NULL;
const char *kaspname = NULL;
const char *dupcheck;
dns_notifytype_t notifytype = dns_notifytype_yes;
uint32_t count;
@@ -879,7 +871,8 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
int32_t journal_size;
bool multi;
bool alt;
dns_view_t *view;
dns_view_t *view = NULL;
dns_kasp_t *kasp = NULL;
bool check = false, fail = false;
bool warn = false, ignore = false;
bool ixfrdiff;
@@ -1056,8 +1049,8 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
} else if (result == ISC_R_SUCCESS) {
dns_ttl_t maxttl = 0; /* unlimited */
if (cfg_obj_isuint32(obj))
maxttl = cfg_obj_asuint32(obj);
if (cfg_obj_isduration(obj))
maxttl = cfg_obj_asduration(obj);
dns_zone_setmaxttl(zone, maxttl);
if (raw != NULL)
dns_zone_setmaxttl(raw, maxttl);
@@ -1203,6 +1196,24 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
*/
if (ztype != dns_zone_stub && ztype != dns_zone_staticstub &&
ztype != dns_zone_redirect) {
obj = NULL;
result = named_config_get(maps, "dnssec-policy", &obj);
if (result == ISC_R_SUCCESS) {
kaspname = cfg_obj_asstring(obj);
if (strcmp(kaspname, "none") != 0) {
result = dns_kasplist_find(kasplist, kaspname,
&kasp);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(obj, named_g_lctx,
ISC_LOG_ERROR,
"'dnssec-policy '%s' not "
"found ", kaspname);
RETERR(result);
}
dns_zone_setkasp(zone, kasp);
}
}
obj = NULL;
result = named_config_get(maps, "notify", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
@@ -1492,38 +1503,52 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
bool allow = false, maint = false;
bool sigvalinsecs;
obj = NULL;
result = named_config_get(maps, "dnskey-sig-validity", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
seconds = cfg_obj_asuint32(obj) * 86400;
if (kasp) {
seconds = (uint32_t) dns_kasp_sigvalidity_dnskey(kasp);
} else {
obj = NULL;
result = named_config_get(maps, "dnskey-sig-validity",
&obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
seconds = cfg_obj_asuint32(obj) * 86400;
}
dns_zone_setkeyvalidityinterval(zone, seconds);
obj = NULL;
result = named_config_get(maps, "sig-validity-interval", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
sigvalinsecs = ns_server_getoption(named_g_server->sctx,
NS_SERVER_SIGVALINSECS);
validity = cfg_tuple_get(obj, "validity");
seconds = cfg_obj_asuint32(validity);
if (!sigvalinsecs) {
seconds *= 86400;
}
dns_zone_setsigvalidityinterval(zone, seconds);
resign = cfg_tuple_get(obj, "re-sign");
if (cfg_obj_isvoid(resign)) {
seconds /= 4;
} else if (!sigvalinsecs) {
if (seconds > 7 * 86400) {
seconds = cfg_obj_asuint32(resign) * 86400;
} else {
seconds = cfg_obj_asuint32(resign) * 3600;
}
if (kasp) {
seconds = (uint32_t) dns_kasp_sigvalidity(kasp);
dns_zone_setsigvalidityinterval(zone, seconds);
seconds = (uint32_t) dns_kasp_sigrefresh(kasp);
dns_zone_setsigresigninginterval(zone, seconds);
} else {
seconds = cfg_obj_asuint32(resign);
obj = NULL;
result = named_config_get(maps, "sig-validity-interval",
&obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
sigvalinsecs = ns_server_getoption(named_g_server->sctx,
NS_SERVER_SIGVALINSECS);
validity = cfg_tuple_get(obj, "validity");
seconds = cfg_obj_asuint32(validity);
if (!sigvalinsecs) {
seconds *= 86400;
}
dns_zone_setsigvalidityinterval(zone, seconds);
resign = cfg_tuple_get(obj, "re-sign");
if (cfg_obj_isvoid(resign)) {
seconds /= 4;
} else if (!sigvalinsecs) {
seconds = cfg_obj_asuint32(resign);
if (seconds > 7 * 86400) {
seconds *= 86400;
} else {
seconds *= 3600;
}
} else {
seconds = cfg_obj_asuint32(resign);
}
dns_zone_setsigresigninginterval(zone, seconds);
}
dns_zone_setsigresigninginterval(zone, seconds);
obj = NULL;
result = named_config_get(maps, "key-directory", &obj);
@@ -1552,12 +1577,20 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
INSIST(result == ISC_R_SUCCESS && obj != NULL);
dns_zone_setoption(zone, DNS_ZONEOPT_UPDATECHECKKSK,
cfg_obj_asboolean(obj));
/*
* This setting will be ignored if dnssec-policy is used.
* named-checkconf will error if both are configured.
*/
obj = NULL;
result = named_config_get(maps, "dnssec-dnskey-kskonly", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
dns_zone_setoption(zone, DNS_ZONEOPT_DNSKEYKSKONLY,
cfg_obj_asboolean(obj));
/*
* This setting will be ignored if dnssec-policy is used.
* named-checkconf will error if both are configured.
*/
obj = NULL;
result = named_config_get(maps, "dnssec-loadkeys-interval",
@@ -1568,7 +1601,11 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
obj = NULL;
result = cfg_map_get(zoptions, "auto-dnssec", &obj);
if (result == ISC_R_SUCCESS) {
if (dns_zone_getkasp(zone) != NULL) {
dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, true);
dns_zone_setkeyopt(zone, DNS_ZONEKEY_CREATE, true);
dns_zone_setkeyopt(zone, DNS_ZONEKEY_MAINTAIN, true);
} else if (result == ISC_R_SUCCESS) {
const char *arg = cfg_obj_asstring(obj);
if (strcasecmp(arg, "allow") == 0) {
allow = true;
@@ -1581,6 +1618,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
ISC_UNREACHABLE();
}
dns_zone_setkeyopt(zone, DNS_ZONEKEY_ALLOW, allow);
dns_zone_setkeyopt(zone, DNS_ZONEKEY_CREATE, false);
dns_zone_setkeyopt(zone, DNS_ZONEKEY_MAINTAIN, maint);
}
}
+3 -7
View File
@@ -906,7 +906,7 @@ setup_system(void) {
result = isc_timermgr_create(gmctx, &timermgr);
check_result(result, "dns_timermgr_create");
result = isc_taskmgr_create(gmctx, 1, 0, &taskmgr);
result = isc_taskmgr_create(gmctx, 1, 0, NULL, &taskmgr);
check_result(result, "isc_taskmgr_create");
result = isc_task_create(taskmgr, 0, &global_task);
@@ -2618,7 +2618,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
* address.
*/
zname = dns_fixedname_initname(&fzname);
dns_name_copy(name, zname, NULL);
dns_name_copynf(name, zname);
}
if (debugging) {
@@ -3210,9 +3210,6 @@ cleanup(void) {
ddebug("Shutting down timer manager");
isc_timermgr_destroy(&timermgr);
ddebug("Destroying name state");
dns_name_destroy();
ddebug("Removing log context");
isc_log_destroy(&glctx);
@@ -3269,8 +3266,7 @@ main(int argc, char **argv) {
pre_parse_args(argc, argv);
result = isc_mem_create(0, 0, &gmctx);
check_result(result, "isc_mem_create");
isc_mem_create(&gmctx);
parse_args(argc, argv);
+1
View File
@@ -50,6 +50,7 @@
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>

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