Compare commits

..
1 Commits
Author SHA1 Message Date
Ondřej Surý be16142ea5 Provide debugging information for the isc_random function 2018-05-23 21:37:47 +02:00
1634 changed files with 158082 additions and 43692 deletions
-2
View File
@@ -7,8 +7,6 @@ libtool
/isc-config.sh /isc-config.sh
/configure.lineno /configure.lineno
autom4te.cache/ autom4te.cache/
*.rej
*.orig
*.o *.o
*.lo *.lo
*.so *.so
+12 -174
View File
@@ -2,29 +2,13 @@ variables:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
LC_ALL: C LC_ALL: C
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9 CI_REGISTRY_IMAGE: oerdnj/bind9
CCACHE_DIR: "/ccache" CCACHE_DIR: "/ccache"
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
stages: stages:
- precheck - precheck
- build - build
- test - test
- push
.centos-centos6-amd64: &centos_centos6_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
tags:
- linux
- docker
- amd64
.centos-centos7-amd64: &centos_centos7_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
tags:
- linux
- docker
- amd64
.debian-jessie-amd64: &debian_jessie_amd64_image .debian-jessie-amd64: &debian_jessie_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64" image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
@@ -114,29 +98,19 @@ stages:
stage: build stage: build
before_script: before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
# - ./autogen.sh - ./autogen.sh
script: script:
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log - ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local --with-libidn2
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1 - make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
artifacts: artifacts:
paths:
- doc/
expire_in: '1 hour' expire_in: '1 hour'
untracked: true untracked: true
.install_test: &install_test_job
stage: test
before_script:
- mkdir $HOME/.local
script:
- make install
.system_test: &system_test_job .system_test: &system_test_job
stage: test stage: test
before_script: before_script:
- rm -rf .ccache - rm -rf .ccache
- bash -x bin/tests/system/ifconfig.sh up - bash -x bin/tests/system/ifconfig.sh up
- bash -x util/prepare-softhsm2.sh
script: script:
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 ) - ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output - test -s bin/tests/system/systests.output
@@ -149,7 +123,6 @@ stages:
stage: test stage: test
before_script: before_script:
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results" - export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
- bash -x util/prepare-softhsm2.sh
script: script:
- make unit - make unit
after_script: after_script:
@@ -167,45 +140,16 @@ precheck:debian:sid:amd64:
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
stage: precheck stage: precheck
script: script:
- sh util/checklibs.sh > checklibs.out
- perl util/check-changes CHANGES - perl util/check-changes CHANGES
- perl -w util/merge_copyrights - perl -w util/merge_copyrights
- diff -urNap util/copyrights util/newcopyrights - diff -urNap util/copyrights util/newcopyrights
- rm util/newcopyrights - rm util/newcopyrights
- perl -w util/update_copyrights < util/copyrights
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
- xmllint --noout --nonet --html `git ls-files '*.html'`
artifacts: artifacts:
paths: paths:
- util/newcopyrights - util/newcopyrights
- checklibs.out
expire_in: '1 week' expire_in: '1 week'
when: on_failure when: on_failure
docs:debian:sid:amd64:
<<: *debian_sid_amd64_image
stage: test
dependencies:
- build:debian:sid:amd64
script:
- make -C doc/misc docbook
- make -C doc/arm Bv9ARM.html
artifacts:
paths:
- doc/arm/
expire_in: '1 month'
push:docs:
<<: *debian_sid_amd64_image
stage: push
dependencies: []
script:
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
only:
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
#build:debian:jessie:amd64: #build:debian:jessie:amd64:
# <<: *debian_jessie_amd64_image # <<: *debian_jessie_amd64_image
# <<: *build_job # <<: *build_job
@@ -230,101 +174,45 @@ push:docs:
# <<: *ubuntu_xenial_i386_image # <<: *ubuntu_xenial_i386_image
# <<: *build_job # <<: *build_job
build:centos:centos6:amd64: build:clang:debian:sid:amd64:
variables: variables:
CC: gcc CC: clang-6.0
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
<<: *centos_centos6_amd64_image
<<: *build_job
build:centos:centos7:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *centos_centos7_amd64_image
<<: *build_job
build:clang:debian:stretch:amd64:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g" CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_stretch_amd64_image <<: *debian_sid_amd64_image
<<: *build_job
build:debian:jessie:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_jessie_amd64_image
<<: *build_job
build:debian:stretch:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_stretch_amd64_image
<<: *build_job <<: *build_job
build:debian:sid:amd64: build:debian:sid:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g" CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
<<: *build_job <<: *build_job
build:clang:debian:stretch:i386: build:clang:debian:sid:i386:
variables: variables:
CC: clang CC: clang-6.0
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g" CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_stretch_i386_image <<: *debian_sid_i386_image
<<: *build_job <<: *build_job
build:debian:sid:i386: build:debian:sid:i386:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g" CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_i386_image <<: *debian_sid_i386_image
<<: *build_job <<: *build_job
unittest:centos:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
dependencies:
- build:centos:centos6:amd64
unittest:centos:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies:
- build:centos:centos7:amd64
unittest:debian:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:jessie:amd64
unittest:debian:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:stretch:amd64
unittest:debian:sid:amd64: unittest:debian:sid:amd64:
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
<<: *unit_test_job <<: *unit_test_job
dependencies: dependencies:
- build:debian:sid:amd64 - build:debian:sid:amd64
unittest:clang:debian:stretch:amd64: unittest:clang:debian:sid:amd64:
<<: *debian_stretch_amd64_image <<: *debian_sid_amd64_image
<<: *unit_test_job <<: *unit_test_job
dependencies: dependencies:
- build:clang:debian:stretch:amd64 - build:clang:debian:sid:amd64
unittest:debian:sid:i386: unittest:debian:sid:i386:
<<: *debian_sid_i386_image <<: *debian_sid_i386_image
@@ -332,30 +220,6 @@ unittest:debian:sid:i386:
dependencies: dependencies:
- build:debian:sid:i386 - build:debian:sid:i386
systemtest:centos:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *system_test_job
dependencies:
- build:centos:centos6:amd64
systemtest:centos:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *system_test_job
dependencies:
- build:centos:centos7:amd64
systemtest:debian:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *system_test_job
dependencies:
- build:debian:jessie:amd64
systemtest:debian:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *system_test_job
dependencies:
- build:debian:stretch:amd64
systemtest:debian:sid:amd64: systemtest:debian:sid:amd64:
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
<<: *system_test_job <<: *system_test_job
@@ -367,29 +231,3 @@ systemtest:debian:sid:i386:
<<: *system_test_job <<: *system_test_job
dependencies: dependencies:
- build:debian:sid:i386 - build:debian:sid:i386
install:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *install_test_job
dependencies:
- build:debian:sid:amd64
pkcs11:build:debian:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
<<: *debian_sid_amd64_image
<<: *build_job
pkcs11:unittest:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:build:debian:sid:amd64
pkcs11:systemtest:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- pkcs11:build:debian:sid:amd64
-4
View File
@@ -9,10 +9,6 @@ email to [security-officer@isc.org](security-officer@isc.org).
(Summarize the bug encountered concisely.) (Summarize the bug encountered concisely.)
### BIND version used
(Paste the output of `named -V`.)
### Steps to reproduce ### Steps to reproduce
(How one can reproduce the issue - this is very important.) (How one can reproduce the issue - this is very important.)
-31
View File
@@ -1,31 +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.
- [ ] 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).
- [ ] Ensure Kyua and ATF files are correct.
- [ ] Rebuild configure using autoconf on docs.isc.org.
- [ ] Update CHANGES.
- [ ] Update CHANGES.SE (subscription branch only).
- [ ] Update "version".
- [ ] Update "readme.md".
- [ ] Ensure the release notes are correct for this release (content, formatting, etc.).
- [ ] 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.
- [ ] (Support) Make tarballs and signatures available to download.
- [ ] (Manager) Update [https://wiki.isc.org/bin/view/Main/BindReleaseDates](BIND release dates page) when public announcement has been made.
- [ ] (Manager) Inform marketing of the release
- [ ] (SwEng) Update DEB and RPM packages
-1434
View File
File diff suppressed because it is too large Load Diff
+4 -366
View File
@@ -1,367 +1,5 @@
5050. [bug] The libirs version of getaddrinfo() was unable to parse
scoped IPv6 addresses present in /etc/resolv.conf.
[GL #187]
5049. [cleanup] QNAME minimization has been deeply refactored. [GL #16]
5048. [func] Add configure option to enable and enforce FIPS mode
in BIND 9. [GL #506]
5047. [bug] Messages logged for certain query processing failures
now include a more specific error description if it is
available. [GL #572]
5046. [bug] named could crash during shutdown if an RPZ
reload was in progress. [RT #46210]
5045. [func] Remove support for DNSSEC algorithms 3 (DSA)
and 6 (DSA-NSEC3-SHA1). [GL #22]
5044. [cleanup] If "dnssec-enable" is no, then "dnssec-validation"
now also defaults to no. [GL #388]
5043. [bug] Fix creating and validating EdDSA signatures. [GL #579]
5042. [test] Make the chained delegations in reclimit behave
like they would in a regular name server. [GL #578]
5041. [test] The chain test contains a incomplete delegation.
[GL #568]
5040. [func] Extended dnstap so that it can log UPDATE requests
and responses as separate message types. Thanks
to Greg Rabil. [GL #570]
5039. [bug] Named could fail to preserve owner name case of new
RRset. [GL #420]
5038. [bug] Chaosnet addresses were compared incorrectly.
[GL #562]
5037. [func] "allow-recursion-on" and "allow-query-cache-on"
each now default to the other if only one of them
is set, in order to be more consistent with the way
"allow-recursion" and "allow-query-cache" work.
Also we now ensure that both query-cache ACLs are
checked when determining cache access. [GL #319]
5036. [cleanup] Fixed a spacing/formatting error in some RPZ-related
error messages in the log. [GL !805]
5035. [test] Fixed errors that prevented the DNSRPS subtests
from running in the rpz and rpzrecurse system
tests. [GL #503]
5034. [bug] A race between threads could prevent zone maintenance
scheduled immediately after zone load from being
performed. [GL #542]
5033. [bug] When adding NTAs to multiple views using "rndc nta",
the text returned via rndc was incorrectly terminated
after the first line, making it look as if only one
NTA had been added. Also, it was not possible to
differentiate between views with the same name but
different classes; this has been corrected with the
addition of a "-class" option. [GL #105]
5032. [func] Add krb5-selfsub and ms-selfsub update policy rules.
[GL #511]
5031. [cleanup] Various defines in platform.h has been either dropped
if always or never triggered on supported platforms
or replaced with config.h equivalents if the defines
didn't have any impact on public headers. Workarounds
for LinuxThreads have been removed because NPTL is
available since Linux kernel 2.6.0. [GL #525]
5030. [bug] Align CMSG buffers to a 64-bit boundary, fixes crash
on architectures with strict alignment. [GL #521]
--- 9.13.3 released ---
5029. [func] Workarounds for servers that misbehave when queried
with EDNS have been removed, because these broken
servers and the workarounds for their noncompliance
cause unnecessary delays, increase code complexity,
and prevent deployment of new DNS features. See
https://dnsflagday.net for further details. [GL #150]
5028. [bug] Spread the initial RRSIG expiration times over the
entire working sig-validity-interval when signing a
zone in named to even out re-signing and transfer
loads. [GL #418]
5027. [func] Set SO_SNDBUF size on sockets. [GL #74]
5026. [bug] rndc reconfig should not touch already loaded zones.
[GL #276]
5025. [cleanup] Remove isc_keyboard family of functions. [GL #178]
5024. [func] Replace custom assembly for atomic operations with
atomic support from the compiler. The code will now use
C11 stdatomic, or __atomic, or __sync builtins with GCC
or Clang compilers, and Interlocked functions with MSVC.
[GL #10]
5023. [cleanup] Remove wrappers that try to fix broken or incomplete
implementations of IPv6, pthreads and other core
functionality required and used by BIND. [GL #192]
5022. [doc] Update ms-self, ms-subdomain, krb5-self, and
krb5-subdomain documentation. [GL !708]
5021. [bug] dig returned a non-zero exit code when it received a
reply over TCP after a retry. [GL #487]
5020. [func] RNG uses thread-local storage instead of locks, if
supported by platform. [GL #496]
5019. [cleanup] A message is now logged when ixfr-from-differences is
set at zone level for an inline-signed zone. [GL #470]
5018. [bug] Fix incorrect sizeof arguments in lib/isc/pk11.c.
[GL !588]
5017. [bug] lib/isc/pk11.c failed to unlink the session before
releasing the lock which is unsafe. [GL !589]
5016. [bug] Named could assert with overlapping filter-aaaa and
dns64 acls. [GL #445]
5015. [bug] Reloading all zones caused zone maintenance to cease
for inline-signed zones. [GL #435]
5014. [bug] Signatures loaded from the journal for the signed
version of an inline-signed zone were not scheduled for
refresh. [GL #482]
5013. [bug] A referral response with a non-empty ANSWER section was
inadvertently being treated as an error. [GL #390]
5012. [bug] Fix lock order reversal in pk11_initialize. [GL !590]
5011. [func] Remove support for unthreaded named. [GL #478]
5010. [func] New "validate-except" option specifies a list of
domains beneath which DNSSEC validation should not
be performed. [GL #237]
5009. [bug] Upon an OpenSSL failure, the first error in the OpenSSL
error queue was not logged. [GL #476]
5008. [bug] "rndc signing -nsec3param ..." requests were silently
ignored for zones which were not yet loaded or
transferred. [GL #468]
5007. [cleanup] Replace custom ISC boolean and integer data types
with C99 stdint.h and stdbool.h types. [GL #9]
5006. [cleanup] Code preparing a delegation response was extracted from
query_delegation() and query_zone_delegation() into a
separate function in order to decrease code
duplication. [GL #431]
5005. [bug] dnssec-verify, and dnssec-signzone at the verification
step, failed on some validly signed zones. [GL #442]
5004. [bug] 'rndc reconfig' could cause inline zones to stop
re-signing. [GL #439]
5003. [bug] dns_acl_isinsecure did not handle geoip elements.
[GL #406]
5002. [bug] mdig: Handle malformed +ednsopt option, support 100
+ednsopt options per query rather than 100 total and
address memory leaks if +ednsopt was specified.
[GL #410]
5001. [bug] Fix refcount errors on error paths. [GL !563]
5000. [bug] named_server_servestale() could leave the server in
exclusive mode if an error occured. [GL #441]
4999. [cleanup] Remove custom printf implementaion in lib/isc/print.c.
[GL #261]
4998. [test] Make resolver and cacheclean tests more civilized.
4997. [security] named could crash during recursive processing
of DNAME records when "deny-answer-aliases" was
in use. (CVE-2018-5740) [GL #387]
4996. [bug] dig: Handle malformed +ednsopt option. [GL #403]
4995. [test] Add tests for "tcp-self" update policy. [GL !282]
4994. [bug] Trust anchor telemetry queries were not being sent
upstream for locally served zones. [GL #392]
4993. [cleanup] Remove support for silently ignoring 'no-change' deltas
from BIND 8 when processing an IXFR stream. 'no-change'
deltas will now trigger a fallback to AXFR as the
recovery mechanism. [GL #369]
4992. [bug] The wrong address was being logged for trust anchor
telemetry queries. [GL #379]
4991. [bug] "rndc reconfig" was incorrectly handling zones whose
"mirror" setting was changed. [GL #381]
4990. [bug] Prevent a possible NULL reference in pkcs11-keygen.
[GL #401]
4989. [cleanup] IDN support in dig has been reworked. IDNA2003
fallbacks were removed in the process. [GL #384]
4988. [bug] Don't synthesize NXDOMAIN from NSEC for records under
a DNAME.
--- 9.13.2 released ---
4987. [cleanup] dns_rdataslab_tordataset() and its related
dns_rdatasetmethods_t callbacks were removed as they
were not being used by anything in BIND. [GL #371]
4986. [func] When built on Linux, BIND now requires the libcap
library to set process privileges, unless capability
support is explicitly overridden with "configure
--disable-linux-caps". [GL #321]
4985. [func] Add a new slave zone option, "mirror", to enable
serving a non-authoritative copy of a zone that
is subject to DNSSEC validation before being
used. For now, this option is only meant to
facilitate deployment of an RFC 7706-style local
copy of the root zone. [GL #33]
4984. [bug] Improve handling of very large incremental
zone transfers to prevent journal corruption. [GL #339]
4983. [func] Add the ability to not return a DNS COOKIE option
when one is present in the request (answer-cookie no;).
[GL #173]
4982. [cleanup] Return FORMERR if the question section is empty
and no COOKIE option is present; this restores
older behavior except in the newly specified
COOKIE case. [GL #260]
4981. [bug] Fix race in cmsg buffer usage in socket code.
[GL #180]
4980. [bug] Named-checkconf failed to detect bad in-view targets.
[GL #288]
4979. [placeholder]
4978. [test] Fix error handling and resolver configuration in the
"rpz" system test. [GL #312]
4977. [func] When starting up, log the same details that
would be reported by 'named -V'. [GL #247]
4976. [bug] Log the label with invalid prefix length correctly
when loading RPZ zones. [GL #254]
4975. [bug] The server cookie computation for sha1 and sha256 did
not match the method described in RFC 7873. [GL #356]
4974. [bug] Restore default rrset-order to random. [GL #336]
4973. [func] verifyzone() and the functions it uses were moved to
libdns and refactored to prevent exit() from being
called upon failure. A side effect of that is that
dnssec-signzone and dnssec-verify now check for memory
leaks upon shutdown. [GL #266]
4972. [func] Declare the 'rdata' argument for dns_rdata_tostruct()
to be const. [GL #341]
4971. [bug] dnssec-signzone and dnssec-verify did not treat records
below a DNAME as out-of-zone data. [GL #298]
4970. [func] Add QNAME minimization option to resolver. [GL #16]
4969. [cleanup] Refactor zone logging functions. [GL #269]
--- 9.13.1 released ---
4968. [bug] If glue records are signed, attempt to validate them.
[GL #209]
4967. [cleanup] Add "answer-cookie" to the parser, marked obsolete.
4966. [placeholder]
4965. [func] Add support for marking options as deprecated.
[GL #322]
4964. [bug] Reduce the probabilty of double signature when deleting
a DNSKEY by checking if the node is otherwise signed
by the algorithm of the key to be deleted. [GL #240]
4963. [test] ifconfig.sh now uses "ip" instead of "ifconfig",
if available, to configure the test interfaces on
linux. [GL #302]
4962. [cleanup] Move 'named -T' processing to its own function.
[GL #316]
4961. [protocol] Remove support for ECC-GOST (GOST R 34.11-94).
[GL #295]
4960. [security] When recursion is enabled, but the "allow-recursion"
and "allow-query-cache" ACLs are not specified,
they should be limited to local networks,
but were inadvertently set to match the default
"allow-query", thus allowing remote queries.
(CVE-2018-5738) [GL #309]
4959. [func] NSID logging (enabled by the "request-nsid" option)
now has its own "nsid" category, instead of using the
"resolver" category. [GL !332]
4958. [bug] Remove redundant space from NSEC3 record. [GL #281]
4957. [func] The default setting for "dnssec-validation" is now
"auto", which activates DNSSEC validation using the
IANA root key. (The default can be changed back to
"yes", which activates DNSSEC validation only when keys
are explicitly configured in named.conf, by building
BIND with "configure --disable-auto-validation".)
[GL #30]
4956. [func] Change isc_random() to be just PRNG using xoshiro128**,
and add isc_nonce_buf() that uses CSPRNG. [GL #289]
4955. [cleanup] Silence cppcheck warnings in lib/dns/master.c.
[GL #286]
4954. [func] Messages about serving of stale answers are now
directed to the "serve-stale" logging category.
Also clarified serve-stale documentation. [GL !323]
4953. [bug] Removed the option to build the red black tree
database without a hash table; the non-hashing
version was buggy and is not needed. [GL #184]
4952. [func] Authoritative server support in named for the
EDNS CLIENT-SUBNET option (which was experimental
and not practical to deploy) has been removed.
The ECS option is still supported in dig and mdig
via the +subnet option, and can be parsed and logged
when received by named, but it is no longer used
for ACL processing. The "geoip-use-ecs" option
is now obsolete; a warning will be logged if it is
used in named.conf. "ecs" tags in an ACL definition
are also obsolete and will cause the configuration
to fail to load. [GL #32]
4951. [protocol] Add "HOME.ARPA" to list of built in empty zones as 4951. [protocol] Add "HOME.ARPA" to list of built in empty zones as
per RFC 8375. [GL #273] per RFC 8375. [GL #273]
--- 9.13.0 released --- --- 9.13.0 released ---
4950. [bug] ISC_SOCKEVENTATTR_TRUNC was not be set. [GL #238] 4950. [bug] ISC_SOCKEVENTATTR_TRUNC was not be set. [GL #238]
@@ -1025,8 +663,8 @@
4760. [func] Add glue cache statistics counters. [RT #46028] 4760. [func] Add glue cache statistics counters. [RT #46028]
4759. [func] Add logging channel "trust-anchor-telemetry" to 4759. [func] Add logging channel "trust-anchor-telementry" to
record trust-anchor-telemetry in incoming requests. record trust-anchor-telementry in incoming requests.
Both _ta-XXXX.<anchor>/NULL and EDNS KEY-TAG options Both _ta-XXXX.<anchor>/NULL and EDNS KEY-TAG options
are logged. [RT #46124] are logged. [RT #46124]
@@ -1095,10 +733,10 @@
tests when running on terminals that support them. tests when running on terminals that support them.
[RT #45977] [RT #45977]
4744. [bug] Suppress trust-anchor-telemetry queries if 4744. [bug] Suppress trust-anchor-telementry queries if
validation is disabled. [RT #46131] validation is disabled. [RT #46131]
4743. [func] Exclude trust-anchor-telemetry queries from 4743. [func] Exclude trust-anchor-telementry queries from
synth-from-dnssec processing. [RT #46123] synth-from-dnssec processing. [RT #46123]
4742. [func] Synthesis of responses from DNSSEC-verified records. 4742. [func] Synthesis of responses from DNSSEC-verified records.
+2 -9
View File
@@ -14,7 +14,7 @@ top_builddir = @top_builddir@
VERSION=@BIND9_VERSION@ VERSION=@BIND9_VERSION@
SUBDIRS = make unit lib fuzz bin doc SUBDIRS = make unit lib bin doc
TARGETS = TARGETS =
PREREQS = bind.keys.h PREREQS = bind.keys.h
@@ -22,8 +22,7 @@ MANPAGES = isc-config.sh.1
HTMLPAGES = isc-config.sh.html HTMLPAGES = isc-config.sh.html
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS \ MANOBJS = README HISTORY OPTIONS CONTRIBUTING ${MANPAGES} ${HTMLPAGES}
${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@ @BIND9_MAKE_RULES@
@@ -90,7 +89,6 @@ force-test: test-force
test-force: test-force:
status=0; \ status=0; \
(cd fuzz && ${MAKE} check) || status=1; \
(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \ (cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
(test -f ${top_builddir}/unit/unittest.sh && \ (test -f ${top_builddir}/unit/unittest.sh && \
$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \ $(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
@@ -116,11 +114,6 @@ CONTRIBUTING: CONTRIBUTING.md
${W3M} -dump -cols 75 -O ascii -T text/html | \ ${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@ sed -e '$${/^$$/d;}' > $@
PLATFORMS: PLATFORMS.md
${PANDOC} --email-obfuscation=none -s -t html PLATFORMS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
unit:: unit::
sh ${top_builddir}/unit/unittest.sh sh ${top_builddir}/unit/unittest.sh
-61
View File
@@ -1,61 +0,0 @@
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with
RFC-compliant IPv6 support, POSIX-compliant threads, and the OpenSSL
cryptography library. Atomic operations support from the compiler is
needed, either in the form of builtin operations, C11 atomics or the
Interlocked family of functions on Windows.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
Regularly tested platforms
As of May 2018, BIND 9.13 is tested on the following systems:
* Debian 8, 9
* Ubuntu 16.04, 18.04
* Fedora 27, 28
* Red Hat/CentOS 6, 7
* FreeBSD 10.x, 11.x
* OpenBSD 6.3
The amd64, i386, armhf and arm64 CPU architectures are all fully
supported.
Best effort
The following are platforms on which BIND is known to build and run, but
on which it is not routinely tested. ISC makes every effort to fix bugs on
these platforms, but may be unable to do so quickly due to lack of
hardware, less familiarity on the part of engineering staff, and other
constraints.
* Windows 10 / x64
* Windows Server 2012 R2, 2016 / x64
* macOS 10.12+
* Solaris 10
* FreeBSD 12+
* OpenBSD 6.2
* NetBSD
* Older or less popular Linux distributions still supported by their
vendors, such as:
+ Ubuntu 14.04, 18.10+
+ Gentoo
+ ArchLinux
+ Alpine Linux
* OpenWRT/LEDE 17.0
* Other CPU architectures (mips, mipsel, sparc, ...)
Unsupported platforms
These are platforms on which BIND is known not to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or
library)
-100
View File
@@ -1,100 +0,0 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
## Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with RFC-compliant
IPv6 support, POSIX-compliant threads, and the OpenSSL cryptography library.
Atomic operations support from the compiler is needed, either in the form of
builtin operations, C11 atomics or the Interlocked family of functions on
Windows.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
### Regularly tested platforms
As of May 2018, BIND 9.13 is tested on the following systems:
* Debian 8, 9
* Ubuntu 16.04, 18.04
* Fedora 27, 28
* Red Hat/CentOS 6, 7
* FreeBSD 10.x, 11.x
* OpenBSD 6.3
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
### Best effort
The following are platforms on which BIND is known to build and run,
but on which it is not routinely tested. ISC makes every effort to fix bugs
on these platforms, but may be unable to do so quickly due to lack of
hardware, less familiarity on the part of engineering staff, and other
constraints.
* Windows 10 / x64
* Windows Server 2012 R2, 2016 / x64
* macOS 10.12+
* Solaris 10
* FreeBSD 12+
* OpenBSD 6.2
* NetBSD
* Older or less popular Linux distributions still supported by their vendors, such as:
* Ubuntu 14.04, 18.10+
* Gentoo
* ArchLinux
* Alpine Linux
* OpenWRT/LEDE 17.0
* Other CPU architectures (mips, mipsel, sparc, ...)
## Unsupported platforms
These are platforms on which BIND is known *not* to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or library)
* Linux without NPTL (Native POSIX Thread Library)
## Platform quirks
### ARM
If the compilation ends with following error:
```
Error: selected processor does not support `yield' in ARM mode
```
You will need to set `-march` compiler option to `native`, so the compiler
recognizes `yield` assembler instruction. The proper way to set `-march=native`
would be to put it into `CFLAGS`, e.g. run `./configure` like this:
`CFLAGS="-march=native -Os -g" ./configure` plus your usual options.
If that doesn't work, you can enforce the minimum CPU and FPU (taken from Debian
armhf documentation):
* The lowest worthwhile CPU implementation is Armv7-A, therefore the recommended
build option is `-march=armv7-a`.
* FPU should be set at VFPv3-D16 as they represent the miminum specification of
the processors to support here, therefore the recommended build option is
`-mfpu=vfpv3-d16`.
The configure command should look like this:
```
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
```
+24 -58
View File
@@ -31,9 +31,9 @@ administrative tools, including the dig and delv DNS lookup tools,
nsupdate for dynamic DNS zone updates, rndc for remote name server nsupdate for dynamic DNS zone updates, rndc for remote name server
administration, and more. administration, and more.
BIND 9 began as a complete re-write of the BIND architecture that was used BIND 9 is a complete re-write of the BIND architecture that was used in
in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a 501
501(c)(3) public benefit corporation dedicated to providing software and (c)(3) public benefit corporation dedicated to providing software and
services in support of the Internet infrastructure, developed BIND 9 and services in support of the Internet infrastructure, developed BIND 9 and
is responsible for its ongoing maintenance and improvement. BIND is open is responsible for its ongoing maintenance and improvement. BIND is open
source software licenced under the terms of the Mozilla Public License, source software licenced under the terms of the Mozilla Public License,
@@ -48,8 +48,6 @@ the file CHANGES. See below for details on the CHANGES file format.
For up-to-date release notes and errata, see http://www.isc.org/software/ For up-to-date release notes and errata, see http://www.isc.org/software/
bind9/releasenotes bind9/releasenotes
For information about supported platforms, see PLATFORMS.
Reporting bugs and getting help Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may To report non-security-sensitive bugs or request new features, you may
@@ -101,51 +99,19 @@ format-patch.
BIND 9.13 features BIND 9.13 features
BIND 9.13 is the newest development branch of BIND 9. It includes a number BIND 9.13.0 is the newest development branch of BIND 9. It includes a
of changes from BIND 9.12 and earlier releases. New features include: number of changes from BIND 9.12 and earlier releases. New features
include:
* QNAME minimization, as described in RFC 7816, is now supported. * TBD
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root
zone.
* Secondary zones can now be configured as "mirror" zones; their
contents are transferred in as with traditional slave zones, but are
subject to DNSSEC validation and are not treated as authoritative data
when answering. This makes it easier to configure a local copy of the
root zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below
which DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with libidn2.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See https://dnsflagday.net for more details.
Cryptographic support has been modernized. BIND now uses the best
available pseudo-random number generator for the platform on which it's
built. Very old versions of OpenSSL are no longer supported. Cryptography
is now mandatory: building BIND without DNSSEC is now longer supported.
Special code to support certain legacy operating systems has also been
removed; see the file PLATFORMS.md for details of supported platforms. In
addition to OpenSSL, BIND now requires support for IPv6, threads, and
standard atomic operations provided by the C compiler.
Building BIND Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler, BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
basic POSIX support, and a 64-bit integer type. Successful builds have support, and a 64-bit integer type. Successful builds have been observed
been observed on many versions of Linux and UNIX, including RedHat, on many versions of Linux and UNIX, including RedHat, Fedora, Debian,
Fedora, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris,
X, Solaris, HP-UX, and OpenWRT. HP-UX, AIX, SCO OpenServer, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires the
libcap library to set process privileges, though this requirement can be
overridden by disabling capability support at compile time. See
Compile-time options below for details on other libraries that may be
required to support optional features.
BIND is also available for Windows 2008 and higher. See win32utils/ BIND is also available for Windows 2008 and higher. See win32utils/
readme1st.txt for details on building for Windows systems. readme1st.txt for details on building for Windows systems.
@@ -216,10 +182,11 @@ smaller systems.
For the server to support DNSSEC, you need to build it with crypto For the server to support DNSSEC, you need to build it with crypto
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
installed. If the OpenSSL library is installed in a nonstandard location, installed. If the OpenSSL library is installed in a nonstandard location,
specify the prefix using --with-openssl=<PREFIX> on the configure command specify the prefix using "--with-openssl=<PREFIX>" on the configure
line. To use a PKCS#11 hardware service module for cryptographic command line. To use a PKCS#11 hardware service module for cryptographic
operations, specify the path to the PKCS#11 provider library using operations, specify the path to the PKCS#11 provider library using
--with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11. "--with-pkcs11=<PREFIX>", and configure BIND with
"--enable-native-pkcs11".
To support the HTTP statistics channel, the server must be linked with at 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:// least one of the following: libxml2 http://xmlsoft.org or json-c https://
@@ -232,22 +199,17 @@ specify the prefix using --with-zlib=/prefix.
To support storing configuration data for runtime-added zones in an LMDB To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in database, the server must be linked with liblmdb. If this is installed in
a nonstandard location, specify the prefix using with-lmdb=/prefix. a nonstandard location, specify the prefix using "with-lmdb=/prefix".
To support GeoIP location-based ACLs, the server must be linked with To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with libGeoIP. This is not turned on by default; BIND must be configured with
--with-geoip. If the library is installed in a nonstandard location, "--with-geoip". If the library is installed in a nonstandard location, use
specify the prefix using --with-geoip=/prefix. specify the prefix using "--with-geoip=/prefix".
For DNSTAP packet logging, you must have installed libfstrm https:// For DNSTAP packet logging, you must have installed libfstrm https://
github.com/farsightsec/fstrm and libprotobuf-c https:// github.com/farsightsec/fstrm and libprotobuf-c https://
developers.google.com/protocol-buffers, and BIND must be configured with developers.google.com/protocol-buffers, and BIND must be configured with
--enable-dnstap. "--enable-dnstap".
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.
Portions of BIND that are written in Python, including dnssec-keymgr, Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the dnssec-coverage, dnssec-checkds, and some of the system tests, require the
@@ -264,6 +226,10 @@ specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
command line. By default, fixed rrset-order is disabled to reduce memory command line. By default, fixed rrset-order is disabled to reduce memory
footprint. footprint.
If your operating system has integrated support for IPv6, it will be used
automatically. If you have installed KAME IPv6 separately, use --with-kame
[=PATH] to specify its location.
make install will install named and the various BIND 9 libraries. By make install will install named and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the default, installation is into /usr/local, but this can be changed with the
--prefix option when running configure. --prefix option when running configure.
+20 -58
View File
@@ -41,8 +41,8 @@ administrative tools, including the `dig` and `delv` DNS lookup tools,
`nsupdate` for dynamic DNS zone updates, `rndc` for remote name server `nsupdate` for dynamic DNS zone updates, `rndc` for remote name server
administration, and more. administration, and more.
BIND 9 began as a complete re-write of the BIND architecture that was BIND 9 is a complete re-write of the BIND architecture that was used in
used in versions 4 and 8. Internet Systems Consortium versions 4 and 8. Internet Systems Consortium
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) public benefit ([https://www.isc.org](https://www.isc.org)), a 501(c)(3) public benefit
corporation dedicated to providing software and services in support of the corporation dedicated to providing software and services in support of the
Internet infrastructure, developed BIND 9 and is responsible for its Internet infrastructure, developed BIND 9 and is responsible for its
@@ -59,8 +59,6 @@ CHANGES file format.
For up-to-date release notes and errata, see For up-to-date release notes and errata, see
[http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes) [http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes)
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
### <a name="help"/> Reporting bugs and getting help ### <a name="help"/> Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may To report non-security-sensitive bugs or request new features, you may
@@ -118,54 +116,19 @@ including your patch as an attachment, preferably generated by
### <a name="features"/> BIND 9.13 features ### <a name="features"/> BIND 9.13 features
BIND 9.13 is the newest development branch of BIND 9. It includes a BIND 9.13.0 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features number of changes from BIND 9.12 and earlier releases. New features
include: include:
* QNAME minimization, as described in RFC 7816, is now supported. * TBD
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root zone.
* Secondary zones can now be configured as "mirror" zones; their contents
are transferred in as with traditional slave zones, but are subject to
DNSSEC validation and are not treated as authoritative data when
answering. This makes it easier to configure a local copy of the root
zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below which
DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with `libidn2`.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
for more details.
Cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory: building BIND without DNSSEC is now
longer supported.
Special code to support certain legacy operating systems has also
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
of supported platforms. In addition to OpenSSL, BIND now requires
support for IPv6, threads, and standard atomic operations provided
by the C compiler.
### <a name="build"/> Building BIND ### <a name="build"/> Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler, BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
basic POSIX support, and a 64-bit integer type. Successful builds have been support, and a 64-bit integer type. Successful builds have been observed on
observed on many versions of Linux and UNIX, including RedHat, Fedora, many versions of Linux and UNIX, including RedHat, Fedora, Debian, Ubuntu,
Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris, HP-UX, AIX,
Solaris, HP-UX, and OpenWRT. SCO OpenServer, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires
the `libcap` library to set process privileges, though this requirement
can be overridden by disabling capability support at compile time.
See [Compile-time options](#opts) below for details on other libraries
that may be required to support optional features.
BIND is also available for Windows 2008 and higher. See BIND is also available for Windows 2008 and higher. See
`win32utils/readme1st.txt` for details on building for Windows `win32utils/readme1st.txt` for details on building for Windows
@@ -231,10 +194,10 @@ performance on smaller systems.
For the server to support DNSSEC, you need to build it with crypto support. For the server to support DNSSEC, you need to build it with crypto support.
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
OpenSSL library is installed in a nonstandard location, specify the prefix OpenSSL library is installed in a nonstandard location, specify the prefix
using `--with-openssl=<PREFIX>` on the configure command line. To use a using "--with-openssl=&lt;PREFIX&gt;" on the configure command line. To use a
PKCS#11 hardware service module for cryptographic operations, specify the PKCS#11 hardware service module for cryptographic operations, specify the
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and path to the PKCS#11 provider library using "--with-pkcs11=&lt;PREFIX&gt;", and
configure BIND with `--enable-native-pkcs11`. configure BIND with "--enable-native-pkcs11".
To support the HTTP statistics channel, the server must be linked with at To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2 least one of the following: libxml2
@@ -249,23 +212,18 @@ specify the prefix using `--with-zlib=/prefix`.
To support storing configuration data for runtime-added zones in an LMDB To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in a database, the server must be linked with liblmdb. If this is installed in a
nonstandard location, specify the prefix using `with-lmdb=/prefix`. nonstandard location, specify the prefix using "with-lmdb=/prefix".
To support GeoIP location-based ACLs, the server must be linked with To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with libGeoIP. This is not turned on by default; BIND must be configured with
`--with-geoip`. If the library is installed in a nonstandard location, "--with-geoip". If the library is installed in a nonstandard location, use
specify the prefix using `--with-geoip=/prefix`. specify the prefix using "--with-geoip=/prefix".
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) [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), [https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with `--enable-dnstap`. and BIND must be configured with "--enable-dnstap".
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`.
Portions of BIND that are written in Python, including Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the `dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
@@ -282,6 +240,10 @@ specifying `--enable-fixed-rrset` or `--disable-fixed-rrset` on the
configure command line. By default, fixed rrset-order is disabled to configure command line. By default, fixed rrset-order is disabled to
reduce memory footprint. reduce memory footprint.
If your operating system has integrated support for IPv6, it will be used
automatically. If you have installed KAME IPv6 separately, use
`--with-kame[=PATH]` to specify its location.
`make install` will install `named` and the various BIND 9 libraries. By `make install` will install `named` and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the default, installation is into /usr/local, but this can be changed with the
`--prefix` option when running `configure`. `--prefix` option when running `configure`.
+137
View File
@@ -0,0 +1,137 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
/***
*** This file is not to be included by any public header files, because
*** it does not get installed.
***/
@TOP@
/** define on DEC OSF to enable 4.4BSD style sa_len support */
#undef _SOCKADDR_LEN
/** define if your system needs pthread_init() before using pthreads */
#undef NEED_PTHREAD_INIT
/** define if your system has sigwait() */
#undef HAVE_SIGWAIT
/** define if sigwait() is the UnixWare flavor */
#undef HAVE_UNIXWARE_SIGWAIT
/** define on Solaris to get sigwait() to work using pthreads semantics */
#undef _POSIX_PTHREAD_SEMANTICS
/** define if LinuxThreads is in use */
#undef HAVE_LINUXTHREADS
/** define if sysconf() is available */
#undef HAVE_SYSCONF
/** define if sysctlbyname() is available */
#undef HAVE_SYSCTLBYNAME
/** define if catgets() is available */
#undef HAVE_CATGETS
/** define if getifaddrs() exists */
#undef HAVE_GETIFADDRS
/** define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
#undef HAVE_IFLIST_SYSCTL
/** define if tzset() is available */
#undef HAVE_TZSET
/** define if struct addrinfo exists */
#undef HAVE_ADDRINFO
/** define if getaddrinfo() exists */
#undef HAVE_GETADDRINFO
/** define if gai_strerror() exists */
#undef HAVE_GAISTRERROR
/**
* define if pthread_setconcurrency() should be called to tell the
* OS how many threads we might want to run.
*/
#undef CALL_PTHREAD_SETCONCURRENCY
/** define if IPv6 is not disabled */
#undef WANT_IPV6
/** define if flockfile() is available */
#undef HAVE_FLOCKFILE
/** define if getc_unlocked() is available */
#undef HAVE_GETCUNLOCKED
/** Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
#undef SHUTUP_SPUTAUX
#ifdef SHUTUP_SPUTAUX
struct __sFILE;
extern __inline int __sputaux(int _c, struct __sFILE *_p);
#endif
/** Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
#undef SHUTUP_SIGWAIT
#ifdef SHUTUP_SIGWAIT
int sigwait(const unsigned int *set, int *sig);
#endif
/** Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
#undef SHUTUP_STDARG_CAST
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
#include <stdarg.h> /** Grr. Must be included *every time*. */
/**
* The silly continuation line is to keep configure from
* commenting out the #undef.
*/
#undef \
va_start
#define va_start(ap, last) \
do { \
union { const void *konst; long *var; } _u; \
_u.konst = &(last); \
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
} while (0)
#endif /** SHUTUP_STDARG_CAST && __GNUC__ */
/** define if the system has a random number generating device */
#undef PATH_RANDOMDEV
/** define if pthread_attr_getstacksize() is available */
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
/** define if pthread_attr_setstacksize() is available */
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
/** define if you have strerror in the C library. */
#undef HAVE_STRERROR
/* Define if OpenSSL includes DSA support */
#undef HAVE_OPENSSL_DSA
/* Define if you have getpassphrase in the C library. */
#undef HAVE_GETPASSPHRASE
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
#undef ISC_SOCKADDR_LEN_T
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
#undef NEED_PTHREAD_SCOPE_SYSTEM
/* Define to 1 if you have the uname library function. */
#undef HAVE_UNAME
Vendored
+15 -295
View File
@@ -1,297 +1,17 @@
# generated automatically by aclocal 1.16.1 -*- Autoconf -*- sinclude(libtool.m4/libtool.m4)dnl
sinclude(libtool.m4/ltoptions.m4)dnl
sinclude(libtool.m4/ltsugar.m4)dnl
sinclude(libtool.m4/ltversion.m4)dnl
sinclude(libtool.m4/lt~obsolete.m4)dnl
# Copyright (C) 1996-2018 Free Software Foundation, Inc. m4_divert_text(HELP_CANON, [[
NOTE: If PREFIX is not set, then the default values for --sysconfdir
and --localstatedir are /etc and /var, respectively.]])
m4_divert_text(HELP_END, [[
Professional support for BIND is provided by Internet Systems Consortium,
Inc. Information about paid support and training options is available at
https://www.isc.org/support.
# This file is free software; the Free Software Foundation Help can also often be found on the BIND Users mailing list
# gives unlimited permission to copy and/or distribute it, (https://lists.isc.org/mailman/listinfo/bind-users) or in the #bind
# with or without modifications, as long as this notice is preserved. channel of the Freenode IRC service.]])
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
m4_include([m4/ax_check_openssl.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
+1 -1
View File
@@ -10,4 +10,4 @@
# information regarding copyright ownership. # information regarding copyright ownership.
# Run this script after modifying configure.in to generate configure # Run this script after modifying configure.in to generate configure
autoreconf -f -i autoreconf -i
+5 -5
View File
@@ -16,15 +16,15 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@ @BIND9_MAKE_INCLUDES@
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \ CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
${ISC_INCLUDES} @OPENSSL_INCLUDES@ ${ISC_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS = CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@ ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@ ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@ BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@ NSLIBS = ../../lib/ns/libns.@A@
@@ -88,12 +88,12 @@ install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir} ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir} ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f named-compilezone@EXEEXT@; ${LINK_PROGRAM} named-checkzone@EXEEXT@ named-compilezone@EXEEXT@) (cd ${DESTDIR}${sbindir}; rm -f named-compilezone@EXEEXT@; ${LINK_PROGRAM} named-checkzone@EXEEXT@ named-compilezone@EXEEXT@)
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
(cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8) (cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8)
uninstall:: uninstall::
rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8 rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
rm -f ${DESTDIR}${sbindir}/named-compilezone@EXEEXT@ rm -f ${DESTDIR}${sbindir}/named-compilezone@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkconf@EXEEXT@ ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkconf@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@ ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@
+64 -45
View File
@@ -14,9 +14,7 @@
#include <config.h> #include <config.h>
#include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <inttypes.h>
#ifdef _WIN32 #ifdef _WIN32
#include <Winsock2.h> #include <Winsock2.h>
@@ -62,6 +60,14 @@
#define CHECK_LOCAL 1 #define CHECK_LOCAL 1
#endif #endif
#ifdef HAVE_ADDRINFO
#ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAISTRERROR
#define USE_GETADDRINFO
#endif
#endif
#endif
#define CHECK(r) \ #define CHECK(r) \
do { \ do { \
result = (r); \ result = (r); \
@@ -82,15 +88,15 @@ static const char *dbtype[] = { "rbt" };
int debug = 0; int debug = 0;
const char *journal = NULL; const char *journal = NULL;
bool nomerge = true; isc_boolean_t nomerge = ISC_TRUE;
#if CHECK_LOCAL #if CHECK_LOCAL
bool docheckmx = true; isc_boolean_t docheckmx = ISC_TRUE;
bool dochecksrv = true; isc_boolean_t dochecksrv = ISC_TRUE;
bool docheckns = true; isc_boolean_t docheckns = ISC_TRUE;
#else #else
bool docheckmx = false; isc_boolean_t docheckmx = ISC_FALSE;
bool dochecksrv = false; isc_boolean_t dochecksrv = ISC_FALSE;
bool docheckns = false; isc_boolean_t docheckns = ISC_FALSE;
#endif #endif
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS | dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKMX | DNS_ZONEOPT_CHECKMX |
@@ -136,7 +142,7 @@ add(char *key, int value) {
if (symtab == NULL) { if (symtab == NULL) {
result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx, result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
false, &symtab); ISC_FALSE, &symtab);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return; return;
} }
@@ -152,31 +158,32 @@ add(char *key, int value) {
isc_mem_free(sym_mctx, key); isc_mem_free(sym_mctx, key);
} }
static bool static isc_boolean_t
logged(char *key, int value) { logged(char *key, int value) {
isc_result_t result; isc_result_t result;
if (symtab == NULL) if (symtab == NULL)
return (false); return (ISC_FALSE);
result = isc_symtab_lookup(symtab, key, value, NULL); result = isc_symtab_lookup(symtab, key, value, NULL);
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
return (true); return (ISC_TRUE);
return (false); return (ISC_FALSE);
} }
static bool static isc_boolean_t
checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner, checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
dns_rdataset_t *a, dns_rdataset_t *aaaa) dns_rdataset_t *a, dns_rdataset_t *aaaa)
{ {
#ifdef USE_GETADDRINFO
dns_rdataset_t *rdataset; dns_rdataset_t *rdataset;
dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_t rdata = DNS_RDATA_INIT;
struct addrinfo hints, *ai, *cur; struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1]; char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE]; char ownerbuf[DNS_NAME_FORMATSIZE];
char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")]; char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")];
bool answer = true; isc_boolean_t answer = ISC_TRUE;
bool match; isc_boolean_t match;
const char *type; const char *type;
void *ptr = NULL; void *ptr = NULL;
int result; int result;
@@ -225,7 +232,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
ownerbuf, namebuf, ownerbuf, namebuf,
cur->ai_canonname); cur->ai_canonname);
/* XXX950 make fatal for 9.5.0 */ /* XXX950 make fatal for 9.5.0 */
/* answer = false; */ /* answer = ISC_FALSE; */
add(namebuf, ERR_IS_CNAME); add(namebuf, ERR_IS_CNAME);
} }
break; break;
@@ -241,7 +248,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
add(namebuf, ERR_NO_ADDRESSES); add(namebuf, ERR_NO_ADDRESSES);
} }
/* XXX950 make fatal for 9.5.0 */ /* XXX950 make fatal for 9.5.0 */
return (true); return (ISC_TRUE);
default: default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) { if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -250,7 +257,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
namebuf, gai_strerror(result)); namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE); add(namebuf, ERR_LOOKUP_FAILURE);
} }
return (true); return (ISC_TRUE);
} }
/* /*
@@ -261,13 +268,13 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
result = dns_rdataset_first(a); result = dns_rdataset_first(a);
while (result == ISC_R_SUCCESS) { while (result == ISC_R_SUCCESS) {
dns_rdataset_current(a, &rdata); dns_rdataset_current(a, &rdata);
match = false; match = ISC_FALSE;
for (cur = ai; cur != NULL; cur = cur->ai_next) { for (cur = ai; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET) if (cur->ai_family != AF_INET)
continue; continue;
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr; ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
if (memcmp(ptr, rdata.data, rdata.length) == 0) { if (memcmp(ptr, rdata.data, rdata.length) == 0) {
match = true; match = ISC_TRUE;
break; break;
} }
} }
@@ -279,7 +286,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
addrbuf, sizeof(addrbuf))); addrbuf, sizeof(addrbuf)));
add(namebuf, ERR_EXTRA_A); add(namebuf, ERR_EXTRA_A);
/* XXX950 make fatal for 9.5.0 */ /* XXX950 make fatal for 9.5.0 */
/* answer = false; */ /* answer = ISC_FALSE; */
} }
dns_rdata_reset(&rdata); dns_rdata_reset(&rdata);
result = dns_rdataset_next(a); result = dns_rdataset_next(a);
@@ -291,13 +298,13 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
result = dns_rdataset_first(aaaa); result = dns_rdataset_first(aaaa);
while (result == ISC_R_SUCCESS) { while (result == ISC_R_SUCCESS) {
dns_rdataset_current(aaaa, &rdata); dns_rdataset_current(aaaa, &rdata);
match = false; match = ISC_FALSE;
for (cur = ai; cur != NULL; cur = cur->ai_next) { for (cur = ai; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET6) if (cur->ai_family != AF_INET6)
continue; continue;
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr; ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
if (memcmp(ptr, rdata.data, rdata.length) == 0) { if (memcmp(ptr, rdata.data, rdata.length) == 0) {
match = true; match = ISC_TRUE;
break; break;
} }
} }
@@ -309,7 +316,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
addrbuf, sizeof(addrbuf))); addrbuf, sizeof(addrbuf)));
add(namebuf, ERR_EXTRA_AAAA); add(namebuf, ERR_EXTRA_AAAA);
/* XXX950 make fatal for 9.5.0. */ /* XXX950 make fatal for 9.5.0. */
/* answer = false; */ /* answer = ISC_FALSE; */
} }
dns_rdata_reset(&rdata); dns_rdata_reset(&rdata);
result = dns_rdataset_next(aaaa); result = dns_rdataset_next(aaaa);
@@ -320,7 +327,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
* Check that all addresses appear in the glue. * Check that all addresses appear in the glue.
*/ */
if (!logged(namebuf, ERR_MISSING_GLUE)) { if (!logged(namebuf, ERR_MISSING_GLUE)) {
bool missing_glue = false; isc_boolean_t missing_glue = ISC_FALSE;
for (cur = ai; cur != NULL; cur = cur->ai_next) { for (cur = ai; cur != NULL; cur = cur->ai_next) {
switch (cur->ai_family) { switch (cur->ai_family) {
case AF_INET: case AF_INET:
@@ -336,7 +343,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
default: default:
continue; continue;
} }
match = false; match = ISC_FALSE;
if (dns_rdataset_isassociated(rdataset)) if (dns_rdataset_isassociated(rdataset))
result = dns_rdataset_first(rdataset); result = dns_rdataset_first(rdataset);
else else
@@ -344,7 +351,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
while (result == ISC_R_SUCCESS && !match) { while (result == ISC_R_SUCCESS && !match) {
dns_rdataset_current(rdataset, &rdata); dns_rdataset_current(rdataset, &rdata);
if (memcmp(ptr, rdata.data, rdata.length) == 0) if (memcmp(ptr, rdata.data, rdata.length) == 0)
match = true; match = ISC_TRUE;
dns_rdata_reset(&rdata); dns_rdata_reset(&rdata);
result = dns_rdataset_next(rdataset); result = dns_rdataset_next(rdataset);
} }
@@ -355,8 +362,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
inet_ntop(cur->ai_family, ptr, inet_ntop(cur->ai_family, ptr,
addrbuf, sizeof(addrbuf))); addrbuf, sizeof(addrbuf)));
/* XXX950 make fatal for 9.5.0. */ /* XXX950 make fatal for 9.5.0. */
/* answer = false; */ /* answer = ISC_FALSE; */
missing_glue = true; missing_glue = ISC_TRUE;
} }
} }
if (missing_glue) if (missing_glue)
@@ -364,16 +371,20 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
} }
freeaddrinfo(ai); freeaddrinfo(ai);
return (answer); return (answer);
#else
return (ISC_TRUE);
#endif
} }
static bool static isc_boolean_t
checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) { checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
#ifdef USE_GETADDRINFO
struct addrinfo hints, *ai, *cur; struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1]; char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE]; char ownerbuf[DNS_NAME_FORMATSIZE];
int result; int result;
int level = ISC_LOG_ERROR; int level = ISC_LOG_ERROR;
bool answer = true; isc_boolean_t answer = ISC_TRUE;
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME; hints.ai_flags = AI_CANONNAME;
@@ -417,7 +428,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_IS_MXCNAME); add(namebuf, ERR_IS_MXCNAME);
} }
if (level == ISC_LOG_ERROR) if (level == ISC_LOG_ERROR)
answer = false; answer = ISC_FALSE;
} }
} }
freeaddrinfo(ai); freeaddrinfo(ai);
@@ -435,7 +446,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_NO_ADDRESSES); add(namebuf, ERR_NO_ADDRESSES);
} }
/* XXX950 make fatal for 9.5.0. */ /* XXX950 make fatal for 9.5.0. */
return (true); return (ISC_TRUE);
default: default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) { if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -444,18 +455,22 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
namebuf, gai_strerror(result)); namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE); add(namebuf, ERR_LOOKUP_FAILURE);
} }
return (true); return (ISC_TRUE);
} }
#else
return (ISC_TRUE);
#endif
} }
static bool static isc_boolean_t
checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) { checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
#ifdef USE_GETADDRINFO
struct addrinfo hints, *ai, *cur; struct addrinfo hints, *ai, *cur;
char namebuf[DNS_NAME_FORMATSIZE + 1]; char namebuf[DNS_NAME_FORMATSIZE + 1];
char ownerbuf[DNS_NAME_FORMATSIZE]; char ownerbuf[DNS_NAME_FORMATSIZE];
int result; int result;
int level = ISC_LOG_ERROR; int level = ISC_LOG_ERROR;
bool answer = true; isc_boolean_t answer = ISC_TRUE;
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME; hints.ai_flags = AI_CANONNAME;
@@ -498,7 +513,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_IS_SRVCNAME); add(namebuf, ERR_IS_SRVCNAME);
} }
if (level == ISC_LOG_ERROR) if (level == ISC_LOG_ERROR)
answer = false; answer = ISC_FALSE;
} }
} }
freeaddrinfo(ai); freeaddrinfo(ai);
@@ -516,7 +531,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
add(namebuf, ERR_NO_ADDRESSES); add(namebuf, ERR_NO_ADDRESSES);
} }
/* XXX950 make fatal for 9.5.0. */ /* XXX950 make fatal for 9.5.0. */
return (true); return (ISC_TRUE);
default: default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) { if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
@@ -525,8 +540,11 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
namebuf, gai_strerror(result)); namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE); add(namebuf, ERR_LOOKUP_FAILURE);
} }
return (true); return (ISC_TRUE);
} }
#else
return (ISC_TRUE);
#endif
} }
isc_result_t isc_result_t
@@ -632,7 +650,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
if (dbiter != NULL) if (dbiter != NULL)
dns_dbiterator_destroy(&dbiter); dns_dbiterator_destroy(&dbiter);
if (version != NULL) if (version != NULL)
dns_db_closeversion(db, &version, false); dns_db_closeversion(db, &version, ISC_FALSE);
if (db != NULL) if (db != NULL)
dns_db_detach(&db); dns_db_detach(&db);
@@ -679,7 +697,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
CHECK(dns_rdataclass_fromtext(&rdclass, &region)); CHECK(dns_rdataclass_fromtext(&rdclass, &region));
dns_zone_setclass(zone, rdclass); dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, zone_options, true); dns_zone_setoption(zone, zone_options, ISC_TRUE);
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge); dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
dns_zone_setmaxttl(zone, maxttl); dns_zone_setmaxttl(zone, maxttl);
@@ -691,7 +709,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
if (dochecksrv) if (dochecksrv)
dns_zone_setchecksrv(zone, checksrv); dns_zone_setchecksrv(zone, checksrv);
CHECK(dns_zone_load(zone, false)); CHECK(dns_zone_load(zone));
/* /*
* When loading map files we can't catch oversize TTLs during * When loading map files we can't catch oversize TTLs during
@@ -716,7 +734,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
isc_result_t isc_result_t
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename, dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
dns_masterformat_t fileformat, const dns_master_style_t *style, dns_masterformat_t fileformat, const dns_master_style_t *style,
const uint32_t rawversion) const isc_uint32_t rawversion)
{ {
isc_result_t result; isc_result_t result;
FILE *output = stdout; FILE *output = stdout;
@@ -771,3 +789,4 @@ DestroySockets(void) {
WSACleanup(); WSACleanup();
} }
#endif #endif
+5 -8
View File
@@ -15,9 +15,6 @@
/*! \file */ /*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <isc/lang.h> #include <isc/lang.h>
#include <isc/stdio.h> #include <isc/stdio.h>
#include <isc/types.h> #include <isc/types.h>
@@ -39,7 +36,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
isc_result_t isc_result_t
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename, dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
dns_masterformat_t fileformat, const dns_master_style_t *style, dns_masterformat_t fileformat, const dns_master_style_t *style,
const uint32_t rawversion); const isc_uint32_t rawversion);
#ifdef _WIN32 #ifdef _WIN32
void InitSockets(void); void InitSockets(void);
@@ -48,10 +45,10 @@ void DestroySockets(void);
extern int debug; extern int debug;
extern const char *journal; extern const char *journal;
extern bool nomerge; extern isc_boolean_t nomerge;
extern bool docheckmx; extern isc_boolean_t docheckmx;
extern bool docheckns; extern isc_boolean_t docheckns;
extern bool dochecksrv; extern isc_boolean_t dochecksrv;
extern dns_zoneopt_t zone_options; extern dns_zoneopt_t zone_options;
ISC_LANG_ENDDECLS ISC_LANG_ENDDECLS
+22 -23
View File
@@ -15,7 +15,6 @@
#include <config.h> #include <config.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@@ -92,18 +91,18 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
static bool static isc_boolean_t
get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) { get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i; int i;
for (i = 0;; i++) { for (i = 0;; i++) {
if (maps[i] == NULL) if (maps[i] == NULL)
return (false); return (ISC_FALSE);
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS) if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
return (true); return (ISC_TRUE);
} }
} }
static bool static isc_boolean_t
get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) { get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
const cfg_listelt_t *element; const cfg_listelt_t *element;
const cfg_obj_t *checknames; const cfg_obj_t *checknames;
@@ -114,14 +113,14 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
for (i = 0;; i++) { for (i = 0;; i++) {
if (maps[i] == NULL) if (maps[i] == NULL)
return (false); return (ISC_FALSE);
checknames = NULL; checknames = NULL;
result = cfg_map_get(maps[i], "check-names", &checknames); result = cfg_map_get(maps[i], "check-names", &checknames);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
continue; continue;
if (checknames != NULL && !cfg_obj_islist(checknames)) { if (checknames != NULL && !cfg_obj_islist(checknames)) {
*obj = checknames; *obj = checknames;
return (true); return (ISC_TRUE);
} }
for (element = cfg_list_first(checknames); for (element = cfg_list_first(checknames);
element != NULL; element != NULL;
@@ -136,7 +135,7 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
continue; continue;
} }
*obj = cfg_tuple_get(value, "mode"); *obj = cfg_tuple_get(value, "mode");
return (true); return (ISC_TRUE);
} }
} }
} }
@@ -169,7 +168,7 @@ configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
static isc_result_t static isc_result_t
configure_zone(const char *vclass, const char *view, configure_zone(const char *vclass, const char *view,
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig, const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
const cfg_obj_t *config, isc_mem_t *mctx, bool list) const cfg_obj_t *config, isc_mem_t *mctx, isc_boolean_t list)
{ {
int i = 0; int i = 0;
isc_result_t result; isc_result_t result;
@@ -421,7 +420,7 @@ configure_zone(const char *vclass, const char *view,
/*% configure a view */ /*% configure a view */
static isc_result_t static isc_result_t
configure_view(const char *vclass, const char *view, const cfg_obj_t *config, configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
const cfg_obj_t *vconfig, isc_mem_t *mctx, bool list) const cfg_obj_t *vconfig, isc_mem_t *mctx, isc_boolean_t list)
{ {
const cfg_listelt_t *element; const cfg_listelt_t *element;
const cfg_obj_t *voptions; const cfg_obj_t *voptions;
@@ -470,7 +469,7 @@ config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
/*% load zones from the configuration */ /*% load zones from the configuration */
static isc_result_t static isc_result_t
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx, load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
bool list_zones) isc_boolean_t list_zones)
{ {
const cfg_listelt_t *element; const cfg_listelt_t *element;
const cfg_obj_t *views; const cfg_obj_t *views;
@@ -538,12 +537,12 @@ main(int argc, char **argv) {
isc_mem_t *mctx = NULL; isc_mem_t *mctx = NULL;
isc_result_t result; isc_result_t result;
int exit_status = 0; int exit_status = 0;
bool load_zones = false; isc_boolean_t load_zones = ISC_FALSE;
bool list_zones = false; isc_boolean_t list_zones = ISC_FALSE;
bool print = false; isc_boolean_t print = ISC_FALSE;
unsigned int flags = 0; unsigned int flags = 0;
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
/* /*
* Process memory debugging argument first. * Process memory debugging argument first.
@@ -567,7 +566,7 @@ main(int argc, char **argv) {
break; break;
} }
} }
isc_commandline_reset = true; isc_commandline_reset = ISC_TRUE;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
@@ -578,11 +577,11 @@ main(int argc, char **argv) {
break; break;
case 'j': case 'j':
nomerge = false; nomerge = ISC_FALSE;
break; break;
case 'l': case 'l':
list_zones = true; list_zones = ISC_TRUE;
break; break;
case 'm': case 'm':
@@ -598,7 +597,7 @@ main(int argc, char **argv) {
break; break;
case 'p': case 'p':
print = true; print = ISC_TRUE;
break; break;
case 'v': case 'v':
@@ -610,10 +609,10 @@ main(int argc, char **argv) {
break; break;
case 'z': case 'z':
load_zones = true; load_zones = ISC_TRUE;
docheckmx = false; docheckmx = ISC_FALSE;
docheckns = false; docheckns = ISC_FALSE;
dochecksrv = false; dochecksrv = ISC_FALSE;
break; break;
case '?': case '?':
+23 -25
View File
@@ -14,9 +14,7 @@
#include <config.h> #include <config.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h>
#include <isc/app.h> #include <isc/app.h>
#include <isc/commandline.h> #include <isc/commandline.h>
@@ -108,10 +106,10 @@ main(int argc, char **argv) {
dns_masterformat_t inputformat = dns_masterformat_text; dns_masterformat_t inputformat = dns_masterformat_text;
dns_masterformat_t outputformat = dns_masterformat_text; dns_masterformat_t outputformat = dns_masterformat_text;
dns_masterrawheader_t header; dns_masterrawheader_t header;
uint32_t rawversion = 1, serialnum = 0; isc_uint32_t rawversion = 1, serialnum = 0;
dns_ttl_t maxttl = 0; dns_ttl_t maxttl = 0;
bool snset = false; isc_boolean_t snset = ISC_FALSE;
bool logdump = false; isc_boolean_t logdump = ISC_FALSE;
FILE *errout = stdout; FILE *errout = stdout;
char *endp; char *endp;
@@ -161,7 +159,7 @@ main(int argc, char **argv) {
#define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0) #define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0)
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
while ((c = isc_commandline_parse(argc, argv, while ((c = isc_commandline_parse(argc, argv,
"c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:")) "c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:"))
@@ -179,33 +177,33 @@ main(int argc, char **argv) {
if (ARGCMP("full")) { if (ARGCMP("full")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY | zone_options |= DNS_ZONEOPT_CHECKINTEGRITY |
DNS_ZONEOPT_CHECKSIBLING; DNS_ZONEOPT_CHECKSIBLING;
docheckmx = true; docheckmx = ISC_TRUE;
docheckns = true; docheckns = ISC_TRUE;
dochecksrv = true; dochecksrv = ISC_TRUE;
} else if (ARGCMP("full-sibling")) { } else if (ARGCMP("full-sibling")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY; zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING; zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = true; docheckmx = ISC_TRUE;
docheckns = true; docheckns = ISC_TRUE;
dochecksrv = true; dochecksrv = ISC_TRUE;
} else if (ARGCMP("local")) { } else if (ARGCMP("local")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY; zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options |= DNS_ZONEOPT_CHECKSIBLING; zone_options |= DNS_ZONEOPT_CHECKSIBLING;
docheckmx = false; docheckmx = ISC_FALSE;
docheckns = false; docheckns = ISC_FALSE;
dochecksrv = false; dochecksrv = ISC_FALSE;
} else if (ARGCMP("local-sibling")) { } else if (ARGCMP("local-sibling")) {
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY; zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING; zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = false; docheckmx = ISC_FALSE;
docheckns = false; docheckns = ISC_FALSE;
dochecksrv = false; dochecksrv = ISC_FALSE;
} else if (ARGCMP("none")) { } else if (ARGCMP("none")) {
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY; zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING; zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
docheckmx = false; docheckmx = ISC_FALSE;
docheckns = false; docheckns = ISC_FALSE;
dochecksrv = false; dochecksrv = ISC_FALSE;
} else { } else {
fprintf(stderr, "invalid argument to -i: %s\n", fprintf(stderr, "invalid argument to -i: %s\n",
isc_commandline_argument); isc_commandline_argument);
@@ -222,12 +220,12 @@ main(int argc, char **argv) {
break; break;
case 'j': case 'j':
nomerge = false; nomerge = ISC_FALSE;
break; break;
case 'J': case 'J':
journal = isc_commandline_argument; journal = isc_commandline_argument;
nomerge = false; nomerge = ISC_FALSE;
break; break;
case 'k': case 'k':
@@ -248,7 +246,7 @@ main(int argc, char **argv) {
break; break;
case 'L': case 'L':
snset = true; snset = ISC_TRUE;
endp = NULL; endp = NULL;
serialnum = strtol(isc_commandline_argument, &endp, 0); serialnum = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0') { if (*endp != '\0') {
@@ -507,7 +505,7 @@ main(int argc, char **argv) {
strcmp(output_filename, "/dev/fd/1") == 0 || strcmp(output_filename, "/dev/fd/1") == 0 ||
strcmp(output_filename, "/dev/stdout") == 0)) { strcmp(output_filename, "/dev/stdout") == 0)) {
errout = stderr; errout = stderr;
logdump = false; logdump = ISC_FALSE;
} }
if (isc_commandline_index + 2 != argc) if (isc_commandline_index + 2 != argc)
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
+2 -2
View File
@@ -58,7 +58,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -80,7 +80,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <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> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration) <Command>cd ..\..\..\Build\$(Configuration)
@@ -87,7 +87,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -105,7 +105,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <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> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
+2 -2
View File
@@ -27,8 +27,8 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@ ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@ ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@ ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@ BIND9LIBS = ../../lib/bind9/libbind9.@A@
+11 -11
View File
@@ -19,15 +19,15 @@
#include <config.h> #include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h>
#include <isc/assertions.h> #include <isc/assertions.h>
#include <isc/base64.h> #include <isc/base64.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/file.h> #include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/net.h> #include <isc/net.h>
#include <isc/print.h> #include <isc/print.h>
@@ -36,7 +36,7 @@
#include <isc/time.h> #include <isc/time.h>
#include <isc/util.h> #include <isc/util.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
@@ -56,7 +56,7 @@
static char program[256]; static char program[256];
const char *progname; const char *progname;
static enum { progmode_keygen, progmode_confgen} progmode; static enum { progmode_keygen, progmode_confgen} progmode;
bool verbose = false; /* needed by util.c but not used here */ isc_boolean_t verbose = ISC_FALSE; /* needed by util.c but not used here */
ISC_PLATFORM_NORETURN_PRE static void ISC_PLATFORM_NORETURN_PRE static void
usage(int status) ISC_PLATFORM_NORETURN_POST; usage(int status) ISC_PLATFORM_NORETURN_POST;
@@ -87,8 +87,8 @@ Usage:\n\
int int
main(int argc, char **argv) { main(int argc, char **argv) {
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
bool show_final_mem = false; isc_boolean_t show_final_mem = ISC_FALSE;
bool quiet = false; isc_boolean_t quiet = ISC_FALSE;
isc_buffer_t key_txtbuffer; isc_buffer_t key_txtbuffer;
char key_txtsecret[256]; char key_txtsecret[256];
isc_mem_t *mctx = NULL; isc_mem_t *mctx = NULL;
@@ -102,7 +102,7 @@ main(int argc, char **argv) {
int len = 0; int len = 0;
int ch; int ch;
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
@@ -124,13 +124,13 @@ main(int argc, char **argv) {
if (PROGCMP("tsig-keygen")) { if (PROGCMP("tsig-keygen")) {
progmode = progmode_keygen; progmode = progmode_keygen;
quiet = true; quiet = ISC_TRUE;
} else if (PROGCMP("ddns-confgen")) } else if (PROGCMP("ddns-confgen"))
progmode = progmode_confgen; progmode = progmode_confgen;
else else
INSIST(0); INSIST(0);
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv, while ((ch = isc_commandline_parse(argc, argv,
"a:hk:Mmr:qs:y:z:")) != -1) { "a:hk:Mmr:qs:y:z:")) != -1) {
@@ -155,11 +155,11 @@ main(int argc, char **argv) {
isc_mem_debugging = ISC_MEM_DEBUGTRACE; isc_mem_debugging = ISC_MEM_DEBUGTRACE;
break; break;
case 'm': case 'm':
show_final_mem = true; show_final_mem = ISC_TRUE;
break; break;
case 'q': case 'q':
if (progmode == progmode_confgen) if (progmode == progmode_confgen)
quiet = true; quiet = ISC_TRUE;
else else
usage(1); usage(1);
break; break;
+8
View File
@@ -20,6 +20,7 @@
#include <isc/base64.h> #include <isc/base64.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/file.h> #include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/print.h> #include <isc/print.h>
#include <isc/result.h> #include <isc/result.h>
@@ -42,8 +43,10 @@
const char * const char *
alg_totext(dns_secalg_t alg) { alg_totext(dns_secalg_t alg) {
switch (alg) { switch (alg) {
#ifndef PK11_MD5_DISABLE
case DST_ALG_HMACMD5: case DST_ALG_HMACMD5:
return "hmac-md5"; return "hmac-md5";
#endif
case DST_ALG_HMACSHA1: case DST_ALG_HMACSHA1:
return "hmac-sha1"; return "hmac-sha1";
case DST_ALG_HMACSHA224: case DST_ALG_HMACSHA224:
@@ -68,8 +71,10 @@ alg_fromtext(const char *name) {
if (strncasecmp(p, "hmac-", 5) == 0) if (strncasecmp(p, "hmac-", 5) == 0)
p = &name[5]; p = &name[5];
#ifndef PK11_MD5_DISABLE
if (strcasecmp(p, "md5") == 0) if (strcasecmp(p, "md5") == 0)
return DST_ALG_HMACMD5; return DST_ALG_HMACMD5;
#endif
if (strcasecmp(p, "sha1") == 0) if (strcasecmp(p, "sha1") == 0)
return DST_ALG_HMACSHA1; return DST_ALG_HMACSHA1;
if (strcasecmp(p, "sha224") == 0) if (strcasecmp(p, "sha224") == 0)
@@ -119,7 +124,9 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
dst_key_t *key = NULL; dst_key_t *key = NULL;
switch (alg) { switch (alg) {
#ifndef PK11_MD5_DISABLE
case DST_ALG_HMACMD5: case DST_ALG_HMACMD5:
#endif
case DST_ALG_HMACSHA1: case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224: case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256: case DST_ALG_HMACSHA256:
@@ -191,3 +198,4 @@ write_key_file(const char *keyfile, const char *user,
fatal("fclose(%s) failed\n", keyfile); fatal("fclose(%s) failed\n", keyfile);
fprintf(stderr, "wrote key file \"%s\"\n", keyfile); fprintf(stderr, "wrote key file \"%s\"\n", keyfile);
} }
+9 -9
View File
@@ -22,15 +22,15 @@
#include <config.h> #include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h>
#include <isc/assertions.h> #include <isc/assertions.h>
#include <isc/base64.h> #include <isc/base64.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/commandline.h> #include <isc/commandline.h>
#include <isc/file.h> #include <isc/file.h>
#include <isc/keyboard.h>
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/net.h> #include <isc/net.h>
#include <isc/print.h> #include <isc/print.h>
@@ -57,7 +57,7 @@
static char program[256]; static char program[256];
const char *progname; const char *progname;
bool verbose = false; isc_boolean_t verbose = ISC_FALSE;
const char *keyfile, *keydef; const char *keyfile, *keydef;
@@ -87,7 +87,7 @@ Usage:\n\
int int
main(int argc, char **argv) { main(int argc, char **argv) {
bool show_final_mem = false; isc_boolean_t show_final_mem = ISC_FALSE;
isc_buffer_t key_txtbuffer; isc_buffer_t key_txtbuffer;
char key_txtsecret[256]; char key_txtsecret[256];
isc_mem_t *mctx = NULL; isc_mem_t *mctx = NULL;
@@ -104,7 +104,7 @@ main(int argc, char **argv) {
struct in6_addr addr6_dummy; struct in6_addr addr6_dummy;
char *chrootdir = NULL; char *chrootdir = NULL;
char *user = NULL; char *user = NULL;
bool keyonly = false; isc_boolean_t keyonly = ISC_FALSE;
int len; int len;
keydef = keyfile = RNDC_KEYFILE; keydef = keyfile = RNDC_KEYFILE;
@@ -119,14 +119,14 @@ main(int argc, char **argv) {
serveraddr = DEFAULT_SERVER; serveraddr = DEFAULT_SERVER;
port = DEFAULT_PORT; port = DEFAULT_PORT;
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv, while ((ch = isc_commandline_parse(argc, argv,
"aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1) "aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1)
{ {
switch (ch) { switch (ch) {
case 'a': case 'a':
keyonly = true; keyonly = ISC_TRUE;
break; break;
case 'A': case 'A':
algname = isc_commandline_argument; algname = isc_commandline_argument;
@@ -153,7 +153,7 @@ main(int argc, char **argv) {
break; break;
case 'm': case 'm':
show_final_mem = true; show_final_mem = ISC_TRUE;
break; break;
case 'p': case 'p':
port = strtol(isc_commandline_argument, &p, 10); port = strtol(isc_commandline_argument, &p, 10);
@@ -177,7 +177,7 @@ main(int argc, char **argv) {
user = isc_commandline_argument; user = isc_commandline_argument;
break; break;
case 'V': case 'V':
verbose = true; verbose = ISC_TRUE;
break; break;
case '?': case '?':
if (isc_commandline_option != '?') { if (isc_commandline_option != '?') {
+2 -2
View File
@@ -15,15 +15,15 @@
#include <config.h> #include <config.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <isc/boolean.h>
#include <isc/print.h> #include <isc/print.h>
#include "util.h" #include "util.h"
extern bool verbose; extern isc_boolean_t verbose;
extern const char *progname; extern const char *progname;
void void
+2 -2
View File
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration) <Command>cd ..\..\..\Build\$(Configuration)
@@ -106,7 +106,7 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration) <Command>cd ..\..\..\Build\$(Configuration)
+2 -2
View File
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>confgentool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+3 -3
View File
@@ -16,7 +16,7 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@ @BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \ CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @OPENSSL_INCLUDES@ ${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = -DVERSION=\"${VERSION}\" \ CDEFINES = -DVERSION=\"${VERSION}\" \
-DSYSCONFDIR=\"${sysconfdir}\" -DSYSCONFDIR=\"${sysconfdir}\"
@@ -24,8 +24,8 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@ ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@ ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@ IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+74 -76
View File
@@ -24,9 +24,7 @@
#include <netdb.h> #include <netdb.h>
#endif #endif
#include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <inttypes.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
@@ -96,40 +94,40 @@ static const char *port = "53";
static isc_sockaddr_t *srcaddr4 = NULL, *srcaddr6 = NULL; static isc_sockaddr_t *srcaddr4 = NULL, *srcaddr6 = NULL;
static isc_sockaddr_t a4, a6; static isc_sockaddr_t a4, a6;
static char *curqname = NULL, *qname = NULL; static char *curqname = NULL, *qname = NULL;
static bool classset = false; static isc_boolean_t classset = ISC_FALSE;
static dns_rdatatype_t qtype = dns_rdatatype_none; static dns_rdatatype_t qtype = dns_rdatatype_none;
static bool typeset = false; static isc_boolean_t typeset = ISC_FALSE;
static unsigned int styleflags = 0; static unsigned int styleflags = 0;
static uint32_t splitwidth = 0xffffffff; static isc_uint32_t splitwidth = 0xffffffff;
static bool static isc_boolean_t
showcomments = true, showcomments = ISC_TRUE,
showdnssec = true, showdnssec = ISC_TRUE,
showtrust = true, showtrust = ISC_TRUE,
rrcomments = true, rrcomments = ISC_TRUE,
noclass = false, noclass = ISC_FALSE,
nocrypto = false, nocrypto = ISC_FALSE,
nottl = false, nottl = ISC_FALSE,
multiline = false, multiline = ISC_FALSE,
short_form = false, short_form = ISC_FALSE,
print_unknown_format = false; print_unknown_format = ISC_FALSE;
static bool static isc_boolean_t
resolve_trace = false, resolve_trace = ISC_FALSE,
validator_trace = false, validator_trace = ISC_FALSE,
message_trace = false; message_trace = ISC_FALSE;
static bool static isc_boolean_t
use_ipv4 = true, use_ipv4 = ISC_TRUE,
use_ipv6 = true; use_ipv6 = ISC_TRUE;
static bool static isc_boolean_t
cdflag = false, cdflag = ISC_FALSE,
no_sigs = false, no_sigs = ISC_FALSE,
root_validation = true, root_validation = ISC_TRUE,
dlv_validation = true; dlv_validation = ISC_TRUE;
static bool use_tcp = false; static isc_boolean_t use_tcp = ISC_FALSE;
static char *anchorfile = NULL; static char *anchorfile = NULL;
static char *trust_anchor = NULL; static char *trust_anchor = NULL;
@@ -146,10 +144,10 @@ static char anchortext[] = MANAGED_KEYS;
* Static function prototypes * Static function prototypes
*/ */
static isc_result_t static isc_result_t
get_reverse(char *reverse, size_t len, char *value, bool strict); get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict);
static isc_result_t static isc_result_t
parse_uint(uint32_t *uip, const char *value, uint32_t max, parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
const char *desc); const char *desc);
static void static void
@@ -410,7 +408,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
{ {
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
static dns_trust_t trust; static dns_trust_t trust;
static bool first = true; static isc_boolean_t first = ISC_TRUE;
isc_buffer_t target; isc_buffer_t target;
isc_region_t r; isc_region_t r;
char *t = NULL; char *t = NULL;
@@ -432,7 +430,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
putchar('\n'); putchar('\n');
print_status(rdataset); print_status(rdataset);
trust = rdataset->trust; trust = rdataset->trust;
first = false; first = ISC_FALSE;
} }
do { do {
@@ -568,7 +566,7 @@ convert_name(dns_fixedname_t *fn, dns_name_t **name, const char *text) {
static isc_result_t static isc_result_t
key_fromconfig(const cfg_obj_t *key, dns_client_t *client) { key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
dns_rdata_dnskey_t keystruct; dns_rdata_dnskey_t keystruct;
uint32_t flags, proto, alg; isc_uint32_t flags, proto, alg;
const char *keystr, *keynamestr; const char *keystr, *keynamestr;
unsigned char keydata[4096]; unsigned char keydata[4096];
isc_buffer_t keydatabuf; isc_buffer_t keydatabuf;
@@ -578,7 +576,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
dns_fixedname_t fkeyname; dns_fixedname_t fkeyname;
dns_name_t *keyname; dns_name_t *keyname;
isc_result_t result; isc_result_t result;
bool match_root = false, match_dlv = false; isc_boolean_t match_root = ISC_FALSE, match_dlv = ISC_FALSE;
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name")); keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
CHECK(convert_name(&fkeyname, &keyname, keynamestr)); CHECK(convert_name(&fkeyname, &keyname, keynamestr));
@@ -623,9 +621,9 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
if (alg > 0xff) if (alg > 0xff)
CHECK(ISC_R_RANGE); CHECK(ISC_R_RANGE);
keystruct.flags = (uint16_t)flags; keystruct.flags = (isc_uint16_t)flags;
keystruct.protocol = (uint8_t)proto; keystruct.protocol = (isc_uint8_t)proto;
keystruct.algorithm = (uint8_t)alg; keystruct.algorithm = (isc_uint8_t)alg;
isc_buffer_init(&keydatabuf, keydata, sizeof(keydata)); isc_buffer_init(&keydatabuf, keydata, sizeof(keydata));
isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata)); isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
@@ -780,7 +778,7 @@ addserver(dns_client_t *client) {
struct in6_addr in6; struct in6_addr in6;
isc_sockaddr_t *sa; isc_sockaddr_t *sa;
isc_sockaddrlist_t servers; isc_sockaddrlist_t servers;
uint32_t destport; isc_uint32_t destport;
isc_result_t result; isc_result_t result;
dns_name_t *name = NULL; dns_name_t *name = NULL;
@@ -871,7 +869,7 @@ findserver(dns_client_t *client) {
irs_resconf_t *resconf = NULL; irs_resconf_t *resconf = NULL;
isc_sockaddrlist_t *nameservers; isc_sockaddrlist_t *nameservers;
isc_sockaddr_t *sa, *next; isc_sockaddr_t *sa, *next;
uint32_t destport; isc_uint32_t destport;
result = parse_uint(&destport, port, 0xffff, "port"); result = parse_uint(&destport, port, 0xffff, "port");
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
@@ -946,9 +944,9 @@ cleanup:
} }
static isc_result_t static isc_result_t
parse_uint(uint32_t *uip, const char *value, uint32_t max, parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
const char *desc) { const char *desc) {
uint32_t n; isc_uint32_t n;
isc_result_t result = isc_parse_uint32(&n, value, 10); isc_result_t result = isc_parse_uint32(&n, value, 10);
if (result == ISC_R_SUCCESS && n > max) if (result == ISC_R_SUCCESS && n > max)
result = ISC_R_RANGE; result = ISC_R_RANGE;
@@ -965,7 +963,7 @@ static void
plus_option(char *option) { plus_option(char *option) {
isc_result_t result; isc_result_t result;
char *cmd, *value, *last = NULL; char *cmd, *value, *last = NULL;
bool state = true; isc_boolean_t state = ISC_TRUE;
INSIST(option != NULL); INSIST(option != NULL);
@@ -976,7 +974,7 @@ plus_option(char *option) {
} }
if (strncasecmp(cmd, "no", 2)==0) { if (strncasecmp(cmd, "no", 2)==0) {
cmd += 2; cmd += 2;
state = false; state = ISC_FALSE;
} }
value = strtok_r(NULL, "\0", &last); value = strtok_r(NULL, "\0", &last);
@@ -1003,7 +1001,7 @@ plus_option(char *option) {
break; break;
case 'l': /* class */ case 'l': /* class */
FULLCHECK("class"); FULLCHECK("class");
noclass = !state; noclass = ISC_TF(!state);
break; break;
case 'o': /* comments */ case 'o': /* comments */
FULLCHECK("comments"); FULLCHECK("comments");
@@ -1011,7 +1009,7 @@ plus_option(char *option) {
break; break;
case 'r': /* crypto */ case 'r': /* crypto */
FULLCHECK("crypto"); FULLCHECK("crypto");
nocrypto = !state; nocrypto = ISC_TF(!state);
break; break;
default: default:
goto invalid_option; goto invalid_option;
@@ -1084,10 +1082,10 @@ plus_option(char *option) {
FULLCHECK("short"); FULLCHECK("short");
short_form = state; short_form = state;
if (short_form) { if (short_form) {
multiline = false; multiline = ISC_FALSE;
showcomments = false; showcomments = ISC_FALSE;
showtrust = false; showtrust = ISC_FALSE;
showdnssec = false; showdnssec = ISC_FALSE;
} }
break; break;
case 'p': /* split */ case 'p': /* split */
@@ -1139,7 +1137,7 @@ plus_option(char *option) {
break; break;
case 't': /* ttl */ case 't': /* ttl */
FULLCHECK("ttl"); FULLCHECK("ttl");
nottl = !state; nottl = ISC_TF(!state);
break; break;
default: default:
goto invalid_option; goto invalid_option;
@@ -1167,11 +1165,11 @@ plus_option(char *option) {
* options: "46a:b:c:d:himp:q:t:vx:"; * options: "46a:b:c:d:himp:q:t:vx:";
*/ */
static const char *single_dash_opts = "46himv"; static const char *single_dash_opts = "46himv";
static bool static isc_boolean_t
dash_option(char *option, char *next, bool *open_type_class) { dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
char opt, *value; char opt, *value;
isc_result_t result; isc_result_t result;
bool value_from_next; isc_boolean_t value_from_next;
isc_textregion_t tr; isc_textregion_t tr;
dns_rdatatype_t rdtype; dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
@@ -1179,7 +1177,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
struct in_addr in4; struct in_addr in4;
struct in6_addr in6; struct in6_addr in6;
in_port_t srcport; in_port_t srcport;
uint32_t num; isc_uint32_t num;
char *hash; char *hash;
while (strpbrk(option, single_dash_opts) == &option[0]) { while (strpbrk(option, single_dash_opts) == &option[0]) {
@@ -1195,7 +1193,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
fatal("IPv4 networking not available"); fatal("IPv4 networking not available");
if (use_ipv6) { if (use_ipv6) {
isc_net_disableipv6(); isc_net_disableipv6();
use_ipv6 = false; use_ipv6 = ISC_FALSE;
} }
break; break;
case '6': case '6':
@@ -1203,7 +1201,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
fatal("IPv6 networking not available"); fatal("IPv6 networking not available");
if (use_ipv4) { if (use_ipv4) {
isc_net_disableipv4(); isc_net_disableipv4();
use_ipv4 = false; use_ipv4 = ISC_FALSE;
} }
break; break;
case 'h': case 'h':
@@ -1211,9 +1209,9 @@ dash_option(char *option, char *next, bool *open_type_class) {
exit(0); exit(0);
/* NOTREACHED */ /* NOTREACHED */
case 'i': case 'i':
no_sigs = true; no_sigs = ISC_TRUE;
dlv_validation = false; dlv_validation = ISC_FALSE;
root_validation = false; root_validation = ISC_FALSE;
break; break;
case 'm': case 'm':
/* handled in preparse_args() */ /* handled in preparse_args() */
@@ -1228,14 +1226,14 @@ dash_option(char *option, char *next, bool *open_type_class) {
if (strlen(option) > 1U) if (strlen(option) > 1U)
option = &option[1]; option = &option[1];
else else
return (false); return (ISC_FALSE);
} }
opt = option[0]; opt = option[0];
if (strlen(option) > 1U) { if (strlen(option) > 1U) {
value_from_next = false; value_from_next = ISC_FALSE;
value = &option[1]; value = &option[1];
} else { } else {
value_from_next = true; value_from_next = ISC_TRUE;
value = next; value = next;
} }
if (value == NULL) if (value == NULL)
@@ -1281,13 +1279,13 @@ dash_option(char *option, char *next, bool *open_type_class) {
if (classset) if (classset)
warn("extra query class"); warn("extra query class");
*open_type_class = false; *open_type_class = ISC_FALSE;
tr.base = value; tr.base = value;
tr.length = strlen(value); tr.length = strlen(value);
result = dns_rdataclass_fromtext(&rdclass, result = dns_rdataclass_fromtext(&rdclass,
(isc_textregion_t *)&tr); (isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
classset = true; classset = ISC_TRUE;
else if (rdclass != dns_rdataclass_in) else if (rdclass != dns_rdataclass_in)
warn("ignoring non-IN query class"); warn("ignoring non-IN query class");
else else
@@ -1312,7 +1310,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
fatal("out of memory"); fatal("out of memory");
return (value_from_next); return (value_from_next);
case 't': case 't':
*open_type_class = false; *open_type_class = ISC_FALSE;
tr.base = value; tr.base = value;
tr.length = strlen(value); tr.length = strlen(value);
result = dns_rdatatype_fromtext(&rdtype, result = dns_rdatatype_fromtext(&rdtype,
@@ -1324,13 +1322,13 @@ dash_option(char *option, char *next, bool *open_type_class) {
rdtype == dns_rdatatype_axfr) rdtype == dns_rdatatype_axfr)
fatal("Transfer not supported"); fatal("Transfer not supported");
qtype = rdtype; qtype = rdtype;
typeset = true; typeset = ISC_TRUE;
} else } else
warn("ignoring invalid type"); warn("ignoring invalid type");
return (value_from_next); return (value_from_next);
case 'x': case 'x':
result = get_reverse(textname, sizeof(textname), value, result = get_reverse(textname, sizeof(textname), value,
false); ISC_FALSE);
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
if (curqname != NULL) { if (curqname != NULL) {
isc_mem_free(mctx, curqname); isc_mem_free(mctx, curqname);
@@ -1342,7 +1340,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
if (typeset) if (typeset)
warn("extra query type"); warn("extra query type");
qtype = dns_rdatatype_ptr; qtype = dns_rdatatype_ptr;
typeset = true; typeset = ISC_TRUE;
} else { } else {
fprintf(stderr, "Invalid IP address %s\n", value); fprintf(stderr, "Invalid IP address %s\n", value);
exit(1); exit(1);
@@ -1354,7 +1352,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
usage(); usage();
} }
/* NOTREACHED */ /* NOTREACHED */
return (false); return (ISC_FALSE);
} }
/* /*
@@ -1363,7 +1361,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
*/ */
static void static void
preparse_args(int argc, char **argv) { preparse_args(int argc, char **argv) {
bool ipv4only = false, ipv6only = false; isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
char *option; char *option;
for (argc--, argv++; argc > 0; argc--, argv++) { for (argc--, argv++; argc > 0; argc--, argv++) {
@@ -1380,13 +1378,13 @@ preparse_args(int argc, char **argv) {
if (ipv6only) { if (ipv6only) {
fatal("only one of -4 and -6 allowed"); fatal("only one of -4 and -6 allowed");
} }
ipv4only = true; ipv4only = ISC_TRUE;
break; break;
case '6': case '6':
if (ipv4only) { if (ipv4only) {
fatal("only one of -4 and -6 allowed"); fatal("only one of -4 and -6 allowed");
} }
ipv6only = true; ipv6only = ISC_TRUE;
break; break;
} }
option = &option[1]; option = &option[1];
@@ -1406,7 +1404,7 @@ parse_args(int argc, char **argv) {
isc_textregion_t tr; isc_textregion_t tr;
dns_rdatatype_t rdtype; dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
bool open_type_class = true; isc_boolean_t open_type_class = ISC_TRUE;
for (; argc > 0; argc--, argv++) { for (; argc > 0; argc--, argv++) {
if (argv[0][0] == '@') { if (argv[0][0] == '@') {
@@ -1445,7 +1443,7 @@ parse_args(int argc, char **argv) {
rdtype == dns_rdatatype_axfr) rdtype == dns_rdatatype_axfr)
fatal("Transfer not supported"); fatal("Transfer not supported");
qtype = rdtype; qtype = rdtype;
typeset = true; typeset = ISC_TRUE;
continue; continue;
} }
result = dns_rdataclass_fromtext(&rdclass, result = dns_rdataclass_fromtext(&rdclass,
@@ -1514,7 +1512,7 @@ reverse_octets(const char *in, char **p, char *end) {
} }
static isc_result_t static isc_result_t
get_reverse(char *reverse, size_t len, char *value, bool strict) { get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict) {
int r; int r;
isc_result_t result; isc_result_t result;
isc_netaddr_t addr; isc_netaddr_t addr;
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+6 -8
View File
@@ -19,7 +19,7 @@ READLINE_LIB = @READLINE_LIB@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \ CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISC_INCLUDES} \ ${BIND9_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@ ${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
CDEFINES = -DVERSION=\"${VERSION}\" CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS = CWARNINGS =
@@ -27,8 +27,8 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@ BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@ ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@ ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
IRSLIBS = ../../lib/irs/libirs.@A@ IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
@@ -64,8 +64,6 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@ @BIND9_MAKE_RULES@
LDFLAGS = @LDFLAGS@ @LIBIDN2_LDFLAGS@
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS} dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \ export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \ export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
@@ -101,12 +99,12 @@ install:: dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
nslookup@EXEEXT@ ${DESTDIR}${bindir} nslookup@EXEEXT@ ${DESTDIR}${bindir}
for m in ${MANPAGES}; do \ for m in ${MANPAGES}; do \
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1 || exit 1; \ ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; \
done done
uninstall:: uninstall::
for m in ${MANPAGES}; do \ for m in ${MANPAGES}; do \
rm -f ${DESTDIR}${mandir}/man1/$$m || exit 1; \ rm -f ${DESTDIR}${mandir}/man1/$$m ; \
done done
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nslookup@EXEEXT@ ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/nslookup@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/host@EXEEXT@ ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${bindir}/host@EXEEXT@
+151 -157
View File
@@ -12,9 +12,6 @@
/*! \file */ /*! \file */
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#include <ctype.h> #include <ctype.h>
@@ -64,10 +61,10 @@ static int addresscount = 0;
static char domainopt[DNS_NAME_MAXTEXT]; static char domainopt[DNS_NAME_MAXTEXT];
static char hexcookie[81]; static char hexcookie[81];
static bool short_form = false, printcmd = true, static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
ip6_int = false, plusquest = false, pluscomm = false, ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
ipv4only = false, ipv6only = false; ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
static uint32_t splitwidth = 0xffffffff; static isc_uint32_t splitwidth = 0xffffffff;
/*% opcode text */ /*% opcode text */
static const char * const opcodetext[] = { static const char * const opcodetext[] = {
@@ -243,7 +240,7 @@ help(void) {
*/ */
static void static void
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) { received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
uint64_t diff; isc_uint64_t diff;
time_t tnow; time_t tnow;
struct tm tmnow; struct tm tmnow;
#ifdef WIN32 #ifdef WIN32
@@ -263,7 +260,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
printf(";; Query time: %ld msec\n", (long) diff / 1000); printf(";; Query time: %ld msec\n", (long) diff / 1000);
printf(";; SERVER: %s(%s)\n", fromtext, query->servname); printf(";; SERVER: %s(%s)\n", fromtext, query->servname);
time(&tnow); time(&tnow);
#if !defined(WIN32) #if defined(ISC_PLATFORM_USETHREADS) && !defined(WIN32)
(void)localtime_r(&tnow, &tmnow); (void)localtime_r(&tnow, &tmnow);
#else #else
tmnow = *localtime(&tnow); tmnow = *localtime(&tnow);
@@ -284,7 +281,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
#endif #endif
if (query->lookup->doing_xfr) { if (query->lookup->doing_xfr) {
printf(";; XFR size: %u records (messages %u, " printf(";; XFR size: %u records (messages %u, "
"bytes %" PRIu64 ")\n", "bytes %" ISC_PRINT_QUADFORMAT "u)\n",
query->rr_count, query->msg_count, query->rr_count, query->msg_count,
query->byte_count); query->byte_count);
} else { } else {
@@ -302,18 +299,18 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
} else if (query->lookup->identify && !short_form) { } else if (query->lookup->identify && !short_form) {
diff = isc_time_microdiff(&query->time_recv, &query->time_sent); diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
if (query->lookup->use_usec) if (query->lookup->use_usec)
printf(";; Received %" PRIu64 " bytes " printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
"from %s(%s) in %ld us\n\n", "from %s(%s) in %ld us\n\n",
query->lookup->doing_xfr query->lookup->doing_xfr
? query->byte_count ? query->byte_count
: (uint64_t)bytes, : (isc_uint64_t)bytes,
fromtext, query->userarg, (long) diff); fromtext, query->userarg, (long) diff);
else else
printf(";; Received %" PRIu64 " bytes " printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
"from %s(%s) in %ld ms\n\n", "from %s(%s) in %ld ms\n\n",
query->lookup->doing_xfr query->lookup->doing_xfr
? query->byte_count ? query->byte_count
: (uint64_t)bytes, : (isc_uint64_t)bytes,
fromtext, query->userarg, (long) diff / 1000); fromtext, query->userarg, (long) diff / 1000);
} }
} }
@@ -335,7 +332,7 @@ trying(char *frm, dig_lookup_t *lookup) {
static isc_result_t static isc_result_t
say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) { say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
isc_result_t result; isc_result_t result;
uint64_t diff; isc_uint64_t diff;
char store[sizeof(" in 18446744073709551616 us.")]; char store[sizeof(" in 18446744073709551616 us.")];
unsigned int styleflags = 0; unsigned int styleflags = 0;
@@ -363,11 +360,10 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
diff = isc_time_microdiff(&query->time_recv, &query->time_sent); diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
ADD_STRING(buf, " from server "); ADD_STRING(buf, " from server ");
ADD_STRING(buf, query->servname); ADD_STRING(buf, query->servname);
if (query->lookup->use_usec) { if (query->lookup->use_usec)
snprintf(store, sizeof(store), " in %" PRIu64 " us.", diff); snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u us.", diff);
} else { else
snprintf(store, sizeof(store), " in %" PRIu64 " ms.", diff / 1000); snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u ms.", diff / 1000);
}
ADD_STRING(buf, store); ADD_STRING(buf, store);
} }
ADD_STRING(buf, "\n"); ADD_STRING(buf, "\n");
@@ -425,7 +421,7 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
static bool static isc_boolean_t
isdotlocal(dns_message_t *msg) { isdotlocal(dns_message_t *msg) {
isc_result_t result; isc_result_t result;
static unsigned char local_ndata[] = { "\005local\0" }; static unsigned char local_ndata[] = { "\005local\0" };
@@ -440,16 +436,16 @@ isdotlocal(dns_message_t *msg) {
dns_name_t *name = NULL; dns_name_t *name = NULL;
dns_message_currentname(msg, DNS_SECTION_QUESTION, &name); dns_message_currentname(msg, DNS_SECTION_QUESTION, &name);
if (dns_name_issubdomain(name, &local)) if (dns_name_issubdomain(name, &local))
return (true); return (ISC_TRUE);
} }
return (false); return (ISC_FALSE);
} }
/* /*
* Callback from dighost.c to print the reply from a server * Callback from dighost.c to print the reply from a server
*/ */
static isc_result_t static isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) { printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
isc_result_t result; isc_result_t result;
dns_messagetextflag_t flags; dns_messagetextflag_t flags;
isc_buffer_t *buf = NULL; isc_buffer_t *buf = NULL;
@@ -693,7 +689,7 @@ cleanup:
static void static void
printgreeting(int argc, char **argv, dig_lookup_t *lookup) { printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
int i; int i;
static bool first = true; static isc_boolean_t first = ISC_TRUE;
char append[MXNAME]; char append[MXNAME];
if (printcmd) { if (printcmd) {
@@ -720,7 +716,7 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
";; global options:%s%s\n", ";; global options:%s%s\n",
short_form ? " +short" : "", short_form ? " +short" : "",
printcmd ? " +cmd" : ""); printcmd ? " +cmd" : "");
first = false; first = ISC_FALSE;
strlcat(lookup->cmdline, append, strlcat(lookup->cmdline, append,
sizeof(lookup->cmdline)); sizeof(lookup->cmdline));
} }
@@ -735,13 +731,13 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
*/ */
static void static void
plus_option(char *option, bool is_batchfile, plus_option(char *option, isc_boolean_t is_batchfile,
dig_lookup_t *lookup) dig_lookup_t *lookup)
{ {
isc_result_t result; isc_result_t result;
char *cmd, *value, *last = NULL, *code, *extra; char *cmd, *value, *last = NULL, *code, *extra;
uint32_t num; isc_uint32_t num;
bool state = true; isc_boolean_t state = ISC_TRUE;
size_t n; size_t n;
INSIST(option != NULL); INSIST(option != NULL);
@@ -752,7 +748,7 @@ plus_option(char *option, bool is_batchfile,
} }
if (strncasecmp(cmd, "no", 2)==0) { if (strncasecmp(cmd, "no", 2)==0) {
cmd += 2; cmd += 2;
state = false; state = ISC_FALSE;
} }
/* parse the rest of the string */ /* parse the rest of the string */
value = strtok_r(NULL, "", &last); value = strtok_r(NULL, "", &last);
@@ -859,7 +855,7 @@ plus_option(char *option, bool is_batchfile,
case 'l': /* class */ case 'l': /* class */
/* keep +cl for backwards compatibility */ /* keep +cl for backwards compatibility */
FULLCHECK2("cl", "class"); FULLCHECK2("cl", "class");
lookup->noclass = !state; lookup->noclass = ISC_TF(!state);
break; break;
case 'm': /* cmd */ case 'm': /* cmd */
FULLCHECK("cmd"); FULLCHECK("cmd");
@@ -895,7 +891,7 @@ plus_option(char *option, bool is_batchfile,
break; break;
case 'r': case 'r':
FULLCHECK("crypto"); FULLCHECK("crypto");
lookup->nocrypto = !state; lookup->nocrypto = ISC_TF(!state);
break; break;
default: default:
goto invalid_option; goto invalid_option;
@@ -1005,20 +1001,14 @@ plus_option(char *option, bool is_batchfile,
lookup->ednsoptscnt = 0; lookup->ednsoptscnt = 0;
break; break;
} }
code = NULL; if (value == NULL) {
if (value != NULL) {
code = strtok_r(value,
":",
&last);
}
if (code == NULL) {
warn("ednsopt no " warn("ednsopt no "
"code point " "code point "
"specified"); "specified");
goto exit_or_usage; goto exit_or_usage;
} }
extra = strtok_r(NULL, "\0", code = strtok_r(value, ":", &last);
&last); extra = strtok_r(NULL, "\0", &last);
save_opt(lookup, code, extra); save_opt(lookup, code, extra);
break; break;
default: default:
@@ -1061,7 +1051,7 @@ plus_option(char *option, bool is_batchfile,
switch (cmd[3]) { switch (cmd[3]) {
case 'i': case 'i':
FULLCHECK("idnin"); FULLCHECK("idnin");
#ifndef HAVE_LIBIDN2 #ifndef WITH_IDN_SUPPORT
fprintf(stderr, ";; IDN input support" fprintf(stderr, ";; IDN input support"
" not enabled\n"); " not enabled\n");
#else #else
@@ -1070,7 +1060,7 @@ plus_option(char *option, bool is_batchfile,
break; break;
case 'o': case 'o':
FULLCHECK("idnout"); FULLCHECK("idnout");
#ifndef HAVE_LIBIDN2 #ifndef WITH_IDN_OUT_SUPPORT
fprintf(stderr, ";; IDN output support" fprintf(stderr, ";; IDN output support"
" not enabled\n"); " not enabled\n");
#else #else
@@ -1166,17 +1156,17 @@ plus_option(char *option, bool is_batchfile,
FULLCHECK("nssearch"); FULLCHECK("nssearch");
lookup->ns_search_only = state; lookup->ns_search_only = state;
if (state) { if (state) {
lookup->trace_root = true; lookup->trace_root = ISC_TRUE;
lookup->recurse = true; lookup->recurse = ISC_TRUE;
lookup->identify = true; lookup->identify = ISC_TRUE;
lookup->stats = false; lookup->stats = ISC_FALSE;
lookup->comments = false; lookup->comments = ISC_FALSE;
lookup->section_additional = false; lookup->section_additional = ISC_FALSE;
lookup->section_authority = false; lookup->section_authority = ISC_FALSE;
lookup->section_question = false; lookup->section_question = ISC_FALSE;
lookup->rdtype = dns_rdatatype_ns; lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
short_form = true; short_form = ISC_TRUE;
lookup->rrcomments = 0; lookup->rrcomments = 0;
} }
break; break;
@@ -1234,7 +1224,7 @@ plus_option(char *option, bool is_batchfile,
warn("Couldn't parse padding"); warn("Couldn't parse padding");
goto exit_or_usage; goto exit_or_usage;
} }
lookup->padding = (uint16_t)num; lookup->padding = (isc_uint16_t)num;
break; break;
case 'q': case 'q':
switch (cmd[1]) { switch (cmd[1]) {
@@ -1310,13 +1300,13 @@ plus_option(char *option, bool is_batchfile,
FULLCHECK("short"); FULLCHECK("short");
short_form = state; short_form = state;
if (state) { if (state) {
printcmd = false; printcmd = ISC_FALSE;
lookup->section_additional = false; lookup->section_additional = ISC_FALSE;
lookup->section_answer = true; lookup->section_answer = ISC_TRUE;
lookup->section_authority = false; lookup->section_authority = ISC_FALSE;
lookup->section_question = false; lookup->section_question = ISC_FALSE;
lookup->comments = false; lookup->comments = ISC_FALSE;
lookup->stats = false; lookup->stats = ISC_FALSE;
lookup->rrcomments = -1; lookup->rrcomments = -1;
} }
break; break;
@@ -1410,7 +1400,7 @@ plus_option(char *option, bool is_batchfile,
FULLCHECK("tcp"); FULLCHECK("tcp");
if (!is_batchfile) { if (!is_batchfile) {
lookup->tcp_mode = state; lookup->tcp_mode = state;
lookup->tcp_mode_set = true; lookup->tcp_mode_set = ISC_TRUE;
} }
break; break;
default: default:
@@ -1443,17 +1433,17 @@ plus_option(char *option, bool is_batchfile,
lookup->trace = state; lookup->trace = state;
lookup->trace_root = state; lookup->trace_root = state;
if (state) { if (state) {
lookup->recurse = false; lookup->recurse = ISC_FALSE;
lookup->identify = true; lookup->identify = ISC_TRUE;
lookup->comments = false; lookup->comments = ISC_FALSE;
lookup->rrcomments = 0; lookup->rrcomments = 0;
lookup->stats = false; lookup->stats = ISC_FALSE;
lookup->section_additional = false; lookup->section_additional = ISC_FALSE;
lookup->section_authority = true; lookup->section_authority = ISC_TRUE;
lookup->section_question = false; lookup->section_question = ISC_FALSE;
lookup->dnssec = true; lookup->dnssec = ISC_TRUE;
lookup->sendcookie = true; lookup->sendcookie = ISC_TRUE;
usesearch = false; usesearch = ISC_FALSE;
} }
break; break;
case 'i': /* tries */ case 'i': /* tries */
@@ -1487,12 +1477,12 @@ plus_option(char *option, bool is_batchfile,
case 0: case 0:
case 'i': /* ttlid */ case 'i': /* ttlid */
FULLCHECK2("ttl", "ttlid"); FULLCHECK2("ttl", "ttlid");
lookup->nottl = !state; lookup->nottl = ISC_TF(!state);
break; break;
case 'u': /* ttlunits */ case 'u': /* ttlunits */
FULLCHECK("ttlunits"); FULLCHECK("ttlunits");
lookup->nottl = false; lookup->nottl = ISC_FALSE;
lookup->ttlunits = state; lookup->ttlunits = ISC_TF(state);
break; break;
default: default:
goto invalid_option; goto invalid_option;
@@ -1514,7 +1504,7 @@ plus_option(char *option, bool is_batchfile,
FULLCHECK("vc"); FULLCHECK("vc");
if (!is_batchfile) { if (!is_batchfile) {
lookup->tcp_mode = state; lookup->tcp_mode = state;
lookup->tcp_mode_set = true; lookup->tcp_mode_set = ISC_TRUE;
} }
break; break;
case 'z': /* zflag */ case 'z': /* zflag */
@@ -1540,19 +1530,19 @@ plus_option(char *option, bool is_batchfile,
} }
/*% /*%
* #true returned if value was used * #ISC_TRUE returned if value was used
*/ */
static const char *single_dash_opts = "46dhimnuv"; static const char *single_dash_opts = "46dhimnuv";
static const char *dash_opts = "46bcdfhikmnptvyx"; static const char *dash_opts = "46bcdfhikmnptvyx";
static bool static isc_boolean_t
dash_option(char *option, char *next, dig_lookup_t **lookup, dash_option(char *option, char *next, dig_lookup_t **lookup,
bool *open_type_class, bool *need_clone, isc_boolean_t *open_type_class, isc_boolean_t *need_clone,
bool config_only, int argc, char **argv, isc_boolean_t config_only, int argc, char **argv,
bool *firstarg) isc_boolean_t *firstarg)
{ {
char opt, *value, *ptr, *ptr2, *ptr3, *last; char opt, *value, *ptr, *ptr2, *ptr3, *last;
isc_result_t result; isc_result_t result;
bool value_from_next; isc_boolean_t value_from_next;
isc_textregion_t tr; isc_textregion_t tr;
dns_rdatatype_t rdtype; dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
@@ -1561,7 +1551,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
struct in6_addr in6; struct in6_addr in6;
in_port_t srcport; in_port_t srcport;
char *hash, *cmd; char *hash, *cmd;
uint32_t num; isc_uint32_t num;
while (strpbrk(option, single_dash_opts) == &option[0]) { while (strpbrk(option, single_dash_opts) == &option[0]) {
/* /*
@@ -1574,21 +1564,21 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
case '4': case '4':
if (have_ipv4) { if (have_ipv4) {
isc_net_disableipv6(); isc_net_disableipv6();
have_ipv6 = false; have_ipv6 = ISC_FALSE;
} else { } else {
fatal("can't find IPv4 networking"); fatal("can't find IPv4 networking");
/* NOTREACHED */ /* NOTREACHED */
return (false); return (ISC_FALSE);
} }
break; break;
case '6': case '6':
if (have_ipv6) { if (have_ipv6) {
isc_net_disableipv4(); isc_net_disableipv4();
have_ipv4 = false; have_ipv4 = ISC_FALSE;
} else { } else {
fatal("can't find IPv6 networking"); fatal("can't find IPv6 networking");
/* NOTREACHED */ /* NOTREACHED */
return (false); return (ISC_FALSE);
} }
break; break;
case 'd': case 'd':
@@ -1596,17 +1586,17 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
if (ptr != &option[1]) { if (ptr != &option[1]) {
cmd = option; cmd = option;
FULLCHECK("debug"); FULLCHECK("debug");
debugging = true; debugging = ISC_TRUE;
return (false); return (ISC_FALSE);
} else } else
debugging = true; debugging = ISC_TRUE;
break; break;
case 'h': case 'h':
help(); help();
exit(0); exit(0);
break; break;
case 'i': case 'i':
ip6_int = true; ip6_int = ISC_TRUE;
break; break;
case 'm': /* memdebug */ case 'm': /* memdebug */
/* memdebug is handled in preparse_args() */ /* memdebug is handled in preparse_args() */
@@ -1615,7 +1605,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
/* deprecated */ /* deprecated */
break; break;
case 'u': case 'u':
(*lookup)->use_usec = true; (*lookup)->use_usec = ISC_TRUE;
break; break;
case 'v': case 'v':
version(); version();
@@ -1625,14 +1615,14 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
if (strlen(option) > 1U) if (strlen(option) > 1U)
option = &option[1]; option = &option[1];
else else
return (false); return (ISC_FALSE);
} }
opt = option[0]; opt = option[0];
if (strlen(option) > 1U) { if (strlen(option) > 1U) {
value_from_next = false; value_from_next = ISC_FALSE;
value = &option[1]; value = &option[1];
} else { } else {
value_from_next = true; value_from_next = ISC_TRUE;
value = next; value = next;
} }
if (value == NULL) if (value == NULL)
@@ -1662,20 +1652,20 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
} }
if (hash != NULL) if (hash != NULL)
*hash = '#'; *hash = '#';
specified_source = true; specified_source = ISC_TRUE;
return (value_from_next); return (value_from_next);
case 'c': case 'c':
if ((*lookup)->rdclassset) { if ((*lookup)->rdclassset) {
fprintf(stderr, ";; Warning, extra class option\n"); fprintf(stderr, ";; Warning, extra class option\n");
} }
*open_type_class = false; *open_type_class = ISC_FALSE;
tr.base = value; tr.base = value;
tr.length = (unsigned int) strlen(value); tr.length = (unsigned int) strlen(value);
result = dns_rdataclass_fromtext(&rdclass, result = dns_rdataclass_fromtext(&rdclass,
(isc_textregion_t *)&tr); (isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
(*lookup)->rdclass = rdclass; (*lookup)->rdclass = rdclass;
(*lookup)->rdclassset = true; (*lookup)->rdclassset = ISC_TRUE;
} else } else
fprintf(stderr, ";; Warning, ignoring " fprintf(stderr, ";; Warning, ignoring "
"invalid class %s\n", "invalid class %s\n",
@@ -1697,23 +1687,23 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
if (!config_only) { if (!config_only) {
if (*need_clone) if (*need_clone)
(*lookup) = clone_lookup(default_lookup, (*lookup) = clone_lookup(default_lookup,
true); ISC_TRUE);
*need_clone = true; *need_clone = ISC_TRUE;
strlcpy((*lookup)->textname, value, strlcpy((*lookup)->textname, value,
sizeof((*lookup)->textname)); sizeof((*lookup)->textname));
(*lookup)->trace_root = ((*lookup)->trace || (*lookup)->trace_root = ISC_TF((*lookup)->trace ||
(*lookup)->ns_search_only); (*lookup)->ns_search_only);
(*lookup)->new_search = true; (*lookup)->new_search = ISC_TRUE;
if (*firstarg) { if (*firstarg) {
printgreeting(argc, argv, *lookup); printgreeting(argc, argv, *lookup);
*firstarg = false; *firstarg = ISC_FALSE;
} }
ISC_LIST_APPEND(lookup_list, (*lookup), link); ISC_LIST_APPEND(lookup_list, (*lookup), link);
debug("looking up %s", (*lookup)->textname); debug("looking up %s", (*lookup)->textname);
} }
return (value_from_next); return (value_from_next);
case 't': case 't':
*open_type_class = false; *open_type_class = ISC_FALSE;
if (strncasecmp(value, "ixfr=", 5) == 0) { if (strncasecmp(value, "ixfr=", 5) == 0) {
rdtype = dns_rdatatype_ixfr; rdtype = dns_rdatatype_ixfr;
result = ISC_R_SUCCESS; result = ISC_R_SUCCESS;
@@ -1733,9 +1723,9 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
"extra type option\n"); "extra type option\n");
} }
if (rdtype == dns_rdatatype_ixfr) { if (rdtype == dns_rdatatype_ixfr) {
uint32_t serial; isc_uint32_t serial;
(*lookup)->rdtype = dns_rdatatype_ixfr; (*lookup)->rdtype = dns_rdatatype_ixfr;
(*lookup)->rdtypeset = true; (*lookup)->rdtypeset = ISC_TRUE;
result = parse_uint(&serial, &value[5], result = parse_uint(&serial, &value[5],
MAXSERIAL, "serial number"); MAXSERIAL, "serial number");
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
@@ -1744,19 +1734,19 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
(*lookup)->section_question = plusquest; (*lookup)->section_question = plusquest;
(*lookup)->comments = pluscomm; (*lookup)->comments = pluscomm;
if (!(*lookup)->tcp_mode_set) if (!(*lookup)->tcp_mode_set)
(*lookup)->tcp_mode = true; (*lookup)->tcp_mode = ISC_TRUE;
} else { } else {
(*lookup)->rdtype = rdtype; (*lookup)->rdtype = rdtype;
if (!config_only) if (!config_only)
(*lookup)->rdtypeset = true; (*lookup)->rdtypeset = ISC_TRUE;
if (rdtype == dns_rdatatype_axfr) { if (rdtype == dns_rdatatype_axfr) {
(*lookup)->section_question = plusquest; (*lookup)->section_question = plusquest;
(*lookup)->comments = pluscomm; (*lookup)->comments = pluscomm;
} else if (rdtype == dns_rdatatype_any) { } else if (rdtype == dns_rdatatype_any) {
if (!(*lookup)->tcp_mode_set) if (!(*lookup)->tcp_mode_set)
(*lookup)->tcp_mode = true; (*lookup)->tcp_mode = ISC_TRUE;
} }
(*lookup)->ixfr_serial = false; (*lookup)->ixfr_serial = ISC_FALSE;
} }
} else } else
fprintf(stderr, ";; Warning, ignoring " fprintf(stderr, ";; Warning, ignoring "
@@ -1775,7 +1765,11 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
ptr = ptr2; ptr = ptr2;
ptr2 = ptr3; ptr2 = ptr3;
} else { } else {
#ifndef PK11_MD5_DISABLE
hmacname = DNS_TSIG_HMACMD5_NAME; hmacname = DNS_TSIG_HMACMD5_NAME;
#else
hmacname = DNS_TSIG_HMACSHA256_NAME;
#endif
digestbits = 0; digestbits = 0;
} }
/* XXXONDREJ: FIXME */ /* XXXONDREJ: FIXME */
@@ -1784,24 +1778,24 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
return (value_from_next); return (value_from_next);
case 'x': case 'x':
if (*need_clone) if (*need_clone)
*lookup = clone_lookup(default_lookup, true); *lookup = clone_lookup(default_lookup, ISC_TRUE);
*need_clone = true; *need_clone = ISC_TRUE;
if (get_reverse(textname, sizeof(textname), value, if (get_reverse(textname, sizeof(textname), value,
ip6_int, false) == ISC_R_SUCCESS) { ip6_int, ISC_FALSE) == ISC_R_SUCCESS) {
strlcpy((*lookup)->textname, textname, strlcpy((*lookup)->textname, textname,
sizeof((*lookup)->textname)); sizeof((*lookup)->textname));
debug("looking up %s", (*lookup)->textname); debug("looking up %s", (*lookup)->textname);
(*lookup)->trace_root = ((*lookup)->trace || (*lookup)->trace_root = ISC_TF((*lookup)->trace ||
(*lookup)->ns_search_only); (*lookup)->ns_search_only);
(*lookup)->ip6_int = ip6_int; (*lookup)->ip6_int = ip6_int;
if (!(*lookup)->rdtypeset) if (!(*lookup)->rdtypeset)
(*lookup)->rdtype = dns_rdatatype_ptr; (*lookup)->rdtype = dns_rdatatype_ptr;
if (!(*lookup)->rdclassset) if (!(*lookup)->rdclassset)
(*lookup)->rdclass = dns_rdataclass_in; (*lookup)->rdclass = dns_rdataclass_in;
(*lookup)->new_search = true; (*lookup)->new_search = ISC_TRUE;
if (*firstarg) { if (*firstarg) {
printgreeting(argc, argv, *lookup); printgreeting(argc, argv, *lookup);
*firstarg = false; *firstarg = ISC_FALSE;
} }
ISC_LIST_APPEND(lookup_list, *lookup, link); ISC_LIST_APPEND(lookup_list, *lookup, link);
} else { } else {
@@ -1815,7 +1809,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
usage(); usage();
} }
/* NOTREACHED */ /* NOTREACHED */
return (false); return (ISC_FALSE);
} }
/*% /*%
@@ -1842,19 +1836,19 @@ preparse_args(int argc, char **argv) {
while (strpbrk(option, single_dash_opts) == &option[0]) { while (strpbrk(option, single_dash_opts) == &option[0]) {
switch (option[0]) { switch (option[0]) {
case 'm': case 'm':
memdebugging = true; memdebugging = ISC_TRUE;
isc_mem_debugging = ISC_MEM_DEBUGTRACE | isc_mem_debugging = ISC_MEM_DEBUGTRACE |
ISC_MEM_DEBUGRECORD; ISC_MEM_DEBUGRECORD;
break; break;
case '4': case '4':
if (ipv6only) if (ipv6only)
fatal("only one of -4 and -6 allowed"); fatal("only one of -4 and -6 allowed");
ipv4only = true; ipv4only = ISC_TRUE;
break; break;
case '6': case '6':
if (ipv4only) if (ipv4only)
fatal("only one of -4 and -6 allowed"); fatal("only one of -4 and -6 allowed");
ipv6only = true; ipv6only = ISC_TRUE;
break; break;
} }
option = &option[1]; option = &option[1];
@@ -1879,16 +1873,16 @@ split_batchline(char *batchline, char **bargv, int len, const char *msg) {
} }
static void static void
parse_args(bool is_batchfile, bool config_only, parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
int argc, char **argv) int argc, char **argv)
{ {
isc_result_t result; isc_result_t result;
isc_textregion_t tr; isc_textregion_t tr;
bool firstarg = true; isc_boolean_t firstarg = ISC_TRUE;
dig_lookup_t *lookup = NULL; dig_lookup_t *lookup = NULL;
dns_rdatatype_t rdtype; dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
bool open_type_class = true; isc_boolean_t open_type_class = ISC_TRUE;
char batchline[MXNAME]; char batchline[MXNAME];
int bargc; int bargc;
char *bargv[64]; char *bargv[64];
@@ -1898,7 +1892,7 @@ parse_args(bool is_batchfile, bool config_only,
char *homedir; char *homedir;
char rcfile[PATH_MAX]; char rcfile[PATH_MAX];
#endif #endif
bool need_clone = true; isc_boolean_t need_clone = ISC_TRUE;
/* /*
* The semantics for parsing the args is a bit complex; if * The semantics for parsing the args is a bit complex; if
@@ -1915,9 +1909,9 @@ parse_args(bool is_batchfile, bool config_only,
if (!is_batchfile) { if (!is_batchfile) {
debug("making new lookup"); debug("making new lookup");
default_lookup = make_empty_lookup(); default_lookup = make_empty_lookup();
default_lookup->adflag = true; default_lookup->adflag = ISC_TRUE;
default_lookup->edns = 0; default_lookup->edns = 0;
default_lookup->sendcookie = true; default_lookup->sendcookie = ISC_TRUE;
#ifndef NOPOSIX #ifndef NOPOSIX
/* /*
@@ -1939,10 +1933,10 @@ parse_args(bool is_batchfile, bool config_only,
{ {
debug("config line %s", batchline); debug("config line %s", batchline);
bargc = split_batchline(batchline, bargv, 62, bargc = split_batchline(batchline, bargv, 62,
".digrc argv"); ".digrc argv");
bargv[0] = argv[0]; bargv[0] = argv[0];
argv0 = argv[0]; argv0 = argv[0];
parse_args(true, true, parse_args(ISC_TRUE, ISC_TRUE,
bargc, (char **)bargv); bargc, (char **)bargv);
} }
fclose(batchfp); fclose(batchfp);
@@ -1952,8 +1946,8 @@ parse_args(bool is_batchfile, bool config_only,
if (is_batchfile && !config_only) { if (is_batchfile && !config_only) {
/* Processing '-f batchfile'. */ /* Processing '-f batchfile'. */
lookup = clone_lookup(default_lookup, true); lookup = clone_lookup(default_lookup, ISC_TRUE);
need_clone = false; need_clone = ISC_FALSE;
} else { } else {
lookup = default_lookup; lookup = default_lookup;
} }
@@ -2036,10 +2030,10 @@ parse_args(bool is_batchfile, bool config_only,
"extra type option\n"); "extra type option\n");
} }
if (rdtype == dns_rdatatype_ixfr) { if (rdtype == dns_rdatatype_ixfr) {
uint32_t serial; isc_uint32_t serial;
lookup->rdtype = lookup->rdtype =
dns_rdatatype_ixfr; dns_rdatatype_ixfr;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
result = parse_uint(&serial, result = parse_uint(&serial,
&rv[0][5], &rv[0][5],
MAXSERIAL, MAXSERIAL,
@@ -2052,10 +2046,10 @@ parse_args(bool is_batchfile, bool config_only,
plusquest; plusquest;
lookup->comments = pluscomm; lookup->comments = pluscomm;
if (!lookup->tcp_mode_set) if (!lookup->tcp_mode_set)
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
} else { } else {
lookup->rdtype = rdtype; lookup->rdtype = rdtype;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
if (rdtype == if (rdtype ==
dns_rdatatype_axfr) { dns_rdatatype_axfr) {
lookup->section_question = lookup->section_question =
@@ -2065,8 +2059,8 @@ parse_args(bool is_batchfile, bool config_only,
if (rdtype == if (rdtype ==
dns_rdatatype_any && dns_rdatatype_any &&
!lookup->tcp_mode_set) !lookup->tcp_mode_set)
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
lookup->ixfr_serial = false; lookup->ixfr_serial = ISC_FALSE;
} }
continue; continue;
} }
@@ -2078,7 +2072,7 @@ parse_args(bool is_batchfile, bool config_only,
"extra class option\n"); "extra class option\n");
} }
lookup->rdclass = rdclass; lookup->rdclass = rdclass;
lookup->rdclassset = true; lookup->rdclassset = ISC_TRUE;
continue; continue;
} }
} }
@@ -2086,16 +2080,16 @@ parse_args(bool is_batchfile, bool config_only,
if (!config_only) { if (!config_only) {
if (need_clone) if (need_clone)
lookup = clone_lookup(default_lookup, lookup = clone_lookup(default_lookup,
true); ISC_TRUE);
need_clone = true; need_clone = ISC_TRUE;
strlcpy(lookup->textname, rv[0], strlcpy(lookup->textname, rv[0],
sizeof(lookup->textname)); sizeof(lookup->textname));
lookup->trace_root = (lookup->trace || lookup->trace_root = ISC_TF(lookup->trace ||
lookup->ns_search_only); lookup->ns_search_only);
lookup->new_search = true; lookup->new_search = ISC_TRUE;
if (firstarg) { if (firstarg) {
printgreeting(argc, argv, lookup); printgreeting(argc, argv, lookup);
firstarg = false; firstarg = ISC_FALSE;
} }
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
debug("looking up %s", lookup->textname); debug("looking up %s", lookup->textname);
@@ -2131,7 +2125,7 @@ parse_args(bool is_batchfile, bool config_only,
"batch argv"); "batch argv");
bargv[0] = argv[0]; bargv[0] = argv[0];
argv0 = argv[0]; argv0 = argv[0];
parse_args(true, false, bargc, (char **)bargv); parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
return; return;
} }
return; return;
@@ -2141,17 +2135,17 @@ parse_args(bool is_batchfile, bool config_only,
*/ */
if ((lookup_list.head == NULL) && !config_only) { if ((lookup_list.head == NULL) && !config_only) {
if (need_clone) if (need_clone)
lookup = clone_lookup(default_lookup, true); lookup = clone_lookup(default_lookup, ISC_TRUE);
need_clone = true; need_clone = ISC_TRUE;
lookup->trace_root = (lookup->trace || lookup->trace_root = ISC_TF(lookup->trace ||
lookup->ns_search_only); lookup->ns_search_only);
lookup->new_search = true; lookup->new_search = ISC_TRUE;
strlcpy(lookup->textname, ".", sizeof(lookup->textname)); strlcpy(lookup->textname, ".", sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ns; lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
if (firstarg) { if (firstarg) {
printgreeting(argc, argv, lookup); printgreeting(argc, argv, lookup);
firstarg = false; firstarg = ISC_FALSE;
} }
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
} }
@@ -2188,7 +2182,7 @@ query_finished(void) {
debug("batch line %s", batchline); debug("batch line %s", batchline);
bargc = split_batchline(batchline, bargv, 14, "batch argv"); bargc = split_batchline(batchline, bargv, 14, "batch argv");
bargv[0] = argv0; bargv[0] = argv0;
parse_args(true, false, bargc, (char **)bargv); parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
start_lookup(); start_lookup();
} else { } else {
batchname = NULL; batchname = NULL;
@@ -2225,7 +2219,7 @@ void dig_setup(int argc, char **argv)
setup_system(ipv4only, ipv6only); setup_system(ipv4only, ipv6only);
} }
void dig_query_setup(bool is_batchfile, bool config_only, void dig_query_setup(isc_boolean_t is_batchfile, isc_boolean_t config_only,
int argc, char **argv) int argc, char **argv)
{ {
debug("dig_query_setup"); debug("dig_query_setup");
@@ -2237,7 +2231,7 @@ void dig_query_setup(bool is_batchfile, bool config_only,
setup_text_key(); setup_text_key();
if (domainopt[0] != '\0') { if (domainopt[0] != '\0') {
set_search_domain(domainopt); set_search_domain(domainopt);
usesearch = true; usesearch = ISC_TRUE;
} }
} }
@@ -2274,7 +2268,7 @@ int
main(int argc, char **argv) { main(int argc, char **argv) {
dig_setup(argc, argv); dig_setup(argc, argv);
dig_query_setup(false, false, argc, argv); dig_query_setup(ISC_FALSE, ISC_FALSE, argc, argv);
dig_startup(); dig_startup();
dig_shutdown(); dig_shutdown();
+1 -3
View File
@@ -1330,9 +1330,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
reply from the server. reply from the server.
If you'd like to turn off the IDN support for some reason, use If you'd like to turn off the IDN support for some reason, use
parameters <parameter>+noidnin</parameter> and parameters <parameter>+noidnin</parameter> and
<parameter>+noidnout</parameter> or define <parameter>+noidnout</parameter>.
the <envar>IDN_DISABLE</envar> environment variable.
</para> </para>
</refsection> </refsection>
+419 -403
View File
File diff suppressed because it is too large Load Diff
+85 -87
View File
@@ -12,9 +12,6 @@
/*! \file */ /*! \file */
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>
@@ -29,6 +26,7 @@
#include <isc/string.h> #include <isc/string.h>
#include <isc/util.h> #include <isc/util.h>
#include <isc/task.h> #include <isc/task.h>
#include <isc/stdlib.h>
#include <dns/byaddr.h> #include <dns/byaddr.h>
#include <dns/fixedname.h> #include <dns/fixedname.h>
@@ -42,14 +40,14 @@
#include <dig/dig.h> #include <dig/dig.h>
static bool short_form = true, listed_server = false; static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
static bool default_lookups = true; static isc_boolean_t default_lookups = ISC_TRUE;
static int seen_error = -1; static int seen_error = -1;
static bool list_addresses = true; static isc_boolean_t list_addresses = ISC_TRUE;
static bool list_almost_all = false; static isc_boolean_t list_almost_all = ISC_FALSE;
static dns_rdatatype_t list_type = dns_rdatatype_a; static dns_rdatatype_t list_type = dns_rdatatype_a;
static bool printed_server = false; static isc_boolean_t printed_server = ISC_FALSE;
static bool ipv4only = false, ipv6only = false; static isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
static const char *opcodetext[] = { static const char *opcodetext[] = {
"QUERY", "QUERY",
@@ -226,7 +224,7 @@ say_message(dns_name_t *name, const char *msg, dns_rdata_t *rdata,
static isc_result_t static isc_result_t
printsection(dns_message_t *msg, dns_section_t sectionid, printsection(dns_message_t *msg, dns_section_t sectionid,
const char *section_name, bool headers, const char *section_name, isc_boolean_t headers,
dig_query_t *query) dig_query_t *query)
{ {
dns_name_t *name, *print_name; dns_name_t *name, *print_name;
@@ -237,13 +235,13 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
isc_region_t r; isc_region_t r;
dns_name_t empty_name; dns_name_t empty_name;
char tbuf[4096]; char tbuf[4096];
bool first; isc_boolean_t first;
bool no_rdata; isc_boolean_t no_rdata;
if (sectionid == DNS_SECTION_QUESTION) if (sectionid == DNS_SECTION_QUESTION)
no_rdata = true; no_rdata = ISC_TRUE;
else else
no_rdata = false; no_rdata = ISC_FALSE;
if (headers) if (headers)
printf(";; %s SECTION:\n", section_name); printf(";; %s SECTION:\n", section_name);
@@ -261,7 +259,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
dns_message_currentname(msg, sectionid, &name); dns_message_currentname(msg, sectionid, &name);
isc_buffer_init(&target, tbuf, sizeof(tbuf)); isc_buffer_init(&target, tbuf, sizeof(tbuf));
first = true; first = ISC_TRUE;
print_name = name; print_name = name;
for (rdataset = ISC_LIST_HEAD(name->list); for (rdataset = ISC_LIST_HEAD(name->list);
@@ -285,7 +283,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
if (!short_form) { if (!short_form) {
result = dns_rdataset_totext(rdataset, result = dns_rdataset_totext(rdataset,
print_name, print_name,
false, ISC_FALSE,
no_rdata, no_rdata,
&target); &target);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
@@ -293,7 +291,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
#ifdef USEINITALWS #ifdef USEINITALWS
if (first) { if (first) {
print_name = &empty_name; print_name = &empty_name;
first = false; first = ISC_FALSE;
} }
#else #else
UNUSED(first); /* Shut up compiler. */ UNUSED(first); /* Shut up compiler. */
@@ -352,7 +350,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
static isc_result_t static isc_result_t
printrdata(dns_message_t *msg, dns_rdataset_t *rdataset, printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
const dns_name_t *owner, const char *set_name, const dns_name_t *owner, const char *set_name,
bool headers) isc_boolean_t headers)
{ {
isc_buffer_t target; isc_buffer_t target;
isc_result_t result; isc_result_t result;
@@ -365,7 +363,7 @@ printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
isc_buffer_init(&target, tbuf, sizeof(tbuf)); isc_buffer_init(&target, tbuf, sizeof(tbuf));
result = dns_rdataset_totext(rdataset, owner, false, false, result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
&target); &target);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
@@ -402,8 +400,8 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
} }
static isc_result_t static isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) { printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
bool did_flag = false; isc_boolean_t did_flag = ISC_FALSE;
dns_rdataset_t *opt, *tsig = NULL; dns_rdataset_t *opt, *tsig = NULL;
const dns_name_t *tsigname; const dns_name_t *tsigname;
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
@@ -426,7 +424,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
sizeof(sockstr)); sizeof(sockstr));
printf("Address: %s\n", sockstr); printf("Address: %s\n", sockstr);
printf("Aliases: \n\n"); printf("Aliases: \n\n");
printed_server = true; printed_server = ISC_TRUE;
} }
if (msg->rcode != 0) { if (msg->rcode != 0) {
@@ -458,22 +456,22 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
dns_name_copy(query->lookup->name, name, NULL); dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name); chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr)); dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, false); lookup = clone_lookup(query->lookup, ISC_FALSE);
if (lookup != NULL) { if (lookup != NULL) {
strlcpy(lookup->textname, namestr, strlcpy(lookup->textname, namestr,
sizeof(lookup->textname)); sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_aaaa; lookup->rdtype = dns_rdatatype_aaaa;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
lookup->origin = NULL; lookup->origin = NULL;
lookup->retries = tries; lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
} }
lookup = clone_lookup(query->lookup, false); lookup = clone_lookup(query->lookup, ISC_FALSE);
if (lookup != NULL) { if (lookup != NULL) {
strlcpy(lookup->textname, namestr, strlcpy(lookup->textname, namestr,
sizeof(lookup->textname)); sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_mx; lookup->rdtype = dns_rdatatype_mx;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
lookup->origin = NULL; lookup->origin = NULL;
lookup->retries = tries; lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -487,31 +485,31 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
printf(";; flags: "); printf(";; flags: ");
if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) {
printf("qr"); printf("qr");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) {
printf("%saa", did_flag ? " " : ""); printf("%saa", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
printf("%stc", did_flag ? " " : ""); printf("%stc", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
printf("%srd", did_flag ? " " : ""); printf("%srd", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) {
printf("%sra", did_flag ? " " : ""); printf("%sra", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) {
printf("%sad", did_flag ? " " : ""); printf("%sad", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
} }
if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) { if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
printf("%scd", did_flag ? " " : ""); printf("%scd", did_flag ? " " : "");
did_flag = true; did_flag = ISC_TRUE;
POST(did_flag); POST(did_flag);
} }
printf("; QUERY: %u, ANSWER: %u, " printf("; QUERY: %u, ANSWER: %u, "
@@ -534,7 +532,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
!short_form) { !short_form) {
printf("\n"); printf("\n");
result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION", result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION",
true, query); ISC_TRUE, query);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
@@ -542,7 +540,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
if (!short_form) if (!short_form)
printf("\n"); printf("\n");
result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER", result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER",
!short_form, query); ISC_TF(!short_form), query);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
@@ -551,7 +549,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
!short_form) { !short_form) {
printf("\n"); printf("\n");
result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY", result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY",
true, query); ISC_TRUE, query);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
@@ -559,14 +557,14 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
!short_form) { !short_form) {
printf("\n"); printf("\n");
result = printsection(msg, DNS_SECTION_ADDITIONAL, result = printsection(msg, DNS_SECTION_ADDITIONAL,
"ADDITIONAL", true, query); "ADDITIONAL", ISC_TRUE, query);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
if ((tsig != NULL) && !short_form) { if ((tsig != NULL) && !short_form) {
printf("\n"); printf("\n");
result = printrdata(msg, tsig, tsigname, result = printrdata(msg, tsig, tsigname,
"PSEUDOSECTION TSIG", true); "PSEUDOSECTION TSIG", ISC_TRUE);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
return (result); return (result);
} }
@@ -601,7 +599,7 @@ pre_parse_args(int argc, char **argv) {
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) { while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
switch (c) { switch (c) {
case 'm': case 'm':
memdebugging = true; memdebugging = ISC_TRUE;
if (strcasecmp("trace", isc_commandline_argument) == 0) if (strcasecmp("trace", isc_commandline_argument) == 0)
isc_mem_debugging |= ISC_MEM_DEBUGTRACE; isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
else if (strcasecmp("record", else if (strcasecmp("record",
@@ -615,12 +613,12 @@ pre_parse_args(int argc, char **argv) {
case '4': case '4':
if (ipv6only) if (ipv6only)
fatal("only one of -4 and -6 allowed"); fatal("only one of -4 and -6 allowed");
ipv4only = true; ipv4only = ISC_TRUE;
break; break;
case '6': case '6':
if (ipv4only) if (ipv4only)
fatal("only one of -4 and -6 allowed"); fatal("only one of -4 and -6 allowed");
ipv6only = true; ipv6only = ISC_TRUE;
break; break;
case 'a': break; case 'a': break;
case 'A': break; case 'A': break;
@@ -641,8 +639,8 @@ pre_parse_args(int argc, char **argv) {
case 'C': break; case 'C': break;
case 'D': case 'D':
if (debugging) if (debugging)
debugtiming = true; debugtiming = ISC_TRUE;
debugging = true; debugging = ISC_TRUE;
break; break;
case 'N': break; case 'N': break;
case 'R': break; case 'R': break;
@@ -652,12 +650,12 @@ pre_parse_args(int argc, char **argv) {
show_usage(); show_usage();
} }
} }
isc_commandline_reset = true; isc_commandline_reset = ISC_TRUE;
isc_commandline_index = 1; isc_commandline_index = 1;
} }
static void static void
parse_args(bool is_batchfile, int argc, char **argv) { parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
char hostname[MXNAME]; char hostname[MXNAME];
dig_lookup_t *lookup; dig_lookup_t *lookup;
int c; int c;
@@ -666,30 +664,30 @@ parse_args(bool is_batchfile, int argc, char **argv) {
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
dns_rdatatype_t rdtype; dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
uint32_t serial = 0; isc_uint32_t serial = 0;
UNUSED(is_batchfile); UNUSED(is_batchfile);
lookup = make_empty_lookup(); lookup = make_empty_lookup();
lookup->servfail_stops = false; lookup->servfail_stops = ISC_FALSE;
lookup->comments = false; lookup->comments = ISC_FALSE;
short_form = !verbose; short_form = !verbose;
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) { while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
switch (c) { switch (c) {
case 'l': case 'l':
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
lookup->rdtype = dns_rdatatype_axfr; lookup->rdtype = dns_rdatatype_axfr;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
fatalexit = 3; fatalexit = 3;
break; break;
case 'v': case 'v':
case 'd': case 'd':
short_form = false; short_form = ISC_FALSE;
break; break;
case 'r': case 'r':
lookup->recurse = false; lookup->recurse = ISC_FALSE;
break; break;
case 't': case 't':
if (strncasecmp(isc_commandline_argument, if (strncasecmp(isc_commandline_argument,
@@ -714,23 +712,23 @@ parse_args(bool is_batchfile, int argc, char **argv) {
if (!lookup->rdtypeset || if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr) lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = rdtype; lookup->rdtype = rdtype;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
if (rdtype == dns_rdatatype_axfr) { if (rdtype == dns_rdatatype_axfr) {
/* -l -t any -v */ /* -l -t any -v */
list_type = dns_rdatatype_any; list_type = dns_rdatatype_any;
short_form = false; short_form = ISC_FALSE;
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
} else if (rdtype == dns_rdatatype_ixfr) { } else if (rdtype == dns_rdatatype_ixfr) {
lookup->ixfr_serial = serial; lookup->ixfr_serial = serial;
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
list_type = rdtype; list_type = rdtype;
} else if (rdtype == dns_rdatatype_any) { } else if (rdtype == dns_rdatatype_any) {
if (!lookup->tcp_mode_set) if (!lookup->tcp_mode_set)
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
} else } else
list_type = rdtype; list_type = rdtype;
list_addresses = false; list_addresses = ISC_FALSE;
default_lookups = false; default_lookups = ISC_FALSE;
break; break;
case 'c': case 'c':
tr.base = isc_commandline_argument; tr.base = isc_commandline_argument;
@@ -744,25 +742,25 @@ parse_args(bool is_batchfile, int argc, char **argv) {
isc_commandline_argument); isc_commandline_argument);
} else { } else {
lookup->rdclass = rdclass; lookup->rdclass = rdclass;
lookup->rdclassset = true; lookup->rdclassset = ISC_TRUE;
} }
default_lookups = false; default_lookups = ISC_FALSE;
break; break;
case 'A': case 'A':
list_almost_all = true; list_almost_all = ISC_TRUE;
/* FALL THROUGH */ /* FALL THROUGH */
case 'a': case 'a':
if (!lookup->rdtypeset || if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr) lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = dns_rdatatype_any; lookup->rdtype = dns_rdatatype_any;
list_type = dns_rdatatype_any; list_type = dns_rdatatype_any;
list_addresses = false; list_addresses = ISC_FALSE;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
short_form = false; short_form = ISC_FALSE;
default_lookups = false; default_lookups = ISC_FALSE;
break; break;
case 'i': case 'i':
lookup->ip6_int = true; lookup->ip6_int = ISC_TRUE;
break; break;
case 'n': case 'n':
/* deprecated */ /* deprecated */
@@ -788,23 +786,23 @@ parse_args(bool is_batchfile, int argc, char **argv) {
tries = 2; tries = 2;
break; break;
case 'T': case 'T':
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
lookup->tcp_mode_set = true; lookup->tcp_mode_set = ISC_TRUE;
break; break;
case 'U': case 'U':
lookup->tcp_mode = false; lookup->tcp_mode = ISC_FALSE;
lookup->tcp_mode_set = true; lookup->tcp_mode_set = ISC_TRUE;
break; break;
case 'C': case 'C':
debug("showing all SOAs"); debug("showing all SOAs");
lookup->rdtype = dns_rdatatype_ns; lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
lookup->rdclass = dns_rdataclass_in; lookup->rdclass = dns_rdataclass_in;
lookup->rdclassset = true; lookup->rdclassset = ISC_TRUE;
lookup->ns_search_only = true; lookup->ns_search_only = ISC_TRUE;
lookup->trace_root = true; lookup->trace_root = ISC_TRUE;
lookup->identify_previous_line = true; lookup->identify_previous_line = ISC_TRUE;
default_lookups = false; default_lookups = ISC_FALSE;
break; break;
case 'N': case 'N':
debug("setting NDOTS to %s", debug("setting NDOTS to %s",
@@ -821,7 +819,7 @@ parse_args(bool is_batchfile, int argc, char **argv) {
/* Handled by pre_parse_args(). */ /* Handled by pre_parse_args(). */
break; break;
case 's': case 's':
lookup->servfail_stops = true; lookup->servfail_stops = ISC_TRUE;
break; break;
} }
} }
@@ -836,22 +834,22 @@ parse_args(bool is_batchfile, int argc, char **argv) {
if (argc > isc_commandline_index + 1) { if (argc > isc_commandline_index + 1) {
set_nameserver(argv[isc_commandline_index+1]); set_nameserver(argv[isc_commandline_index+1]);
debug("server is %s", argv[isc_commandline_index+1]); debug("server is %s", argv[isc_commandline_index+1]);
listed_server = true; listed_server = ISC_TRUE;
} else } else
check_ra = true; check_ra = ISC_TRUE;
lookup->pending = false; lookup->pending = ISC_FALSE;
if (get_reverse(store, sizeof(store), hostname, if (get_reverse(store, sizeof(store), hostname,
lookup->ip6_int, true) == ISC_R_SUCCESS) { lookup->ip6_int, ISC_TRUE) == ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname)); strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr; lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
default_lookups = false; default_lookups = ISC_FALSE;
} else { } else {
strlcpy(lookup->textname, hostname, sizeof(lookup->textname)); strlcpy(lookup->textname, hostname, sizeof(lookup->textname));
usesearch = true; usesearch = ISC_TRUE;
} }
lookup->new_search = true; lookup->new_search = ISC_TRUE;
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
} }
@@ -880,7 +878,7 @@ main(int argc, char **argv) {
check_result(result, "isc_app_start"); check_result(result, "isc_app_start");
setup_libs(); setup_libs();
setup_system(ipv4only, ipv6only); setup_system(ipv4only, ipv6only);
parse_args(false, argc, argv); parse_args(ISC_FALSE, argc, argv);
if (keyfile[0] != 0) if (keyfile[0] != 0)
setup_file_key(); setup_file_key();
else if (keysecret[0] != 0) else if (keysecret[0] != 0)
+1 -1
View File
@@ -389,7 +389,7 @@
<command>host</command> appropriately converts character encoding of <command>host</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a domain name before sending a request to DNS server or displaying a
reply from the server. reply from the server.
If you'd like to turn off the IDN support for some reason, define If you'd like to turn off the IDN support for some reason, defines
the <envar>IDN_DISABLE</envar> environment variable. the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when The IDN support is disabled if the variable is set when
<command>host</command> runs. <command>host</command> runs.
+33 -35
View File
@@ -14,13 +14,11 @@
/*! \file */ /*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <dns/rdatalist.h> #include <dns/rdatalist.h>
#include <dst/dst.h> #include <dst/dst.h>
#include <isc/boolean.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/bufferlist.h> #include <isc/bufferlist.h>
#include <isc/formatcheck.h> #include <isc/formatcheck.h>
@@ -83,7 +81,7 @@ typedef struct dig_searchlist dig_searchlist_t;
/*% The dig_lookup structure */ /*% The dig_lookup structure */
struct dig_lookup { struct dig_lookup {
bool isc_boolean_t
pending, /*%< Pending a successful answer */ pending, /*%< Pending a successful answer */
waiting_connect, waiting_connect,
doing_xfr, doing_xfr,
@@ -141,8 +139,8 @@ struct dig_lookup {
dns_rdatatype_t rdtype; dns_rdatatype_t rdtype;
dns_rdatatype_t qrdtype; dns_rdatatype_t qrdtype;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
bool rdtypeset; isc_boolean_t rdtypeset;
bool rdclassset; isc_boolean_t rdclassset;
char name_space[BUFSIZE]; char name_space[BUFSIZE];
char oname_space[BUFSIZE]; char oname_space[BUFSIZE];
isc_buffer_t namebuf; isc_buffer_t namebuf;
@@ -160,17 +158,17 @@ struct dig_lookup {
dig_serverlist_t my_server_list; dig_serverlist_t my_server_list;
dig_searchlist_t *origin; dig_searchlist_t *origin;
dig_query_t *xfr_q; dig_query_t *xfr_q;
uint32_t retries; isc_uint32_t retries;
int nsfound; int nsfound;
uint16_t udpsize; isc_uint16_t udpsize;
int16_t edns; isc_int16_t edns;
int16_t padding; isc_int16_t padding;
uint32_t ixfr_serial; isc_uint32_t ixfr_serial;
isc_buffer_t rdatabuf; isc_buffer_t rdatabuf;
char rdatastore[MXNAME]; char rdatastore[MXNAME];
dst_context_t *tsigctx; dst_context_t *tsigctx;
isc_buffer_t *querysig; isc_buffer_t *querysig;
uint32_t msgcounter; isc_uint32_t msgcounter;
dns_fixedname_t fdomain; dns_fixedname_t fdomain;
isc_sockaddr_t *ecs_addr; isc_sockaddr_t *ecs_addr;
char *cookie; char *cookie;
@@ -186,7 +184,7 @@ struct dig_lookup {
/*% The dig_query structure */ /*% The dig_query structure */
struct dig_query { struct dig_query {
dig_lookup_t *lookup; dig_lookup_t *lookup;
bool waiting_connect, isc_boolean_t waiting_connect,
pending_free, pending_free,
waiting_senddone, waiting_senddone,
first_pass, first_pass,
@@ -196,11 +194,11 @@ struct dig_query {
recv_made, recv_made,
warn_id, warn_id,
timedout; timedout;
uint32_t first_rr_serial; isc_uint32_t first_rr_serial;
uint32_t second_rr_serial; isc_uint32_t second_rr_serial;
uint32_t msg_count; isc_uint32_t msg_count;
uint32_t rr_count; isc_uint32_t rr_count;
bool ixfr_axfr; isc_boolean_t ixfr_axfr;
char *servname; char *servname;
char *userarg; char *userarg;
isc_bufferlist_t sendlist, isc_bufferlist_t sendlist,
@@ -218,7 +216,7 @@ struct dig_query {
isc_sockaddr_t sockaddr; isc_sockaddr_t sockaddr;
isc_time_t time_sent; isc_time_t time_sent;
isc_time_t time_recv; isc_time_t time_recv;
uint64_t byte_count; isc_uint64_t byte_count;
isc_buffer_t sendbuf; isc_buffer_t sendbuf;
isc_timer_t *timer; isc_timer_t *timer;
}; };
@@ -246,7 +244,7 @@ extern dig_serverlist_t server_list;
extern dig_searchlistlist_t search_list; extern dig_searchlistlist_t search_list;
extern unsigned int extrabytes; extern unsigned int extrabytes;
extern bool check_ra, have_ipv4, have_ipv6, specified_source, extern isc_boolean_t check_ra, have_ipv4, have_ipv6, specified_source,
usesearch, showsearch; usesearch, showsearch;
extern in_port_t port; extern in_port_t port;
extern unsigned int timeout; extern unsigned int timeout;
@@ -262,17 +260,17 @@ extern char keysecret[MXNAME];
extern const dns_name_t *hmacname; extern const dns_name_t *hmacname;
extern unsigned int digestbits; extern unsigned int digestbits;
extern dns_tsigkey_t *tsigkey; extern dns_tsigkey_t *tsigkey;
extern bool validated; extern isc_boolean_t validated;
extern isc_taskmgr_t *taskmgr; extern isc_taskmgr_t *taskmgr;
extern isc_task_t *global_task; extern isc_task_t *global_task;
extern bool free_now; extern isc_boolean_t free_now;
extern bool debugging, debugtiming, memdebugging; extern isc_boolean_t debugging, debugtiming, memdebugging;
extern bool keep_open; extern isc_boolean_t keep_open;
extern char *progname; extern char *progname;
extern int tries; extern int tries;
extern int fatalexit; extern int fatalexit;
extern bool verbose; extern isc_boolean_t verbose;
/* /*
* Routines in dighost.c. * Routines in dighost.c.
@@ -284,8 +282,8 @@ int
getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp); getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
isc_result_t isc_result_t
get_reverse(char *reverse, size_t len, char *value, bool ip6_int, get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
bool strict); isc_boolean_t strict);
ISC_PLATFORM_NORETURN_PRE void ISC_PLATFORM_NORETURN_PRE void
fatal(const char *format, ...) fatal(const char *format, ...)
@@ -304,7 +302,7 @@ debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
void void
check_result(isc_result_t result, const char *msg); check_result(isc_result_t result, const char *msg);
bool isc_boolean_t
setup_lookup(dig_lookup_t *lookup); setup_lookup(dig_lookup_t *lookup);
void void
@@ -326,14 +324,14 @@ void
setup_libs(void); setup_libs(void);
void void
setup_system(bool ipv4only, bool ipv6only); setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only);
isc_result_t isc_result_t
parse_uint(uint32_t *uip, const char *value, uint32_t max, parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
const char *desc); const char *desc);
isc_result_t isc_result_t
parse_xint(uint32_t *uip, const char *value, uint32_t max, parse_xint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
const char *desc); const char *desc);
isc_result_t isc_result_t
@@ -343,13 +341,13 @@ void
parse_hmac(const char *hmacstr); parse_hmac(const char *hmacstr);
dig_lookup_t * dig_lookup_t *
requeue_lookup(dig_lookup_t *lookold, bool servers); requeue_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
dig_lookup_t * dig_lookup_t *
make_empty_lookup(void); make_empty_lookup(void);
dig_lookup_t * dig_lookup_t *
clone_lookup(dig_lookup_t *lookold, bool servers); clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
dig_server_t * dig_server_t *
make_server(const char *servname, const char *userarg); make_server(const char *servname, const char *userarg);
@@ -378,7 +376,7 @@ set_search_domain(char *domain);
* then assigned to the appropriate function pointer * then assigned to the appropriate function pointer
*/ */
extern isc_result_t extern isc_result_t
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, bool headers); (*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers);
/*%< /*%<
* Print the final result of the lookup. * Print the final result of the lookup.
*/ */
@@ -420,7 +418,7 @@ dig_setup(int argc, char **argv);
* Call to supply new parameters for the next lookup * Call to supply new parameters for the next lookup
*/ */
void void
dig_query_setup(bool, bool, int argc, char **argv); dig_query_setup(isc_boolean_t, isc_boolean_t, int argc, char **argv);
/*%< /*%<
* set the main application event cycle running * set the main application event cycle running
+86 -88
View File
@@ -11,8 +11,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@@ -55,18 +53,18 @@
#endif #endif
#endif #endif
static bool short_form = true, static isc_boolean_t short_form = ISC_TRUE,
tcpmode = false, tcpmode_set = false, tcpmode = ISC_FALSE, tcpmode_set = ISC_FALSE,
identify = false, stats = true, identify = ISC_FALSE, stats = ISC_TRUE,
comments = true, section_question = true, comments = ISC_TRUE, section_question = ISC_TRUE,
section_answer = true, section_authority = true, section_answer = ISC_TRUE, section_authority = ISC_TRUE,
section_additional = true, recurse = true, section_additional = ISC_TRUE, recurse = ISC_TRUE,
aaonly = false, nofail = true, aaonly = ISC_FALSE, nofail = ISC_TRUE,
default_lookups = true, a_noanswer = false; default_lookups = ISC_TRUE, a_noanswer = ISC_FALSE;
static bool interactive; static isc_boolean_t interactive;
static bool in_use = false; static isc_boolean_t in_use = ISC_FALSE;
static char defclass[MXRD] = "IN"; static char defclass[MXRD] = "IN";
static char deftype[MXRD] = "A"; static char deftype[MXRD] = "A";
static isc_event_t *global_event = NULL; static isc_event_t *global_event = NULL;
@@ -215,7 +213,7 @@ printrdata(dns_rdata_t *rdata) {
isc_result_t result; isc_result_t result;
isc_buffer_t *b = NULL; isc_buffer_t *b = NULL;
unsigned int size = 1024; unsigned int size = 1024;
bool done = false; isc_boolean_t done = ISC_FALSE;
if (rdata->type < N_KNOWN_RRTYPES) if (rdata->type < N_KNOWN_RRTYPES)
printf("%s", rtypetext[rdata->type]); printf("%s", rtypetext[rdata->type]);
@@ -230,7 +228,7 @@ printrdata(dns_rdata_t *rdata) {
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
printf("%.*s\n", (int)isc_buffer_usedlength(b), printf("%.*s\n", (int)isc_buffer_usedlength(b),
(char *)isc_buffer_base(b)); (char *)isc_buffer_base(b));
done = true; done = ISC_TRUE;
} else if (result != ISC_R_NOSPACE) } else if (result != ISC_R_NOSPACE)
check_result(result, "dns_rdata_totext"); check_result(result, "dns_rdata_totext");
isc_buffer_free(&b); isc_buffer_free(&b);
@@ -239,7 +237,7 @@ printrdata(dns_rdata_t *rdata) {
} }
static isc_result_t static isc_result_t
printsection(dig_query_t *query, dns_message_t *msg, bool headers, printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
dns_section_t section) { dns_section_t section) {
isc_result_t result, loopresult; isc_result_t result, loopresult;
dns_name_t *name; dns_name_t *name;
@@ -306,7 +304,7 @@ printsection(dig_query_t *query, dns_message_t *msg, bool headers,
} }
static isc_result_t static isc_result_t
detailsection(dig_query_t *query, dns_message_t *msg, bool headers, detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
dns_section_t section) { dns_section_t section) {
isc_result_t result, loopresult; isc_result_t result, loopresult;
dns_name_t *name; dns_name_t *name;
@@ -431,7 +429,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
} }
static isc_result_t static isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) { printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
char servtext[ISC_SOCKADDR_FORMATSIZE]; char servtext[ISC_SOCKADDR_FORMATSIZE];
/* I've we've gotten this far, we've reached a server. */ /* I've we've gotten this far, we've reached a server. */
@@ -450,10 +448,10 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
if (!short_form) { if (!short_form) {
puts("------------"); puts("------------");
/* detailheader(query, msg);*/ /* detailheader(query, msg);*/
detailsection(query, msg, true, DNS_SECTION_QUESTION); detailsection(query, msg, ISC_TRUE, DNS_SECTION_QUESTION);
detailsection(query, msg, true, DNS_SECTION_ANSWER); detailsection(query, msg, ISC_TRUE, DNS_SECTION_ANSWER);
detailsection(query, msg, true, DNS_SECTION_AUTHORITY); detailsection(query, msg, ISC_TRUE, DNS_SECTION_AUTHORITY);
detailsection(query, msg, true, DNS_SECTION_ADDITIONAL); detailsection(query, msg, ISC_TRUE, DNS_SECTION_ADDITIONAL);
puts("------------"); puts("------------");
} }
@@ -481,12 +479,12 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
dns_name_copy(query->lookup->name, name, NULL); dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name); chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr)); dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, false); lookup = clone_lookup(query->lookup, ISC_FALSE);
if (lookup != NULL) { if (lookup != NULL) {
strlcpy(lookup->textname, namestr, strlcpy(lookup->textname, namestr,
sizeof(lookup->textname)); sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_aaaa; lookup->rdtype = dns_rdatatype_aaaa;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
lookup->origin = NULL; lookup->origin = NULL;
lookup->retries = tries; lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -500,7 +498,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
printsection(query, msg, headers, DNS_SECTION_ANSWER); printsection(query, msg, headers, DNS_SECTION_ANSWER);
else { else {
if (default_lookups && query->lookup->rdtype == dns_rdatatype_a) if (default_lookups && query->lookup->rdtype == dns_rdatatype_a)
a_noanswer = true; a_noanswer = ISC_TRUE;
else if (!default_lookups || else if (!default_lookups ||
(query->lookup->rdtype == dns_rdatatype_aaaa && (query->lookup->rdtype == dns_rdatatype_aaaa &&
@@ -522,7 +520,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
} }
static void static void
show_settings(bool full, bool serv_only) { show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
dig_server_t *srv; dig_server_t *srv;
isc_sockaddr_t sockaddr; isc_sockaddr_t sockaddr;
dig_searchlist_t *listent; dig_searchlist_t *listent;
@@ -567,7 +565,7 @@ show_settings(bool full, bool serv_only) {
printf("\n"); printf("\n");
} }
static bool static isc_boolean_t
testtype(char *typetext) { testtype(char *typetext) {
isc_result_t result; isc_result_t result;
isc_textregion_t tr; isc_textregion_t tr;
@@ -577,14 +575,14 @@ testtype(char *typetext) {
tr.length = strlen(typetext); tr.length = strlen(typetext);
result = dns_rdatatype_fromtext(&rdtype, &tr); result = dns_rdatatype_fromtext(&rdtype, &tr);
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
return (true); return (ISC_TRUE);
else { else {
printf("unknown query type: %s\n", typetext); printf("unknown query type: %s\n", typetext);
return (false); return (ISC_FALSE);
} }
} }
static bool static isc_boolean_t
testclass(char *typetext) { testclass(char *typetext) {
isc_result_t result; isc_result_t result;
isc_textregion_t tr; isc_textregion_t tr;
@@ -594,24 +592,24 @@ testclass(char *typetext) {
tr.length = strlen(typetext); tr.length = strlen(typetext);
result = dns_rdataclass_fromtext(&rdclass, &tr); result = dns_rdataclass_fromtext(&rdclass, &tr);
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
return (true); return (ISC_TRUE);
else { else {
printf("unknown query class: %s\n", typetext); printf("unknown query class: %s\n", typetext);
return (false); return (ISC_FALSE);
} }
} }
static void static void
set_port(const char *value) { set_port(const char *value) {
uint32_t n; isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, 65535, "port"); isc_result_t result = parse_uint(&n, value, 65535, "port");
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
port = (uint16_t) n; port = (isc_uint16_t) n;
} }
static void static void
set_timeout(const char *value) { set_timeout(const char *value) {
uint32_t n; isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout"); isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout");
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
timeout = n; timeout = n;
@@ -619,7 +617,7 @@ set_timeout(const char *value) {
static void static void
set_tries(const char *value) { set_tries(const char *value) {
uint32_t n; isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, INT_MAX, "tries"); isc_result_t result = parse_uint(&n, value, INT_MAX, "tries");
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
tries = n; tries = n;
@@ -627,7 +625,7 @@ set_tries(const char *value) {
static void static void
set_ndots(const char *value) { set_ndots(const char *value) {
uint32_t n; isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, 128, "ndots"); isc_result_t result = parse_uint(&n, value, 128, "ndots");
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
ndots = n; ndots = n;
@@ -646,7 +644,7 @@ setoption(char *opt) {
((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0)) ((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0))
if (CHECKOPT("all", 3)) { if (CHECKOPT("all", 3)) {
show_settings(true, false); show_settings(ISC_TRUE, ISC_FALSE);
} else if (strncasecmp(opt, "class=", 6) == 0) { } else if (strncasecmp(opt, "class=", 6) == 0) {
if (testclass(&opt[6])) if (testclass(&opt[6]))
strlcpy(defclass, &opt[6], sizeof(defclass)); strlcpy(defclass, &opt[6], sizeof(defclass));
@@ -656,41 +654,41 @@ setoption(char *opt) {
} else if (strncasecmp(opt, "type=", 5) == 0) { } else if (strncasecmp(opt, "type=", 5) == 0) {
if (testtype(&opt[5])) { if (testtype(&opt[5])) {
strlcpy(deftype, &opt[5], sizeof(deftype)); strlcpy(deftype, &opt[5], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "ty=", 3) == 0) { } else if (strncasecmp(opt, "ty=", 3) == 0) {
if (testtype(&opt[3])) { if (testtype(&opt[3])) {
strlcpy(deftype, &opt[3], sizeof(deftype)); strlcpy(deftype, &opt[3], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "querytype=", 10) == 0) { } else if (strncasecmp(opt, "querytype=", 10) == 0) {
if (testtype(&opt[10])) { if (testtype(&opt[10])) {
strlcpy(deftype, &opt[10], sizeof(deftype)); strlcpy(deftype, &opt[10], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "query=", 6) == 0) { } else if (strncasecmp(opt, "query=", 6) == 0) {
if (testtype(&opt[6])) { if (testtype(&opt[6])) {
strlcpy(deftype, &opt[6], sizeof(deftype)); strlcpy(deftype, &opt[6], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "qu=", 3) == 0) { } else if (strncasecmp(opt, "qu=", 3) == 0) {
if (testtype(&opt[3])) { if (testtype(&opt[3])) {
strlcpy(deftype, &opt[3], sizeof(deftype)); strlcpy(deftype, &opt[3], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "q=", 2) == 0) { } else if (strncasecmp(opt, "q=", 2) == 0) {
if (testtype(&opt[2])) { if (testtype(&opt[2])) {
strlcpy(deftype, &opt[2], sizeof(deftype)); strlcpy(deftype, &opt[2], sizeof(deftype));
default_lookups = false; default_lookups = ISC_FALSE;
} }
} else if (strncasecmp(opt, "domain=", 7) == 0) { } else if (strncasecmp(opt, "domain=", 7) == 0) {
strlcpy(domainopt, &opt[7], sizeof(domainopt)); strlcpy(domainopt, &opt[7], sizeof(domainopt));
set_search_domain(domainopt); set_search_domain(domainopt);
usesearch = true; usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "do=", 3) == 0) { } else if (strncasecmp(opt, "do=", 3) == 0) {
strlcpy(domainopt, &opt[3], sizeof(domainopt)); strlcpy(domainopt, &opt[3], sizeof(domainopt));
set_search_domain(domainopt); set_search_domain(domainopt);
usesearch = true; usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "port=", 5) == 0) { } else if (strncasecmp(opt, "port=", 5) == 0) {
set_port(&opt[5]); set_port(&opt[5]);
} else if (strncasecmp(opt, "po=", 3) == 0) { } else if (strncasecmp(opt, "po=", 3) == 0) {
@@ -700,43 +698,43 @@ setoption(char *opt) {
} else if (strncasecmp(opt, "t=", 2) == 0) { } else if (strncasecmp(opt, "t=", 2) == 0) {
set_timeout(&opt[2]); set_timeout(&opt[2]);
} else if (CHECKOPT("recurse", 3)) { } else if (CHECKOPT("recurse", 3)) {
recurse = true; recurse = ISC_TRUE;
} else if (CHECKOPT("norecurse", 5)) { } else if (CHECKOPT("norecurse", 5)) {
recurse = false; recurse = ISC_FALSE;
} else if (strncasecmp(opt, "retry=", 6) == 0) { } else if (strncasecmp(opt, "retry=", 6) == 0) {
set_tries(&opt[6]); set_tries(&opt[6]);
} else if (strncasecmp(opt, "ret=", 4) == 0) { } else if (strncasecmp(opt, "ret=", 4) == 0) {
set_tries(&opt[4]); set_tries(&opt[4]);
} else if (CHECKOPT("defname", 3)) { } else if (CHECKOPT("defname", 3)) {
usesearch = true; usesearch = ISC_TRUE;
} else if (CHECKOPT("nodefname", 5)) { } else if (CHECKOPT("nodefname", 5)) {
usesearch = false; usesearch = ISC_FALSE;
} else if (CHECKOPT("vc", 2)) { } else if (CHECKOPT("vc", 2)) {
tcpmode = true; tcpmode = ISC_TRUE;
tcpmode_set = true; tcpmode_set = ISC_TRUE;
} else if (CHECKOPT("novc", 4)) { } else if (CHECKOPT("novc", 4)) {
tcpmode = false; tcpmode = ISC_FALSE;
tcpmode_set = true; tcpmode_set = ISC_TRUE;
} else if (CHECKOPT("debug", 3)) { } else if (CHECKOPT("debug", 3)) {
short_form = false; short_form = ISC_FALSE;
showsearch = true; showsearch = ISC_TRUE;
} else if (CHECKOPT("nodebug", 5)) { } else if (CHECKOPT("nodebug", 5)) {
short_form = true; short_form = ISC_TRUE;
showsearch = false; showsearch = ISC_FALSE;
} else if (CHECKOPT("d2", 2)) { } else if (CHECKOPT("d2", 2)) {
debugging = true; debugging = ISC_TRUE;
} else if (CHECKOPT("nod2", 4)) { } else if (CHECKOPT("nod2", 4)) {
debugging = false; debugging = ISC_FALSE;
} else if (CHECKOPT("search", 3)) { } else if (CHECKOPT("search", 3)) {
usesearch = true; usesearch = ISC_TRUE;
} else if (CHECKOPT("nosearch", 5)) { } else if (CHECKOPT("nosearch", 5)) {
usesearch = false; usesearch = ISC_FALSE;
} else if (CHECKOPT("sil", 3)) { } else if (CHECKOPT("sil", 3)) {
/* deprecation_msg = false; */ /* deprecation_msg = ISC_FALSE; */
} else if (CHECKOPT("fail", 3)) { } else if (CHECKOPT("fail", 3)) {
nofail=false; nofail=ISC_FALSE;
} else if (CHECKOPT("nofail", 5)) { } else if (CHECKOPT("nofail", 5)) {
nofail=true; nofail=ISC_TRUE;
} else if (strncasecmp(opt, "ndots=", 6) == 0) { } else if (strncasecmp(opt, "ndots=", 6) == 0) {
set_ndots(&opt[6]); set_ndots(&opt[6]);
} else { } else {
@@ -755,7 +753,7 @@ addlookup(char *opt) {
debug("addlookup()"); debug("addlookup()");
a_noanswer = false; a_noanswer = ISC_FALSE;
tr.base = deftype; tr.base = deftype;
tr.length = strlen(deftype); tr.length = strlen(deftype);
@@ -772,21 +770,21 @@ addlookup(char *opt) {
rdclass = dns_rdataclass_in; rdclass = dns_rdataclass_in;
} }
lookup = make_empty_lookup(); lookup = make_empty_lookup();
if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, true) if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, ISC_TRUE)
== ISC_R_SUCCESS) { == ISC_R_SUCCESS) {
strlcpy(lookup->textname, store, sizeof(lookup->textname)); strlcpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr; lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
} else { } else {
strlcpy(lookup->textname, opt, sizeof(lookup->textname)); strlcpy(lookup->textname, opt, sizeof(lookup->textname));
lookup->rdtype = rdtype; lookup->rdtype = rdtype;
lookup->rdtypeset = true; lookup->rdtypeset = ISC_TRUE;
} }
lookup->rdclass = rdclass; lookup->rdclass = rdclass;
lookup->rdclassset = true; lookup->rdclassset = ISC_TRUE;
lookup->trace = false; lookup->trace = ISC_FALSE;
lookup->trace_root = lookup->trace; lookup->trace_root = lookup->trace;
lookup->ns_search_only = false; lookup->ns_search_only = ISC_FALSE;
lookup->identify = identify; lookup->identify = identify;
lookup->recurse = recurse; lookup->recurse = recurse;
lookup->aaonly = aaonly; lookup->aaonly = aaonly;
@@ -794,7 +792,7 @@ addlookup(char *opt) {
lookup->udpsize = 0; lookup->udpsize = 0;
lookup->comments = comments; lookup->comments = comments;
if (lookup->rdtype == dns_rdatatype_any && !tcpmode_set) if (lookup->rdtype == dns_rdatatype_any && !tcpmode_set)
lookup->tcp_mode = true; lookup->tcp_mode = ISC_TRUE;
else else
lookup->tcp_mode = tcpmode; lookup->tcp_mode = tcpmode;
lookup->stats = stats; lookup->stats = stats;
@@ -802,9 +800,9 @@ addlookup(char *opt) {
lookup->section_answer = section_answer; lookup->section_answer = section_answer;
lookup->section_authority = section_authority; lookup->section_authority = section_authority;
lookup->section_additional = section_additional; lookup->section_additional = section_additional;
lookup->new_search = true; lookup->new_search = ISC_TRUE;
if (nofail) if (nofail)
lookup->servfail_stops = false; lookup->servfail_stops = ISC_FALSE;
ISC_LIST_INIT(lookup->q); ISC_LIST_INIT(lookup->q);
ISC_LINK_INIT(lookup, link); ISC_LINK_INIT(lookup, link);
ISC_LIST_APPEND(lookup_list, lookup, link); ISC_LIST_APPEND(lookup_list, lookup, link);
@@ -828,11 +826,11 @@ do_next_command(char *input) {
(strcasecmp(ptr, "lserver") == 0)) { (strcasecmp(ptr, "lserver") == 0)) {
isc_app_block(); isc_app_block();
set_nameserver(arg); set_nameserver(arg);
check_ra = false; check_ra = ISC_FALSE;
isc_app_unblock(); isc_app_unblock();
show_settings(true, true); show_settings(ISC_TRUE, ISC_TRUE);
} else if (strcasecmp(ptr, "exit") == 0) { } else if (strcasecmp(ptr, "exit") == 0) {
in_use = false; in_use = ISC_FALSE;
} else if (strcasecmp(ptr, "help") == 0 || } else if (strcasecmp(ptr, "help") == 0 ||
strcasecmp(ptr, "?") == 0) { strcasecmp(ptr, "?") == 0) {
printf("The '%s' command is not yet implemented.\n", ptr); printf("The '%s' command is not yet implemented.\n", ptr);
@@ -869,7 +867,7 @@ get_next_command(void) {
ptr = fgets(buf, COMMSIZE, stdin); ptr = fgets(buf, COMMSIZE, stdin);
isc_app_unblock(); isc_app_unblock();
if (ptr == NULL) { if (ptr == NULL) {
in_use = false; in_use = ISC_FALSE;
} else } else
do_next_command(ptr); do_next_command(ptr);
#ifdef HAVE_READLINE #ifdef HAVE_READLINE
@@ -881,9 +879,9 @@ get_next_command(void) {
static void static void
parse_args(int argc, char **argv) { parse_args(int argc, char **argv) {
bool have_lookup = false; isc_boolean_t have_lookup = ISC_FALSE;
usesearch = true; usesearch = ISC_TRUE;
for (argc--, argv++; argc > 0; argc--, argv++) { for (argc--, argv++; argc > 0; argc--, argv++) {
debug("main parsing %s", argv[0]); debug("main parsing %s", argv[0]);
if (argv[0][0] == '-') { if (argv[0][0] == '-') {
@@ -893,15 +891,15 @@ parse_args(int argc, char **argv) {
} else if (argv[0][1] != 0) { } else if (argv[0][1] != 0) {
setoption(&argv[0][1]); setoption(&argv[0][1]);
} else } else
have_lookup = true; have_lookup = ISC_TRUE;
} else { } else {
if (!have_lookup) { if (!have_lookup) {
have_lookup = true; have_lookup = ISC_TRUE;
in_use = true; in_use = ISC_TRUE;
addlookup(argv[0]); addlookup(argv[0]);
} else { } else {
set_nameserver(argv[0]); set_nameserver(argv[0]);
check_ra = false; check_ra = ISC_FALSE;
} }
} }
} }
@@ -972,13 +970,13 @@ int
main(int argc, char **argv) { main(int argc, char **argv) {
isc_result_t result; isc_result_t result;
interactive = isatty(0); interactive = ISC_TF(isatty(0));
ISC_LIST_INIT(lookup_list); ISC_LIST_INIT(lookup_list);
ISC_LIST_INIT(server_list); ISC_LIST_INIT(server_list);
ISC_LIST_INIT(search_list); ISC_LIST_INIT(search_list);
check_ra = true; check_ra = ISC_TRUE;
/* setup dighost callbacks */ /* setup dighost callbacks */
dighost_printmessage = printmessage; dighost_printmessage = printmessage;
@@ -992,7 +990,7 @@ main(int argc, char **argv) {
setup_libs(); setup_libs();
progname = argv[0]; progname = argv[0];
setup_system(false, false); setup_system(ISC_FALSE, ISC_FALSE);
parse_args(argc, argv); parse_args(argc, argv);
if (keyfile[0] != 0) if (keyfile[0] != 0)
setup_file_key(); setup_file_key();
@@ -1006,7 +1004,7 @@ main(int argc, char **argv) {
else else
result = isc_app_onrun(mctx, global_task, getinput, NULL); result = isc_app_onrun(mctx, global_task, getinput, NULL);
check_result(result, "isc_app_onrun"); check_result(result, "isc_app_onrun");
in_use = !in_use; in_use = ISC_TF(!in_use);
(void)isc_app_run(); (void)isc_app_run();
-15
View File
@@ -478,21 +478,6 @@ nslookup -query=hinfo -timeout=10
</para> </para>
</refsection> </refsection>
<refsection><info><title>IDN SUPPORT</title></info>
<para>
If <command>nslookup</command> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
<command>nslookup</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, define
the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>nslookup</command> runs.
</para>
</refsection>
<refsection><info><title>FILES</title></info> <refsection><info><title>FILES</title></info>
<para><filename>/etc/resolv.conf</filename> <para><filename>/etc/resolv.conf</filename>
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+2 -2
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -77,7 +77,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+4 -4
View File
@@ -53,7 +53,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -68,7 +68,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -79,7 +79,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -98,7 +98,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+9 -8
View File
@@ -15,14 +15,15 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@ @BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = -DVERSION=\"${VERSION}\" CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
-DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
CWARNINGS = CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@ ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@ ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
DNSDEPLIBS = ../../lib/dns/libdns.@A@ DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@ ISCDEPLIBS = ../../lib/isc/libisc.@A@
@@ -115,12 +116,12 @@ installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: ${TARGETS} installdirs install:: ${TARGETS} installdirs
for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir} || exit 1; done for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir}; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
uninstall:: uninstall::
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m ; done
for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t || exit 1; done for t in ${TARGETS}; do ${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/$$t ; done
clean distclean:: clean distclean::
rm -f ${TARGETS} rm -f ${TARGETS}
+1 -1
View File
@@ -102,7 +102,7 @@ Specify a digest algorithm to use when converting CDNSKEY records to DS records\
.sp .sp
The The
\fIalgorithm\fR \fIalgorithm\fR
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&. must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST, or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&.
.RE .RE
.PP .PP
\-c \fIclass\fR \-c \fIclass\fR
+48 -50
View File
@@ -19,8 +19,6 @@
#include <config.h> #include <config.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <isc/buffer.h> #include <isc/buffer.h>
@@ -55,14 +53,14 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
#include "dnssectool.h" #include "dnssectool.h"
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */ #define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif #endif
const char *program = "dnssec-cds"; const char *program = "dnssec-cds";
@@ -86,7 +84,7 @@ static dns_rdataclass_t rdclass = dns_rdataclass_in;
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype() * List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
* from -a arguments. The size of the array is an arbitrary limit. * from -a arguments. The size of the array is an arbitrary limit.
*/ */
static uint8_t dtype[8]; static isc_uint8_t dtype[8];
static const char *startstr = NULL; /* from which we derive notbefore */ static const char *startstr = NULL; /* from which we derive notbefore */
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */ static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
@@ -129,7 +127,7 @@ static int nkey; /* number of child zone DNSKEY records */
typedef struct keyinfo { typedef struct keyinfo {
dns_rdata_t rdata; dns_rdata_t rdata;
dst_key_t *dst; dst_key_t *dst;
uint8_t algo; isc_uint8_t algo;
dns_keytag_t tag; dns_keytag_t tag;
} keyinfo_t; } keyinfo_t;
@@ -260,7 +258,7 @@ load_db(const char *filename, dns_db_t **dbp, dns_dbnode_t **nodep) {
isc_result_totext(result)); isc_result_totext(result));
} }
result = dns_db_findnode(*dbp, name, false, nodep); result = dns_db_findnode(*dbp, name, ISC_FALSE, nodep);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
fatal("can't find %s node in %s", namestr, filename); fatal("can't find %s node in %s", namestr, filename);
} }
@@ -314,7 +312,7 @@ get_dsset_name(char *filename, size_t size,
} }
isc_buffer_putstr(&buf, prefix); isc_buffer_putstr(&buf, prefix);
result = dns_name_tofilenametext(name, false, &buf); result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
check_result(result, "dns_name_tofilenametext()"); check_result(result, "dns_name_tofilenametext()");
if (isc_buffer_availablelength(&buf) == 0) { if (isc_buffer_availablelength(&buf) == 0) {
fatal("%s: pathname too long", path); fatal("%s: pathname too long", path);
@@ -402,7 +400,7 @@ formatset(dns_rdataset_t *rdataset) {
static void static void
write_parent_set(const char *path, const char *inplace, write_parent_set(const char *path, const char *inplace,
bool nsupdate, dns_rdataset_t *rdataset) isc_boolean_t nsupdate, dns_rdataset_t *rdataset)
{ {
isc_result_t result; isc_result_t result;
isc_buffer_t *buf = NULL; isc_buffer_t *buf = NULL;
@@ -469,7 +467,7 @@ typedef enum { LOOSE, TIGHT } strictness_t;
/* /*
* Find out if any (C)DS record matches a particular (C)DNSKEY. * Find out if any (C)DS record matches a particular (C)DNSKEY.
*/ */
static bool static isc_boolean_t
match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness) match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
{ {
isc_result_t result; isc_result_t result;
@@ -483,7 +481,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_t dsrdata = DNS_RDATA_INIT;
dns_rdata_t newdsrdata = DNS_RDATA_INIT; dns_rdata_t newdsrdata = DNS_RDATA_INIT;
dns_rdatatype_t keytype; dns_rdatatype_t keytype;
bool c; isc_boolean_t c;
dns_rdataset_current(dsset, &dsrdata); dns_rdataset_current(dsset, &dsrdata);
result = dns_rdata_tostruct(&dsrdata, &ds, NULL); result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
@@ -513,13 +511,13 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
vbprintf(1, "found matching %s %d %d %d\n", vbprintf(1, "found matching %s %d %d %d\n",
c ? "CDS" : "DS", c ? "CDS" : "DS",
ds.key_tag, ds.algorithm, ds.digest_type); ds.key_tag, ds.algorithm, ds.digest_type);
return (true); return (ISC_TRUE);
} else if (strictness == TIGHT) { } else if (strictness == TIGHT) {
vbprintf(0, "key does not match %s %d %d %d " vbprintf(0, "key does not match %s %d %d %d "
"when it looks like it should\n", "when it looks like it should\n",
c ? "CDS" : "DS", c ? "CDS" : "DS",
ds.key_tag, ds.algorithm, ds.digest_type); ds.key_tag, ds.algorithm, ds.digest_type);
return (false); return (ISC_FALSE);
} }
} }
@@ -530,7 +528,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
? "CDNSKEY" : "DNSKEY", ? "CDNSKEY" : "DNSKEY",
ki->tag, ki->algo); ki->tag, ki->algo);
return (false); return (ISC_FALSE);
} }
/* /*
@@ -619,12 +617,12 @@ free_keytable(keyinfo_t **keytable_p) {
* otherwise the key algorithm. This is used by the signature coverage * otherwise the key algorithm. This is used by the signature coverage
* check functions below. * check functions below.
*/ */
static uint8_t * static isc_uint8_t *
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset, matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
dns_rdataset_t *sigset) dns_rdataset_t *sigset)
{ {
isc_result_t result; isc_result_t result;
uint8_t *algo; isc_uint8_t *algo;
int i; int i;
algo = isc_mem_get(mctx, nkey); algo = isc_mem_get(mctx, nkey);
@@ -670,7 +668,7 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
} }
result = dns_dnssec_verify(name, rdataset, ki->dst, result = dns_dnssec_verify(name, rdataset, ki->dst,
false, 0, mctx, ISC_FALSE, 0, mctx,
&sigrdata, NULL); &sigrdata, NULL);
if (result != ISC_R_SUCCESS && if (result != ISC_R_SUCCESS &&
@@ -706,13 +704,13 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
* Consume the result of matching_sigs(). When checking records * Consume the result of matching_sigs(). When checking records
* fetched from the child zone, any working signature is enough. * fetched from the child zone, any working signature is enough.
*/ */
static bool static isc_boolean_t
signed_loose(uint8_t *algo) { signed_loose(isc_uint8_t *algo) {
bool ok = false; isc_boolean_t ok = ISC_FALSE;
int i; int i;
for (i = 0; i < nkey; i++) { for (i = 0; i < nkey; i++) {
if (algo[i] != 0) { if (algo[i] != 0) {
ok = true; ok = ISC_TRUE;
} }
} }
isc_mem_put(mctx, algo, nkey); isc_mem_put(mctx, algo, nkey);
@@ -725,10 +723,10 @@ signed_loose(uint8_t *algo) {
* key algorithm in the DS RRset must have a signature in the DNSKEY * key algorithm in the DS RRset must have a signature in the DNSKEY
* RRset. * RRset.
*/ */
static bool static isc_boolean_t
signed_strict(dns_rdataset_t *dsset, uint8_t *algo) { signed_strict(dns_rdataset_t *dsset, isc_uint8_t *algo) {
isc_result_t result; isc_result_t result;
bool all_ok = true; isc_boolean_t all_ok = ISC_TRUE;
for (result = dns_rdataset_first(dsset); for (result = dns_rdataset_first(dsset);
result == ISC_R_SUCCESS; result == ISC_R_SUCCESS;
@@ -736,23 +734,23 @@ signed_strict(dns_rdataset_t *dsset, uint8_t *algo) {
{ {
dns_rdata_t dsrdata = DNS_RDATA_INIT; dns_rdata_t dsrdata = DNS_RDATA_INIT;
dns_rdata_ds_t ds; dns_rdata_ds_t ds;
bool ds_ok; isc_boolean_t ds_ok;
int i; int i;
dns_rdataset_current(dsset, &dsrdata); dns_rdataset_current(dsset, &dsrdata);
result = dns_rdata_tostruct(&dsrdata, &ds, NULL); result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
check_result(result, "dns_rdata_tostruct(DS)"); check_result(result, "dns_rdata_tostruct(DS)");
ds_ok = false; ds_ok = ISC_FALSE;
for (i = 0; i < nkey; i++) { for (i = 0; i < nkey; i++) {
if (algo[i] == ds.algorithm) { if (algo[i] == ds.algorithm) {
ds_ok = true; ds_ok = ISC_TRUE;
} }
} }
if (!ds_ok) { if (!ds_ok) {
vbprintf(0, "missing signature for algorithm %d " vbprintf(0, "missing signature for algorithm %d "
"(key %d)\n", ds.algorithm, ds.key_tag); "(key %d)\n", ds.algorithm, ds.key_tag);
all_ok = false; all_ok = ISC_FALSE;
} }
} }
@@ -850,14 +848,14 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
*/ */
static int static int
cmp_dtype(const void *ap, const void *bp) { cmp_dtype(const void *ap, const void *bp) {
int a = *(const uint8_t *)ap; int a = *(const isc_uint8_t *)ap;
int b = *(const uint8_t *)bp; int b = *(const isc_uint8_t *)bp;
return (a - b); return (a - b);
} }
static void static void
add_dtype(const char *dn) { add_dtype(const char *dn) {
uint8_t dt; isc_uint8_t dt;
unsigned i, n; unsigned i, n;
dt = strtodsdigest(dn); dt = strtodsdigest(dn);
@@ -874,7 +872,7 @@ add_dtype(const char *dn) {
static void static void
make_new_ds_set(ds_maker_func_t *ds_from_rdata, make_new_ds_set(ds_maker_func_t *ds_from_rdata,
uint32_t ttl, dns_rdataset_t *rdset) isc_uint32_t ttl, dns_rdataset_t *rdset)
{ {
unsigned int size = 16; unsigned int size = 16;
for (;;) { for (;;) {
@@ -936,14 +934,14 @@ rdata_cmp(const void *rdata1, const void *rdata2) {
* Ensure that every key identified by the DS RRset has the same set of * Ensure that every key identified by the DS RRset has the same set of
* digest types. * digest types.
*/ */
static bool static isc_boolean_t
consistent_digests(dns_rdataset_t *dsset) { consistent_digests(dns_rdataset_t *dsset) {
isc_result_t result; isc_result_t result;
dns_rdata_t *arrdata; dns_rdata_t *arrdata;
dns_rdata_ds_t *ds; dns_rdata_ds_t *ds;
dns_keytag_t key_tag; dns_keytag_t key_tag;
uint8_t algorithm; isc_uint8_t algorithm;
bool match; isc_boolean_t match;
int i, j, n, d; int i, j, n, d;
/* /*
@@ -997,7 +995,7 @@ consistent_digests(dns_rdataset_t *dsset) {
/* /*
* Check subsequent keys match the first one * Check subsequent keys match the first one
*/ */
match = true; match = ISC_TRUE;
while (i < n) { while (i < n) {
key_tag = ds[i].key_tag; key_tag = ds[i].key_tag;
algorithm = ds[i].algorithm; algorithm = ds[i].algorithm;
@@ -1006,7 +1004,7 @@ consistent_digests(dns_rdataset_t *dsset) {
ds[i+j].algorithm != algorithm || ds[i+j].algorithm != algorithm ||
ds[i+j].digest_type != ds[j].digest_type) ds[i+j].digest_type != ds[j].digest_type)
{ {
match = false; match = ISC_FALSE;
} }
} }
i += d; i += d;
@@ -1041,7 +1039,7 @@ print_diff(const char *cmd, dns_rdataset_t *rdataset) {
} }
static void static void
update_diff(const char *cmd, uint32_t ttl, update_diff(const char *cmd, isc_uint32_t ttl,
dns_rdataset_t *addset, dns_rdataset_t *delset) dns_rdataset_t *addset, dns_rdataset_t *delset)
{ {
isc_result_t result; isc_result_t result;
@@ -1049,7 +1047,7 @@ update_diff(const char *cmd, uint32_t ttl,
dns_dbnode_t *node; dns_dbnode_t *node;
dns_dbversion_t *ver; dns_dbversion_t *ver;
dns_rdataset_t diffset; dns_rdataset_t diffset;
uint32_t save; isc_uint32_t save;
db = NULL; db = NULL;
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone, result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
@@ -1061,7 +1059,7 @@ update_diff(const char *cmd, uint32_t ttl,
check_result(result, "dns_db_newversion()"); check_result(result, "dns_db_newversion()");
node = NULL; node = NULL;
result = dns_db_findnode(db, name, true, &node); result = dns_db_findnode(db, name, ISC_TRUE, &node);
check_result(result, "dns_db_findnode()"); check_result(result, "dns_db_findnode()");
dns_rdataset_init(&diffset); dns_rdataset_init(&diffset);
@@ -1085,12 +1083,12 @@ update_diff(const char *cmd, uint32_t ttl,
} }
dns_db_detachnode(db, &node); dns_db_detachnode(db, &node);
dns_db_closeversion(db, &ver, false); dns_db_closeversion(db, &ver, ISC_FALSE);
dns_db_detach(&db); dns_db_detach(&db);
} }
static void static void
nsdiff(uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) { nsdiff(isc_uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) {
if (ttl == 0) { if (ttl == 0) {
vbprintf(1, "warning: no TTL in nsupdate script\n"); vbprintf(1, "warning: no TTL in nsupdate script\n");
} }
@@ -1117,7 +1115,7 @@ usage(void) {
program); program);
fprintf(stderr, "Version: %s\n", VERSION); fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "Options:\n" fprintf(stderr, "Options:\n"
" -a <algorithm> digest algorithm (SHA-1 / SHA-256 / SHA-384)\n" " -a <algorithm> digest algorithm (SHA-1 / SHA-256 / GOST / SHA-384)\n"
" -c <class> of domain (default IN)\n" " -c <class> of domain (default IN)\n"
" -D prefer CDNSKEY records instead of CDS\n" " -D prefer CDNSKEY records instead of CDS\n"
" -d <file|dir> where to find parent dsset- file\n" " -d <file|dir> where to find parent dsset- file\n"
@@ -1138,9 +1136,9 @@ main(int argc, char *argv[]) {
const char *ds_path = NULL; const char *ds_path = NULL;
const char *inplace = NULL; const char *inplace = NULL;
isc_result_t result; isc_result_t result;
bool prefer_cdnskey = false; isc_boolean_t prefer_cdnskey = ISC_FALSE;
bool nsupdate = false; isc_boolean_t nsupdate = ISC_FALSE;
uint32_t ttl = 0; isc_uint32_t ttl = 0;
int ch; int ch;
char *endp; char *endp;
@@ -1149,12 +1147,12 @@ main(int argc, char *argv[]) {
fatal("out of memory"); fatal("out of memory");
} }
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
#define OPTIONS "a:c:Dd:f:i:ms:T:uv:V" #define OPTIONS "a:c:Dd:f:i:ms:T:uv:V"
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
@@ -1166,7 +1164,7 @@ main(int argc, char *argv[]) {
rdclass = strtoclass(isc_commandline_argument); rdclass = strtoclass(isc_commandline_argument);
break; break;
case 'D': case 'D':
prefer_cdnskey = true; prefer_cdnskey = ISC_TRUE;
break; break;
case 'd': case 'd':
ds_path = isc_commandline_argument; ds_path = isc_commandline_argument;
@@ -1199,7 +1197,7 @@ main(int argc, char *argv[]) {
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
break; break;
case 'u': case 'u':
nsupdate = true; nsupdate = ISC_TRUE;
break; break;
case 'V': case 'V':
/* Does not return. */ /* Does not return. */
+1 -1
View File
@@ -144,7 +144,7 @@
</para> </para>
<para> <para>
The <replaceable>algorithm</replaceable> must be one of SHA-1 The <replaceable>algorithm</replaceable> must be one of SHA-1
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These (SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
values are case insensitive. If no algorithm is specified, values are case insensitive. If no algorithm is specified,
the default is SHA-256. the default is SHA-256.
</para> </para>
+1 -1
View File
@@ -130,7 +130,7 @@
</p> </p>
<p> <p>
The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1 The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These (SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
values are case insensitive. If no algorithm is specified, values are case insensitive. If no algorithm is specified,
the default is SHA-256. the default is SHA-256.
</p> </p>
+1 -1
View File
@@ -64,7 +64,7 @@ Use SHA\-256 as the digest algorithm\&.
.RS 4 .RS 4
Select the digest algorithm\&. The value of Select the digest algorithm\&. The value of
\fBalgorithm\fR \fBalgorithm\fR
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256) or SHA\-384 (SHA384)\&. These values are case insensitive\&. must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST or SHA\-384 (SHA384)\&. These values are case insensitive\&.
.RE .RE
.PP .PP
\-C \-C
+23 -25
View File
@@ -13,8 +13,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <isc/buffer.h> #include <isc/buffer.h>
@@ -43,14 +41,14 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
#include "dnssectool.h" #include "dnssectool.h"
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */ #define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif #endif
const char *program = "dnssec-dsfromkey"; const char *program = "dnssec-dsfromkey";
@@ -60,8 +58,8 @@ static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed; static dns_fixedname_t fixed;
static dns_name_t *name = NULL; static dns_name_t *name = NULL;
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
static uint32_t ttl; static isc_uint32_t ttl;
static bool emitttl = false; static isc_boolean_t emitttl = ISC_FALSE;
static isc_result_t static isc_result_t
initname(char *setname) { initname(char *setname) {
@@ -120,7 +118,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
isc_result_totext(result)); isc_result_totext(result));
} }
result = dns_db_findnode(db, name, false, &node); result = dns_db_findnode(db, name, ISC_FALSE, &node);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("can't find %s node in %s", setname, filename); fatal("can't find %s node in %s", setname, filename);
@@ -161,7 +159,7 @@ loadkeyset(char *dirname, dns_rdataset_t *rdataset) {
return (ISC_R_NOSPACE); return (ISC_R_NOSPACE);
isc_buffer_putstr(&buf, "keyset-"); isc_buffer_putstr(&buf, "keyset-");
result = dns_name_tofilenametext(name, false, &buf); result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
check_result(result, "dns_name_tofilenametext()"); check_result(result, "dns_name_tofilenametext()");
if (isc_buffer_availablelength(&buf) == 0) if (isc_buffer_availablelength(&buf) == 0)
return (ISC_R_NOSPACE); return (ISC_R_NOSPACE);
@@ -235,8 +233,8 @@ logkey(dns_rdata_t *rdata)
} }
static void static void
emit(unsigned int dtype, bool showall, char *lookaside, emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
bool cds, dns_rdata_t *rdata) isc_boolean_t cds, dns_rdata_t *rdata)
{ {
isc_result_t result; isc_result_t result;
unsigned char buf[DNS_DS_BUFFERSIZE]; unsigned char buf[DNS_DS_BUFFERSIZE];
@@ -265,7 +263,7 @@ emit(unsigned int dtype, bool showall, char *lookaside,
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("can't build record"); fatal("can't build record");
result = dns_name_totext(name, false, &nameb); result = dns_name_totext(name, ISC_FALSE, &nameb);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("can't print name"); fatal("can't print name");
@@ -354,10 +352,10 @@ main(int argc, char **argv) {
char *endp; char *endp;
int ch; int ch;
unsigned int dtype = DNS_DSDIGEST_SHA1; unsigned int dtype = DNS_DSDIGEST_SHA1;
bool cds = false; isc_boolean_t cds = ISC_FALSE;
bool both = true; isc_boolean_t both = ISC_TRUE;
bool usekeyset = false; isc_boolean_t usekeyset = ISC_FALSE;
bool showall = false; isc_boolean_t showall = ISC_FALSE;
isc_result_t result; isc_result_t result;
isc_log_t *log = NULL; isc_log_t *log = NULL;
dns_rdataset_t rdataset; dns_rdataset_t rdataset;
@@ -372,36 +370,36 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("out of memory"); fatal("out of memory");
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
#define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV" #define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
switch (ch) { switch (ch) {
case '1': case '1':
dtype = DNS_DSDIGEST_SHA1; dtype = DNS_DSDIGEST_SHA1;
both = false; both = ISC_FALSE;
break; break;
case '2': case '2':
dtype = DNS_DSDIGEST_SHA256; dtype = DNS_DSDIGEST_SHA256;
both = false; both = ISC_FALSE;
break; break;
case 'A': case 'A':
showall = true; showall = ISC_TRUE;
break; break;
case 'a': case 'a':
dtype = strtodsdigest(isc_commandline_argument); dtype = strtodsdigest(isc_commandline_argument);
both = false; both = ISC_FALSE;
break; break;
case 'C': case 'C':
if (lookaside != NULL) if (lookaside != NULL)
fatal("lookaside and CDS are mutually" fatal("lookaside and CDS are mutually"
" exclusive"); " exclusive");
cds = true; cds = ISC_TRUE;
break; break;
case 'c': case 'c':
classname = isc_commandline_argument; classname = isc_commandline_argument;
@@ -427,10 +425,10 @@ main(int argc, char **argv) {
fatal("lookaside must be a non-empty string"); fatal("lookaside must be a non-empty string");
break; break;
case 's': case 's':
usekeyset = true; usekeyset = ISC_TRUE;
break; break;
case 'T': case 'T':
emitttl = true; emitttl = ISC_TRUE;
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
break; break;
case 'v': case 'v':
@@ -468,7 +466,7 @@ main(int argc, char **argv) {
/* When not using -f, -A is implicit */ /* When not using -f, -A is implicit */
if (filename == NULL) if (filename == NULL)
showall = true; showall = ISC_TRUE;
if (argc < isc_commandline_index + 1 && filename == NULL) if (argc < isc_commandline_index + 1 && filename == NULL)
fatal("the key file name was not specified"); fatal("the key file name was not specified");
+1 -1
View File
@@ -117,7 +117,7 @@
<para> <para>
Select the digest algorithm. The value of Select the digest algorithm. The value of
<option>algorithm</option> must be one of SHA-1 (SHA1), <option>algorithm</option> must be one of SHA-1 (SHA1),
SHA-256 (SHA256) or SHA-384 (SHA384). SHA-256 (SHA256), GOST or SHA-384 (SHA384).
These values are case insensitive. These values are case insensitive.
</para> </para>
</listitem> </listitem>
+1 -1
View File
@@ -97,7 +97,7 @@
<p> <p>
Select the digest algorithm. The value of Select the digest algorithm. The value of
<code class="option">algorithm</code> must be one of SHA-1 (SHA1), <code class="option">algorithm</code> must be one of SHA-1 (SHA1),
SHA-256 (SHA256) or SHA-384 (SHA384). SHA-256 (SHA256), GOST or SHA-384 (SHA384).
These values are case insensitive. These values are case insensitive.
</p> </p>
</dd> </dd>
+11 -12
View File
@@ -13,7 +13,6 @@
#include <config.h> #include <config.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <isc/buffer.h> #include <isc/buffer.h>
@@ -42,14 +41,14 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
#include "dnssectool.h" #include "dnssectool.h"
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */ #define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
#endif #endif
const char *program = "dnssec-importkey"; const char *program = "dnssec-importkey";
@@ -59,13 +58,13 @@ static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed; static dns_fixedname_t fixed;
static dns_name_t *name = NULL; static dns_name_t *name = NULL;
static isc_mem_t *mctx = NULL; static isc_mem_t *mctx = NULL;
static bool setpub = false, setdel = false; static isc_boolean_t setpub = ISC_FALSE, setdel = ISC_FALSE;
static bool setttl = false; static isc_boolean_t setttl = ISC_FALSE;
static isc_stdtime_t pub = 0, del = 0; static isc_stdtime_t pub = 0, del = 0;
static dns_ttl_t ttl = 0; static dns_ttl_t ttl = 0;
static isc_stdtime_t syncadd = 0, syncdel = 0; static isc_stdtime_t syncadd = 0, syncdel = 0;
static bool setsyncadd = false; static isc_boolean_t setsyncadd = ISC_FALSE;
static bool setsyncdel = false; static isc_boolean_t setsyncdel = ISC_FALSE;
static isc_result_t static isc_result_t
initname(char *setname) { initname(char *setname) {
@@ -125,7 +124,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
isc_result_totext(result)); isc_result_totext(result));
} }
result = dns_db_findnode(db, name, false, &node); result = dns_db_findnode(db, name, ISC_FALSE, &node);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("can't find %s node in %s", setname, filename); fatal("can't find %s node in %s", setname, filename);
@@ -227,7 +226,7 @@ emit(const char *dir, dns_rdata_t *rdata) {
dst_key_free(&tmp); dst_key_free(&tmp);
} }
dst_key_setexternal(key, true); dst_key_setexternal(key, ISC_TRUE);
if (setpub) if (setpub)
dst_key_settime(key, DST_TIME_PUBLISH, pub); dst_key_settime(key, DST_TIME_PUBLISH, pub);
if (setdel) if (setdel)
@@ -311,12 +310,12 @@ main(int argc, char **argv) {
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("out of memory"); fatal("out of memory");
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V" #define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
@@ -347,7 +346,7 @@ main(int argc, char **argv) {
break; break;
case 'L': case 'L':
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
setttl = true; setttl = ISC_TRUE;
break; break;
case 'P': case 'P':
/* -Psync ? */ /* -Psync ? */
+1 -1
View File
@@ -55,7 +55,7 @@ of the key is specified on the command line\&. This must match the name of the z
.RS 4 .RS 4
Selects the cryptographic algorithm\&. The value of Selects the cryptographic algorithm\&. The value of
\fBalgorithm\fR \fBalgorithm\fR
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
.sp .sp
If no algorithm is specified, then RSASHA1 will be used by default, unless the If no algorithm is specified, then RSASHA1 will be used by default, unless the
\fB\-3\fR \fB\-3\fR
+52 -31
View File
@@ -14,8 +14,6 @@
#include <config.h> #include <config.h>
#include <ctype.h> #include <ctype.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <isc/buffer.h> #include <isc/buffer.h>
@@ -39,7 +37,7 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
@@ -66,14 +64,17 @@ usage(void) {
fprintf(stderr, " -a algorithm: \n" fprintf(stderr, " -a algorithm: \n"
" RSA | RSAMD5 | DH | DSA | RSASHA1 |\n" " RSA | RSAMD5 | DH | DSA | RSASHA1 |\n"
" NSEC3DSA | NSEC3RSASHA1 |\n" " NSEC3DSA | NSEC3RSASHA1 |\n"
" RSASHA256 | RSASHA512 |\n" " RSASHA256 | RSASHA512 | ECCGOST |\n"
" ECDSAP256SHA256 | ECDSAP384SHA384\n"); " ECDSAP256SHA256 | ECDSAP384SHA384\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n"); fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
fprintf(stderr, " -c class (default: IN)\n"); fprintf(stderr, " -c class (default: IN)\n");
fprintf(stderr, " -E <engine>:\n"); fprintf(stderr, " -E <engine>:\n");
#if USE_PKCS11 #if HAVE_PKCS11
fprintf(stderr, " path to PKCS#11 provider library " fprintf(stderr, " path to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION); "(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " name of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else #else
fprintf(stderr, " name of an OpenSSL engine to use\n"); fprintf(stderr, " name of an OpenSSL engine to use\n");
#endif #endif
@@ -123,15 +124,19 @@ main(int argc, char **argv) {
const char *directory = NULL; const char *directory = NULL;
const char *predecessor = NULL; const char *predecessor = NULL;
dst_key_t *prevkey = NULL; dst_key_t *prevkey = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL; const char *engine = NULL;
#endif
char *classname = NULL; char *classname = NULL;
char *endp; char *endp;
dst_key_t *key = NULL; dst_key_t *key = NULL;
dns_fixedname_t fname; dns_fixedname_t fname;
dns_name_t *name; dns_name_t *name;
uint16_t flags = 0, kskflag = 0, revflag = 0; isc_uint16_t flags = 0, kskflag = 0, revflag = 0;
dns_secalg_t alg; dns_secalg_t alg;
bool oldstyle = false; isc_boolean_t oldstyle = ISC_FALSE;
isc_mem_t *mctx = NULL; isc_mem_t *mctx = NULL;
int ch; int ch;
int protocol = -1, signatory = 0; int protocol = -1, signatory = 0;
@@ -148,32 +153,32 @@ main(int argc, char **argv) {
isc_stdtime_t inactive = 0, deltime = 0; isc_stdtime_t inactive = 0, deltime = 0;
isc_stdtime_t now; isc_stdtime_t now;
int prepub = -1; int prepub = -1;
bool setpub = false, setact = false; isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
bool setrev = false, setinact = false; isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
bool setdel = false, setttl = false; isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
bool unsetpub = false, unsetact = false; isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
bool unsetrev = false, unsetinact = false; isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
bool unsetdel = false; isc_boolean_t unsetdel = ISC_FALSE;
bool genonly = false; isc_boolean_t genonly = ISC_FALSE;
bool use_nsec3 = false; isc_boolean_t use_nsec3 = ISC_FALSE;
bool avoid_collisions = true; isc_boolean_t avoid_collisions = ISC_TRUE;
bool exact; isc_boolean_t exact;
unsigned char c; unsigned char c;
isc_stdtime_t syncadd = 0, syncdel = 0; isc_stdtime_t syncadd = 0, syncdel = 0;
bool unsetsyncadd = false, setsyncadd = false; isc_boolean_t unsetsyncadd = ISC_FALSE, setsyncadd = ISC_FALSE;
bool unsetsyncdel = false, setsyncdel = false; isc_boolean_t unsetsyncdel = ISC_FALSE, setsyncdel = ISC_FALSE;
if (argc == 1) if (argc == 1)
usage(); usage();
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
isc_stdtime_get(&now); isc_stdtime_get(&now);
@@ -181,13 +186,13 @@ main(int argc, char **argv) {
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) { switch (ch) {
case '3': case '3':
use_nsec3 = true; use_nsec3 = ISC_TRUE;
break; break;
case 'a': case 'a':
algname = isc_commandline_argument; algname = isc_commandline_argument;
break; break;
case 'C': case 'C':
oldstyle = true; oldstyle = ISC_TRUE;
break; break;
case 'c': case 'c':
classname = isc_commandline_argument; classname = isc_commandline_argument;
@@ -217,7 +222,7 @@ main(int argc, char **argv) {
break; break;
case 'L': case 'L':
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
setttl = true; setttl = ISC_TRUE;
break; break;
case 'l': case 'l':
label = isc_mem_strdup(mctx, isc_commandline_argument); label = isc_mem_strdup(mctx, isc_commandline_argument);
@@ -240,10 +245,10 @@ main(int argc, char **argv) {
fatal("-v must be followed by a number"); fatal("-v must be followed by a number");
break; break;
case 'y': case 'y':
avoid_collisions = false; avoid_collisions = ISC_FALSE;
break; break;
case 'G': case 'G':
genonly = true; genonly = ISC_TRUE;
break; break;
case 'P': case 'P':
/* -Psync ? */ /* -Psync ? */
@@ -383,10 +388,20 @@ main(int argc, char **argv) {
} }
if (strcasecmp(algname, "RSA") == 0) { if (strcasecmp(algname, "RSA") == 0) {
#ifndef PK11_MD5_DISABLE
fprintf(stderr, "The use of RSA (RSAMD5) is not " fprintf(stderr, "The use of RSA (RSAMD5) is not "
"recommended.\nIf you still wish to " "recommended.\nIf you still wish to "
"use RSA (RSAMD5) please specify " "use RSA (RSAMD5) please specify "
"\"-a RSAMD5\"\n"); "\"-a RSAMD5\"\n");
#else
fprintf(stderr,
"The use of RSA (RSAMD5) was disabled\n");
if (freeit != NULL)
free(freeit);
return (1);
} else if (strcasecmp(algname, "RSAMD5") == 0) {
fprintf(stderr, "The use of RSAMD5 was disabled\n");
#endif
if (freeit != NULL) if (freeit != NULL)
free(freeit); free(freeit);
return (1); return (1);
@@ -412,6 +427,7 @@ main(int argc, char **argv) {
case DST_ALG_NSEC3RSASHA1: case DST_ALG_NSEC3RSASHA1:
case DST_ALG_RSASHA256: case DST_ALG_RSASHA256:
case DST_ALG_RSASHA512: case DST_ALG_RSASHA512:
case DST_ALG_ECCGOST:
case DST_ALG_ECDSA256: case DST_ALG_ECDSA256:
case DST_ALG_ECDSA384: case DST_ALG_ECDSA384:
case DST_ALG_ED25519: case DST_ALG_ED25519:
@@ -444,14 +460,14 @@ main(int argc, char **argv) {
"prepublication interval."); "prepublication interval.");
if (!setpub && !setact) { if (!setpub && !setact) {
setpub = setact = true; setpub = setact = ISC_TRUE;
publish = now; publish = now;
activate = now + prepub; activate = now + prepub;
} else if (setpub && !setact) { } else if (setpub && !setact) {
setact = true; setact = ISC_TRUE;
activate = publish + prepub; activate = publish + prepub;
} else if (setact && !setpub) { } else if (setact && !setpub) {
setpub = true; setpub = ISC_TRUE;
publish = activate - prepub; publish = activate - prepub;
} }
@@ -497,6 +513,11 @@ main(int argc, char **argv) {
alg = dst_key_alg(prevkey); alg = dst_key_alg(prevkey);
flags = dst_key_flags(prevkey); flags = dst_key_flags(prevkey);
#ifdef PK11_MD5_DISABLE
if (alg == DST_ALG_RSAMD5)
fatal("Key %s uses disabled RSAMD5", predecessor);
#endif
dst_key_format(prevkey, keystr, sizeof(keystr)); dst_key_format(prevkey, keystr, sizeof(keystr));
dst_key_getprivateformat(prevkey, &major, &minor); dst_key_getprivateformat(prevkey, &major, &minor);
if (major != DST_MAJOR_VERSION || minor < DST_MINOR_VERSION) if (major != DST_MAJOR_VERSION || minor < DST_MINOR_VERSION)
@@ -534,7 +555,7 @@ main(int argc, char **argv) {
"You can use dnssec-settime -D to " "You can use dnssec-settime -D to "
"change this.\n", program, keystr); "change this.\n", program, keystr);
setpub = setact = true; setpub = setact = ISC_TRUE;
} }
if (nametype == NULL) { if (nametype == NULL) {
@@ -586,7 +607,7 @@ main(int argc, char **argv) {
/* associate the key */ /* associate the key */
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass, ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
#if USE_PKCS11 #if HAVE_PKCS11
"pkcs11", "pkcs11",
#else #else
engine, engine,
+1 -1
View File
@@ -106,7 +106,7 @@
<para> <para>
Selects the cryptographic algorithm. The value of Selects the cryptographic algorithm. The value of
<option>algorithm</option> must be one of RSAMD5, RSASHA1, <option>algorithm</option> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
</para> </para>
<para> <para>
+1 -1
View File
@@ -90,7 +90,7 @@
<p> <p>
Selects the cryptographic algorithm. The value of Selects the cryptographic algorithm. The value of
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1, <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
</p> </p>
<p> <p>
+1 -1
View File
@@ -62,7 +62,7 @@ may be preferable to direct use of
.RS 4 .RS 4
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
\fBalgorithm\fR \fBalgorithm\fR
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
\fB\-T KEY\fR \fB\-T KEY\fR
option as well\&. option as well\&.
.sp .sp
+62 -42
View File
@@ -28,8 +28,6 @@
#include <config.h> #include <config.h>
#include <ctype.h> #include <ctype.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@@ -54,7 +52,7 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
@@ -81,7 +79,7 @@ usage(void) {
fprintf(stderr, " -a <algorithm>:\n"); fprintf(stderr, " -a <algorithm>:\n");
fprintf(stderr, " RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1" fprintf(stderr, " RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1"
" | NSEC3DSA |\n"); " | NSEC3DSA |\n");
fprintf(stderr, " RSASHA256 | RSASHA512 |\n"); fprintf(stderr, " RSASHA256 | RSASHA512 | ECCGOST |\n");
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n"); fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
fprintf(stderr, " ED25519 | ED448 | DH\n"); fprintf(stderr, " ED25519 | ED448 | DH\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n"); fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
@@ -108,9 +106,12 @@ usage(void) {
fprintf(stderr, " -c <class>: (default: IN)\n"); fprintf(stderr, " -c <class>: (default: IN)\n");
fprintf(stderr, " -d <digest bits> (0 => max, default)\n"); fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
fprintf(stderr, " -E <engine>:\n"); fprintf(stderr, " -E <engine>:\n");
#if USE_PKCS11 #if HAVE_PKCS11
fprintf(stderr, " path to PKCS#11 provider library " fprintf(stderr, " path to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION); "(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " name of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else #else
fprintf(stderr, " name of an OpenSSL engine to use\n"); fprintf(stderr, " name of an OpenSSL engine to use\n");
#endif #endif
@@ -161,9 +162,9 @@ usage(void) {
exit (-1); exit (-1);
} }
static bool static isc_boolean_t
dsa_size_ok(int size) { dsa_size_ok(int size) {
return (size >= 512 && size <= 1024 && size % 64 == 0); return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
} }
static void static void
@@ -200,10 +201,10 @@ main(int argc, char **argv) {
dst_key_t *key = NULL; dst_key_t *key = NULL;
dns_fixedname_t fname; dns_fixedname_t fname;
dns_name_t *name; dns_name_t *name;
uint16_t flags = 0, kskflag = 0, revflag = 0; isc_uint16_t flags = 0, kskflag = 0, revflag = 0;
dns_secalg_t alg; dns_secalg_t alg;
bool conflict = false, null_key = false; isc_boolean_t conflict = ISC_FALSE, null_key = ISC_FALSE;
bool oldstyle = false; isc_boolean_t oldstyle = ISC_FALSE;
isc_mem_t *mctx = NULL; isc_mem_t *mctx = NULL;
int ch, generator = 0, param = 0; int ch, generator = 0, param = 0;
int protocol = -1, size = -1, signatory = 0; int protocol = -1, size = -1, signatory = 0;
@@ -215,39 +216,43 @@ main(int argc, char **argv) {
dst_key_t *prevkey = NULL; dst_key_t *prevkey = NULL;
isc_buffer_t buf; isc_buffer_t buf;
isc_log_t *log = NULL; isc_log_t *log = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL; const char *engine = NULL;
#endif
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC; int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
int dbits = 0; int dbits = 0;
dns_ttl_t ttl = 0; dns_ttl_t ttl = 0;
bool use_nsec3 = false; isc_boolean_t use_nsec3 = ISC_FALSE;
isc_stdtime_t publish = 0, activate = 0, revokekey = 0; isc_stdtime_t publish = 0, activate = 0, revokekey = 0;
isc_stdtime_t inactive = 0, deltime = 0; isc_stdtime_t inactive = 0, deltime = 0;
isc_stdtime_t now; isc_stdtime_t now;
int prepub = -1; int prepub = -1;
bool setpub = false, setact = false; isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
bool setrev = false, setinact = false; isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
bool setdel = false, setttl = false; isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
bool unsetpub = false, unsetact = false; isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
bool unsetrev = false, unsetinact = false; isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
bool unsetdel = false; isc_boolean_t unsetdel = ISC_FALSE;
bool genonly = false; isc_boolean_t genonly = ISC_FALSE;
bool quiet = false; isc_boolean_t quiet = ISC_FALSE;
bool show_progress = false; isc_boolean_t show_progress = ISC_FALSE;
unsigned char c; unsigned char c;
isc_stdtime_t syncadd = 0, syncdel = 0; isc_stdtime_t syncadd = 0, syncdel = 0;
bool setsyncadd = false; isc_boolean_t setsyncadd = ISC_FALSE;
bool setsyncdel = false; isc_boolean_t setsyncdel = ISC_FALSE;
if (argc == 1) if (argc == 1)
usage(); usage();
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
/* /*
* Process memory debugging argument first. * Process memory debugging argument first.
@@ -272,7 +277,7 @@ main(int argc, char **argv) {
break; break;
} }
} }
isc_commandline_reset = true; isc_commandline_reset = ISC_TRUE;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS); RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
@@ -281,7 +286,7 @@ main(int argc, char **argv) {
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) { switch (ch) {
case '3': case '3':
use_nsec3 = true; use_nsec3 = ISC_TRUE;
break; break;
case 'a': case 'a':
algname = isc_commandline_argument; algname = isc_commandline_argument;
@@ -292,7 +297,7 @@ main(int argc, char **argv) {
fatal("-b requires a non-negative number"); fatal("-b requires a non-negative number");
break; break;
case 'C': case 'C':
oldstyle = true; oldstyle = ISC_TRUE;
break; break;
case 'c': case 'c':
classname = isc_commandline_argument; classname = isc_commandline_argument;
@@ -308,7 +313,7 @@ main(int argc, char **argv) {
case 'e': case 'e':
fprintf(stderr, fprintf(stderr,
"phased-out option -e " "phased-out option -e "
"(was 'use (RSA) large exponent')\n"); "(was 'use (RSA) large exponent)\n");
break; break;
case 'f': case 'f':
c = (unsigned char)(isc_commandline_argument[0]); c = (unsigned char)(isc_commandline_argument[0]);
@@ -340,7 +345,7 @@ main(int argc, char **argv) {
break; break;
case 'L': case 'L':
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
setttl = true; setttl = ISC_TRUE;
break; break;
case 'n': case 'n':
nametype = isc_commandline_argument; nametype = isc_commandline_argument;
@@ -354,7 +359,7 @@ main(int argc, char **argv) {
"[0..255]"); "[0..255]");
break; break;
case 'q': case 'q':
quiet = true; quiet = ISC_TRUE;
break; break;
case 'r': case 'r':
fatal("The -r option has been deprecated.\n" fatal("The -r option has been deprecated.\n"
@@ -391,7 +396,7 @@ main(int argc, char **argv) {
/* already the default */ /* already the default */
break; break;
case 'G': case 'G':
genonly = true; genonly = ISC_TRUE;
break; break;
case 'P': case 'P':
/* -Psync ? */ /* -Psync ? */
@@ -485,7 +490,7 @@ main(int argc, char **argv) {
} }
if (!isatty(0)) if (!isatty(0))
quiet = true; quiet = ISC_TRUE;
ret = dst_lib_init(mctx, engine); ret = dst_lib_init(mctx, engine);
if (ret != ISC_R_SUCCESS) if (ret != ISC_R_SUCCESS)
@@ -518,12 +523,23 @@ main(int argc, char **argv) {
} }
if (strcasecmp(algname, "RSA") == 0) { if (strcasecmp(algname, "RSA") == 0) {
#ifndef PK11_MD5_DISABLE
fprintf(stderr, "The use of RSA (RSAMD5) is not " fprintf(stderr, "The use of RSA (RSAMD5) is not "
"recommended.\nIf you still wish to " "recommended.\nIf you still wish to "
"use RSA (RSAMD5) please specify " "use RSA (RSAMD5) please specify "
"\"-a RSAMD5\"\n"); "\"-a RSAMD5\"\n");
INSIST(freeit == NULL); INSIST(freeit == NULL);
return (1); return (1);
#else
fprintf(stderr,
"The use of RSA (RSAMD5) was disabled\n");
INSIST(freeit == NULL);
return (1);
} else if (strcasecmp(algname, "RSAMD5") == 0) {
fprintf(stderr, "The use of RSAMD5 was disabled\n");
INSIST(freeit == NULL);
return (1);
#endif
} else { } else {
r.base = algname; r.base = algname;
r.length = strlen(algname); r.length = strlen(algname);
@@ -536,6 +552,10 @@ main(int argc, char **argv) {
} }
} }
#ifdef PK11_MD5_DISABLE
INSIST((alg != DNS_KEYALG_RSAMD5));
#endif
if (!dst_algorithm_supported(alg)) { if (!dst_algorithm_supported(alg)) {
fatal("unsupported algorithm: %d", alg); fatal("unsupported algorithm: %d", alg);
} }
@@ -616,14 +636,14 @@ main(int argc, char **argv) {
"prepublication interval."); "prepublication interval.");
if (!setpub && !setact) { if (!setpub && !setact) {
setpub = setact = true; setpub = setact = ISC_TRUE;
publish = now; publish = now;
activate = now + prepub; activate = now + prepub;
} else if (setpub && !setact) { } else if (setpub && !setact) {
setact = true; setact = ISC_TRUE;
activate = publish + prepub; activate = publish + prepub;
} else if (setact && !setpub) { } else if (setact && !setpub) {
setpub = true; setpub = ISC_TRUE;
publish = activate - prepub; publish = activate - prepub;
} }
@@ -709,7 +729,7 @@ main(int argc, char **argv) {
"You can use dnssec-settime -D to " "You can use dnssec-settime -D to "
"change this.\n", program, keystr); "change this.\n", program, keystr);
setpub = setact = true; setpub = setact = ISC_TRUE;
} }
switch (alg) { switch (alg) {
@@ -808,7 +828,7 @@ main(int argc, char **argv) {
case DNS_KEYALG_NSEC3RSASHA1: case DNS_KEYALG_NSEC3RSASHA1:
case DNS_KEYALG_RSASHA256: case DNS_KEYALG_RSASHA256:
case DNS_KEYALG_RSASHA512: case DNS_KEYALG_RSASHA512:
show_progress = true; show_progress = ISC_TRUE;
break; break;
case DNS_KEYALG_DH: case DNS_KEYALG_DH:
@@ -822,17 +842,17 @@ main(int argc, char **argv) {
case DST_ALG_ECDSA384: case DST_ALG_ECDSA384:
case DST_ALG_ED25519: case DST_ALG_ED25519:
case DST_ALG_ED448: case DST_ALG_ED448:
show_progress = true; show_progress = ISC_TRUE;
break; break;
} }
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY) if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY)
null_key = true; null_key = ISC_TRUE;
isc_buffer_init(&buf, filename, sizeof(filename) - 1); isc_buffer_init(&buf, filename, sizeof(filename) - 1);
do { do {
conflict = false; conflict = ISC_FALSE;
if (!quiet && show_progress) { if (!quiet && show_progress) {
fprintf(stderr, "Generating key pair."); fprintf(stderr, "Generating key pair.");
@@ -953,7 +973,7 @@ main(int argc, char **argv) {
* or another key being revoked. * or another key being revoked.
*/ */
if (key_collision(key, name, directory, mctx, NULL)) { if (key_collision(key, name, directory, mctx, NULL)) {
conflict = true; conflict = ISC_TRUE;
if (null_key) { if (null_key) {
dst_key_free(&key); dst_key_free(&key);
break; break;
@@ -974,7 +994,7 @@ main(int argc, char **argv) {
dst_key_free(&key); dst_key_free(&key);
} }
} while (conflict == true); } while (conflict == ISC_TRUE);
if (conflict) if (conflict)
fatal("cannot generate a null key due to possible key ID " fatal("cannot generate a null key due to possible key ID "
+1 -1
View File
@@ -123,7 +123,7 @@
<para> <para>
Selects the cryptographic algorithm. For DNSSEC keys, the value Selects the cryptographic algorithm. For DNSSEC keys, the value
of <option>algorithm</option> must be one of RSAMD5, RSASHA1, of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
TKEY, the value must be DH (Diffie Hellman); specifying TKEY, the value must be DH (Diffie Hellman); specifying
his value will automatically set the <option>-T KEY</option> his value will automatically set the <option>-T KEY</option>
+1 -1
View File
@@ -100,7 +100,7 @@
<p> <p>
Selects the cryptographic algorithm. For DNSSEC keys, the value Selects the cryptographic algorithm. For DNSSEC keys, the value
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1, of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
TKEY, the value must be DH (Diffie Hellman); specifying TKEY, the value must be DH (Diffie Hellman); specifying
his value will automatically set the <code class="option">-T KEY</code> his value will automatically set the <code class="option">-T KEY</code>
+17 -12
View File
@@ -13,8 +13,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@@ -32,7 +30,7 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
@@ -51,9 +49,12 @@ usage(void) {
fprintf(stderr, "Usage:\n"); fprintf(stderr, "Usage:\n");
fprintf(stderr, " %s [options] keyfile\n\n", program); fprintf(stderr, " %s [options] keyfile\n\n", program);
fprintf(stderr, "Version: %s\n", VERSION); fprintf(stderr, "Version: %s\n", VERSION);
#if USE_PKCS11 #if HAVE_PKCS11
fprintf(stderr, " -E engine: specify PKCS#11 provider " fprintf(stderr, " -E engine: specify PKCS#11 provider "
"(default: %s)\n", PK11_LIB_LOCATION); "(default: %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, " -E engine: specify OpenSSL engine "
"(default \"pkcs11\")\n");
#else #else
fprintf(stderr, " -E engine: specify OpenSSL engine\n"); fprintf(stderr, " -E engine: specify OpenSSL engine\n");
#endif #endif
@@ -74,7 +75,11 @@ usage(void) {
int int
main(int argc, char **argv) { main(int argc, char **argv) {
isc_result_t result; isc_result_t result;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL; const char *engine = NULL;
#endif
char const *filename = NULL; char const *filename = NULL;
char *dir = NULL; char *dir = NULL;
char newname[1024], oldname[1024]; char newname[1024], oldname[1024];
@@ -82,11 +87,11 @@ main(int argc, char **argv) {
char *endp; char *endp;
int ch; int ch;
dst_key_t *key = NULL; dst_key_t *key = NULL;
uint32_t flags; isc_uint32_t flags;
isc_buffer_t buf; isc_buffer_t buf;
bool force = false; isc_boolean_t force = ISC_FALSE;
bool removefile = false; isc_boolean_t removefile = ISC_FALSE;
bool id = false; isc_boolean_t id = ISC_FALSE;
if (argc == 1) if (argc == 1)
usage(); usage();
@@ -100,7 +105,7 @@ main(int argc, char **argv) {
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:V")) != -1) { while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:V")) != -1) {
switch (ch) { switch (ch) {
@@ -108,7 +113,7 @@ main(int argc, char **argv) {
engine = isc_commandline_argument; engine = isc_commandline_argument;
break; break;
case 'f': case 'f':
force = true; force = ISC_TRUE;
break; break;
case 'K': case 'K':
/* /*
@@ -122,10 +127,10 @@ main(int argc, char **argv) {
} }
break; break;
case 'r': case 'r':
removefile = true; removefile = ISC_TRUE;
break; break;
case 'R': case 'R':
id = true; id = ISC_TRUE;
break; break;
case 'v': case 'v':
verbose = strtol(isc_commandline_argument, &endp, 0); verbose = strtol(isc_commandline_argument, &endp, 0);
+56 -54
View File
@@ -13,8 +13,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
@@ -35,7 +33,7 @@
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
@@ -55,7 +53,7 @@ usage(void) {
fprintf(stderr, " %s [options] keyfile\n\n", program); fprintf(stderr, " %s [options] keyfile\n\n", program);
fprintf(stderr, "Version: %s\n", VERSION); fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "General options:\n"); fprintf(stderr, "General options:\n");
#if USE_PKCS11 #if HAVE_PKCS11
fprintf(stderr, " -E engine: specify PKCS#11 provider " fprintf(stderr, " -E engine: specify PKCS#11 provider "
"(default: %s)\n", PK11_LIB_LOCATION); "(default: %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11) #elif defined(USE_PKCS11)
@@ -104,7 +102,7 @@ usage(void) {
} }
static void static void
printtime(dst_key_t *key, int type, const char *tag, bool epoch, printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch,
FILE *stream) FILE *stream)
{ {
isc_result_t result; isc_result_t result;
@@ -129,7 +127,11 @@ printtime(dst_key_t *key, int type, const char *tag, bool epoch,
int int
main(int argc, char **argv) { main(int argc, char **argv) {
isc_result_t result; isc_result_t result;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL; const char *engine = NULL;
#endif
const char *filename = NULL; const char *filename = NULL;
char *directory = NULL; char *directory = NULL;
char newname[1024]; char newname[1024];
@@ -143,29 +145,29 @@ main(int argc, char **argv) {
dns_name_t *name = NULL; dns_name_t *name = NULL;
dns_secalg_t alg = 0; dns_secalg_t alg = 0;
unsigned int size = 0; unsigned int size = 0;
uint16_t flags = 0; isc_uint16_t flags = 0;
int prepub = -1; int prepub = -1;
dns_ttl_t ttl = 0; dns_ttl_t ttl = 0;
isc_stdtime_t now; isc_stdtime_t now;
isc_stdtime_t pub = 0, act = 0, rev = 0, inact = 0, del = 0; isc_stdtime_t pub = 0, act = 0, rev = 0, inact = 0, del = 0;
isc_stdtime_t prevact = 0, previnact = 0, prevdel = 0; isc_stdtime_t prevact = 0, previnact = 0, prevdel = 0;
bool setpub = false, setact = false; isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
bool setrev = false, setinact = false; isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
bool setdel = false, setttl = false; isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
bool unsetpub = false, unsetact = false; isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
bool unsetrev = false, unsetinact = false; isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
bool unsetdel = false; isc_boolean_t unsetdel = ISC_FALSE;
bool printcreate = false, printpub = false; isc_boolean_t printcreate = ISC_FALSE, printpub = ISC_FALSE;
bool printact = false, printrev = false; isc_boolean_t printact = ISC_FALSE, printrev = ISC_FALSE;
bool printinact = false, printdel = false; isc_boolean_t printinact = ISC_FALSE, printdel = ISC_FALSE;
bool force = false; isc_boolean_t force = ISC_FALSE;
bool epoch = false; isc_boolean_t epoch = ISC_FALSE;
bool changed = false; isc_boolean_t changed = ISC_FALSE;
isc_log_t *log = NULL; isc_log_t *log = NULL;
isc_stdtime_t syncadd = 0, syncdel = 0; isc_stdtime_t syncadd = 0, syncdel = 0;
bool unsetsyncadd = false, setsyncadd = false; isc_boolean_t unsetsyncadd = ISC_FALSE, setsyncadd = ISC_FALSE;
bool unsetsyncdel = false, setsyncdel = false; isc_boolean_t unsetsyncdel = ISC_FALSE, setsyncdel = ISC_FALSE;
bool printsyncadd = false, printsyncdel = false; isc_boolean_t printsyncadd = ISC_FALSE, printsyncdel = ISC_FALSE;
if (argc == 1) if (argc == 1)
usage(); usage();
@@ -176,12 +178,12 @@ main(int argc, char **argv) {
setup_logging(mctx, &log); setup_logging(mctx, &log);
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
isc_stdtime_get(&now); isc_stdtime_get(&now);
@@ -192,51 +194,51 @@ main(int argc, char **argv) {
engine = isc_commandline_argument; engine = isc_commandline_argument;
break; break;
case 'f': case 'f':
force = true; force = ISC_TRUE;
break; break;
case 'p': case 'p':
p = isc_commandline_argument; p = isc_commandline_argument;
if (!strcasecmp(p, "all")) { if (!strcasecmp(p, "all")) {
printcreate = true; printcreate = ISC_TRUE;
printpub = true; printpub = ISC_TRUE;
printact = true; printact = ISC_TRUE;
printrev = true; printrev = ISC_TRUE;
printinact = true; printinact = ISC_TRUE;
printdel = true; printdel = ISC_TRUE;
printsyncadd = true; printsyncadd = ISC_TRUE;
printsyncdel = true; printsyncdel = ISC_TRUE;
break; break;
} }
do { do {
switch (*p++) { switch (*p++) {
case 'C': case 'C':
printcreate = true; printcreate = ISC_TRUE;
break; break;
case 'P': case 'P':
if (!strncmp(p, "sync", 4)) { if (!strncmp(p, "sync", 4)) {
p += 4; p += 4;
printsyncadd = true; printsyncadd = ISC_TRUE;
break; break;
} }
printpub = true; printpub = ISC_TRUE;
break; break;
case 'A': case 'A':
printact = true; printact = ISC_TRUE;
break; break;
case 'R': case 'R':
printrev = true; printrev = ISC_TRUE;
break; break;
case 'I': case 'I':
printinact = true; printinact = ISC_TRUE;
break; break;
case 'D': case 'D':
if (!strncmp(p, "sync", 4)) { if (!strncmp(p, "sync", 4)) {
p += 4; p += 4;
printsyncdel = true; printsyncdel = ISC_TRUE;
break; break;
} }
printdel = true; printdel = ISC_TRUE;
break; break;
case ' ': case ' ':
break; break;
@@ -247,7 +249,7 @@ main(int argc, char **argv) {
} while (*p != '\0'); } while (*p != '\0');
break; break;
case 'u': case 'u':
epoch = true; epoch = ISC_TRUE;
break; break;
case 'K': case 'K':
/* /*
@@ -263,7 +265,7 @@ main(int argc, char **argv) {
break; break;
case 'L': case 'L':
ttl = strtottl(isc_commandline_argument); ttl = strtottl(isc_commandline_argument);
setttl = true; setttl = ISC_TRUE;
break; break;
case 'v': case 'v':
verbose = strtol(isc_commandline_argument, &endp, 0); verbose = strtol(isc_commandline_argument, &endp, 0);
@@ -277,7 +279,7 @@ main(int argc, char **argv) {
fatal("-P sync specified more than " fatal("-P sync specified more than "
"once"); "once");
changed = true; changed = ISC_TRUE;
syncadd = strtotime(isc_commandline_argument, syncadd = strtotime(isc_commandline_argument,
now, now, &setsyncadd); now, now, &setsyncadd);
unsetsyncadd = !setsyncadd; unsetsyncadd = !setsyncadd;
@@ -287,7 +289,7 @@ main(int argc, char **argv) {
if (setpub || unsetpub) if (setpub || unsetpub)
fatal("-P specified more than once"); fatal("-P specified more than once");
changed = true; changed = ISC_TRUE;
pub = strtotime(isc_commandline_argument, pub = strtotime(isc_commandline_argument,
now, now, &setpub); now, now, &setpub);
unsetpub = !setpub; unsetpub = !setpub;
@@ -296,7 +298,7 @@ main(int argc, char **argv) {
if (setact || unsetact) if (setact || unsetact)
fatal("-A specified more than once"); fatal("-A specified more than once");
changed = true; changed = ISC_TRUE;
act = strtotime(isc_commandline_argument, act = strtotime(isc_commandline_argument,
now, now, &setact); now, now, &setact);
unsetact = !setact; unsetact = !setact;
@@ -305,7 +307,7 @@ main(int argc, char **argv) {
if (setrev || unsetrev) if (setrev || unsetrev)
fatal("-R specified more than once"); fatal("-R specified more than once");
changed = true; changed = ISC_TRUE;
rev = strtotime(isc_commandline_argument, rev = strtotime(isc_commandline_argument,
now, now, &setrev); now, now, &setrev);
unsetrev = !setrev; unsetrev = !setrev;
@@ -314,7 +316,7 @@ main(int argc, char **argv) {
if (setinact || unsetinact) if (setinact || unsetinact)
fatal("-I specified more than once"); fatal("-I specified more than once");
changed = true; changed = ISC_TRUE;
inact = strtotime(isc_commandline_argument, inact = strtotime(isc_commandline_argument,
now, now, &setinact); now, now, &setinact);
unsetinact = !setinact; unsetinact = !setinact;
@@ -326,7 +328,7 @@ main(int argc, char **argv) {
fatal("-D sync specified more than " fatal("-D sync specified more than "
"once"); "once");
changed = true; changed = ISC_TRUE;
syncdel = strtotime(isc_commandline_argument, syncdel = strtotime(isc_commandline_argument,
now, now, &setsyncdel); now, now, &setsyncdel);
unsetsyncdel = !setsyncdel; unsetsyncdel = !setsyncdel;
@@ -337,7 +339,7 @@ main(int argc, char **argv) {
if (setdel || unsetdel) if (setdel || unsetdel)
fatal("-D specified more than once"); fatal("-D specified more than once");
changed = true; changed = ISC_TRUE;
del = strtotime(isc_commandline_argument, del = strtotime(isc_commandline_argument,
now, now, &setdel); now, now, &setdel);
unsetdel = !setdel; unsetdel = !setdel;
@@ -448,7 +450,7 @@ main(int argc, char **argv) {
"before it is scheduled to be " "before it is scheduled to be "
"inactive.\n", program); "inactive.\n", program);
changed = setpub = setact = true; changed = setpub = setact = ISC_TRUE;
} else { } else {
if (prepub < 0) if (prepub < 0)
prepub = 0; prepub = 0;
@@ -460,10 +462,10 @@ main(int argc, char **argv) {
"prepublication interval."); "prepublication interval.");
if (setpub && !setact) { if (setpub && !setact) {
setact = true; setact = ISC_TRUE;
act = pub + prepub; act = pub + prepub;
} else if (setact && !setpub) { } else if (setact && !setpub) {
setpub = true; setpub = ISC_TRUE;
pub = act - prepub; pub = act - prepub;
} }
@@ -594,11 +596,11 @@ main(int argc, char **argv) {
if (force && !changed) { if (force && !changed) {
dst_key_settime(key, DST_TIME_PUBLISH, now); dst_key_settime(key, DST_TIME_PUBLISH, now);
dst_key_settime(key, DST_TIME_ACTIVATE, now); dst_key_settime(key, DST_TIME_ACTIVATE, now);
changed = true; changed = ISC_TRUE;
} }
if (!changed && setttl) if (!changed && setttl)
changed = true; changed = ISC_TRUE;
/* /*
* Print out time values, if -p was used. * Print out time values, if -p was used.
File diff suppressed because it is too large Load Diff
+21 -15
View File
@@ -13,7 +13,6 @@
#include <config.h> #include <config.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
@@ -32,6 +31,7 @@
#include <isc/rwlock.h> #include <isc/rwlock.h>
#include <isc/serial.h> #include <isc/serial.h>
#include <isc/stdio.h> #include <isc/stdio.h>
#include <isc/stdlib.h>
#include <isc/string.h> #include <isc/string.h>
#include <isc/time.h> #include <isc/time.h>
#include <isc/util.h> #include <isc/util.h>
@@ -58,11 +58,10 @@
#include <dns/result.h> #include <dns/result.h>
#include <dns/soa.h> #include <dns/soa.h>
#include <dns/time.h> #include <dns/time.h>
#include <dns/zoneverify.h>
#include <dst/dst.h> #include <dst/dst.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
@@ -78,8 +77,8 @@ static dns_db_t *gdb; /* The database */
static dns_dbversion_t *gversion; /* The database version */ static dns_dbversion_t *gversion; /* The database version */
static dns_rdataclass_t gclass; /* The class */ static dns_rdataclass_t gclass; /* The class */
static dns_name_t *gorigin; /* The database origin */ static dns_name_t *gorigin; /* The database origin */
static bool ignore_kskflag = false; static isc_boolean_t ignore_kskflag = ISC_FALSE;
static bool keyset_kskonly = false; static isc_boolean_t keyset_kskonly = ISC_FALSE;
/*% /*%
* Load the zone file from disk * Load the zone file from disk
@@ -150,9 +149,12 @@ usage(void) {
fprintf(stderr, "\t\tfile format of input zonefile (text)\n"); fprintf(stderr, "\t\tfile format of input zonefile (text)\n");
fprintf(stderr, "\t-c class (IN)\n"); fprintf(stderr, "\t-c class (IN)\n");
fprintf(stderr, "\t-E engine:\n"); fprintf(stderr, "\t-E engine:\n");
#if USE_PKCS11 #if HAVE_PKCS11
fprintf(stderr, "\t\tpath to PKCS#11 provider library " fprintf(stderr, "\t\tpath to PKCS#11 provider library "
"(default is %s)\n", PK11_LIB_LOCATION); "(default is %s)\n", PK11_LIB_LOCATION);
#elif defined(USE_PKCS11)
fprintf(stderr, "\t\tname of an OpenSSL engine to use "
"(default is \"pkcs11\")\n");
#else #else
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n"); fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
#endif #endif
@@ -168,7 +170,11 @@ main(int argc, char *argv[]) {
char *inputformatstr = NULL; char *inputformatstr = NULL;
isc_result_t result; isc_result_t result;
isc_log_t *log = NULL; isc_log_t *log = NULL;
#ifdef USE_PKCS11
const char *engine = PKCS11_ENGINE;
#else
const char *engine = NULL; const char *engine = NULL;
#endif
char *classname = NULL; char *classname = NULL;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
char *endp; char *endp;
@@ -198,19 +204,19 @@ main(int argc, char *argv[]) {
break; break;
} }
} }
isc_commandline_reset = true; isc_commandline_reset = ISC_TRUE;
check_result(isc_app_start(), "isc_app_start"); check_result(isc_app_start(), "isc_app_start");
result = isc_mem_create(0, 0, &mctx); result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
fatal("out of memory"); fatal("out of memory");
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
dns_result_register(); dns_result_register();
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) { while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (ch) { switch (ch) {
@@ -241,11 +247,11 @@ main(int argc, char *argv[]) {
break; break;
case 'x': case 'x':
keyset_kskonly = true; keyset_kskonly = ISC_TRUE;
break; break;
case 'z': case 'z':
ignore_kskflag = true; ignore_kskflag = ISC_TRUE;
break; break;
case '?': case '?':
@@ -316,10 +322,10 @@ main(int argc, char *argv[]) {
result = dns_db_newversion(gdb, &gversion); result = dns_db_newversion(gdb, &gversion);
check_result(result, "dns_db_newversion()"); check_result(result, "dns_db_newversion()");
result = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin, NULL, verifyzone(gdb, gversion, gorigin, mctx,
mctx, ignore_kskflag, keyset_kskonly); ignore_kskflag, keyset_kskonly);
dns_db_closeversion(gdb, &gversion, false); dns_db_closeversion(gdb, &gversion, ISC_FALSE);
dns_db_detach(&gdb); dns_db_detach(&gdb);
cleanup_logging(&log); cleanup_logging(&log);
@@ -331,5 +337,5 @@ main(int argc, char *argv[]) {
(void) isc_app_finish(); (void) isc_app_finish();
return (result == ISC_R_SUCCESS ? 0 : 1); return (0);
} }
+1361 -24
View File
File diff suppressed because it is too large Load Diff
+23 -8
View File
@@ -13,14 +13,16 @@
#ifndef DNSSECTOOL_H #ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1 #define DNSSECTOOL_H 1
#include <inttypes.h>
#include <stdbool.h>
#include <isc/log.h> #include <isc/log.h>
#include <isc/stdtime.h> #include <isc/stdtime.h>
#include <dns/rdatastruct.h> #include <dns/rdatastruct.h>
#include <dst/dst.h> #include <dst/dst.h>
#define check_dns_dbiterator_current(result) \
check_result((result == DNS_R_NEWORIGIN) ? ISC_R_SUCCESS : result, \
"dns_dbiterator_current()")
typedef void (fatalcallback_t)(void); typedef void (fatalcallback_t)(void);
ISC_PLATFORM_NORETURN_PRE void ISC_PLATFORM_NORETURN_PRE void
@@ -39,6 +41,10 @@ vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
ISC_PLATFORM_NORETURN_PRE void ISC_PLATFORM_NORETURN_PRE void
version(const char *program) ISC_PLATFORM_NORETURN_POST; version(const char *program) ISC_PLATFORM_NORETURN_POST;
void
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
#define TYPE_FORMATSIZE 20
void void
sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size); sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535")) #define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
@@ -52,8 +58,8 @@ cleanup_logging(isc_log_t **logp);
dns_ttl_t strtottl(const char *str); dns_ttl_t strtottl(const char *str);
isc_stdtime_t isc_stdtime_t
strtotime(const char *str, int64_t now, int64_t base, strtotime(const char *str, isc_int64_t now, isc_int64_t base,
bool *setp); isc_boolean_t *setp);
unsigned int unsigned int
strtodsdigest(const char *str); strtodsdigest(const char *str);
@@ -70,11 +76,20 @@ check_keyversion(dst_key_t *key, char *keystr);
void void
set_keyversion(dst_key_t *key); set_keyversion(dst_key_t *key);
bool isc_boolean_t
key_collision(dst_key_t *key, dns_name_t *name, const char *dir, key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
isc_mem_t *mctx, bool *exact); isc_mem_t *mctx, isc_boolean_t *exact);
bool isc_boolean_t
is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
dns_name_t *name, dns_dbnode_t *node, isc_uint32_t *ttlp);
void
verifyzone(dns_db_t *db, dns_dbversion_t *ver,
dns_name_t *origin, isc_mem_t *mctx,
isc_boolean_t ignore_kskflag, isc_boolean_t keyset_kskonly);
isc_boolean_t
isoptarg(const char *arg, char **argv, void (*usage)(void)); isoptarg(const char *arg, char **argv, void (*usage)(void));
#ifdef _WIN32 #ifdef _WIN32
+2 -2
View File
@@ -61,7 +61,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -84,7 +84,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
@IF PYTHON @IF PYTHON
<PostBuildEvent> <PostBuildEvent>
@@ -94,7 +94,7 @@ set PYTHONPATH=.
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -113,7 +113,7 @@ set PYTHONPATH=.
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
@IF PYTHON @IF PYTHON
<PostBuildEvent> <PostBuildEvent>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -70,7 +70,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -100,7 +100,7 @@
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
+4 -4
View File
@@ -55,7 +55,7 @@
</PrecompiledHeader> </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
@@ -69,7 +69,7 @@
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
@@ -81,7 +81,7 @@
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization> <WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling> <StringPooling>true</StringPooling>
@@ -99,7 +99,7 @@
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalDependencies>@OPENSSL_LIB@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
+6 -8
View File
@@ -46,17 +46,17 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
${NS_INCLUDES} ${DNS_INCLUDES} \ ${NS_INCLUDES} ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \ ${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \ ${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \
${DBDRIVER_INCLUDES} @OPENSSL_INCLUDES@ ${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = @CONTRIB_DLZ@ CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@
CWARNINGS = CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@ ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@ ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@ ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@ BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@ NSLIBS = ../../lib/ns/libns.@A@
@@ -72,13 +72,11 @@ DEPLIBS = ${NSDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
LIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \ LIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \ ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \ ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
@LIBS@
NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \ NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \ ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCNOSYMLIBS} \
${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBCAP_LIBS@ \ ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@
@LIBS@
SUBDIRS = unix SUBDIRS = unix
+28 -26
View File
@@ -13,7 +13,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdlib.h> #include <stdlib.h>
#include <isc/buffer.h> #include <isc/buffer.h>
@@ -28,7 +27,6 @@
#include <pk11/site.h> #include <pk11/site.h>
#include <isccfg/grammar.h>
#include <isccfg/namedconf.h> #include <isccfg/namedconf.h>
#include <dns/fixedname.h> #include <dns/fixedname.h>
@@ -48,11 +46,14 @@
/*% default configuration */ /*% default configuration */
static char defaultconf[] = "\ static char defaultconf[] = "\
options {\n\ options {\n\
answer-cookie true;\n\
automatic-interface-scan yes;\n\ automatic-interface-scan yes;\n\
bindkeys-file \"" NAMED_SYSCONFDIR "/bind.keys\";\n\ bindkeys-file \"" NAMED_SYSCONFDIR "/bind.keys\";\n\
# blackhole {none;};\n" # blackhole {none;};\n"
#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
" cookie-algorithm aes;\n" " cookie-algorithm aes;\n"
#else
" cookie-algorithm sha256;\n"
#endif
#ifndef WIN32 #ifndef WIN32
" coresize default;\n\ " coresize default;\n\
datasize default;\n" datasize default;\n"
@@ -93,7 +94,6 @@ options {\n\
request-nsid false;\n\ request-nsid false;\n\
reserved-sockets 512;\n\ reserved-sockets 512;\n\
resolver-query-timeout 10;\n\ resolver-query-timeout 10;\n\
rrset-order { order random; };\n\
secroots-file \"named.secroots\";\n\ secroots-file \"named.secroots\";\n\
send-cookie true;\n\ send-cookie true;\n\
# serial-queries <obsolete>;\n\ # serial-queries <obsolete>;\n\
@@ -146,7 +146,7 @@ options {\n\
clients-per-query 10;\n\ clients-per-query 10;\n\
dnssec-accept-expired no;\n\ dnssec-accept-expired no;\n\
dnssec-enable yes;\n\ dnssec-enable yes;\n\
dnssec-validation " VALIDATION_DEFAULT "; \n" dnssec-validation yes; \n"
#ifdef HAVE_DNSTAP #ifdef HAVE_DNSTAP
" dnstap-identity hostname;\n" " dnstap-identity hostname;\n"
#endif #endif
@@ -181,7 +181,6 @@ options {\n\
notify-source-v6 *;\n\ notify-source-v6 *;\n\
nsec3-test-zone no;\n\ nsec3-test-zone no;\n\
provide-ixfr true;\n\ provide-ixfr true;\n\
qname-minimization relaxed;\n\
query-source address *;\n\ query-source address *;\n\
query-source-v6 address *;\n\ query-source-v6 address *;\n\
recursion true;\n\ recursion true;\n\
@@ -309,9 +308,8 @@ named_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
isc_buffer_init(&b, defaultconf, sizeof(defaultconf) - 1); isc_buffer_init(&b, defaultconf, sizeof(defaultconf) - 1);
isc_buffer_add(&b, sizeof(defaultconf) - 1); isc_buffer_add(&b, sizeof(defaultconf) - 1);
return (cfg_parse_buffer4(parser, &b, __FILE__, 0, return (cfg_parse_buffer3(parser, &b, __FILE__, 0,
&cfg_type_namedconf, &cfg_type_namedconf, conf));
CFG_PCTX_NODEPRECATED, conf));
} }
isc_result_t isc_result_t
@@ -448,7 +446,7 @@ isc_result_t
named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list, named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx, in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp, isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
uint32_t *countp) isc_uint32_t *countp)
{ {
int count, i = 0; int count, i = 0;
const cfg_obj_t *addrlist; const cfg_obj_t *addrlist;
@@ -468,8 +466,8 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
portobj = cfg_tuple_get(list, "port"); portobj = cfg_tuple_get(list, "port");
if (cfg_obj_isuint32(portobj)) { if (cfg_obj_isuint32(portobj)) {
uint32_t val = cfg_obj_asuint32(portobj); isc_uint32_t val = cfg_obj_asuint32(portobj);
if (val > UINT16_MAX) { if (val > ISC_UINT16_MAX) {
cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR, cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR,
"port '%u' out of range", val); "port '%u' out of range", val);
return (ISC_R_RANGE); return (ISC_R_RANGE);
@@ -539,7 +537,7 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
void void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp, named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_dscp_t **dscpsp, uint32_t count) isc_dscp_t **dscpsp, isc_uint32_t count)
{ {
INSIST(addrsp != NULL && *addrsp != NULL); INSIST(addrsp != NULL && *addrsp != NULL);
INSIST(dscpsp == NULL || *dscpsp != NULL); INSIST(dscpsp == NULL || *dscpsp != NULL);
@@ -585,9 +583,9 @@ isc_result_t
named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
isc_mem_t *mctx, dns_ipkeylist_t *ipkl) isc_mem_t *mctx, dns_ipkeylist_t *ipkl)
{ {
uint32_t addrcount = 0, dscpcount = 0, keycount = 0, i = 0; isc_uint32_t addrcount = 0, dscpcount = 0, keycount = 0, i = 0;
uint32_t listcount = 0, l = 0, j; isc_uint32_t listcount = 0, l = 0, j;
uint32_t stackcount = 0, pushed = 0; isc_uint32_t stackcount = 0, pushed = 0;
isc_result_t result; isc_result_t result;
const cfg_listelt_t *element; const cfg_listelt_t *element;
const cfg_obj_t *addrlist; const cfg_obj_t *addrlist;
@@ -631,8 +629,8 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
dscpobj = cfg_tuple_get(list, "dscp"); dscpobj = cfg_tuple_get(list, "dscp");
if (cfg_obj_isuint32(portobj)) { if (cfg_obj_isuint32(portobj)) {
uint32_t val = cfg_obj_asuint32(portobj); isc_uint32_t val = cfg_obj_asuint32(portobj);
if (val > UINT16_MAX) { if (val > ISC_UINT16_MAX) {
cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR, cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR,
"port '%u' out of range", val); "port '%u' out of range", val);
result = ISC_R_RANGE; result = ISC_R_RANGE;
@@ -676,7 +674,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
/* Grow lists? */ /* Grow lists? */
if (listcount == l) { if (listcount == l) {
void * tmp; void * tmp;
uint32_t newlen = listcount + 16; isc_uint32_t newlen = listcount + 16;
size_t newsize, oldsize; size_t newsize, oldsize;
newsize = newlen * sizeof(*lists); newsize = newlen * sizeof(*lists);
@@ -711,7 +709,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
/* Grow stack? */ /* Grow stack? */
if (stackcount == pushed) { if (stackcount == pushed) {
void * tmp; void * tmp;
uint32_t newlen = stackcount + 16; isc_uint32_t newlen = stackcount + 16;
size_t newsize, oldsize; size_t newsize, oldsize;
newsize = newlen * sizeof(*stack); newsize = newlen * sizeof(*stack);
@@ -739,7 +737,7 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (i == addrcount) { if (i == addrcount) {
void * tmp; void * tmp;
uint32_t newlen = addrcount + 16; isc_uint32_t newlen = addrcount + 16;
size_t newsize, oldsize; size_t newsize, oldsize;
newsize = newlen * sizeof(isc_sockaddr_t); newsize = newlen * sizeof(isc_sockaddr_t);
@@ -912,7 +910,7 @@ named_config_getport(const cfg_obj_t *config, in_port_t *portp) {
result = named_config_get(maps, "port", &portobj); result = named_config_get(maps, "port", &portobj);
INSIST(result == ISC_R_SUCCESS); INSIST(result == ISC_R_SUCCESS);
if (cfg_obj_asuint32(portobj) >= UINT16_MAX) { if (cfg_obj_asuint32(portobj) >= ISC_UINT16_MAX) {
cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR, cfg_obj_log(portobj, named_g_lctx, ISC_LOG_ERROR,
"port '%u' out of range", "port '%u' out of range",
cfg_obj_asuint32(portobj)); cfg_obj_asuint32(portobj));
@@ -952,11 +950,13 @@ struct keyalgorithms {
enum { hmacnone, hmacmd5, hmacsha1, hmacsha224, enum { hmacnone, hmacmd5, hmacsha1, hmacsha224,
hmacsha256, hmacsha384, hmacsha512 } hmac; hmacsha256, hmacsha384, hmacsha512 } hmac;
unsigned int type; unsigned int type;
uint16_t size; isc_uint16_t size;
} algorithms[] = { } algorithms[] = {
#ifndef PK11_MD5_DISABLE
{ "hmac-md5", hmacmd5, DST_ALG_HMACMD5, 128 }, { "hmac-md5", hmacmd5, DST_ALG_HMACMD5, 128 },
{ "hmac-md5.sig-alg.reg.int", hmacmd5, DST_ALG_HMACMD5, 0 }, { "hmac-md5.sig-alg.reg.int", hmacmd5, DST_ALG_HMACMD5, 0 },
{ "hmac-md5.sig-alg.reg.int.", hmacmd5, DST_ALG_HMACMD5, 0 }, { "hmac-md5.sig-alg.reg.int.", hmacmd5, DST_ALG_HMACMD5, 0 },
#endif
{ "hmac-sha1", hmacsha1, DST_ALG_HMACSHA1, 160 }, { "hmac-sha1", hmacsha1, DST_ALG_HMACSHA1, 160 },
{ "hmac-sha224", hmacsha224, DST_ALG_HMACSHA224, 224 }, { "hmac-sha224", hmacsha224, DST_ALG_HMACSHA224, 224 },
{ "hmac-sha256", hmacsha256, DST_ALG_HMACSHA256, 256 }, { "hmac-sha256", hmacsha256, DST_ALG_HMACSHA256, 256 },
@@ -967,18 +967,18 @@ struct keyalgorithms {
isc_result_t isc_result_t
named_config_getkeyalgorithm(const char *str, const dns_name_t **name, named_config_getkeyalgorithm(const char *str, const dns_name_t **name,
uint16_t *digestbits) isc_uint16_t *digestbits)
{ {
return (named_config_getkeyalgorithm2(str, name, NULL, digestbits)); return (named_config_getkeyalgorithm2(str, name, NULL, digestbits));
} }
isc_result_t isc_result_t
named_config_getkeyalgorithm2(const char *str, const dns_name_t **name, named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
unsigned int *typep, uint16_t *digestbits) unsigned int *typep, isc_uint16_t *digestbits)
{ {
int i; int i;
size_t len = 0; size_t len = 0;
uint16_t bits; isc_uint16_t bits;
isc_result_t result; isc_result_t result;
for (i = 0; algorithms[i].str != NULL; i++) { for (i = 0; algorithms[i].str != NULL; i++) {
@@ -1003,7 +1003,9 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
if (name != NULL) { if (name != NULL) {
switch (algorithms[i].hmac) { switch (algorithms[i].hmac) {
#ifndef PK11_MD5_DISABLE
case hmacmd5: *name = dns_tsig_hmacmd5_name; break; case hmacmd5: *name = dns_tsig_hmacmd5_name; break;
#endif
case hmacsha1: *name = dns_tsig_hmacsha1_name; break; case hmacsha1: *name = dns_tsig_hmacsha1_name; break;
case hmacsha224: *name = dns_tsig_hmacsha224_name; break; case hmacsha224: *name = dns_tsig_hmacsha224_name; break;
case hmacsha256: *name = dns_tsig_hmacsha256_name; break; case hmacsha256: *name = dns_tsig_hmacsha256_name; break;
+9 -10
View File
@@ -14,7 +14,6 @@
#include <config.h> #include <config.h>
#include <stdbool.h>
#include <isc/app.h> #include <isc/app.h>
#include <isc/event.h> #include <isc/event.h>
@@ -60,9 +59,9 @@ getcommand(isc_lex_t *lex, char **cmdp) {
return (ISC_R_SUCCESS); return (ISC_R_SUCCESS);
} }
static inline bool static inline isc_boolean_t
command_compare(const char *str, const char *command) { command_compare(const char *str, const char *command) {
return (strcasecmp(str, command) == 0); return ISC_TF(strcasecmp(str, command) == 0);
} }
/*% /*%
@@ -70,7 +69,7 @@ command_compare(const char *str, const char *command) {
* when a control channel message is received. * when a control channel message is received.
*/ */
isc_result_t isc_result_t
named_control_docommand(isccc_sexpr_t *message, bool readonly, named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
isc_buffer_t **text) isc_buffer_t **text)
{ {
isccc_sexpr_t *data; isccc_sexpr_t *data;
@@ -185,7 +184,7 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
*/ */
#endif #endif
/* Do not flush master files */ /* Do not flush master files */
named_server_flushonshutdown(named_g_server, false); named_server_flushonshutdown(named_g_server, ISC_FALSE);
named_os_shutdownmsg(cmdline, *text); named_os_shutdownmsg(cmdline, *text);
isc_app_shutdown(); isc_app_shutdown();
result = ISC_R_SUCCESS; result = ISC_R_SUCCESS;
@@ -202,7 +201,7 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
if (named_smf_got_instance == 1 && named_smf_chroot == 0) if (named_smf_got_instance == 1 && named_smf_chroot == 0)
named_smf_want_disable = 1; named_smf_want_disable = 1;
#endif #endif
named_server_flushonshutdown(named_g_server, true); named_server_flushonshutdown(named_g_server, ISC_TRUE);
named_os_shutdownmsg(cmdline, *text); named_os_shutdownmsg(cmdline, *text);
isc_app_shutdown(); isc_app_shutdown();
result = ISC_R_SUCCESS; result = ISC_R_SUCCESS;
@@ -224,9 +223,9 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
} else if (command_compare(command, NAMED_COMMAND_FLUSH)) { } else if (command_compare(command, NAMED_COMMAND_FLUSH)) {
result = named_server_flushcache(named_g_server, lex); result = named_server_flushcache(named_g_server, lex);
} else if (command_compare(command, NAMED_COMMAND_FLUSHNAME)) { } else if (command_compare(command, NAMED_COMMAND_FLUSHNAME)) {
result = named_server_flushnode(named_g_server, lex, false); result = named_server_flushnode(named_g_server, lex, ISC_FALSE);
} else if (command_compare(command, NAMED_COMMAND_FLUSHTREE)) { } else if (command_compare(command, NAMED_COMMAND_FLUSHTREE)) {
result = named_server_flushnode(named_g_server, lex, true); result = named_server_flushnode(named_g_server, lex, ISC_TRUE);
} else if (command_compare(command, NAMED_COMMAND_STATUS)) { } else if (command_compare(command, NAMED_COMMAND_STATUS)) {
result = named_server_status(named_g_server, text); result = named_server_status(named_g_server, text);
} else if (command_compare(command, NAMED_COMMAND_TSIGLIST)) { } else if (command_compare(command, NAMED_COMMAND_TSIGLIST)) {
@@ -234,11 +233,11 @@ named_control_docommand(isccc_sexpr_t *message, bool readonly,
} else if (command_compare(command, NAMED_COMMAND_TSIGDELETE)) { } else if (command_compare(command, NAMED_COMMAND_TSIGDELETE)) {
result = named_server_tsigdelete(named_g_server, lex, text); result = named_server_tsigdelete(named_g_server, lex, text);
} else if (command_compare(command, NAMED_COMMAND_FREEZE)) { } else if (command_compare(command, NAMED_COMMAND_FREEZE)) {
result = named_server_freeze(named_g_server, true, lex, result = named_server_freeze(named_g_server, ISC_TRUE, lex,
text); text);
} else if (command_compare(command, NAMED_COMMAND_UNFREEZE) || } else if (command_compare(command, NAMED_COMMAND_UNFREEZE) ||
command_compare(command, NAMED_COMMAND_THAW)) { command_compare(command, NAMED_COMMAND_THAW)) {
result = named_server_freeze(named_g_server, false, lex, result = named_server_freeze(named_g_server, ISC_FALSE, lex,
text); text);
} else if (command_compare(command, NAMED_COMMAND_SCAN)) { } else if (command_compare(command, NAMED_COMMAND_SCAN)) {
result = ISC_R_SUCCESS; result = ISC_R_SUCCESS;
+40 -39
View File
@@ -13,9 +13,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <isc/base64.h> #include <isc/base64.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/event.h> #include <isc/event.h>
@@ -23,7 +20,6 @@
#include <isc/mem.h> #include <isc/mem.h>
#include <isc/net.h> #include <isc/net.h>
#include <isc/netaddr.h> #include <isc/netaddr.h>
#include <isc/nonce.h>
#include <isc/random.h> #include <isc/random.h>
#include <isc/result.h> #include <isc/result.h>
#include <isc/stdtime.h> #include <isc/stdtime.h>
@@ -68,7 +64,7 @@ typedef ISC_LIST(controllistener_t) controllistenerlist_t;
struct controlkey { struct controlkey {
char * keyname; char * keyname;
uint32_t algorithm; isc_uint32_t algorithm;
isc_region_t secret; isc_region_t secret;
ISC_LINK(controlkey_t) link; ISC_LINK(controlkey_t) link;
}; };
@@ -76,12 +72,12 @@ struct controlkey {
struct controlconnection { struct controlconnection {
isc_socket_t * sock; isc_socket_t * sock;
isccc_ccmsg_t ccmsg; isccc_ccmsg_t ccmsg;
bool ccmsg_valid; isc_boolean_t ccmsg_valid;
bool sending; isc_boolean_t sending;
isc_timer_t * timer; isc_timer_t * timer;
isc_buffer_t * buffer; isc_buffer_t * buffer;
controllistener_t * listener; controllistener_t * listener;
uint32_t nonce; isc_uint32_t nonce;
ISC_LINK(controlconnection_t) link; ISC_LINK(controlconnection_t) link;
}; };
@@ -92,22 +88,22 @@ struct controllistener {
isc_sockaddr_t address; isc_sockaddr_t address;
isc_socket_t * sock; isc_socket_t * sock;
dns_acl_t * acl; dns_acl_t * acl;
bool listening; isc_boolean_t listening;
bool exiting; isc_boolean_t exiting;
controlkeylist_t keys; controlkeylist_t keys;
controlconnectionlist_t connections; controlconnectionlist_t connections;
isc_sockettype_t type; isc_sockettype_t type;
uint32_t perm; isc_uint32_t perm;
uint32_t owner; isc_uint32_t owner;
uint32_t group; isc_uint32_t group;
bool readonly; isc_boolean_t readonly;
ISC_LINK(controllistener_t) link; ISC_LINK(controllistener_t) link;
}; };
struct named_controls { struct named_controls {
named_server_t *server; named_server_t *server;
controllistenerlist_t listeners; controllistenerlist_t listeners;
bool shuttingdown; isc_boolean_t shuttingdown;
isccc_symtab_t *symtab; isccc_symtab_t *symtab;
}; };
@@ -205,8 +201,8 @@ shutdown_listener(controllistener_t *listener) {
NAMED_LOGMODULE_CONTROL, ISC_LOG_NOTICE, NAMED_LOGMODULE_CONTROL, ISC_LOG_NOTICE,
"stopping command channel on %s", socktext); "stopping command channel on %s", socktext);
if (listener->type == isc_sockettype_unix) if (listener->type == isc_sockettype_unix)
isc_socket_cleanunix(&listener->address, true); isc_socket_cleanunix(&listener->address, ISC_TRUE);
listener->exiting = true; listener->exiting = ISC_TRUE;
} }
for (conn = ISC_LIST_HEAD(listener->connections); for (conn = ISC_LIST_HEAD(listener->connections);
@@ -224,7 +220,7 @@ shutdown_listener(controllistener_t *listener) {
maybe_free_listener(listener); maybe_free_listener(listener);
} }
static bool static isc_boolean_t
address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) { address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
dns_aclenv_t *env = dns_aclenv_t *env =
ns_interfacemgr_getaclenv(named_g_server->interfacemgr); ns_interfacemgr_getaclenv(named_g_server->interfacemgr);
@@ -234,8 +230,13 @@ address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
isc_netaddr_fromsockaddr(&netaddr, sockaddr); isc_netaddr_fromsockaddr(&netaddr, sockaddr);
result = dns_acl_match(&netaddr, NULL, acl, env, &match, NULL); result = dns_acl_match(&netaddr, NULL, NULL, 0, NULL, acl, env, &match,
return (result == ISC_R_SUCCESS && match > 0); NULL);
if (result != ISC_R_SUCCESS || match <= 0)
return (ISC_FALSE);
else
return (ISC_TRUE);
} }
static isc_result_t static isc_result_t
@@ -249,7 +250,7 @@ control_accept(controllistener_t *listener) {
"isc_socket_accept() failed: %s", "isc_socket_accept() failed: %s",
isc_result_totext(result)); isc_result_totext(result));
else else
listener->listening = true; listener->listening = ISC_TRUE;
return (result); return (result);
} }
@@ -282,7 +283,7 @@ control_senddone(isc_task_t *task, isc_event_t *event) {
UNUSED(task); UNUSED(task);
conn->sending = false; conn->sending = ISC_FALSE;
if (sevent->result != ISC_R_SUCCESS && if (sevent->result != ISC_R_SUCCESS &&
sevent->result != ISC_R_CANCELED) sevent->result != ISC_R_CANCELED)
@@ -328,7 +329,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
controlkey_t *key = NULL; controlkey_t *key = NULL;
isccc_sexpr_t *request = NULL; isccc_sexpr_t *request = NULL;
isccc_sexpr_t *response = NULL; isccc_sexpr_t *response = NULL;
uint32_t algorithm; isc_uint32_t algorithm;
isccc_region_t secret; isccc_region_t secret;
isc_stdtime_t now; isc_stdtime_t now;
isc_buffer_t b; isc_buffer_t b;
@@ -339,7 +340,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
isccc_sexpr_t *_ctrl = NULL; isccc_sexpr_t *_ctrl = NULL;
isccc_time_t sent; isccc_time_t sent;
isccc_time_t exp; isccc_time_t exp;
uint32_t nonce; isc_uint32_t nonce;
isccc_sexpr_t *data = NULL; isccc_sexpr_t *data = NULL;
REQUIRE(event->ev_type == ISCCC_EVENT_CCMSG); REQUIRE(event->ev_type == ISCCC_EVENT_CCMSG);
@@ -457,7 +458,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
*/ */
if (conn->nonce == 0) { if (conn->nonce == 0) {
while (conn->nonce == 0) { while (conn->nonce == 0) {
isc_nonce_buf(&conn->nonce, sizeof(conn->nonce)); isc_random_buf(&conn->nonce, sizeof(conn->nonce));
} }
eresult = ISC_R_SUCCESS; eresult = ISC_R_SUCCESS;
} else } else
@@ -519,7 +520,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
result = isc_socket_send(conn->sock, &r, task, control_senddone, conn); result = isc_socket_send(conn->sock, &r, task, control_senddone, conn);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
goto cleanup_response; goto cleanup_response;
conn->sending = true; conn->sending = ISC_TRUE;
isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret)); isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret));
isccc_sexpr_free(&request); isccc_sexpr_free(&request);
@@ -539,7 +540,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
cleanup: cleanup:
isc_socket_detach(&conn->sock); isc_socket_detach(&conn->sock);
isccc_ccmsg_invalidate(&conn->ccmsg); isccc_ccmsg_invalidate(&conn->ccmsg);
conn->ccmsg_valid = false; conn->ccmsg_valid = ISC_FALSE;
maybe_free_connection(conn); maybe_free_connection(conn);
maybe_free_listener(listener); maybe_free_listener(listener);
} }
@@ -572,8 +573,8 @@ newconnection(controllistener_t *listener, isc_socket_t *sock) {
/* Set a 32 KiB upper limit on incoming message. */ /* Set a 32 KiB upper limit on incoming message. */
isccc_ccmsg_setmaxsize(&conn->ccmsg, 32768); isccc_ccmsg_setmaxsize(&conn->ccmsg, 32768);
conn->ccmsg_valid = true; conn->ccmsg_valid = ISC_TRUE;
conn->sending = false; conn->sending = ISC_FALSE;
conn->buffer = NULL; conn->buffer = NULL;
conn->timer = NULL; conn->timer = NULL;
isc_interval_set(&interval, 60, 0); isc_interval_set(&interval, 60, 0);
@@ -620,7 +621,7 @@ control_newconn(isc_task_t *task, isc_event_t *event) {
UNUSED(task); UNUSED(task);
listener->listening = false; listener->listening = ISC_FALSE;
if (nevent->result != ISC_R_SUCCESS) { if (nevent->result != ISC_R_SUCCESS) {
if (nevent->result == ISC_R_CANCELED) { if (nevent->result == ISC_R_CANCELED) {
@@ -684,7 +685,7 @@ controls_shutdown(named_controls_t *controls) {
void void
named_controls_shutdown(named_controls_t *controls) { named_controls_shutdown(named_controls_t *controls) {
controls_shutdown(controls); controls_shutdown(controls);
controls->shuttingdown = true; controls->shuttingdown = ISC_TRUE;
} }
static isc_result_t static isc_result_t
@@ -1090,7 +1091,7 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp,
socktext, isc_result_totext(result)); socktext, isc_result_totext(result));
if (result == ISC_R_SUCCESS && type == isc_sockettype_unix) { if (result == ISC_R_SUCCESS && type == isc_sockettype_unix) {
uint32_t perm, owner, group; isc_uint32_t perm, owner, group;
perm = cfg_obj_asuint32(cfg_tuple_get(control, "perm")); perm = cfg_obj_asuint32(cfg_tuple_get(control, "perm"));
owner = cfg_obj_asuint32(cfg_tuple_get(control, "owner")); owner = cfg_obj_asuint32(cfg_tuple_get(control, "owner"));
group = cfg_obj_asuint32(cfg_tuple_get(control, "group")); group = cfg_obj_asuint32(cfg_tuple_get(control, "group"));
@@ -1137,14 +1138,14 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
listener->task = cp->server->task; listener->task = cp->server->task;
listener->address = *addr; listener->address = *addr;
listener->sock = NULL; listener->sock = NULL;
listener->listening = false; listener->listening = ISC_FALSE;
listener->exiting = false; listener->exiting = ISC_FALSE;
listener->acl = NULL; listener->acl = NULL;
listener->type = type; listener->type = type;
listener->perm = 0; listener->perm = 0;
listener->owner = 0; listener->owner = 0;
listener->group = 0; listener->group = 0;
listener->readonly = false; listener->readonly = ISC_FALSE;
ISC_LINK_INIT(listener, link); ISC_LINK_INIT(listener, link);
ISC_LIST_INIT(listener->keys); ISC_LIST_INIT(listener->keys);
ISC_LIST_INIT(listener->connections); ISC_LIST_INIT(listener->connections);
@@ -1207,7 +1208,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
} }
if (result == ISC_R_SUCCESS && type == isc_sockettype_unix) if (result == ISC_R_SUCCESS && type == isc_sockettype_unix)
isc_socket_cleanunix(&listener->address, false); isc_socket_cleanunix(&listener->address, ISC_FALSE);
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
result = isc_socket_create(named_g_socketmgr, result = isc_socket_create(named_g_socketmgr,
@@ -1218,7 +1219,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
#ifndef ISC_ALLOW_MAPPED #ifndef ISC_ALLOW_MAPPED
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
isc_socket_ipv6only(listener->sock, true); isc_socket_ipv6only(listener->sock, ISC_TRUE);
#endif #endif
if (result == ISC_R_SUCCESS) if (result == ISC_R_SUCCESS)
@@ -1249,7 +1250,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
} else { } else {
if (listener != NULL) { if (listener != NULL) {
listener->exiting = true; listener->exiting = ISC_TRUE;
free_listener(listener); free_listener(listener);
} }
@@ -1509,7 +1510,7 @@ named_controls_create(named_server_t *server, named_controls_t **ctrlsp) {
return (ISC_R_NOMEMORY); return (ISC_R_NOMEMORY);
controls->server = server; controls->server = server;
ISC_LIST_INIT(controls->listeners); ISC_LIST_INIT(controls->listeners);
controls->shuttingdown = false; controls->shuttingdown = ISC_FALSE;
controls->symtab = NULL; controls->symtab = NULL;
result = isccc_cc_createsymtab(&controls->symtab); result = isccc_cc_createsymtab(&controls->symtab);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
+25 -31
View File
@@ -9,10 +9,7 @@
* information regarding copyright ownership. * information regarding copyright ownership.
*/ */
#include <config.h> #include "config.h"
#include <inttypes.h>
#include <stdbool.h>
#include <named/fuzz.h> #include <named/fuzz.h>
@@ -36,6 +33,10 @@
#include <unistd.h> #include <unistd.h>
#include <pthread.h> #include <pthread.h>
#ifndef __AFL_LOOP
#error To use American Fuzzy Lop you have to set CC to afl-clang-fast!!!
#endif
/* /*
* We are using pthreads directly because we might be using it with * We are using pthreads directly because we might be using it with
* unthreaded version of BIND, where all thread functions are * unthreaded version of BIND, where all thread functions are
@@ -43,7 +44,7 @@
*/ */
static pthread_cond_t cond; static pthread_cond_t cond;
static pthread_mutex_t mutex; static pthread_mutex_t mutex;
static bool ready; static isc_boolean_t ready;
/* /*
* In "client:" mode, this thread reads fuzzed query messages from AFL * In "client:" mode, this thread reads fuzzed query messages from AFL
@@ -57,6 +58,7 @@ fuzz_thread_client(void *arg) {
char *port; char *port;
struct sockaddr_in servaddr; struct sockaddr_in servaddr;
int sockfd; int sockfd;
int loop;
void *buf; void *buf;
UNUSED(arg); UNUSED(arg);
@@ -98,18 +100,14 @@ fuzz_thread_client(void *arg) {
* Processing fuzzed packets 100,000 times before shutting down * Processing fuzzed packets 100,000 times before shutting down
* the app. * the app.
*/ */
#ifdef __AFL_LOOP for (loop = 0; loop < 100000; loop++) {
for (int loop = 0; loop < 100000; loop++) {
#else
{
#endif
ssize_t length; ssize_t length;
ssize_t sent; ssize_t sent;
length = read(0, buf, 65536); length = read(0, buf, 65536);
if (length <= 0) { if (length <= 0) {
usleep(1000000); usleep(1000000);
goto next; continue;
} }
/* /*
@@ -124,17 +122,17 @@ fuzz_thread_client(void *arg) {
free(buf); free(buf);
close(sockfd); close(sockfd);
named_server_flushonshutdown(named_g_server, named_server_flushonshutdown(named_g_server,
false); ISC_FALSE);
isc_app_shutdown(); isc_app_shutdown();
return (NULL); return (NULL);
} }
raise(SIGSTOP); raise(SIGSTOP);
goto next; continue;
} }
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0); RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
ready = false; ready = ISC_FALSE;
sent = sendto(sockfd, buf, length, 0, sent = sendto(sockfd, buf, length, 0,
(struct sockaddr *) &servaddr, sizeof(servaddr)); (struct sockaddr *) &servaddr, sizeof(servaddr));
@@ -150,13 +148,12 @@ fuzz_thread_client(void *arg) {
pthread_cond_wait(&cond, &mutex); pthread_cond_wait(&cond, &mutex);
RUNTIME_CHECK(pthread_mutex_unlock(&mutex) == 0); RUNTIME_CHECK(pthread_mutex_unlock(&mutex) == 0);
next: ;
} }
free(buf); free(buf);
close(sockfd); close(sockfd);
named_server_flushonshutdown(named_g_server, false); named_server_flushonshutdown(named_g_server, ISC_FALSE);
isc_app_shutdown(); isc_app_shutdown();
return (NULL); return (NULL);
@@ -203,7 +200,7 @@ fuzz_thread_resolver(void *arg) {
* have to be updated. 0x8d, 0xf6 at the start is the ID field * have to be updated. 0x8d, 0xf6 at the start is the ID field
* which will be made to match the query. * which will be made to match the query.
*/ */
const uint8_t dnskey_wf[] = { const isc_uint8_t dnskey_wf[] = {
0x8d, 0xf6, 0x84, 0x00, 0x00, 0x01, 0x00, 0x02, 0x8d, 0xf6, 0x84, 0x00, 0x00, 0x01, 0x00, 0x02,
0x00, 0x00, 0x00, 0x01, 0x07, 0x65, 0x78, 0x61, 0x00, 0x00, 0x00, 0x01, 0x07, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x30, 0x00, 0x6d, 0x70, 0x6c, 0x65, 0x00, 0x00, 0x30, 0x00,
@@ -285,12 +282,12 @@ fuzz_thread_resolver(void *arg) {
int sockfd; int sockfd;
int listenfd; int listenfd;
int loop; int loop;
uint16_t qtype; isc_uint16_t qtype;
char *buf, *rbuf; char *buf, *rbuf;
char *nameptr; char *nameptr;
unsigned int i; unsigned int i;
uint8_t llen; isc_uint8_t llen;
uint64_t seed; isc_uint64_t seed;
UNUSED(arg); UNUSED(arg);
@@ -388,7 +385,7 @@ fuzz_thread_resolver(void *arg) {
close(sockfd); close(sockfd);
close(listenfd); close(listenfd);
named_server_flushonshutdown(named_g_server, named_server_flushonshutdown(named_g_server,
false); ISC_FALSE);
isc_app_shutdown(); isc_app_shutdown();
return (NULL); return (NULL);
} }
@@ -402,7 +399,7 @@ fuzz_thread_resolver(void *arg) {
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0); RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
ready = false; ready = ISC_FALSE;
/* Use a unique query ID. */ /* Use a unique query ID. */
seed = 1664525 * seed + 1013904223; seed = 1664525 * seed + 1013904223;
@@ -552,7 +549,7 @@ fuzz_thread_resolver(void *arg) {
* "example." * "example."
*/ */
if ((nameptr - buf) < (length - 2)) { if ((nameptr - buf) < (length - 2)) {
uint8_t hb, lb; isc_uint8_t hb, lb;
hb = *nameptr++; hb = *nameptr++;
lb = *nameptr++; lb = *nameptr++;
qtype = (hb << 8) | lb; qtype = (hb << 8) | lb;
@@ -580,13 +577,11 @@ fuzz_thread_resolver(void *arg) {
} }
free(buf); free(buf);
free(rbuf);
close(sockfd); close(sockfd);
close(listenfd); close(listenfd);
named_server_flushonshutdown(named_g_server, false); named_server_flushonshutdown(named_g_server, ISC_FALSE);
isc_app_shutdown(); isc_app_shutdown();
#ifdef __AFL_LOOP
/* /*
* This is here just for the signature, that's how AFL detects * This is here just for the signature, that's how AFL detects
* if it's a 'persistent mode' binary. It has to occur somewhere * if it's a 'persistent mode' binary. It has to occur somewhere
@@ -595,7 +590,6 @@ fuzz_thread_resolver(void *arg) {
* in persistent mode if it's present. * in persistent mode if it's present.
*/ */
__AFL_LOOP(0); __AFL_LOOP(0);
#endif
return (NULL); return (NULL);
} }
@@ -692,7 +686,7 @@ fuzz_thread_tcp(void *arg) {
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0); RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
ready = false; ready = ISC_FALSE;
yes = 1; yes = 1;
sockfd = socket(AF_INET, SOCK_STREAM, 0); sockfd = socket(AF_INET, SOCK_STREAM, 0);
@@ -723,7 +717,7 @@ fuzz_thread_tcp(void *arg) {
free(buf); free(buf);
close(sockfd); close(sockfd);
named_server_flushonshutdown(named_g_server, false); named_server_flushonshutdown(named_g_server, ISC_FALSE);
isc_app_shutdown(); isc_app_shutdown();
return (NULL); return (NULL);
@@ -740,7 +734,7 @@ void
named_fuzz_notify(void) { named_fuzz_notify(void) {
#ifdef ENABLE_AFL #ifdef ENABLE_AFL
if (getenv("AFL_CMIN")) { if (getenv("AFL_CMIN")) {
named_server_flushonshutdown(named_g_server, false); named_server_flushonshutdown(named_g_server, ISC_FALSE);
isc_app_shutdown(); isc_app_shutdown();
return; return;
} }
@@ -749,7 +743,7 @@ named_fuzz_notify(void) {
RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0); RUNTIME_CHECK(pthread_mutex_lock(&mutex) == 0);
ready = true; ready = ISC_TRUE;
RUNTIME_CHECK(pthread_cond_signal(&cond) == 0); RUNTIME_CHECK(pthread_cond_signal(&cond) == 0);
RUNTIME_CHECK(pthread_mutex_unlock(&mutex) == 0); RUNTIME_CHECK(pthread_mutex_unlock(&mutex) == 0);
+4 -6
View File
@@ -15,8 +15,6 @@
/*! \file */ /*! \file */
#include <inttypes.h>
#include <isccfg/cfg.h> #include <isccfg/cfg.h>
#include <dns/types.h> #include <dns/types.h>
@@ -51,11 +49,11 @@ isc_result_t
named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list, named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
in_port_t defport, isc_mem_t *mctx, in_port_t defport, isc_mem_t *mctx,
isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp, isc_sockaddr_t **addrsp, isc_dscp_t **dscpsp,
uint32_t *countp); isc_uint32_t *countp);
void void
named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp, named_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
isc_dscp_t **dscpsp, uint32_t count); isc_dscp_t **dscpsp, isc_uint32_t count);
isc_result_t isc_result_t
named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list, named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
@@ -66,10 +64,10 @@ named_config_getport(const cfg_obj_t *config, in_port_t *portp);
isc_result_t isc_result_t
named_config_getkeyalgorithm(const char *str, const dns_name_t **name, named_config_getkeyalgorithm(const char *str, const dns_name_t **name,
uint16_t *digestbits); isc_uint16_t *digestbits);
isc_result_t isc_result_t
named_config_getkeyalgorithm2(const char *str, const dns_name_t **name, named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
unsigned int *typep, uint16_t *digestbits); unsigned int *typep, isc_uint16_t *digestbits);
isc_result_t isc_result_t
named_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp); named_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp);
+1 -3
View File
@@ -17,8 +17,6 @@
* The name server command channel. * The name server command channel.
*/ */
#include <stdbool.h>
#include <isccc/types.h> #include <isccc/types.h>
#include <isccfg/aclconf.h> #include <isccfg/aclconf.h>
@@ -103,7 +101,7 @@ named_controls_shutdown(named_controls_t *controls);
*/ */
isc_result_t isc_result_t
named_control_docommand(isccc_sexpr_t *message, bool readonly, named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
isc_buffer_t **text); isc_buffer_t **text);
#endif /* NAMED_CONTROL_H */ #endif /* NAMED_CONTROL_H */
+13 -11
View File
@@ -14,8 +14,6 @@
/*! \file */ /*! \file */
#include <stdbool.h>
#include <isc/rwlock.h> #include <isc/rwlock.h>
#include <isc/log.h> #include <isc/log.h>
#include <isc/net.h> #include <isc/net.h>
@@ -53,7 +51,7 @@ EXTERN dns_dispatchmgr_t * named_g_dispatchmgr INIT(NULL);
EXTERN unsigned int named_g_cpus_detected INIT(1); EXTERN unsigned int named_g_cpus_detected INIT(1);
#ifdef ENABLE_AFL #ifdef ENABLE_AFL
EXTERN bool named_g_run_done INIT(false); EXTERN isc_boolean_t named_g_run_done INIT(ISC_FALSE);
#endif #endif
/* /*
* XXXRTH We're going to want multiple timer managers eventually. One * XXXRTH We're going to want multiple timer managers eventually. One
@@ -96,7 +94,7 @@ EXTERN const char * named_g_keyfile INIT(NAMED_SYSCONFDIR
EXTERN dns_tsigkey_t * named_g_sessionkey INIT(NULL); EXTERN dns_tsigkey_t * named_g_sessionkey INIT(NULL);
EXTERN dns_name_t named_g_sessionkeyname; EXTERN dns_name_t named_g_sessionkeyname;
EXTERN bool named_g_conffileset INIT(false); EXTERN isc_boolean_t named_g_conffileset INIT(ISC_FALSE);
EXTERN cfg_aclconfctx_t * named_g_aclconfctx INIT(NULL); EXTERN cfg_aclconfctx_t * named_g_aclconfctx INIT(NULL);
/* /*
@@ -110,11 +108,11 @@ EXTERN isc_resourcevalue_t named_g_initopenfiles INIT(0);
/* /*
* Misc. * Misc.
*/ */
EXTERN bool named_g_coreok INIT(true); EXTERN isc_boolean_t named_g_coreok INIT(ISC_TRUE);
EXTERN const char * named_g_chrootdir INIT(NULL); EXTERN const char * named_g_chrootdir INIT(NULL);
EXTERN bool named_g_foreground INIT(false); EXTERN isc_boolean_t named_g_foreground INIT(ISC_FALSE);
EXTERN bool named_g_logstderr INIT(false); EXTERN isc_boolean_t named_g_logstderr INIT(ISC_FALSE);
EXTERN bool named_g_nosyslog INIT(false); EXTERN isc_boolean_t named_g_nosyslog INIT(ISC_FALSE);
EXTERN const char * named_g_logfile INIT(NULL); EXTERN const char * named_g_logfile INIT(NULL);
EXTERN const char * named_g_defaultsessionkeyfile EXTERN const char * named_g_defaultsessionkeyfile
@@ -123,7 +121,7 @@ EXTERN const char * named_g_defaultsessionkeyfile
EXTERN const char * named_g_defaultlockfile INIT(NAMED_LOCALSTATEDIR EXTERN const char * named_g_defaultlockfile INIT(NAMED_LOCALSTATEDIR
"/run/named/" "/run/named/"
"named.lock"); "named.lock");
EXTERN bool named_g_forcelock INIT(false); EXTERN isc_boolean_t named_g_forcelock INIT(ISC_FALSE);
#if NAMED_RUN_PID_DIR #if NAMED_RUN_PID_DIR
EXTERN const char * named_g_defaultpidfile INIT(NAMED_LOCALSTATEDIR EXTERN const char * named_g_defaultpidfile INIT(NAMED_LOCALSTATEDIR
@@ -144,12 +142,16 @@ EXTERN const char * named_g_defaultdnstap INIT(NULL);
EXTERN const char * named_g_username INIT(NULL); EXTERN const char * named_g_username INIT(NULL);
#if defined(USE_PKCS11)
EXTERN const char * named_g_engine INIT(PKCS11_ENGINE);
#else
EXTERN const char * named_g_engine INIT(NULL); EXTERN const char * named_g_engine INIT(NULL);
#endif
EXTERN isc_time_t named_g_boottime; EXTERN isc_time_t named_g_boottime;
EXTERN isc_time_t named_g_configtime; EXTERN isc_time_t named_g_configtime;
EXTERN bool named_g_memstatistics INIT(false); EXTERN isc_boolean_t named_g_memstatistics INIT(ISC_FALSE);
EXTERN bool named_g_keepstderr INIT(false); EXTERN isc_boolean_t named_g_keepstderr INIT(ISC_FALSE);
EXTERN unsigned int named_g_tat_interval INIT(24*3600); EXTERN unsigned int named_g_tat_interval INIT(24*3600);
+1 -1
View File
@@ -34,7 +34,7 @@
#define NAMED_LOGMODULE_CONTROL (&named_g_modules[2]) #define NAMED_LOGMODULE_CONTROL (&named_g_modules[2])
isc_result_t isc_result_t
named_log_init(bool safe); named_log_init(isc_boolean_t safe);
/*% /*%
* Initialize the logging system and set up an initial default * Initialize the logging system and set up an initial default
* logging default configuration that will be used until the * logging default configuration that will be used until the
+11 -14
View File
@@ -14,9 +14,6 @@
/*! \file */ /*! \file */
#include <inttypes.h>
#include <stdbool.h>
#include <isc/log.h> #include <isc/log.h>
#include <isc/magic.h> #include <isc/magic.h>
#include <isc/quota.h> #include <isc/quota.h>
@@ -56,9 +53,9 @@ struct named_server {
char * secrootsfile; /*%< Secroots file name */ char * secrootsfile; /*%< Secroots file name */
char * bindkeysfile; /*%< bind.keys file name */ char * bindkeysfile; /*%< bind.keys file name */
char * recfile; /*%< Recursive file name */ char * recfile; /*%< Recursive file name */
bool version_set; /*%< User has set version */ isc_boolean_t version_set; /*%< User has set version */
char * version; /*%< User-specified version */ char * version; /*%< User-specified version */
bool hostname_set; /*%< User has set hostname */ isc_boolean_t hostname_set; /*%< User has set hostname */
char * hostname; /*%< User-specified hostname */ char * hostname; /*%< User-specified hostname */
/* Server data structures. */ /* Server data structures. */
@@ -73,13 +70,13 @@ struct named_server {
isc_timer_t * pps_timer; isc_timer_t * pps_timer;
isc_timer_t * tat_timer; isc_timer_t * tat_timer;
uint32_t interface_interval; isc_uint32_t interface_interval;
uint32_t heartbeat_interval; isc_uint32_t heartbeat_interval;
isc_mutex_t reload_event_lock; isc_mutex_t reload_event_lock;
isc_event_t * reload_event; isc_event_t * reload_event;
bool flushonshutdown; isc_boolean_t flushonshutdown;
named_cachelist_t cachelist; /*%< Possibly shared caches */ named_cachelist_t cachelist; /*%< Possibly shared caches */
isc_stats_t * zonestats; /*% Zone management stats */ isc_stats_t * zonestats; /*% Zone management stats */
@@ -96,8 +93,8 @@ struct named_server {
char *session_keyfile; char *session_keyfile;
dns_name_t *session_keyname; dns_name_t *session_keyname;
unsigned int session_keyalg; unsigned int session_keyalg;
uint16_t session_keybits; isc_uint16_t session_keybits;
bool interface_auto; isc_boolean_t interface_auto;
unsigned char secret[32]; /*%< Server Cookie Secret */ unsigned char secret[32]; /*%< Server Cookie Secret */
ns_cookiealg_t cookiealg; ns_cookiealg_t cookiealg;
@@ -140,7 +137,7 @@ named_server_scan_interfaces(named_server_t *server);
*/ */
void void
named_server_flushonshutdown(named_server_t *server, bool flush); named_server_flushonshutdown(named_server_t *server, isc_boolean_t flush);
/*%< /*%<
* Inform the server that the zones should be flushed to disk on shutdown. * Inform the server that the zones should be flushed to disk on shutdown.
*/ */
@@ -237,7 +234,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex);
*/ */
isc_result_t isc_result_t
named_server_flushnode(named_server_t *server, isc_lex_t *lex, named_server_flushnode(named_server_t *server, isc_lex_t *lex,
bool tree); isc_boolean_t tree);
/*% /*%
* Report the server's status. * Report the server's status.
@@ -262,7 +259,7 @@ named_server_tsigdelete(named_server_t *server, isc_lex_t *lex,
* Enable or disable updates for a zone. * Enable or disable updates for a zone.
*/ */
isc_result_t isc_result_t
named_server_freeze(named_server_t *server, bool freeze, named_server_freeze(named_server_t *server, isc_boolean_t freeze,
isc_lex_t *lex, isc_buffer_t **text); isc_lex_t *lex, isc_buffer_t **text);
/*% /*%
@@ -342,7 +339,7 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
*/ */
isc_result_t isc_result_t
named_server_nta(named_server_t *server, isc_lex_t *lex, named_server_nta(named_server_t *server, isc_lex_t *lex,
bool readonly, isc_buffer_t **text); isc_boolean_t readonly, isc_buffer_t **text);
/*% /*%
* Generates a test sequence that is only for use in system tests. The * Generates a test sequence that is only for use in system tests. The
+3 -5
View File
@@ -14,8 +14,6 @@
/*! \file */ /*! \file */
#include <stdbool.h>
#include <isc/lang.h> #include <isc/lang.h>
#include <isc/types.h> #include <isc/types.h>
@@ -43,13 +41,13 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
* \li 'zone' to be initialized. * \li 'zone' to be initialized.
*/ */
bool isc_boolean_t
named_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig); named_zone_reusable(dns_zone_t *zone, const cfg_obj_t *zconfig);
/*%< /*%<
* If 'zone' can be safely reconfigured according to the configuration * If 'zone' can be safely reconfigured according to the configuration
* data in 'zconfig', return true. If the configuration data is so * data in 'zconfig', return ISC_TRUE. If the configuration data is so
* different from the current zone state that the zone needs to be destroyed * different from the current zone state that the zone needs to be destroyed
* and recreated, return false. * and recreated, return ISC_FALSE.
*/ */
isc_result_t isc_result_t
+1 -1
View File
@@ -50,7 +50,7 @@ static isc_logmodule_t modules[] = {
}; };
isc_result_t isc_result_t
named_log_init(bool safe) { named_log_init(isc_boolean_t safe) {
isc_result_t result; isc_result_t result;
isc_logconfig_t *lcfg = NULL; isc_logconfig_t *lcfg = NULL;
+6 -9
View File
@@ -13,9 +13,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <isc/file.h> #include <isc/file.h>
#include <isc/offset.h> #include <isc/offset.h>
#include <isc/print.h> #include <isc/print.h>
@@ -139,10 +136,10 @@ channel_fromconf(const cfg_obj_t *channel, isc_logconfig_t *logconfig) {
cfg_tuple_get(fileobj, "versions"); cfg_tuple_get(fileobj, "versions");
const cfg_obj_t *suffixobj = const cfg_obj_t *suffixobj =
cfg_tuple_get(fileobj, "suffix"); cfg_tuple_get(fileobj, "suffix");
int32_t versions = ISC_LOG_ROLLNEVER; isc_int32_t versions = ISC_LOG_ROLLNEVER;
isc_log_rollsuffix_t suffix = isc_log_rollsuffix_increment; isc_log_rollsuffix_t suffix = isc_log_rollsuffix_increment;
isc_offset_t size = 0; isc_offset_t size = 0;
uint64_t maxoffset; isc_uint64_t maxoffset;
/* /*
* isc_offset_t is a signed integer type, so the maximum * isc_offset_t is a signed integer type, so the maximum
@@ -305,8 +302,8 @@ named_logconfig(isc_logconfig_t *logconfig, const cfg_obj_t *logstmt) {
const cfg_obj_t *channels = NULL; const cfg_obj_t *channels = NULL;
const cfg_obj_t *categories = NULL; const cfg_obj_t *categories = NULL;
const cfg_listelt_t *element; const cfg_listelt_t *element;
bool default_set = false; isc_boolean_t default_set = ISC_FALSE;
bool unmatched_set = false; isc_boolean_t unmatched_set = ISC_FALSE;
const cfg_obj_t *catname; const cfg_obj_t *catname;
if (logconfig != NULL) if (logconfig != NULL)
@@ -331,12 +328,12 @@ named_logconfig(isc_logconfig_t *logconfig, const cfg_obj_t *logstmt) {
if (!default_set) { if (!default_set) {
catname = cfg_tuple_get(category, "name"); catname = cfg_tuple_get(category, "name");
if (strcmp(cfg_obj_asstring(catname), "default") == 0) if (strcmp(cfg_obj_asstring(catname), "default") == 0)
default_set = true; default_set = ISC_TRUE;
} }
if (!unmatched_set) { if (!unmatched_set) {
catname = cfg_tuple_get(category, "name"); catname = cfg_tuple_get(category, "name");
if (strcmp(cfg_obj_asstring(catname), "unmatched") == 0) if (strcmp(cfg_obj_asstring(catname), "unmatched") == 0)
unmatched_set = true; unmatched_set = ISC_TRUE;
} }
} }
+172 -237
View File
@@ -14,8 +14,6 @@
#include <config.h> #include <config.h>
#include <ctype.h> #include <ctype.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -46,7 +44,7 @@
#include <dns/view.h> #include <dns/view.h>
#include <dst/result.h> #include <dst/result.h>
#if USE_PKCS11 #if HAVE_PKCS11
#include <pk11/result.h> #include <pk11/result.h>
#endif #endif
@@ -77,8 +75,10 @@
#include <named/smf_globals.h> #include <named/smf_globals.h>
#endif #endif
#if HAVE_OPENSSL
#include <openssl/opensslv.h> #include <openssl/opensslv.h>
#include <openssl/crypto.h> #include <openssl/crypto.h>
#endif
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
#include <libxml/xmlversion.h> #include <libxml/xmlversion.h>
#endif #endif
@@ -109,9 +109,9 @@ LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_hour;
LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_day; LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_day;
LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_month; LIBDNS_EXTERNAL_DATA extern unsigned int dns_zone_mkey_month;
static bool want_stats = false; static isc_boolean_t want_stats = ISC_FALSE;
static char program_name[NAME_MAX] = "named"; static char program_name[ISC_DIR_NAMEMAX] = "named";
static char absolute_conffile[PATH_MAX]; static char absolute_conffile[ISC_DIR_PATHMAX];
static char saved_command_line[512]; static char saved_command_line[512];
static char version[512]; static char version[512];
static unsigned int maxsocks = 0; static unsigned int maxsocks = 0;
@@ -120,25 +120,21 @@ static int maxudp = 0;
/* /*
* -T options: * -T options:
*/ */
static bool clienttest = false; static isc_boolean_t clienttest = ISC_FALSE;
static bool dropedns = false; static isc_boolean_t dropedns = ISC_FALSE;
static bool ednsformerr = false; static isc_boolean_t noedns = ISC_FALSE;
static bool ednsnotimp = false; static isc_boolean_t nosoa = ISC_FALSE;
static bool ednsrefused = false; static isc_boolean_t noaa = ISC_FALSE;
static bool fixedlocal = false;
static bool noaa = false;
static bool noedns = false;
static bool nonearest = false;
static bool nosoa = false;
static bool notcp = false;
static bool sigvalinsecs = false;
static unsigned int delay = 0; static unsigned int delay = 0;
static isc_boolean_t nonearest = ISC_FALSE;
static isc_boolean_t notcp = ISC_FALSE;
static isc_boolean_t fixedlocal = ISC_FALSE;
/* /*
* -4 and -6 * -4 and -6
*/ */
static bool disable6 = false; static isc_boolean_t disable6 = ISC_FALSE;
static bool disable4 = false; static isc_boolean_t disable4 = ISC_FALSE;
void void
named_main_earlywarning(const char *format, ...) { named_main_earlywarning(const char *format, ...) {
@@ -341,7 +337,7 @@ save_command_line(int argc, char *argv[]) {
char *dst; char *dst;
char *eob; char *eob;
const char truncated[] = "..."; const char truncated[] = "...";
bool quoted = false; isc_boolean_t quoted = ISC_FALSE;
dst = saved_command_line; dst = saved_command_line;
eob = saved_command_line + sizeof(saved_command_line); eob = saved_command_line + sizeof(saved_command_line);
@@ -361,10 +357,10 @@ save_command_line(int argc, char *argv[]) {
*src == '-' || *src == '_' || *src == '-' || *src == '_' ||
*src == '.' || *src == '/') { *src == '.' || *src == '/') {
*dst++ = *src++; *dst++ = *src++;
quoted = false; quoted = ISC_FALSE;
} else { } else {
*dst++ = '\\'; *dst++ = '\\';
quoted = true; quoted = ISC_TRUE;
} }
} }
} }
@@ -395,25 +391,25 @@ parse_int(char *arg, const char *desc) {
static struct flag_def { static struct flag_def {
const char *name; const char *name;
unsigned int value; unsigned int value;
bool negate; isc_boolean_t negate;
} mem_debug_flags[] = { } mem_debug_flags[] = {
{ "none", 0, false }, { "none", 0, ISC_FALSE },
{ "trace", ISC_MEM_DEBUGTRACE, false }, { "trace", ISC_MEM_DEBUGTRACE, ISC_FALSE },
{ "record", ISC_MEM_DEBUGRECORD, false }, { "record", ISC_MEM_DEBUGRECORD, ISC_FALSE },
{ "usage", ISC_MEM_DEBUGUSAGE, false }, { "usage", ISC_MEM_DEBUGUSAGE, ISC_FALSE },
{ "size", ISC_MEM_DEBUGSIZE, false }, { "size", ISC_MEM_DEBUGSIZE, ISC_FALSE },
{ "mctx", ISC_MEM_DEBUGCTX, false }, { "mctx", ISC_MEM_DEBUGCTX, ISC_FALSE },
{ NULL, 0, false } { NULL, 0, ISC_FALSE }
}, mem_context_flags[] = { }, mem_context_flags[] = {
{ "external", ISC_MEMFLAG_INTERNAL, true }, { "external", ISC_MEMFLAG_INTERNAL, ISC_TRUE },
{ "fill", ISC_MEMFLAG_FILL, false }, { "fill", ISC_MEMFLAG_FILL, ISC_FALSE },
{ "nofill", ISC_MEMFLAG_FILL, true }, { "nofill", ISC_MEMFLAG_FILL, ISC_TRUE },
{ NULL, 0, false } { NULL, 0, ISC_FALSE }
}; };
static void static void
set_flags(const char *arg, struct flag_def *defs, unsigned int *ret) { set_flags(const char *arg, struct flag_def *defs, unsigned int *ret) {
bool clear = false; isc_boolean_t clear = ISC_FALSE;
for (;;) { for (;;) {
const struct flag_def *def; const struct flag_def *def;
@@ -426,7 +422,7 @@ set_flags(const char *arg, struct flag_def *defs, unsigned int *ret) {
if (arglen == (int)strlen(def->name) && if (arglen == (int)strlen(def->name) &&
memcmp(arg, def->name, arglen) == 0) { memcmp(arg, def->name, arglen) == 0) {
if (def->value == 0) if (def->value == 0)
clear = true; clear = ISC_TRUE;
if (def->negate) if (def->negate)
*ret &= ~(def->value); *ret &= ~(def->value);
else else
@@ -468,103 +464,12 @@ parse_fuzz_arg(void) {
} }
} }
static void
parse_T_opt(char *option) {
const char *p;
char *last = NULL;
/*
* 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)) {
delay = atoi(option + 6);
} else if (!strcmp(option, "dropedns")) {
dropedns = true;
} else if (!strncmp(option, "dscp=", 5)) {
isc_dscp_check_value = atoi(option + 5);
} else if (!strcmp(option, "ednsformerr")) {
ednsformerr = true;
} else if (!strcmp(option, "ednsnotimp")) {
ednsnotimp = true;
} else if (!strcmp(option, "ednsrefused")) {
ednsrefused = true;
} else if (!strcmp(option, "fixedlocal")) {
fixedlocal = true;
} else if (!strcmp(option, "keepstderr")) {
named_g_keepstderr = true;
} else if (!strcmp(option, "noaa")) {
noaa = true;
} else if (!strcmp(option, "noedns")) {
noedns = true;
} else if (!strcmp(option, "nonearest")) {
nonearest = true;
} else if (!strcmp(option, "nosoa")) {
nosoa = true;
} else if (!strcmp(option, "nosyslog")) {
named_g_nosyslog = true;
} else if (!strcmp(option, "notcp")) {
notcp = true;
} else if (!strcmp(option, "maxudp512")) {
maxudp = 512;
} else if (!strcmp(option, "maxudp1460")) {
maxudp = 1460;
} else if (!strncmp(option, "maxudp=", 7)) {
maxudp = atoi(option + 7);
} else if (!strncmp(option, "mkeytimers=", 11)) {
p = strtok_r(option + 11, "/", &last);
if (p == NULL) {
named_main_earlyfatal("bad mkeytimer");
}
dns_zone_mkey_hour = atoi(p);
if (dns_zone_mkey_hour == 0) {
named_main_earlyfatal("bad mkeytimer");
}
p = strtok_r(NULL, "/", &last);
if (p == NULL) {
dns_zone_mkey_day = (24 * dns_zone_mkey_hour);
dns_zone_mkey_month = (30 * dns_zone_mkey_day);
return;
}
dns_zone_mkey_day = atoi(p);
if (dns_zone_mkey_day < dns_zone_mkey_hour)
named_main_earlyfatal("bad mkeytimer");
p = strtok_r(NULL, "/", &last);
if (p == NULL) {
dns_zone_mkey_month = (30 * dns_zone_mkey_day);
return;
}
dns_zone_mkey_month = atoi(p);
if (dns_zone_mkey_month < dns_zone_mkey_day) {
named_main_earlyfatal("bad mkeytimer");
}
} else if (!strcmp(option, "sigvalinsecs")) {
sigvalinsecs = true;
} else if (!strncmp(option, "tat=", 4)) {
named_g_tat_interval = atoi(option + 4);
} else {
fprintf(stderr, "unknown -T flag '%s'\n", option);
}
}
static void static void
parse_command_line(int argc, char *argv[]) { parse_command_line(int argc, char *argv[]) {
int ch; int ch;
int port; int port;
const char *p; const char *p;
char *last;
save_command_line(argc, argv); save_command_line(argc, argv);
@@ -572,7 +477,7 @@ parse_command_line(int argc, char *argv[]) {
* NAMED_MAIN_ARGS is defined in main.h, so that it can be used * NAMED_MAIN_ARGS is defined in main.h, so that it can be used
* both by named and by ntservice hooks. * both by named and by ntservice hooks.
*/ */
isc_commandline_errprint = false; isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv, while ((ch = isc_commandline_parse(argc, argv,
NAMED_MAIN_ARGS)) != -1) NAMED_MAIN_ARGS)) != -1)
{ {
@@ -585,7 +490,7 @@ parse_command_line(int argc, char *argv[]) {
named_main_earlyfatal("IPv4 not supported " named_main_earlyfatal("IPv4 not supported "
"by OS"); "by OS");
isc_net_disableipv6(); isc_net_disableipv6();
disable6 = true; disable6 = ISC_TRUE;
break; break;
case '6': case '6':
if (disable6) if (disable6)
@@ -595,14 +500,14 @@ parse_command_line(int argc, char *argv[]) {
named_main_earlyfatal("IPv6 not supported " named_main_earlyfatal("IPv6 not supported "
"by OS"); "by OS");
isc_net_disableipv4(); isc_net_disableipv4();
disable4 = true; disable4 = ISC_TRUE;
break; break;
case 'A': case 'A':
parse_fuzz_arg(); parse_fuzz_arg();
break; break;
case 'c': case 'c':
named_g_conffile = isc_commandline_argument; named_g_conffile = isc_commandline_argument;
named_g_conffileset = true; named_g_conffileset = ISC_TRUE;
break; break;
case 'd': case 'd':
named_g_debuglevel = parse_int(isc_commandline_argument, named_g_debuglevel = parse_int(isc_commandline_argument,
@@ -615,11 +520,11 @@ parse_command_line(int argc, char *argv[]) {
named_g_engine = isc_commandline_argument; named_g_engine = isc_commandline_argument;
break; break;
case 'f': case 'f':
named_g_foreground = true; named_g_foreground = ISC_TRUE;
break; break;
case 'g': case 'g':
named_g_foreground = true; named_g_foreground = ISC_TRUE;
named_g_logstderr = true; named_g_logstderr = ISC_TRUE;
break; break;
case 'L': case 'L':
named_g_logfile = isc_commandline_argument; named_g_logfile = isc_commandline_argument;
@@ -648,7 +553,7 @@ parse_command_line(int argc, char *argv[]) {
break; break;
case 's': case 's':
/* XXXRTH temporary syntax */ /* XXXRTH temporary syntax */
want_stats = true; want_stats = ISC_TRUE;
break; break;
case 'S': case 'S':
maxsocks = parse_int(isc_commandline_argument, maxsocks = parse_int(isc_commandline_argument,
@@ -659,7 +564,95 @@ parse_command_line(int argc, char *argv[]) {
named_g_chrootdir = isc_commandline_argument; named_g_chrootdir = isc_commandline_argument;
break; break;
case 'T': /* NOT DOCUMENTED */ case 'T': /* NOT DOCUMENTED */
parse_T_opt(isc_commandline_argument); /*
* 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(isc_commandline_argument, "clienttest"))
clienttest = ISC_TRUE;
else if (!strcmp(isc_commandline_argument, "nosoa"))
nosoa = ISC_TRUE;
else if (!strcmp(isc_commandline_argument, "noaa"))
noaa = ISC_TRUE;
else if (!strcmp(isc_commandline_argument,
"maxudp512"))
maxudp = 512;
else if (!strcmp(isc_commandline_argument,
"maxudp1460"))
maxudp = 1460;
else if (!strcmp(isc_commandline_argument, "dropedns"))
dropedns = ISC_TRUE;
else if (!strcmp(isc_commandline_argument, "noedns"))
noedns = ISC_TRUE;
else if (!strncmp(isc_commandline_argument,
"maxudp=", 7))
maxudp = atoi(isc_commandline_argument + 7);
else if (!strncmp(isc_commandline_argument,
"delay=", 6))
delay = atoi(isc_commandline_argument + 6);
else if (!strcmp(isc_commandline_argument, "nosyslog"))
named_g_nosyslog = ISC_TRUE;
else if (!strcmp(isc_commandline_argument, "nonearest"))
nonearest = ISC_TRUE;
else if (!strncmp(isc_commandline_argument, "dscp=", 5))
isc_dscp_check_value =
atoi(isc_commandline_argument + 5);
else if (!strncmp(isc_commandline_argument,
"mkeytimers=", 11))
{
p = strtok_r(isc_commandline_argument + 11, "/", &last);
if (p == NULL)
named_main_earlyfatal("bad mkeytimer");
dns_zone_mkey_hour = atoi(p);
if (dns_zone_mkey_hour == 0)
named_main_earlyfatal("bad mkeytimer");
p = strtok_r(NULL, "/", &last);
if (p == NULL) {
dns_zone_mkey_day =
(24 * dns_zone_mkey_hour);
dns_zone_mkey_month =
(30 * dns_zone_mkey_day);
break;
}
dns_zone_mkey_day = atoi(p);
if (dns_zone_mkey_day < dns_zone_mkey_hour)
named_main_earlyfatal("bad mkeytimer");
p = strtok_r(NULL, "/", &last);
if (p == NULL) {
dns_zone_mkey_month =
(30 * dns_zone_mkey_day);
break;
}
dns_zone_mkey_month = atoi(p);
if (dns_zone_mkey_month < dns_zone_mkey_day)
named_main_earlyfatal("bad mkeytimer");
} else if (!strcmp(isc_commandline_argument, "notcp"))
notcp = ISC_TRUE;
else if (!strncmp(isc_commandline_argument, "tat=", 4))
{
named_g_tat_interval =
atoi(isc_commandline_argument + 4);
} else if (!strcmp(isc_commandline_argument,
"keepstderr"))
{
named_g_keepstderr = ISC_TRUE;
} else if (!strcmp(isc_commandline_argument,
"fixedlocal"))
{
fixedlocal = ISC_TRUE;
} else {
fprintf(stderr, "unknown -T flag '%s\n",
isc_commandline_argument);
}
break; break;
case 'U': case 'U':
named_g_udpdisp = parse_int(isc_commandline_argument, named_g_udpdisp = parse_int(isc_commandline_argument,
@@ -700,6 +693,7 @@ parse_command_line(int argc, char *argv[]) {
#ifdef __SUNPRO_C #ifdef __SUNPRO_C
printf("compiled by Solaris Studio %x\n", __SUNPRO_C); printf("compiled by Solaris Studio %x\n", __SUNPRO_C);
#endif #endif
#if HAVE_OPENSSL
printf("compiled with OpenSSL version: %s\n", printf("compiled with OpenSSL version: %s\n",
OPENSSL_VERSION_TEXT); OPENSSL_VERSION_TEXT);
#if !defined(LIBRESSL_VERSION_NUMBER) && \ #if !defined(LIBRESSL_VERSION_NUMBER) && \
@@ -711,6 +705,7 @@ parse_command_line(int argc, char *argv[]) {
printf("linked to OpenSSL version: %s\n", printf("linked to OpenSSL version: %s\n",
SSLeay_version(SSLEAY_VERSION)); SSLeay_version(SSLEAY_VERSION));
#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ #endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
#endif
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
printf("compiled with libxml2 version: %s\n", printf("compiled with libxml2 version: %s\n",
LIBXML_DOTTED_VERSION); LIBXML_DOTTED_VERSION);
@@ -729,13 +724,17 @@ parse_command_line(int argc, char *argv[]) {
printf("linked to zlib version: %s\n", printf("linked to zlib version: %s\n",
zlibVersion()); zlibVersion());
#endif #endif
#ifdef ISC_PLATFORM_USETHREADS
printf("threads support is enabled\n"); printf("threads support is enabled\n");
#else
printf("threads support is disabled\n");
#endif
exit(0); exit(0);
case 'x': case 'x':
/* Obsolete. No longer in use. Ignore. */ /* Obsolete. No longer in use. Ignore. */
break; break;
case 'X': case 'X':
named_g_forcelock = true; named_g_forcelock = ISC_TRUE;
if (strcasecmp(isc_commandline_argument, "none") != 0) if (strcasecmp(isc_commandline_argument, "none") != 0)
named_g_defaultlockfile = named_g_defaultlockfile =
isc_commandline_argument; isc_commandline_argument;
@@ -781,6 +780,7 @@ create_managers(void) {
INSIST(named_g_cpus_detected > 0); INSIST(named_g_cpus_detected > 0);
#ifdef ISC_PLATFORM_USETHREADS
if (named_g_cpus == 0) if (named_g_cpus == 0)
named_g_cpus = named_g_cpus_detected; named_g_cpus = named_g_cpus_detected;
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
@@ -789,19 +789,27 @@ create_managers(void) {
named_g_cpus_detected, named_g_cpus_detected,
named_g_cpus_detected == 1 ? "" : "s", named_g_cpus_detected == 1 ? "" : "s",
named_g_cpus, named_g_cpus == 1 ? "" : "s"); named_g_cpus, named_g_cpus == 1 ? "" : "s");
#else
named_g_cpus = 1;
#endif
#ifdef WIN32 #ifdef WIN32
named_g_udpdisp = 1; named_g_udpdisp = 1;
#else #else
if (named_g_udpdisp == 0) { if (named_g_udpdisp == 0) {
named_g_udpdisp = named_g_cpus_detected; if (named_g_cpus_detected == 1)
named_g_udpdisp = 1;
else
named_g_udpdisp = named_g_cpus_detected - 1;
} }
if (named_g_udpdisp > named_g_cpus) if (named_g_udpdisp > named_g_cpus)
named_g_udpdisp = named_g_cpus; named_g_udpdisp = named_g_cpus;
#endif #endif
#ifdef ISC_PLATFORM_USETHREADS
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO, NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"using %u UDP listener%s per interface", "using %u UDP listener%s per interface",
named_g_udpdisp, named_g_udpdisp == 1 ? "" : "s"); named_g_udpdisp, named_g_udpdisp == 1 ? "" : "s");
#endif
result = isc_taskmgr_create(named_g_mctx, named_g_cpus, 0, result = isc_taskmgr_create(named_g_mctx, named_g_cpus, 0,
&named_g_taskmgr); &named_g_taskmgr);
@@ -821,14 +829,14 @@ create_managers(void) {
} }
result = isc_socketmgr_create2(named_g_mctx, &named_g_socketmgr, result = isc_socketmgr_create2(named_g_mctx, &named_g_socketmgr,
maxsocks, named_g_udpdisp); maxsocks);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__, UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_socketmgr_create() failed: %s", "isc_socketmgr_create() failed: %s",
isc_result_totext(result)); isc_result_totext(result));
return (ISC_R_UNEXPECTED); return (ISC_R_UNEXPECTED);
} }
isc_socketmgr_maxudp(named_g_socketmgr, maxudp); isc__socketmgr_maxudp(named_g_socketmgr, maxudp);
result = isc_socketmgr_getmaxsockets(named_g_socketmgr, &socks); result = isc_socketmgr_getmaxsockets(named_g_socketmgr, &socks);
if (result == ISC_R_SUCCESS) { if (result == ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
@@ -913,10 +921,12 @@ setup(void) {
isc_mem_free(named_g_mctx, instance); isc_mem_free(named_g_mctx, instance);
#endif /* HAVE_LIBSCF */ #endif /* HAVE_LIBSCF */
#ifdef ISC_PLATFORM_USETHREADS
/* /*
* Check for the number of cpu's before named_os_chroot(). * Check for the number of cpu's before named_os_chroot().
*/ */
named_g_cpus_detected = isc_os_ncpus(); named_g_cpus_detected = isc_os_ncpus();
#endif
named_os_chroot(named_g_chrootdir); named_os_chroot(named_g_chrootdir);
@@ -930,7 +940,7 @@ setup(void) {
*/ */
named_os_minprivs(); named_os_minprivs();
result = named_log_init(named_g_username != NULL); result = named_log_init(ISC_TF(named_g_username != NULL));
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
named_main_earlyfatal("named_log_init() failed: %s", named_main_earlyfatal("named_log_init() failed: %s",
isc_result_totext(result)); isc_result_totext(result));
@@ -973,74 +983,7 @@ setup(void) {
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"running as: %s%s", "running as: %s%s",
program_name, saved_command_line); program_name, saved_command_line);
#ifdef __clang__
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled by CLANG %s", __VERSION__);
#else
#if defined(__ICC) || defined(__INTEL_COMPILER)
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled by ICC %s", __VERSION__);
#else
#ifdef __GNUC__
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled by GCC %s", __VERSION__);
#endif
#endif
#endif
#ifdef _MSC_VER
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled by MSVC %d", _MSC_VER);
#endif
#ifdef __SUNPRO_C
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled by Solaris Studio %x", __SUNPRO_C);
#endif
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled with OpenSSL version: %s",
OPENSSL_VERSION_TEXT);
#if !defined(LIBRESSL_VERSION_NUMBER) && \
OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"linked to OpenSSL version: %s",
OpenSSL_version(OPENSSL_VERSION));
#else
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"linked to OpenSSL version: %s",
SSLeay_version(SSLEAY_VERSION));
#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */
#ifdef HAVE_LIBXML2
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled with libxml2 version: %s",
LIBXML_DOTTED_VERSION);
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"linked to libxml2 version: %s", xmlParserVersion);
#endif
#if defined(HAVE_JSON) && defined(JSON_C_VERSION)
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled with libjson-c version: %s", JSON_C_VERSION);
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"linked to libjson-c version: %s", json_c_version());
#endif
#if defined(HAVE_ZLIB) && defined(ZLIB_VERSION)
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled with zlib version: %s", ZLIB_VERSION);
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"linked to zlib version: %s", zlibVersion());
#endif
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"----------------------------------------------------"); "----------------------------------------------------");
@@ -1086,8 +1029,8 @@ setup(void) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE, NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"adjusted limit on open files from " "adjusted limit on open files from "
"%" PRIu64 " to " "%" ISC_PRINT_QUADFORMAT "u to "
"%" PRIu64, "%" ISC_PRINT_QUADFORMAT "u",
old_openfiles, named_g_initopenfiles); old_openfiles, named_g_initopenfiles);
} }
@@ -1154,33 +1097,25 @@ setup(void) {
* Modify server context according to command line options * Modify server context according to command line options
*/ */
if (clienttest) if (clienttest)
ns_server_setoption(sctx, NS_SERVER_CLIENTTEST, true); ns_server_setoption(sctx, NS_SERVER_CLIENTTEST, ISC_TRUE);
if (disable4)
ns_server_setoption(sctx, NS_SERVER_DISABLE4, true);
if (disable6)
ns_server_setoption(sctx, NS_SERVER_DISABLE6, true);
if (dropedns) if (dropedns)
ns_server_setoption(sctx, NS_SERVER_DROPEDNS, true); ns_server_setoption(sctx, NS_SERVER_DROPEDNS, ISC_TRUE);
if (ednsformerr) /* STD13 server */
ns_server_setoption(sctx, NS_SERVER_EDNSFORMERR, true);
if (ednsnotimp)
ns_server_setoption(sctx, NS_SERVER_EDNSNOTIMP, true);
if (ednsrefused)
ns_server_setoption(sctx, NS_SERVER_EDNSREFUSED, true);
if (fixedlocal)
ns_server_setoption(sctx, NS_SERVER_FIXEDLOCAL, true);
if (noaa)
ns_server_setoption(sctx, NS_SERVER_NOAA, true);
if (noedns) if (noedns)
ns_server_setoption(sctx, NS_SERVER_NOEDNS, true); ns_server_setoption(sctx, NS_SERVER_NOEDNS, ISC_TRUE);
if (nonearest)
ns_server_setoption(sctx, NS_SERVER_NONEAREST, true);
if (nosoa) if (nosoa)
ns_server_setoption(sctx, NS_SERVER_NOSOA, true); ns_server_setoption(sctx, NS_SERVER_NOSOA, ISC_TRUE);
if (noaa)
ns_server_setoption(sctx, NS_SERVER_NOAA, ISC_TRUE);
if (nonearest)
ns_server_setoption(sctx, NS_SERVER_NONEAREST, ISC_TRUE);
if (notcp) if (notcp)
ns_server_setoption(sctx, NS_SERVER_NOTCP, true); ns_server_setoption(sctx, NS_SERVER_NOTCP, ISC_TRUE);
if (sigvalinsecs) if (fixedlocal)
ns_server_setoption(sctx, NS_SERVER_SIGVALINSECS, true); ns_server_setoption(sctx, NS_SERVER_FIXEDLOCAL, ISC_TRUE);
if (disable4)
ns_server_setoption(sctx, NS_SERVER_DISABLE4, ISC_TRUE);
if (disable6)
ns_server_setoption(sctx, NS_SERVER_DISABLE6, ISC_TRUE);
named_g_server->sctx->delay = delay; named_g_server->sctx->delay = delay;
} }
@@ -1344,7 +1279,7 @@ main(int argc, char *argv[]) {
dns_result_register(); dns_result_register();
dst_result_register(); dst_result_register();
isccc_result_register(); isccc_result_register();
#if USE_PKCS11 #if HAVE_PKCS11
pk11_result_register(); pk11_result_register();
#endif #endif
+35 -44
View File
@@ -10,12 +10,12 @@
.\" Title: named.conf .\" Title: named.conf
.\" Author: .\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2018-06-21 .\" Date: 2018-01-22
.\" Manual: BIND9 .\" Manual: BIND9
.\" Source: ISC .\" Source: ISC
.\" Language: English .\" Language: English
.\" .\"
.TH "NAMED\&.CONF" "5" "2018\-06\-21" "ISC" "BIND9" .TH "NAMED\&.CONF" "5" "2018\-01\-22" "ISC" "BIND9"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@@ -212,7 +212,7 @@ options {
\fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [ \fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [
port \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key port \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
\fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [ \fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIttlval\fR ]; \&.\&.\&. }; in\-memory \fIboolean\fR ] [ min\-update\-interval \fIinteger\fR ]; \&.\&.\&. };
check\-dup\-records ( fail | warn | ignore ); check\-dup\-records ( fail | warn | ignore );
check\-integrity \fIboolean\fR; check\-integrity \fIboolean\fR;
check\-mx ( fail | warn | ignore ); check\-mx ( fail | warn | ignore );
@@ -231,9 +231,9 @@ options {
coresize ( default | unlimited | \fIsizeval\fR ); coresize ( default | unlimited | \fIsizeval\fR );
datasize ( default | unlimited | \fIsizeval\fR ); datasize ( default | unlimited | \fIsizeval\fR );
deny\-answer\-addresses { \fIaddress_match_element\fR; \&.\&.\&. } [ deny\-answer\-addresses { \fIaddress_match_element\fR; \&.\&.\&. } [
except\-from { \fIstring\fR; \&.\&.\&. } ]; except\-from { \fIquoted_string\fR; \&.\&.\&. } ];
deny\-answer\-aliases { \fIstring\fR; \&.\&.\&. } [ except\-from { \fIstring\fR; \&.\&.\&. deny\-answer\-aliases { \fIquoted_string\fR; \&.\&.\&. } [ except\-from {
} ]; \fIquoted_string\fR; \&.\&.\&. } ];
dialup ( notify | notify\-passive | passive | refresh | \fIboolean\fR ); dialup ( notify | notify\-passive | passive | refresh | \fIboolean\fR );
directory \fIquoted_string\fR; directory \fIquoted_string\fR;
disable\-algorithms \fIstring\fR { \fIstring\fR; disable\-algorithms \fIstring\fR { \fIstring\fR;
@@ -251,7 +251,6 @@ options {
}; };
dns64\-contact \fIstring\fR; dns64\-contact \fIstring\fR;
dns64\-server \fIstring\fR; dns64\-server \fIstring\fR;
dnskey\-sig\-validity \fIinteger\fR;
dnsrps\-enable \fIboolean\fR; dnsrps\-enable \fIboolean\fR;
dnsrps\-options { \fIunspecified\-text\fR }; dnsrps\-options { \fIunspecified\-text\fR };
dnssec\-accept\-expired \fIboolean\fR; dnssec\-accept\-expired \fIboolean\fR;
@@ -264,12 +263,14 @@ options {
dnssec\-secure\-to\-insecure \fIboolean\fR; dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign ); dnssec\-update\-mode ( maintain | no\-resign );
dnssec\-validation ( yes | no | auto ); dnssec\-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query | dnstap { ( all | auth | client | forwarder |
response ) ]; \&.\&.\&. }; resolver ) [ ( query | response ) ]; \&.\&.\&. };
dnstap\-identity ( \fIquoted_string\fR | none | hostname ); dnstap\-identity ( \fIquoted_string\fR | none |
dnstap\-output ( file | unix ) \fIquoted_string\fR [ size ( unlimited | hostname );
\fIsize\fR ) ] [ versions ( unlimited | \fIinteger\fR ) ] [ suffix ( dnstap\-output ( file | unix ) \fIquoted_string\fR [
increment | timestamp ) ]; size ( unlimited | \fIsize\fR ) ] [ versions (
unlimited | \fIinteger\fR ) ] [ suffix ( increment
| timestamp ) ];
dnstap\-version ( \fIquoted_string\fR | none ); dnstap\-version ( \fIquoted_string\fR | none );
dscp \fIinteger\fR; dscp \fIinteger\fR;
dual\-stack\-servers [ port \fIinteger\fR ] { ( \fIquoted_string\fR [ port dual\-stack\-servers [ port \fIinteger\fR ] { ( \fIquoted_string\fR [ port
@@ -298,13 +299,14 @@ options {
fstrm\-set\-output\-notify\-threshold \fIinteger\fR; fstrm\-set\-output\-notify\-threshold \fIinteger\fR;
fstrm\-set\-output\-queue\-model ( mpsc | spsc ); fstrm\-set\-output\-queue\-model ( mpsc | spsc );
fstrm\-set\-output\-queue\-size \fIinteger\fR; fstrm\-set\-output\-queue\-size \fIinteger\fR;
fstrm\-set\-reopen\-interval \fIttlval\fR; fstrm\-set\-reopen\-interval \fIinteger\fR;
geoip\-directory ( \fIquoted_string\fR | none ); geoip\-directory ( \fIquoted_string\fR | none );
geoip\-use\-ecs \fIboolean\fR;
glue\-cache \fIboolean\fR; glue\-cache \fIboolean\fR;
heartbeat\-interval \fIinteger\fR; heartbeat\-interval \fIinteger\fR;
hostname ( \fIquoted_string\fR | none ); hostname ( \fIquoted_string\fR | none );
inline\-signing \fIboolean\fR; inline\-signing \fIboolean\fR;
interface\-interval \fIttlval\fR; interface\-interval \fIinteger\fR;
ixfr\-from\-differences ( primary | master | secondary | slave | ixfr\-from\-differences ( primary | master | secondary | slave |
\fIboolean\fR ); \fIboolean\fR );
keep\-response\-order { \fIaddress_match_element\fR; \&.\&.\&. }; keep\-response\-order { \fIaddress_match_element\fR; \&.\&.\&. };
@@ -323,10 +325,10 @@ options {
masterfile\-style ( full | relative ); masterfile\-style ( full | relative );
match\-mapped\-addresses \fIboolean\fR; match\-mapped\-addresses \fIboolean\fR;
max\-cache\-size ( default | unlimited | \fIsizeval\fR | \fIpercentage\fR ); max\-cache\-size ( default | unlimited | \fIsizeval\fR | \fIpercentage\fR );
max\-cache\-ttl \fIttlval\fR; max\-cache\-ttl \fIinteger\fR;
max\-clients\-per\-query \fIinteger\fR; max\-clients\-per\-query \fIinteger\fR;
max\-journal\-size ( default | unlimited | \fIsizeval\fR ); max\-journal\-size ( default | unlimited | \fIsizeval\fR );
max\-ncache\-ttl \fIttlval\fR; max\-ncache\-ttl \fIinteger\fR;
max\-records \fIinteger\fR; max\-records \fIinteger\fR;
max\-recursion\-depth \fIinteger\fR; max\-recursion\-depth \fIinteger\fR;
max\-recursion\-queries \fIinteger\fR; max\-recursion\-queries \fIinteger\fR;
@@ -367,7 +369,6 @@ options {
preferred\-glue \fIstring\fR; preferred\-glue \fIstring\fR;
prefetch \fIinteger\fR [ \fIinteger\fR ]; prefetch \fIinteger\fR [ \fIinteger\fR ];
provide\-ixfr \fIboolean\fR; provide\-ixfr \fIboolean\fR;
qname\-minimization ( strict | relaxed | disabled | off );
query\-source ( ( [ address ] ( \fIipv4_address\fR | * ) [ port ( query\-source ( ( [ address ] ( \fIipv4_address\fR | * ) [ port (
\fIinteger\fR | * ) ] ) | ( [ [ address ] ( \fIipv4_address\fR | * ) ] \fIinteger\fR | * ) ] ) | ( [ [ address ] ( \fIipv4_address\fR | * ) ]
port ( \fIinteger\fR | * ) ) ) [ dscp \fIinteger\fR ]; port ( \fIinteger\fR | * ) ) ) [ dscp \fIinteger\fR ];
@@ -407,19 +408,18 @@ options {
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
\fIinteger\fR; \fIinteger\fR;
response\-policy { zone \fIquoted_string\fR [ log \fIboolean\fR ] [ response\-policy { zone \fIquoted_string\fR [ log \fIboolean\fR ] [
max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ max\-policy\-ttl \fIinteger\fR ] [ min\-update\-interval \fIinteger\fR ] [
policy ( cname | disabled | drop | given | no\-op | nodata | policy ( cname | disabled | drop | given | no\-op | nodata |
nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [ nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [ recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ break\-dnssec \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ break\-dnssec \fIboolean\fR ] [
max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ max\-policy\-ttl \fIinteger\fR ] [ min\-update\-interval \fIinteger\fR ] [
min\-ns\-dots \fIinteger\fR ] [ nsip\-wait\-recurse \fIboolean\fR ] [ min\-ns\-dots \fIinteger\fR ] [ nsip\-wait\-recurse \fIboolean\fR ] [
qname\-wait\-recurse \fIboolean\fR ] [ recursive\-only \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ] [ recursive\-only \fIboolean\fR ] [
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ] [
dnsrps\-enable \fIboolean\fR ] [ dnsrps\-options { \fIunspecified\-text\fR dnsrps\-enable \fIboolean\fR ] [ dnsrps\-options { \fIunspecified\-text\fR
} ]; } ];
root\-delegation\-only [ exclude { \fIstring\fR; \&.\&.\&. } ]; root\-delegation\-only [ exclude { \fIquoted_string\fR; \&.\&.\&. } ];
root\-key\-sentinel \fIboolean\fR;
rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name
\fIquoted_string\fR ] \fIstring\fR \fIstring\fR; \&.\&.\&. }; \fIquoted_string\fR ] \fIstring\fR \fIstring\fR; \&.\&.\&. };
secroots\-file \fIquoted_string\fR; secroots\-file \fIquoted_string\fR;
@@ -468,7 +468,6 @@ options {
use\-v4\-udp\-ports { \fIportrange\fR; \&.\&.\&. }; use\-v4\-udp\-ports { \fIportrange\fR; \&.\&.\&. };
use\-v6\-udp\-ports { \fIportrange\fR; \&.\&.\&. }; use\-v6\-udp\-ports { \fIportrange\fR; \&.\&.\&. };
v6\-bias \fIinteger\fR; v6\-bias \fIinteger\fR;
validate\-except { \fIstring\fR; \&.\&.\&. };
version ( \fIquoted_string\fR | none ); version ( \fIquoted_string\fR | none );
zero\-no\-soa\-ttl \fIboolean\fR; zero\-no\-soa\-ttl \fIboolean\fR;
zero\-no\-soa\-ttl\-cache \fIboolean\fR; zero\-no\-soa\-ttl\-cache \fIboolean\fR;
@@ -581,7 +580,7 @@ view \fIstring\fR [ \fIclass\fR ] {
\fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [ \fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR | \fIipv4_address\fR [
port \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key port \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] ) [ key
\fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [ \fIstring\fR ]; \&.\&.\&. } ] [ zone\-directory \fIquoted_string\fR ] [
in\-memory \fIboolean\fR ] [ min\-update\-interval \fIttlval\fR ]; \&.\&.\&. }; in\-memory \fIboolean\fR ] [ min\-update\-interval \fIinteger\fR ]; \&.\&.\&. };
check\-dup\-records ( fail | warn | ignore ); check\-dup\-records ( fail | warn | ignore );
check\-integrity \fIboolean\fR; check\-integrity \fIboolean\fR;
check\-mx ( fail | warn | ignore ); check\-mx ( fail | warn | ignore );
@@ -596,9 +595,9 @@ view \fIstring\fR [ \fIclass\fR ] {
cleaning\-interval \fIinteger\fR; cleaning\-interval \fIinteger\fR;
clients\-per\-query \fIinteger\fR; clients\-per\-query \fIinteger\fR;
deny\-answer\-addresses { \fIaddress_match_element\fR; \&.\&.\&. } [ deny\-answer\-addresses { \fIaddress_match_element\fR; \&.\&.\&. } [
except\-from { \fIstring\fR; \&.\&.\&. } ]; except\-from { \fIquoted_string\fR; \&.\&.\&. } ];
deny\-answer\-aliases { \fIstring\fR; \&.\&.\&. } [ except\-from { \fIstring\fR; \&.\&.\&. deny\-answer\-aliases { \fIquoted_string\fR; \&.\&.\&. } [ except\-from {
} ]; \fIquoted_string\fR; \&.\&.\&. } ];
dialup ( notify | notify\-passive | passive | refresh | \fIboolean\fR ); dialup ( notify | notify\-passive | passive | refresh | \fIboolean\fR );
disable\-algorithms \fIstring\fR { \fIstring\fR; disable\-algorithms \fIstring\fR { \fIstring\fR;
\&.\&.\&. }; \&.\&.\&. };
@@ -619,7 +618,6 @@ view \fIstring\fR [ \fIclass\fR ] {
}; };
dns64\-contact \fIstring\fR; dns64\-contact \fIstring\fR;
dns64\-server \fIstring\fR; dns64\-server \fIstring\fR;
dnskey\-sig\-validity \fIinteger\fR;
dnsrps\-enable \fIboolean\fR; dnsrps\-enable \fIboolean\fR;
dnsrps\-options { \fIunspecified\-text\fR }; dnsrps\-options { \fIunspecified\-text\fR };
dnssec\-accept\-expired \fIboolean\fR; dnssec\-accept\-expired \fIboolean\fR;
@@ -632,8 +630,8 @@ view \fIstring\fR [ \fIclass\fR ] {
dnssec\-secure\-to\-insecure \fIboolean\fR; dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign ); dnssec\-update\-mode ( maintain | no\-resign );
dnssec\-validation ( yes | no | auto ); dnssec\-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query | dnstap { ( all | auth | client | forwarder |
response ) ]; \&.\&.\&. }; resolver ) [ ( query | response ) ]; \&.\&.\&. };
dual\-stack\-servers [ port \fIinteger\fR ] { ( \fIquoted_string\fR [ port dual\-stack\-servers [ port \fIinteger\fR ] { ( \fIquoted_string\fR [ port
\fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv4_address\fR [ port \fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv4_address\fR [ port
\fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv6_address\fR [ port \fIinteger\fR ] [ dscp \fIinteger\fR ] | \fIipv6_address\fR [ port
@@ -673,10 +671,10 @@ view \fIstring\fR [ \fIclass\fR ] {
match\-destinations { \fIaddress_match_element\fR; \&.\&.\&. }; match\-destinations { \fIaddress_match_element\fR; \&.\&.\&. };
match\-recursive\-only \fIboolean\fR; match\-recursive\-only \fIboolean\fR;
max\-cache\-size ( default | unlimited | \fIsizeval\fR | \fIpercentage\fR ); max\-cache\-size ( default | unlimited | \fIsizeval\fR | \fIpercentage\fR );
max\-cache\-ttl \fIttlval\fR; max\-cache\-ttl \fIinteger\fR;
max\-clients\-per\-query \fIinteger\fR; max\-clients\-per\-query \fIinteger\fR;
max\-journal\-size ( default | unlimited | \fIsizeval\fR ); max\-journal\-size ( default | unlimited | \fIsizeval\fR );
max\-ncache\-ttl \fIttlval\fR; max\-ncache\-ttl \fIinteger\fR;
max\-records \fIinteger\fR; max\-records \fIinteger\fR;
max\-recursion\-depth \fIinteger\fR; max\-recursion\-depth \fIinteger\fR;
max\-recursion\-queries \fIinteger\fR; max\-recursion\-queries \fIinteger\fR;
@@ -711,7 +709,6 @@ view \fIstring\fR [ \fIclass\fR ] {
preferred\-glue \fIstring\fR; preferred\-glue \fIstring\fR;
prefetch \fIinteger\fR [ \fIinteger\fR ]; prefetch \fIinteger\fR [ \fIinteger\fR ];
provide\-ixfr \fIboolean\fR; provide\-ixfr \fIboolean\fR;
qname\-minimization ( strict | relaxed | disabled | off );
query\-source ( ( [ address ] ( \fIipv4_address\fR | * ) [ port ( query\-source ( ( [ address ] ( \fIipv4_address\fR | * ) [ port (
\fIinteger\fR | * ) ] ) | ( [ [ address ] ( \fIipv4_address\fR | * ) ] \fIinteger\fR | * ) ] ) | ( [ [ address ] ( \fIipv4_address\fR | * ) ]
port ( \fIinteger\fR | * ) ) ) [ dscp \fIinteger\fR ]; port ( \fIinteger\fR | * ) ) ) [ dscp \fIinteger\fR ];
@@ -746,19 +743,18 @@ view \fIstring\fR [ \fIclass\fR ] {
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
\fIinteger\fR; \fIinteger\fR;
response\-policy { zone \fIquoted_string\fR [ log \fIboolean\fR ] [ response\-policy { zone \fIquoted_string\fR [ log \fIboolean\fR ] [
max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ max\-policy\-ttl \fIinteger\fR ] [ min\-update\-interval \fIinteger\fR ] [
policy ( cname | disabled | drop | given | no\-op | nodata | policy ( cname | disabled | drop | given | no\-op | nodata |
nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [ nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [ recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ break\-dnssec \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ break\-dnssec \fIboolean\fR ] [
max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ max\-policy\-ttl \fIinteger\fR ] [ min\-update\-interval \fIinteger\fR ] [
min\-ns\-dots \fIinteger\fR ] [ nsip\-wait\-recurse \fIboolean\fR ] [ min\-ns\-dots \fIinteger\fR ] [ nsip\-wait\-recurse \fIboolean\fR ] [
qname\-wait\-recurse \fIboolean\fR ] [ recursive\-only \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ] [ recursive\-only \fIboolean\fR ] [
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ] [
dnsrps\-enable \fIboolean\fR ] [ dnsrps\-options { \fIunspecified\-text\fR dnsrps\-enable \fIboolean\fR ] [ dnsrps\-options { \fIunspecified\-text\fR
} ]; } ];
root\-delegation\-only [ exclude { \fIstring\fR; \&.\&.\&. } ]; root\-delegation\-only [ exclude { \fIquoted_string\fR; \&.\&.\&. } ];
root\-key\-sentinel \fIboolean\fR;
rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name rrset\-order { [ class \fIstring\fR ] [ type \fIstring\fR ] [ name
\fIquoted_string\fR ] \fIstring\fR \fIstring\fR; \&.\&.\&. }; \fIquoted_string\fR ] \fIstring\fR \fIstring\fR; \&.\&.\&. };
send\-cookie \fIboolean\fR; send\-cookie \fIboolean\fR;
@@ -819,7 +815,6 @@ view \fIstring\fR [ \fIclass\fR ] {
update\-check\-ksk \fIboolean\fR; update\-check\-ksk \fIboolean\fR;
use\-alt\-transfer\-source \fIboolean\fR; use\-alt\-transfer\-source \fIboolean\fR;
v6\-bias \fIinteger\fR; v6\-bias \fIinteger\fR;
validate\-except { \fIstring\fR; \&.\&.\&. };
zero\-no\-soa\-ttl \fIboolean\fR; zero\-no\-soa\-ttl \fIboolean\fR;
zero\-no\-soa\-ttl\-cache \fIboolean\fR; zero\-no\-soa\-ttl\-cache \fIboolean\fR;
zone \fIstring\fR [ \fIclass\fR ] { zone \fIstring\fR [ \fIclass\fR ] {
@@ -852,7 +847,6 @@ view \fIstring\fR [ \fIclass\fR ] {
dialup ( notify | notify\-passive | passive | refresh | dialup ( notify | notify\-passive | passive | refresh |
\fIboolean\fR ); \fIboolean\fR );
dlz \fIstring\fR; dlz \fIstring\fR;
dnskey\-sig\-validity \fIinteger\fR;
dnssec\-dnskey\-kskonly \fIboolean\fR; dnssec\-dnskey\-kskonly \fIboolean\fR;
dnssec\-loadkeys\-interval \fIinteger\fR; dnssec\-loadkeys\-interval \fIinteger\fR;
dnssec\-secure\-to\-insecure \fIboolean\fR; dnssec\-secure\-to\-insecure \fIboolean\fR;
@@ -884,7 +878,6 @@ view \fIstring\fR [ \fIclass\fR ] {
max\-zone\-ttl ( unlimited | \fIttlval\fR ); max\-zone\-ttl ( unlimited | \fIttlval\fR );
min\-refresh\-time \fIinteger\fR; min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR; min\-retry\-time \fIinteger\fR;
mirror \fIboolean\fR;
multi\-master \fIboolean\fR; multi\-master \fIboolean\fR;
notify ( explicit | master\-only | \fIboolean\fR ); notify ( explicit | master\-only | \fIboolean\fR );
notify\-delay \fIinteger\fR; notify\-delay \fIinteger\fR;
@@ -901,7 +894,7 @@ view \fIstring\fR [ \fIclass\fR ] {
serial\-update\-method ( date | increment | unixtime ); serial\-update\-method ( date | increment | unixtime );
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [ server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [
port \fIinteger\fR ]; \&.\&.\&. }; port \fIinteger\fR ]; \&.\&.\&. };
server\-names { \fIstring\fR; \&.\&.\&. }; server\-names { \fIquoted_string\fR; \&.\&.\&. };
sig\-signing\-nodes \fIinteger\fR; sig\-signing\-nodes \fIinteger\fR;
sig\-signing\-signatures \fIinteger\fR; sig\-signing\-signatures \fIinteger\fR;
sig\-signing\-type \fIinteger\fR; sig\-signing\-type \fIinteger\fR;
@@ -964,7 +957,6 @@ zone \fIstring\fR [ \fIclass\fR ] {
delegation\-only \fIboolean\fR; delegation\-only \fIboolean\fR;
dialup ( notify | notify\-passive | passive | refresh | \fIboolean\fR ); dialup ( notify | notify\-passive | passive | refresh | \fIboolean\fR );
dlz \fIstring\fR; dlz \fIstring\fR;
dnskey\-sig\-validity \fIinteger\fR;
dnssec\-dnskey\-kskonly \fIboolean\fR; dnssec\-dnskey\-kskonly \fIboolean\fR;
dnssec\-loadkeys\-interval \fIinteger\fR; dnssec\-loadkeys\-interval \fIinteger\fR;
dnssec\-secure\-to\-insecure \fIboolean\fR; dnssec\-secure\-to\-insecure \fIboolean\fR;
@@ -994,7 +986,6 @@ zone \fIstring\fR [ \fIclass\fR ] {
max\-zone\-ttl ( unlimited | \fIttlval\fR ); max\-zone\-ttl ( unlimited | \fIttlval\fR );
min\-refresh\-time \fIinteger\fR; min\-refresh\-time \fIinteger\fR;
min\-retry\-time \fIinteger\fR; min\-retry\-time \fIinteger\fR;
mirror \fIboolean\fR;
multi\-master \fIboolean\fR; multi\-master \fIboolean\fR;
notify ( explicit | master\-only | \fIboolean\fR ); notify ( explicit | master\-only | \fIboolean\fR );
notify\-delay \fIinteger\fR; notify\-delay \fIinteger\fR;
@@ -1009,7 +1000,7 @@ zone \fIstring\fR [ \fIclass\fR ] {
serial\-update\-method ( date | increment | unixtime ); serial\-update\-method ( date | increment | unixtime );
server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [ port server\-addresses { ( \fIipv4_address\fR | \fIipv6_address\fR ) [ port
\fIinteger\fR ]; \&.\&.\&. }; \fIinteger\fR ]; \&.\&.\&. };
server\-names { \fIstring\fR; \&.\&.\&. }; server\-names { \fIquoted_string\fR; \&.\&.\&. };
sig\-signing\-nodes \fIinteger\fR; sig\-signing\-nodes \fIinteger\fR;
sig\-signing\-signatures \fIinteger\fR; sig\-signing\-signatures \fIinteger\fR;
sig\-signing\-type \fIinteger\fR; sig\-signing\-type \fIinteger\fR;
+41 -54
View File
@@ -13,7 +13,7 @@
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf"> <refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf">
<info> <info>
<date>2018-09-04</date> <date>2018-01-22</date>
</info> </info>
<refentryinfo> <refentryinfo>
<corpname>ISC</corpname> <corpname>ISC</corpname>
@@ -192,7 +192,6 @@ options {
] [ dscp <replaceable>integer</replaceable> ]; ] [ dscp <replaceable>integer</replaceable> ];
alt-transfer-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | alt-transfer-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> |
* ) ] [ dscp <replaceable>integer</replaceable> ]; * ) ] [ dscp <replaceable>integer</replaceable> ];
answer-cookie <replaceable>boolean</replaceable>;
attach-cache <replaceable>string</replaceable>; attach-cache <replaceable>string</replaceable>;
auth-nxdomain <replaceable>boolean</replaceable>; // default changed auth-nxdomain <replaceable>boolean</replaceable>; // default changed
auto-dnssec ( allow | maintain | off ); auto-dnssec ( allow | maintain | off );
@@ -206,7 +205,7 @@ options {
<replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ <replaceable>integer</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 port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [ <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>integer</replaceable> ]; ... };
check-dup-records ( fail | warn | ignore ); check-dup-records ( fail | warn | ignore );
check-integrity <replaceable>boolean</replaceable>; check-integrity <replaceable>boolean</replaceable>;
check-mx ( fail | warn | ignore ); check-mx ( fail | warn | ignore );
@@ -225,9 +224,9 @@ options {
coresize ( default | unlimited | <replaceable>sizeval</replaceable> ); coresize ( default | unlimited | <replaceable>sizeval</replaceable> );
datasize ( default | unlimited | <replaceable>sizeval</replaceable> ); datasize ( default | unlimited | <replaceable>sizeval</replaceable> );
deny-answer-addresses { <replaceable>address_match_element</replaceable>; ... } [ deny-answer-addresses { <replaceable>address_match_element</replaceable>; ... } [
except-from { <replaceable>string</replaceable>; ... } ]; except-from { <replaceable>quoted_string</replaceable>; ... } ];
deny-answer-aliases { <replaceable>string</replaceable>; ... } [ except-from { <replaceable>string</replaceable>; ... deny-answer-aliases { <replaceable>quoted_string</replaceable>; ... } [ except-from {
} ]; <replaceable>quoted_string</replaceable>; ... } ];
dialup ( notify | notify-passive | passive | refresh | <replaceable>boolean</replaceable> ); dialup ( notify | notify-passive | passive | refresh | <replaceable>boolean</replaceable> );
directory <replaceable>quoted_string</replaceable>; directory <replaceable>quoted_string</replaceable>;
disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>; disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>;
@@ -245,7 +244,6 @@ options {
}; };
dns64-contact <replaceable>string</replaceable>; dns64-contact <replaceable>string</replaceable>;
dns64-server <replaceable>string</replaceable>; dns64-server <replaceable>string</replaceable>;
dnskey-sig-validity <replaceable>integer</replaceable>;
dnsrps-enable <replaceable>boolean</replaceable>; dnsrps-enable <replaceable>boolean</replaceable>;
dnsrps-options { <replaceable>unspecified-text</replaceable> }; dnsrps-options { <replaceable>unspecified-text</replaceable> };
dnssec-accept-expired <replaceable>boolean</replaceable>; dnssec-accept-expired <replaceable>boolean</replaceable>;
@@ -258,12 +256,14 @@ options {
dnssec-secure-to-insecure <replaceable>boolean</replaceable>; dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
dnssec-update-mode ( maintain | no-resign ); dnssec-update-mode ( maintain | no-resign );
dnssec-validation ( yes | no | auto ); dnssec-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver | update ) [ dnstap { ( all | auth | client | forwarder |
( query | response ) ]; ... }; resolver ) [ ( query | response ) ]; ... };
dnstap-identity ( <replaceable>quoted_string</replaceable> | none | hostname ); dnstap-identity ( <replaceable>quoted_string</replaceable> | none |
dnstap-output ( file | unix ) <replaceable>quoted_string</replaceable> [ size ( unlimited | hostname );
<replaceable>size</replaceable> ) ] [ versions ( unlimited | <replaceable>integer</replaceable> ) ] [ suffix ( dnstap-output ( file | unix ) <replaceable>quoted_string</replaceable> [
increment | timestamp ) ]; size ( unlimited | <replaceable>size</replaceable> ) ] [ versions (
unlimited | <replaceable>integer</replaceable> ) ] [ suffix ( increment
| timestamp ) ];
dnstap-version ( <replaceable>quoted_string</replaceable> | none ); dnstap-version ( <replaceable>quoted_string</replaceable> | none );
dscp <replaceable>integer</replaceable>; dscp <replaceable>integer</replaceable>;
dual-stack-servers [ port <replaceable>integer</replaceable> ] { ( <replaceable>quoted_string</replaceable> [ port dual-stack-servers [ port <replaceable>integer</replaceable> ] { ( <replaceable>quoted_string</replaceable> [ port
@@ -292,13 +292,14 @@ options {
fstrm-set-output-notify-threshold <replaceable>integer</replaceable>; fstrm-set-output-notify-threshold <replaceable>integer</replaceable>;
fstrm-set-output-queue-model ( mpsc | spsc ); fstrm-set-output-queue-model ( mpsc | spsc );
fstrm-set-output-queue-size <replaceable>integer</replaceable>; fstrm-set-output-queue-size <replaceable>integer</replaceable>;
fstrm-set-reopen-interval <replaceable>ttlval</replaceable>; fstrm-set-reopen-interval <replaceable>integer</replaceable>;
geoip-directory ( <replaceable>quoted_string</replaceable> | none ); geoip-directory ( <replaceable>quoted_string</replaceable> | none );
geoip-use-ecs <replaceable>boolean</replaceable>;
glue-cache <replaceable>boolean</replaceable>; glue-cache <replaceable>boolean</replaceable>;
heartbeat-interval <replaceable>integer</replaceable>; heartbeat-interval <replaceable>integer</replaceable>;
hostname ( <replaceable>quoted_string</replaceable> | none ); hostname ( <replaceable>quoted_string</replaceable> | none );
inline-signing <replaceable>boolean</replaceable>; inline-signing <replaceable>boolean</replaceable>;
interface-interval <replaceable>ttlval</replaceable>; interface-interval <replaceable>integer</replaceable>;
ixfr-from-differences ( primary | master | secondary | slave | ixfr-from-differences ( primary | master | secondary | slave |
<replaceable>boolean</replaceable> ); <replaceable>boolean</replaceable> );
keep-response-order { <replaceable>address_match_element</replaceable>; ... }; keep-response-order { <replaceable>address_match_element</replaceable>; ... };
@@ -317,10 +318,10 @@ options {
masterfile-style ( full | relative ); masterfile-style ( full | relative );
match-mapped-addresses <replaceable>boolean</replaceable>; match-mapped-addresses <replaceable>boolean</replaceable>;
max-cache-size ( default | unlimited | <replaceable>sizeval</replaceable> | <replaceable>percentage</replaceable> ); max-cache-size ( default | unlimited | <replaceable>sizeval</replaceable> | <replaceable>percentage</replaceable> );
max-cache-ttl <replaceable>ttlval</replaceable>; max-cache-ttl <replaceable>integer</replaceable>;
max-clients-per-query <replaceable>integer</replaceable>; max-clients-per-query <replaceable>integer</replaceable>;
max-journal-size ( default | unlimited | <replaceable>sizeval</replaceable> ); max-journal-size ( default | unlimited | <replaceable>sizeval</replaceable> );
max-ncache-ttl <replaceable>ttlval</replaceable>; max-ncache-ttl <replaceable>integer</replaceable>;
max-records <replaceable>integer</replaceable>; max-records <replaceable>integer</replaceable>;
max-recursion-depth <replaceable>integer</replaceable>; max-recursion-depth <replaceable>integer</replaceable>;
max-recursion-queries <replaceable>integer</replaceable>; max-recursion-queries <replaceable>integer</replaceable>;
@@ -341,7 +342,6 @@ options {
min-retry-time <replaceable>integer</replaceable>; min-retry-time <replaceable>integer</replaceable>;
minimal-any <replaceable>boolean</replaceable>; minimal-any <replaceable>boolean</replaceable>;
minimal-responses ( no-auth | no-auth-recursive | <replaceable>boolean</replaceable> ); minimal-responses ( no-auth | no-auth-recursive | <replaceable>boolean</replaceable> );
mirror <replaceable>boolean</replaceable>;
multi-master <replaceable>boolean</replaceable>; multi-master <replaceable>boolean</replaceable>;
new-zones-directory <replaceable>quoted_string</replaceable>; new-zones-directory <replaceable>quoted_string</replaceable>;
no-case-compress { <replaceable>address_match_element</replaceable>; ... }; no-case-compress { <replaceable>address_match_element</replaceable>; ... };
@@ -362,7 +362,6 @@ options {
preferred-glue <replaceable>string</replaceable>; preferred-glue <replaceable>string</replaceable>;
prefetch <replaceable>integer</replaceable> [ <replaceable>integer</replaceable> ]; prefetch <replaceable>integer</replaceable> [ <replaceable>integer</replaceable> ];
provide-ixfr <replaceable>boolean</replaceable>; provide-ixfr <replaceable>boolean</replaceable>;
qname-minimization ( strict | relaxed | disabled | off );
query-source ( ( [ address ] ( <replaceable>ipv4_address</replaceable> | * ) [ port ( query-source ( ( [ address ] ( <replaceable>ipv4_address</replaceable> | * ) [ port (
<replaceable>integer</replaceable> | * ) ] ) | ( [ [ address ] ( <replaceable>ipv4_address</replaceable> | * ) ] <replaceable>integer</replaceable> | * ) ] ) | ( [ [ address ] ( <replaceable>ipv4_address</replaceable> | * ) ]
port ( <replaceable>integer</replaceable> | * ) ) ) [ dscp <replaceable>integer</replaceable> ]; port ( <replaceable>integer</replaceable> | * ) ) ) [ dscp <replaceable>integer</replaceable> ];
@@ -402,19 +401,18 @@ options {
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
<replaceable>integer</replaceable>; <replaceable>integer</replaceable>;
response-policy { zone <replaceable>quoted_string</replaceable> [ log <replaceable>boolean</replaceable> ] [ response-policy { zone <replaceable>quoted_string</replaceable> [ log <replaceable>boolean</replaceable> ] [
max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ max-policy-ttl <replaceable>integer</replaceable> ] [ min-update-interval <replaceable>integer</replaceable> ] [
policy ( cname | disabled | drop | given | no-op | nodata | policy ( cname | disabled | drop | given | no-op | nodata |
nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [ nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ break-dnssec <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ break-dnssec <replaceable>boolean</replaceable> ] [
max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ max-policy-ttl <replaceable>integer</replaceable> ] [ min-update-interval <replaceable>integer</replaceable> ] [
min-ns-dots <replaceable>integer</replaceable> ] [ nsip-wait-recurse <replaceable>boolean</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [ nsip-wait-recurse <replaceable>boolean</replaceable> ] [
qname-wait-recurse <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ] [
nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ] [
dnsrps-enable <replaceable>boolean</replaceable> ] [ dnsrps-options { <replaceable>unspecified-text</replaceable> dnsrps-enable <replaceable>boolean</replaceable> ] [ dnsrps-options { <replaceable>unspecified-text</replaceable>
} ]; } ];
root-delegation-only [ exclude { <replaceable>string</replaceable>; ... } ]; root-delegation-only [ exclude { <replaceable>quoted_string</replaceable>; ... } ];
root-key-sentinel <replaceable>boolean</replaceable>;
rrset-order { [ class <replaceable>string</replaceable> ] [ type <replaceable>string</replaceable> ] [ name rrset-order { [ class <replaceable>string</replaceable> ] [ type <replaceable>string</replaceable> ] [ name
<replaceable>quoted_string</replaceable> ] <replaceable>string</replaceable> <replaceable>string</replaceable>; ... }; <replaceable>quoted_string</replaceable> ] <replaceable>string</replaceable> <replaceable>string</replaceable>; ... };
secroots-file <replaceable>quoted_string</replaceable>; secroots-file <replaceable>quoted_string</replaceable>;
@@ -463,7 +461,6 @@ options {
use-v4-udp-ports { <replaceable>portrange</replaceable>; ... }; use-v4-udp-ports { <replaceable>portrange</replaceable>; ... };
use-v6-udp-ports { <replaceable>portrange</replaceable>; ... }; use-v6-udp-ports { <replaceable>portrange</replaceable>; ... };
v6-bias <replaceable>integer</replaceable>; v6-bias <replaceable>integer</replaceable>;
validate-except { <replaceable>string</replaceable>; ... };
version ( <replaceable>quoted_string</replaceable> | none ); version ( <replaceable>quoted_string</replaceable> | none );
zero-no-soa-ttl <replaceable>boolean</replaceable>; zero-no-soa-ttl <replaceable>boolean</replaceable>;
zero-no-soa-ttl-cache <replaceable>boolean</replaceable>; zero-no-soa-ttl-cache <replaceable>boolean</replaceable>;
@@ -560,7 +557,7 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
<replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [ <replaceable>integer</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 port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] ) [ key
<replaceable>string</replaceable> ]; ... } ] [ zone-directory <replaceable>quoted_string</replaceable> ] [ <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>integer</replaceable> ]; ... };
check-dup-records ( fail | warn | ignore ); check-dup-records ( fail | warn | ignore );
check-integrity <replaceable>boolean</replaceable>; check-integrity <replaceable>boolean</replaceable>;
check-mx ( fail | warn | ignore ); check-mx ( fail | warn | ignore );
@@ -575,9 +572,9 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
cleaning-interval <replaceable>integer</replaceable>; cleaning-interval <replaceable>integer</replaceable>;
clients-per-query <replaceable>integer</replaceable>; clients-per-query <replaceable>integer</replaceable>;
deny-answer-addresses { <replaceable>address_match_element</replaceable>; ... } [ deny-answer-addresses { <replaceable>address_match_element</replaceable>; ... } [
except-from { <replaceable>string</replaceable>; ... } ]; except-from { <replaceable>quoted_string</replaceable>; ... } ];
deny-answer-aliases { <replaceable>string</replaceable>; ... } [ except-from { <replaceable>string</replaceable>; ... deny-answer-aliases { <replaceable>quoted_string</replaceable>; ... } [ except-from {
} ]; <replaceable>quoted_string</replaceable>; ... } ];
dialup ( notify | notify-passive | passive | refresh | <replaceable>boolean</replaceable> ); dialup ( notify | notify-passive | passive | refresh | <replaceable>boolean</replaceable> );
disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>; disable-algorithms <replaceable>string</replaceable> { <replaceable>string</replaceable>;
... }; ... };
@@ -598,7 +595,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
}; };
dns64-contact <replaceable>string</replaceable>; dns64-contact <replaceable>string</replaceable>;
dns64-server <replaceable>string</replaceable>; dns64-server <replaceable>string</replaceable>;
dnskey-sig-validity <replaceable>integer</replaceable>;
dnsrps-enable <replaceable>boolean</replaceable>; dnsrps-enable <replaceable>boolean</replaceable>;
dnsrps-options { <replaceable>unspecified-text</replaceable> }; dnsrps-options { <replaceable>unspecified-text</replaceable> };
dnssec-accept-expired <replaceable>boolean</replaceable>; dnssec-accept-expired <replaceable>boolean</replaceable>;
@@ -611,8 +607,8 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
dnssec-secure-to-insecure <replaceable>boolean</replaceable>; dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
dnssec-update-mode ( maintain | no-resign ); dnssec-update-mode ( maintain | no-resign );
dnssec-validation ( yes | no | auto ); dnssec-validation ( yes | no | auto );
dnstap { ( all | auth | client | forwarder | resolver | update ) [ dnstap { ( all | auth | client | forwarder |
( query | response ) ]; ... }; resolver ) [ ( query | response ) ]; ... };
dual-stack-servers [ port <replaceable>integer</replaceable> ] { ( <replaceable>quoted_string</replaceable> [ port dual-stack-servers [ port <replaceable>integer</replaceable> ] { ( <replaceable>quoted_string</replaceable> [ port
<replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] | <replaceable>ipv4_address</replaceable> [ port <replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] | <replaceable>ipv4_address</replaceable> [ port
<replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port <replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [ port
@@ -652,10 +648,10 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
match-destinations { <replaceable>address_match_element</replaceable>; ... }; match-destinations { <replaceable>address_match_element</replaceable>; ... };
match-recursive-only <replaceable>boolean</replaceable>; match-recursive-only <replaceable>boolean</replaceable>;
max-cache-size ( default | unlimited | <replaceable>sizeval</replaceable> | <replaceable>percentage</replaceable> ); max-cache-size ( default | unlimited | <replaceable>sizeval</replaceable> | <replaceable>percentage</replaceable> );
max-cache-ttl <replaceable>ttlval</replaceable>; max-cache-ttl <replaceable>integer</replaceable>;
max-clients-per-query <replaceable>integer</replaceable>; max-clients-per-query <replaceable>integer</replaceable>;
max-journal-size ( default | unlimited | <replaceable>sizeval</replaceable> ); max-journal-size ( default | unlimited | <replaceable>sizeval</replaceable> );
max-ncache-ttl <replaceable>ttlval</replaceable>; max-ncache-ttl <replaceable>integer</replaceable>;
max-records <replaceable>integer</replaceable>; max-records <replaceable>integer</replaceable>;
max-recursion-depth <replaceable>integer</replaceable>; max-recursion-depth <replaceable>integer</replaceable>;
max-recursion-queries <replaceable>integer</replaceable>; max-recursion-queries <replaceable>integer</replaceable>;
@@ -673,7 +669,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
min-retry-time <replaceable>integer</replaceable>; min-retry-time <replaceable>integer</replaceable>;
minimal-any <replaceable>boolean</replaceable>; minimal-any <replaceable>boolean</replaceable>;
minimal-responses ( no-auth | no-auth-recursive | <replaceable>boolean</replaceable> ); minimal-responses ( no-auth | no-auth-recursive | <replaceable>boolean</replaceable> );
mirror <replaceable>boolean</replaceable>;
multi-master <replaceable>boolean</replaceable>; multi-master <replaceable>boolean</replaceable>;
new-zones-directory <replaceable>quoted_string</replaceable>; new-zones-directory <replaceable>quoted_string</replaceable>;
no-case-compress { <replaceable>address_match_element</replaceable>; ... }; no-case-compress { <replaceable>address_match_element</replaceable>; ... };
@@ -691,7 +686,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
preferred-glue <replaceable>string</replaceable>; preferred-glue <replaceable>string</replaceable>;
prefetch <replaceable>integer</replaceable> [ <replaceable>integer</replaceable> ]; prefetch <replaceable>integer</replaceable> [ <replaceable>integer</replaceable> ];
provide-ixfr <replaceable>boolean</replaceable>; provide-ixfr <replaceable>boolean</replaceable>;
qname-minimization ( strict | relaxed | disabled | off );
query-source ( ( [ address ] ( <replaceable>ipv4_address</replaceable> | * ) [ port ( query-source ( ( [ address ] ( <replaceable>ipv4_address</replaceable> | * ) [ port (
<replaceable>integer</replaceable> | * ) ] ) | ( [ [ address ] ( <replaceable>ipv4_address</replaceable> | * ) ] <replaceable>integer</replaceable> | * ) ] ) | ( [ [ address ] ( <replaceable>ipv4_address</replaceable> | * ) ]
port ( <replaceable>integer</replaceable> | * ) ) ) [ dscp <replaceable>integer</replaceable> ]; port ( <replaceable>integer</replaceable> | * ) ) ) [ dscp <replaceable>integer</replaceable> ];
@@ -726,19 +720,18 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
<replaceable>integer</replaceable>; <replaceable>integer</replaceable>;
response-policy { zone <replaceable>quoted_string</replaceable> [ log <replaceable>boolean</replaceable> ] [ response-policy { zone <replaceable>quoted_string</replaceable> [ log <replaceable>boolean</replaceable> ] [
max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ max-policy-ttl <replaceable>integer</replaceable> ] [ min-update-interval <replaceable>integer</replaceable> ] [
policy ( cname | disabled | drop | given | no-op | nodata | policy ( cname | disabled | drop | given | no-op | nodata |
nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [ nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ break-dnssec <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ break-dnssec <replaceable>boolean</replaceable> ] [
max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ max-policy-ttl <replaceable>integer</replaceable> ] [ min-update-interval <replaceable>integer</replaceable> ] [
min-ns-dots <replaceable>integer</replaceable> ] [ nsip-wait-recurse <replaceable>boolean</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [ nsip-wait-recurse <replaceable>boolean</replaceable> ] [
qname-wait-recurse <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ] [ recursive-only <replaceable>boolean</replaceable> ] [
nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ] [
dnsrps-enable <replaceable>boolean</replaceable> ] [ dnsrps-options { <replaceable>unspecified-text</replaceable> dnsrps-enable <replaceable>boolean</replaceable> ] [ dnsrps-options { <replaceable>unspecified-text</replaceable>
} ]; } ];
root-delegation-only [ exclude { <replaceable>string</replaceable>; ... } ]; root-delegation-only [ exclude { <replaceable>quoted_string</replaceable>; ... } ];
root-key-sentinel <replaceable>boolean</replaceable>;
rrset-order { [ class <replaceable>string</replaceable> ] [ type <replaceable>string</replaceable> ] [ name rrset-order { [ class <replaceable>string</replaceable> ] [ type <replaceable>string</replaceable> ] [ name
<replaceable>quoted_string</replaceable> ] <replaceable>string</replaceable> <replaceable>string</replaceable>; ... }; <replaceable>quoted_string</replaceable> ] <replaceable>string</replaceable> <replaceable>string</replaceable>; ... };
send-cookie <replaceable>boolean</replaceable>; send-cookie <replaceable>boolean</replaceable>;
@@ -799,7 +792,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
update-check-ksk <replaceable>boolean</replaceable>; update-check-ksk <replaceable>boolean</replaceable>;
use-alt-transfer-source <replaceable>boolean</replaceable>; use-alt-transfer-source <replaceable>boolean</replaceable>;
v6-bias <replaceable>integer</replaceable>; v6-bias <replaceable>integer</replaceable>;
validate-except { <replaceable>string</replaceable>; ... };
zero-no-soa-ttl <replaceable>boolean</replaceable>; zero-no-soa-ttl <replaceable>boolean</replaceable>;
zero-no-soa-ttl-cache <replaceable>boolean</replaceable>; zero-no-soa-ttl-cache <replaceable>boolean</replaceable>;
zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] { zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
@@ -832,7 +824,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
dialup ( notify | notify-passive | passive | refresh | dialup ( notify | notify-passive | passive | refresh |
<replaceable>boolean</replaceable> ); <replaceable>boolean</replaceable> );
dlz <replaceable>string</replaceable>; dlz <replaceable>string</replaceable>;
dnskey-sig-validity <replaceable>integer</replaceable>;
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>; dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
dnssec-loadkeys-interval <replaceable>integer</replaceable>; dnssec-loadkeys-interval <replaceable>integer</replaceable>;
dnssec-secure-to-insecure <replaceable>boolean</replaceable>; dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
@@ -864,7 +855,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> ); max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> );
min-refresh-time <replaceable>integer</replaceable>; min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>; min-retry-time <replaceable>integer</replaceable>;
mirror <replaceable>boolean</replaceable>;
multi-master <replaceable>boolean</replaceable>; multi-master <replaceable>boolean</replaceable>;
notify ( explicit | master-only | <replaceable>boolean</replaceable> ); notify ( explicit | master-only | <replaceable>boolean</replaceable> );
notify-delay <replaceable>integer</replaceable>; notify-delay <replaceable>integer</replaceable>;
@@ -881,7 +871,7 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
serial-update-method ( date | increment | unixtime ); serial-update-method ( date | increment | unixtime );
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) [ server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) [
port <replaceable>integer</replaceable> ]; ... }; port <replaceable>integer</replaceable> ]; ... };
server-names { <replaceable>string</replaceable>; ... }; server-names { <replaceable>quoted_string</replaceable>; ... };
sig-signing-nodes <replaceable>integer</replaceable>; sig-signing-nodes <replaceable>integer</replaceable>;
sig-signing-signatures <replaceable>integer</replaceable>; sig-signing-signatures <replaceable>integer</replaceable>;
sig-signing-type <replaceable>integer</replaceable>; sig-signing-type <replaceable>integer</replaceable>;
@@ -896,10 +886,10 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
static-stub | stub ); static-stub | stub );
update-check-ksk <replaceable>boolean</replaceable>; update-check-ksk <replaceable>boolean</replaceable>;
update-policy ( local | { ( deny | grant ) <replaceable>string</replaceable> ( update-policy ( local | { ( deny | grant ) <replaceable>string</replaceable> (
6to4-self | external | krb5-self | krb5-selfsub | 6to4-self | external | krb5-self | krb5-subdomain |
krb5-subdomain | ms-self | ms-selfsub | ms-subdomain | ms-self | ms-subdomain | name | self | selfsub |
name | self | selfsub | selfwild | subdomain | tcp-self selfwild | subdomain | tcp-self | wildcard | zonesub )
| wildcard | zonesub ) [ <replaceable>string</replaceable> ] <replaceable>rrtypelist</replaceable>; ... }; [ <replaceable>string</replaceable> ] <replaceable>rrtypelist</replaceable>; ... };
use-alt-transfer-source <replaceable>boolean</replaceable>; use-alt-transfer-source <replaceable>boolean</replaceable>;
zero-no-soa-ttl <replaceable>boolean</replaceable>; zero-no-soa-ttl <replaceable>boolean</replaceable>;
zone-statistics ( full | terse | none | <replaceable>boolean</replaceable> ); zone-statistics ( full | terse | none | <replaceable>boolean</replaceable> );
@@ -940,7 +930,6 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
delegation-only <replaceable>boolean</replaceable>; delegation-only <replaceable>boolean</replaceable>;
dialup ( notify | notify-passive | passive | refresh | <replaceable>boolean</replaceable> ); dialup ( notify | notify-passive | passive | refresh | <replaceable>boolean</replaceable> );
dlz <replaceable>string</replaceable>; dlz <replaceable>string</replaceable>;
dnskey-sig-validity <replaceable>integer</replaceable>;
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>; dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
dnssec-loadkeys-interval <replaceable>integer</replaceable>; dnssec-loadkeys-interval <replaceable>integer</replaceable>;
dnssec-secure-to-insecure <replaceable>boolean</replaceable>; dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
@@ -970,7 +959,6 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> ); max-zone-ttl ( unlimited | <replaceable>ttlval</replaceable> );
min-refresh-time <replaceable>integer</replaceable>; min-refresh-time <replaceable>integer</replaceable>;
min-retry-time <replaceable>integer</replaceable>; min-retry-time <replaceable>integer</replaceable>;
mirror <replaceable>boolean</replaceable>;
multi-master <replaceable>boolean</replaceable>; multi-master <replaceable>boolean</replaceable>;
notify ( explicit | master-only | <replaceable>boolean</replaceable> ); notify ( explicit | master-only | <replaceable>boolean</replaceable> );
notify-delay <replaceable>integer</replaceable>; notify-delay <replaceable>integer</replaceable>;
@@ -985,7 +973,7 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
serial-update-method ( date | increment | unixtime ); serial-update-method ( date | increment | unixtime );
server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) [ port server-addresses { ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> ) [ port
<replaceable>integer</replaceable> ]; ... }; <replaceable>integer</replaceable> ]; ... };
server-names { <replaceable>string</replaceable>; ... }; server-names { <replaceable>quoted_string</replaceable>; ... };
sig-signing-nodes <replaceable>integer</replaceable>; sig-signing-nodes <replaceable>integer</replaceable>;
sig-signing-signatures <replaceable>integer</replaceable>; sig-signing-signatures <replaceable>integer</replaceable>;
sig-signing-type <replaceable>integer</replaceable>; sig-signing-type <replaceable>integer</replaceable>;
@@ -999,10 +987,9 @@ zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
forward | hint | redirect | static-stub | stub ); forward | hint | redirect | static-stub | stub );
update-check-ksk <replaceable>boolean</replaceable>; update-check-ksk <replaceable>boolean</replaceable>;
update-policy ( local | { ( deny | grant ) <replaceable>string</replaceable> ( 6to4-self | update-policy ( local | { ( deny | grant ) <replaceable>string</replaceable> ( 6to4-self |
external | krb5-self | krb5-selfsub | krb5-subdomain | ms-self external | krb5-self | krb5-subdomain | ms-self | ms-subdomain
| ms-selfsub | ms-subdomain | name | self | selfsub | selfwild | name | self | selfsub | selfwild | subdomain | tcp-self |
| subdomain | tcp-self | wildcard | zonesub ) [ <replaceable>string</replaceable> ] wildcard | zonesub ) [ <replaceable>string</replaceable> ] <replaceable>rrtypelist</replaceable>; ... };
<replaceable>rrtypelist</replaceable>; ... };
use-alt-transfer-source <replaceable>boolean</replaceable>; use-alt-transfer-source <replaceable>boolean</replaceable>;
zero-no-soa-ttl <replaceable>boolean</replaceable>; zero-no-soa-ttl <replaceable>boolean</replaceable>;
zone-statistics ( full | terse | none | <replaceable>boolean</replaceable> ); zone-statistics ( full | terse | none | <replaceable>boolean</replaceable> );
+33 -42
View File
@@ -193,7 +193,7 @@ options
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>     <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
    port <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>     port <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>     <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>integer</code></em> ]; ... };<br>
check-dup-records ( fail | warn | ignore );<br> check-dup-records ( fail | warn | ignore );<br>
check-integrity <em class="replaceable"><code>boolean</code></em>;<br> check-integrity <em class="replaceable"><code>boolean</code></em>;<br>
check-mx ( fail | warn | ignore );<br> check-mx ( fail | warn | ignore );<br>
@@ -212,9 +212,9 @@ options
coresize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br> coresize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
datasize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br> datasize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
deny-answer-addresses { <em class="replaceable"><code>address_match_element</code></em>; ... } [<br> deny-answer-addresses { <em class="replaceable"><code>address_match_element</code></em>; ... } [<br>
    except-from { <em class="replaceable"><code>string</code></em>; ... } ];<br>     except-from { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
deny-answer-aliases { <em class="replaceable"><code>string</code></em>; ... } [ except-from { <em class="replaceable"><code>string</code></em>; ...<br> deny-answer-aliases { <em class="replaceable"><code>quoted_string</code></em>; ... } [ except-from {<br>
    } ];<br>     <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
dialup ( notify | notify-passive | passive | refresh | <em class="replaceable"><code>boolean</code></em> );<br> dialup ( notify | notify-passive | passive | refresh | <em class="replaceable"><code>boolean</code></em> );<br>
directory <em class="replaceable"><code>quoted_string</code></em>;<br> directory <em class="replaceable"><code>quoted_string</code></em>;<br>
disable-algorithms <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>;<br> disable-algorithms <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>;<br>
@@ -232,7 +232,6 @@ options
};<br> };<br>
dns64-contact <em class="replaceable"><code>string</code></em>;<br> dns64-contact <em class="replaceable"><code>string</code></em>;<br>
dns64-server <em class="replaceable"><code>string</code></em>;<br> dns64-server <em class="replaceable"><code>string</code></em>;<br>
dnskey-sig-validity <em class="replaceable"><code>integer</code></em>;<br>
dnsrps-enable <em class="replaceable"><code>boolean</code></em>;<br> dnsrps-enable <em class="replaceable"><code>boolean</code></em>;<br>
dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br> dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br>
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br> dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
@@ -245,12 +244,14 @@ options
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br> dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br> dnssec-update-mode ( maintain | no-resign );<br>
dnssec-validation ( yes | no | auto );<br> dnssec-validation ( yes | no | auto );<br>
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |<br> dnstap { ( all | auth | client | forwarder |<br>
    response ) ]; ... };<br>     resolver ) [ ( query | response ) ]; ... };<br>
dnstap-identity ( <em class="replaceable"><code>quoted_string</code></em> | none | hostname );<br> dnstap-identity ( <em class="replaceable"><code>quoted_string</code></em> | none |<br>
dnstap-output ( file | unix ) <em class="replaceable"><code>quoted_string</code></em> [ size ( unlimited |<br>     hostname );<br>
    <em class="replaceable"><code>size</code></em> ) ] [ versions ( unlimited | <em class="replaceable"><code>integer</code></em> ) ] [ suffix (<br> dnstap-output ( file | unix ) <em class="replaceable"><code>quoted_string</code></em> [<br>
    increment | timestamp ) ];<br>     size ( unlimited | <em class="replaceable"><code>size</code></em> ) ] [ versions (<br>
    unlimited | <em class="replaceable"><code>integer</code></em> ) ] [ suffix ( increment<br>
    | timestamp ) ];<br>
dnstap-version ( <em class="replaceable"><code>quoted_string</code></em> | none );<br> dnstap-version ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
dscp <em class="replaceable"><code>integer</code></em>;<br> dscp <em class="replaceable"><code>integer</code></em>;<br>
dual-stack-servers [ port <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>quoted_string</code></em> [ port<br> dual-stack-servers [ port <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>quoted_string</code></em> [ port<br>
@@ -279,13 +280,14 @@ options
fstrm-set-output-notify-threshold <em class="replaceable"><code>integer</code></em>;<br> 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-model ( mpsc | spsc );<br>
fstrm-set-output-queue-size <em class="replaceable"><code>integer</code></em>;<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>integer</code></em>;<br>
geoip-directory ( <em class="replaceable"><code>quoted_string</code></em> | none );<br> geoip-directory ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
geoip-use-ecs <em class="replaceable"><code>boolean</code></em>;<br>
glue-cache <em class="replaceable"><code>boolean</code></em>;<br> glue-cache <em class="replaceable"><code>boolean</code></em>;<br>
heartbeat-interval <em class="replaceable"><code>integer</code></em>;<br> heartbeat-interval <em class="replaceable"><code>integer</code></em>;<br>
hostname ( <em class="replaceable"><code>quoted_string</code></em> | none );<br> hostname ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
inline-signing <em class="replaceable"><code>boolean</code></em>;<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>integer</code></em>;<br>
ixfr-from-differences ( primary | master | secondary | slave |<br> ixfr-from-differences ( primary | master | secondary | slave |<br>
    <em class="replaceable"><code>boolean</code></em> );<br>     <em class="replaceable"><code>boolean</code></em> );<br>
keep-response-order { <em class="replaceable"><code>address_match_element</code></em>; ... };<br> keep-response-order { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
@@ -304,10 +306,10 @@ options
masterfile-style ( full | relative );<br> masterfile-style ( full | relative );<br>
match-mapped-addresses <em class="replaceable"><code>boolean</code></em>;<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-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>integer</code></em>;<br>
max-clients-per-query <em class="replaceable"><code>integer</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-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>integer</code></em>;<br>
max-records <em class="replaceable"><code>integer</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-depth <em class="replaceable"><code>integer</code></em>;<br>
max-recursion-queries <em class="replaceable"><code>integer</code></em>;<br> max-recursion-queries <em class="replaceable"><code>integer</code></em>;<br>
@@ -348,7 +350,6 @@ options
preferred-glue <em class="replaceable"><code>string</code></em>;<br> preferred-glue <em class="replaceable"><code>string</code></em>;<br>
prefetch <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ];<br> prefetch <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ];<br>
provide-ixfr <em class="replaceable"><code>boolean</code></em>;<br> provide-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
qname-minimization ( strict | relaxed | disabled | off );<br>
query-source ( ( [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [ port (<br> query-source ( ( [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [ port (<br>
    <em class="replaceable"><code>integer</code></em> | * ) ] ) | ( [ [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) ]<br>     <em class="replaceable"><code>integer</code></em> | * ) ] ) | ( [ [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) ]<br>
    port ( <em class="replaceable"><code>integer</code></em> | * ) ) ) [ dscp <em class="replaceable"><code>integer</code></em> ];<br>     port ( <em class="replaceable"><code>integer</code></em> | * ) ) ) [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
@@ -388,19 +389,18 @@ options
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br> response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
    <em class="replaceable"><code>integer</code></em>;<br>     <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>quoted_string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [<br> response-policy { zone <em class="replaceable"><code>quoted_string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [<br>
    max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [<br>     max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ min-update-interval <em class="replaceable"><code>integer</code></em> ] [<br>
    policy ( cname | disabled | drop | given | no-op | nodata |<br>     policy ( cname | disabled | drop | given | no-op | nodata |<br>
    nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>     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>     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> ]; ... } [ break-dnssec <em class="replaceable"><code>boolean</code></em> ] [<br>     nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ break-dnssec <em class="replaceable"><code>boolean</code></em> ] [<br>
    max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [<br>     max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ min-update-interval <em class="replaceable"><code>integer</code></em> ] [<br>
    min-ns-dots <em class="replaceable"><code>integer</code></em> ] [ nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [<br>     min-ns-dots <em class="replaceable"><code>integer</code></em> ] [ nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [<br>
    qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>     qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ] [<br>     nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    dnsrps-enable <em class="replaceable"><code>boolean</code></em> ] [ dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em><br>     dnsrps-enable <em class="replaceable"><code>boolean</code></em> ] [ dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em><br>
    } ];<br>     } ];<br>
root-delegation-only [ exclude { <em class="replaceable"><code>string</code></em>; ... } ];<br> root-delegation-only [ exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
root-key-sentinel <em class="replaceable"><code>boolean</code></em>;<br>
rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br> rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br>
    <em class="replaceable"><code>quoted_string</code></em> ] <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em>; ... };<br>     <em class="replaceable"><code>quoted_string</code></em> ] <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em>; ... };<br>
secroots-file <em class="replaceable"><code>quoted_string</code></em>;<br> secroots-file <em class="replaceable"><code>quoted_string</code></em>;<br>
@@ -449,7 +449,6 @@ options
use-v4-udp-ports { <em class="replaceable"><code>portrange</code></em>; ... };<br> use-v4-udp-ports { <em class="replaceable"><code>portrange</code></em>; ... };<br>
use-v6-udp-ports { <em class="replaceable"><code>portrange</code></em>; ... };<br> use-v6-udp-ports { <em class="replaceable"><code>portrange</code></em>; ... };<br>
v6-bias <em class="replaceable"><code>integer</code></em>;<br> v6-bias <em class="replaceable"><code>integer</code></em>;<br>
validate-except { <em class="replaceable"><code>string</code></em>; ... };<br>
version ( <em class="replaceable"><code>quoted_string</code></em> | none );<br> version ( <em class="replaceable"><code>quoted_string</code></em> | none );<br>
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br> zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br> zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br>
@@ -550,7 +549,7 @@ view
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>     <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
    port <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>     port <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>     <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>integer</code></em> ]; ... };<br>
check-dup-records ( fail | warn | ignore );<br> check-dup-records ( fail | warn | ignore );<br>
check-integrity <em class="replaceable"><code>boolean</code></em>;<br> check-integrity <em class="replaceable"><code>boolean</code></em>;<br>
check-mx ( fail | warn | ignore );<br> check-mx ( fail | warn | ignore );<br>
@@ -565,9 +564,9 @@ view
cleaning-interval <em class="replaceable"><code>integer</code></em>;<br> cleaning-interval <em class="replaceable"><code>integer</code></em>;<br>
clients-per-query <em class="replaceable"><code>integer</code></em>;<br> clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
deny-answer-addresses { <em class="replaceable"><code>address_match_element</code></em>; ... } [<br> deny-answer-addresses { <em class="replaceable"><code>address_match_element</code></em>; ... } [<br>
    except-from { <em class="replaceable"><code>string</code></em>; ... } ];<br>     except-from { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
deny-answer-aliases { <em class="replaceable"><code>string</code></em>; ... } [ except-from { <em class="replaceable"><code>string</code></em>; ...<br> deny-answer-aliases { <em class="replaceable"><code>quoted_string</code></em>; ... } [ except-from {<br>
    } ];<br>     <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
dialup ( notify | notify-passive | passive | refresh | <em class="replaceable"><code>boolean</code></em> );<br> dialup ( notify | notify-passive | passive | refresh | <em class="replaceable"><code>boolean</code></em> );<br>
disable-algorithms <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>;<br> disable-algorithms <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>;<br>
    ... };<br>     ... };<br>
@@ -588,7 +587,6 @@ view
};<br> };<br>
dns64-contact <em class="replaceable"><code>string</code></em>;<br> dns64-contact <em class="replaceable"><code>string</code></em>;<br>
dns64-server <em class="replaceable"><code>string</code></em>;<br> dns64-server <em class="replaceable"><code>string</code></em>;<br>
dnskey-sig-validity <em class="replaceable"><code>integer</code></em>;<br>
dnsrps-enable <em class="replaceable"><code>boolean</code></em>;<br> dnsrps-enable <em class="replaceable"><code>boolean</code></em>;<br>
dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br> dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br>
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br> dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
@@ -601,8 +599,8 @@ view
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br> dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br> dnssec-update-mode ( maintain | no-resign );<br>
dnssec-validation ( yes | no | auto );<br> dnssec-validation ( yes | no | auto );<br>
dnstap { ( all | auth | client | forwarder | resolver ) [ ( query |<br> dnstap { ( all | auth | client | forwarder |<br>
    response ) ]; ... };<br>     resolver ) [ ( query | response ) ]; ... };<br>
dual-stack-servers [ port <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>quoted_string</code></em> [ port<br> dual-stack-servers [ port <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>quoted_string</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>     <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv4_address</code></em> [ port<br>
    <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port<br>     <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [ port<br>
@@ -642,10 +640,10 @@ view
match-destinations { <em class="replaceable"><code>address_match_element</code></em>; ... };<br> match-destinations { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
match-recursive-only <em class="replaceable"><code>boolean</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-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>integer</code></em>;<br>
max-clients-per-query <em class="replaceable"><code>integer</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-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>integer</code></em>;<br>
max-records <em class="replaceable"><code>integer</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-depth <em class="replaceable"><code>integer</code></em>;<br>
max-recursion-queries <em class="replaceable"><code>integer</code></em>;<br> max-recursion-queries <em class="replaceable"><code>integer</code></em>;<br>
@@ -680,7 +678,6 @@ view
preferred-glue <em class="replaceable"><code>string</code></em>;<br> preferred-glue <em class="replaceable"><code>string</code></em>;<br>
prefetch <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ];<br> prefetch <em class="replaceable"><code>integer</code></em> [ <em class="replaceable"><code>integer</code></em> ];<br>
provide-ixfr <em class="replaceable"><code>boolean</code></em>;<br> provide-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
qname-minimization ( strict | relaxed | disabled | off );<br>
query-source ( ( [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [ port (<br> query-source ( ( [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) [ port (<br>
    <em class="replaceable"><code>integer</code></em> | * ) ] ) | ( [ [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) ]<br>     <em class="replaceable"><code>integer</code></em> | * ) ] ) | ( [ [ address ] ( <em class="replaceable"><code>ipv4_address</code></em> | * ) ]<br>
    port ( <em class="replaceable"><code>integer</code></em> | * ) ) ) [ dscp <em class="replaceable"><code>integer</code></em> ];<br>     port ( <em class="replaceable"><code>integer</code></em> | * ) ) ) [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
@@ -715,19 +712,18 @@ view
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br> response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
    <em class="replaceable"><code>integer</code></em>;<br>     <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>quoted_string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [<br> response-policy { zone <em class="replaceable"><code>quoted_string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [<br>
    max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [<br>     max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ min-update-interval <em class="replaceable"><code>integer</code></em> ] [<br>
    policy ( cname | disabled | drop | given | no-op | nodata |<br>     policy ( cname | disabled | drop | given | no-op | nodata |<br>
    nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>     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>     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> ]; ... } [ break-dnssec <em class="replaceable"><code>boolean</code></em> ] [<br>     nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ break-dnssec <em class="replaceable"><code>boolean</code></em> ] [<br>
    max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [<br>     max-policy-ttl <em class="replaceable"><code>integer</code></em> ] [ min-update-interval <em class="replaceable"><code>integer</code></em> ] [<br>
    min-ns-dots <em class="replaceable"><code>integer</code></em> ] [ nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [<br>     min-ns-dots <em class="replaceable"><code>integer</code></em> ] [ nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [<br>
    qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>     qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ] [<br>     nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    dnsrps-enable <em class="replaceable"><code>boolean</code></em> ] [ dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em><br>     dnsrps-enable <em class="replaceable"><code>boolean</code></em> ] [ dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em><br>
    } ];<br>     } ];<br>
root-delegation-only [ exclude { <em class="replaceable"><code>string</code></em>; ... } ];<br> root-delegation-only [ exclude { <em class="replaceable"><code>quoted_string</code></em>; ... } ];<br>
root-key-sentinel <em class="replaceable"><code>boolean</code></em>;<br>
rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br> rrset-order { [ class <em class="replaceable"><code>string</code></em> ] [ type <em class="replaceable"><code>string</code></em> ] [ name<br>
    <em class="replaceable"><code>quoted_string</code></em> ] <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em>; ... };<br>     <em class="replaceable"><code>quoted_string</code></em> ] <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em>; ... };<br>
send-cookie <em class="replaceable"><code>boolean</code></em>;<br> send-cookie <em class="replaceable"><code>boolean</code></em>;<br>
@@ -788,7 +784,6 @@ view
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br> update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br> use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br>
v6-bias <em class="replaceable"><code>integer</code></em>;<br> v6-bias <em class="replaceable"><code>integer</code></em>;<br>
validate-except { <em class="replaceable"><code>string</code></em>; ... };<br>
zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br> zero-no-soa-ttl <em class="replaceable"><code>boolean</code></em>;<br>
zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br> zero-no-soa-ttl-cache <em class="replaceable"><code>boolean</code></em>;<br>
zone <em class="replaceable"><code>string</code></em> [ <em class="replaceable"><code>class</code></em> ] {<br> zone <em class="replaceable"><code>string</code></em> [ <em class="replaceable"><code>class</code></em> ] {<br>
@@ -821,7 +816,6 @@ view
dialup ( notify | notify-passive | passive | refresh |<br> dialup ( notify | notify-passive | passive | refresh |<br>
    <em class="replaceable"><code>boolean</code></em> );<br>     <em class="replaceable"><code>boolean</code></em> );<br>
dlz <em class="replaceable"><code>string</code></em>;<br> dlz <em class="replaceable"><code>string</code></em>;<br>
dnskey-sig-validity <em class="replaceable"><code>integer</code></em>;<br>
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</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-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br> dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
@@ -853,7 +847,6 @@ view
max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br> max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br>
min-refresh-time <em class="replaceable"><code>integer</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> min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
mirror <em class="replaceable"><code>boolean</code></em>;<br>
multi-master <em class="replaceable"><code>boolean</code></em>;<br> multi-master <em class="replaceable"><code>boolean</code></em>;<br>
notify ( explicit | master-only | <em class="replaceable"><code>boolean</code></em> );<br> notify ( explicit | master-only | <em class="replaceable"><code>boolean</code></em> );<br>
notify-delay <em class="replaceable"><code>integer</code></em>;<br> notify-delay <em class="replaceable"><code>integer</code></em>;<br>
@@ -870,7 +863,7 @@ view
serial-update-method ( date | increment | unixtime );<br> serial-update-method ( date | increment | unixtime );<br>
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [<br> server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [<br>
    port <em class="replaceable"><code>integer</code></em> ]; ... };<br>     port <em class="replaceable"><code>integer</code></em> ]; ... };<br>
server-names { <em class="replaceable"><code>string</code></em>; ... };<br> server-names { <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
sig-signing-nodes <em class="replaceable"><code>integer</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-signatures <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-type <em class="replaceable"><code>integer</code></em>;<br> sig-signing-type <em class="replaceable"><code>integer</code></em>;<br>
@@ -930,7 +923,6 @@ zone
delegation-only <em class="replaceable"><code>boolean</code></em>;<br> delegation-only <em class="replaceable"><code>boolean</code></em>;<br>
dialup ( notify | notify-passive | passive | refresh | <em class="replaceable"><code>boolean</code></em> );<br> dialup ( notify | notify-passive | passive | refresh | <em class="replaceable"><code>boolean</code></em> );<br>
dlz <em class="replaceable"><code>string</code></em>;<br> dlz <em class="replaceable"><code>string</code></em>;<br>
dnskey-sig-validity <em class="replaceable"><code>integer</code></em>;<br>
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</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-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br> dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
@@ -960,7 +952,6 @@ zone
max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br> max-zone-ttl ( unlimited | <em class="replaceable"><code>ttlval</code></em> );<br>
min-refresh-time <em class="replaceable"><code>integer</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> min-retry-time <em class="replaceable"><code>integer</code></em>;<br>
mirror <em class="replaceable"><code>boolean</code></em>;<br>
multi-master <em class="replaceable"><code>boolean</code></em>;<br> multi-master <em class="replaceable"><code>boolean</code></em>;<br>
notify ( explicit | master-only | <em class="replaceable"><code>boolean</code></em> );<br> notify ( explicit | master-only | <em class="replaceable"><code>boolean</code></em> );<br>
notify-delay <em class="replaceable"><code>integer</code></em>;<br> notify-delay <em class="replaceable"><code>integer</code></em>;<br>
@@ -975,7 +966,7 @@ zone
serial-update-method ( date | increment | unixtime );<br> serial-update-method ( date | increment | unixtime );<br>
server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [ port<br> server-addresses { ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> ) [ port<br>
    <em class="replaceable"><code>integer</code></em> ]; ... };<br>     <em class="replaceable"><code>integer</code></em> ]; ... };<br>
server-names { <em class="replaceable"><code>string</code></em>; ... };<br> server-names { <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
sig-signing-nodes <em class="replaceable"><code>integer</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-signatures <em class="replaceable"><code>integer</code></em>;<br>
sig-signing-type <em class="replaceable"><code>integer</code></em>;<br> sig-signing-type <em class="replaceable"><code>integer</code></em>;<br>
+673 -931
View File
File diff suppressed because it is too large Load Diff
+71 -74
View File
@@ -13,9 +13,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/httpd.h> #include <isc/httpd.h>
#include <isc/json.h> #include <isc/json.h>
@@ -70,7 +67,7 @@ stats_dumparg {
void *arg; /* type dependent argument */ void *arg; /* type dependent argument */
int ncounters; /* for general statistics */ int ncounters; /* for general statistics */
int *counterindices; /* for general statistics */ int *counterindices; /* for general statistics */
uint64_t *countervalues; /* for general statistics */ isc_uint64_t *countervalues; /* for general statistics */
isc_result_t result; isc_result_t result;
} stats_dumparg_t; } stats_dumparg_t;
@@ -1051,7 +1048,7 @@ init_desc(void) {
* Dump callback functions. * Dump callback functions.
*/ */
static void static void
generalstat_dump(isc_statscounter_t counter, uint64_t val, void *arg) { generalstat_dump(isc_statscounter_t counter, isc_uint64_t val, void *arg) {
stats_dumparg_t *dumparg = arg; stats_dumparg_t *dumparg = arg;
REQUIRE(counter < dumparg->ncounters); REQUIRE(counter < dumparg->ncounters);
@@ -1061,10 +1058,10 @@ generalstat_dump(isc_statscounter_t counter, uint64_t val, void *arg) {
static isc_result_t static isc_result_t
dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg, dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
const char *category, const char **desc, int ncounters, const char *category, const char **desc, int ncounters,
int *indices, uint64_t *values, int options) int *indices, isc_uint64_t *values, int options)
{ {
int i, idx; int i, idx;
uint64_t value; isc_uint64_t value;
stats_dumparg_t dumparg; stats_dumparg_t dumparg;
FILE *fp; FILE *fp;
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
@@ -1109,7 +1106,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
switch (dumparg.type) { switch (dumparg.type) {
case isc_statsformat_file: case isc_statsformat_file:
fp = arg; fp = arg;
fprintf(fp, "%20" PRIu64 " %s\n", fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
value, desc[idx]); value, desc[idx]);
break; break;
case isc_statsformat_xml: case isc_statsformat_xml:
@@ -1137,7 +1134,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
ISC_XMLCHAR ISC_XMLCHAR
"counter")); "counter"));
TRY0(xmlTextWriterWriteFormatString(writer, TRY0(xmlTextWriterWriteFormatString(writer,
"%" PRIu64, value)); "%" ISC_PRINT_QUADFORMAT "u", value));
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
/* </counter> */ /* </counter> */
@@ -1154,7 +1151,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
ISC_XMLCHAR ISC_XMLCHAR
desc[idx])); desc[idx]));
TRY0(xmlTextWriterWriteFormatString(writer, TRY0(xmlTextWriterWriteFormatString(writer,
"%" PRIu64, value)); "%" ISC_PRINT_QUADFORMAT "u", value));
TRY0(xmlTextWriterEndElement(writer)); TRY0(xmlTextWriterEndElement(writer));
/* counter */ /* counter */
} }
@@ -1182,7 +1179,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
} }
static void static void
rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) { rdtypestat_dump(dns_rdatastatstype_t type, isc_uint64_t val, void *arg) {
char typebuf[64]; char typebuf[64];
const char *typestr; const char *typestr;
stats_dumparg_t *dumparg = arg; stats_dumparg_t *dumparg = arg;
@@ -1206,7 +1203,7 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
switch (dumparg->type) { switch (dumparg->type) {
case isc_statsformat_file: case isc_statsformat_file:
fp = dumparg->arg; fp = dumparg->arg;
fprintf(fp, "%20" PRIu64 " %s\n", val, typestr); fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n", val, typestr);
break; break;
case isc_statsformat_xml: case isc_statsformat_xml:
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
@@ -1218,7 +1215,7 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
ISC_XMLCHAR typestr)); ISC_XMLCHAR typestr));
TRY0(xmlTextWriterWriteFormatString(writer, TRY0(xmlTextWriterWriteFormatString(writer,
"%" PRIu64, "%" ISC_PRINT_QUADFORMAT "u",
val)); val));
TRY0(xmlTextWriterEndElement(writer)); /* type */ TRY0(xmlTextWriterEndElement(writer)); /* type */
@@ -1246,13 +1243,13 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
} }
static void static void
rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) { rdatasetstats_dump(dns_rdatastatstype_t type, isc_uint64_t val, void *arg) {
stats_dumparg_t *dumparg = arg; stats_dumparg_t *dumparg = arg;
FILE *fp; FILE *fp;
char typebuf[64]; char typebuf[64];
const char *typestr; const char *typestr;
bool nxrrset = false; isc_boolean_t nxrrset = ISC_FALSE;
bool stale = false; isc_boolean_t stale = ISC_FALSE;
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
xmlTextWriterPtr writer; xmlTextWriterPtr writer;
int xmlrc; int xmlrc;
@@ -1276,16 +1273,16 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_NXRRSET) if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_NXRRSET)
!= 0) != 0)
nxrrset = true; nxrrset = ISC_TRUE;
if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_STALE) if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_STALE)
!= 0) != 0)
stale = true; stale = ISC_TRUE;
switch (dumparg->type) { switch (dumparg->type) {
case isc_statsformat_file: case isc_statsformat_file:
fp = dumparg->arg; fp = dumparg->arg;
fprintf(fp, "%20" PRIu64 " %s%s%s\n", val, fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s%s%s\n", val,
stale ? "#" : "", nxrrset ? "!" : "", typestr); stale ? "#" : "", nxrrset ? "!" : "", typestr);
break; break;
case isc_statsformat_xml: case isc_statsformat_xml:
@@ -1301,7 +1298,7 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counter")); TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counter"));
TRY0(xmlTextWriterWriteFormatString(writer, TRY0(xmlTextWriterWriteFormatString(writer,
"%" PRIu64, "%" ISC_PRINT_QUADFORMAT "u",
val)); val));
TRY0(xmlTextWriterEndElement(writer)); /* counter */ TRY0(xmlTextWriterEndElement(writer)); /* counter */
@@ -1332,7 +1329,7 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
} }
static void static void
opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) { opcodestat_dump(dns_opcode_t code, isc_uint64_t val, void *arg) {
FILE *fp; FILE *fp;
isc_buffer_t b; isc_buffer_t b;
char codebuf[64]; char codebuf[64];
@@ -1352,7 +1349,7 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
switch (dumparg->type) { switch (dumparg->type) {
case isc_statsformat_file: case isc_statsformat_file:
fp = dumparg->arg; fp = dumparg->arg;
fprintf(fp, "%20" PRIu64 " %s\n", val, codebuf); fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n", val, codebuf);
break; break;
case isc_statsformat_xml: case isc_statsformat_xml:
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
@@ -1361,7 +1358,7 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name",
ISC_XMLCHAR codebuf )); ISC_XMLCHAR codebuf ));
TRY0(xmlTextWriterWriteFormatString(writer, TRY0(xmlTextWriterWriteFormatString(writer,
"%" PRIu64, "%" ISC_PRINT_QUADFORMAT "u",
val)); val));
TRY0(xmlTextWriterEndElement(writer)); /* counter */ TRY0(xmlTextWriterEndElement(writer)); /* counter */
#endif #endif
@@ -1389,7 +1386,7 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
} }
static void static void
rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) { rcodestat_dump(dns_rcode_t code, isc_uint64_t val, void *arg) {
FILE *fp; FILE *fp;
isc_buffer_t b; isc_buffer_t b;
char codebuf[64]; char codebuf[64];
@@ -1409,7 +1406,7 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
switch (dumparg->type) { switch (dumparg->type) {
case isc_statsformat_file: case isc_statsformat_file:
fp = dumparg->arg; fp = dumparg->arg;
fprintf(fp, "%20" PRIu64 " %s\n", val, codebuf); fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n", val, codebuf);
break; break;
case isc_statsformat_xml: case isc_statsformat_xml:
#ifdef HAVE_LIBXML2 #ifdef HAVE_LIBXML2
@@ -1418,7 +1415,7 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name", TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name",
ISC_XMLCHAR codebuf )); ISC_XMLCHAR codebuf ));
TRY0(xmlTextWriterWriteFormatString(writer, TRY0(xmlTextWriterWriteFormatString(writer,
"%" PRIu64, "%" ISC_PRINT_QUADFORMAT "u",
val)); val));
TRY0(xmlTextWriterEndElement(writer)); /* counter */ TRY0(xmlTextWriterEndElement(writer)); /* counter */
#endif #endif
@@ -1463,7 +1460,7 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
isc_result_t result; isc_result_t result;
char buf[1024 + 32]; /* sufficiently large for zone name and class */ char buf[1024 + 32]; /* sufficiently large for zone name and class */
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
uint32_t serial; isc_uint32_t serial;
xmlTextWriterPtr writer = arg; xmlTextWriterPtr writer = arg;
dns_zonestat_level_t statlevel; dns_zonestat_level_t statlevel;
int xmlrc; int xmlrc;
@@ -1507,8 +1504,8 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
isc_stats_t *zonestats; isc_stats_t *zonestats;
isc_stats_t *gluecachestats; isc_stats_t *gluecachestats;
dns_stats_t *rcvquerystats; dns_stats_t *rcvquerystats;
uint64_t nsstat_values[ns_statscounter_max]; isc_uint64_t nsstat_values[ns_statscounter_max];
uint64_t gluecachestats_values[dns_gluecachestatscounter_max]; isc_uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
zonestats = dns_zone_getrequeststats(zone); zonestats = dns_zone_getrequeststats(zone);
if (zonestats != NULL) { if (zonestats != NULL) {
@@ -1581,7 +1578,7 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
} }
static isc_result_t static isc_result_t
generatexml(named_server_t *server, uint32_t flags, generatexml(named_server_t *server, isc_uint32_t flags,
int *buflen, xmlChar **buf) int *buflen, xmlChar **buf)
{ {
char boottime[sizeof "yyyy-mm-ddThh:mm:ss.sssZ"]; char boottime[sizeof "yyyy-mm-ddThh:mm:ss.sssZ"];
@@ -1594,17 +1591,17 @@ generatexml(named_server_t *server, uint32_t flags,
dns_view_t *view; dns_view_t *view;
stats_dumparg_t dumparg; stats_dumparg_t dumparg;
dns_stats_t *cacherrstats; dns_stats_t *cacherrstats;
uint64_t nsstat_values[ns_statscounter_max]; isc_uint64_t nsstat_values[ns_statscounter_max];
uint64_t resstat_values[dns_resstatscounter_max]; isc_uint64_t resstat_values[dns_resstatscounter_max];
uint64_t adbstat_values[dns_adbstats_max]; isc_uint64_t adbstat_values[dns_adbstats_max];
uint64_t zonestat_values[dns_zonestatscounter_max]; isc_uint64_t zonestat_values[dns_zonestatscounter_max];
uint64_t sockstat_values[isc_sockstatscounter_max]; isc_uint64_t sockstat_values[isc_sockstatscounter_max];
uint64_t udpinsizestat_values[dns_sizecounter_in_max]; isc_uint64_t udpinsizestat_values[dns_sizecounter_in_max];
uint64_t udpoutsizestat_values[dns_sizecounter_out_max]; isc_uint64_t udpoutsizestat_values[dns_sizecounter_out_max];
uint64_t tcpinsizestat_values[dns_sizecounter_in_max]; isc_uint64_t tcpinsizestat_values[dns_sizecounter_in_max];
uint64_t tcpoutsizestat_values[dns_sizecounter_out_max]; isc_uint64_t tcpoutsizestat_values[dns_sizecounter_out_max];
#ifdef HAVE_DNSTAP #ifdef HAVE_DNSTAP
uint64_t dnstapstat_values[dns_dnstapcounter_max]; isc_uint64_t dnstapstat_values[dns_dnstapcounter_max];
#endif #endif
isc_result_t result; isc_result_t result;
@@ -1918,7 +1915,7 @@ generatexml(named_server_t *server, uint32_t flags,
if ((flags & STATS_XML_ZONES) != 0) { if ((flags & STATS_XML_ZONES) != 0) {
TRY0(xmlTextWriterStartElement(writer, TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "zones")); ISC_XMLCHAR "zones"));
result = dns_zt_apply(view->zonetable, true, result = dns_zt_apply(view->zonetable, ISC_TRUE,
NULL, zone_xmlrender, writer); NULL, zone_xmlrender, writer);
if (result != ISC_R_SUCCESS) if (result != ISC_R_SUCCESS)
goto error; goto error;
@@ -2056,7 +2053,7 @@ wrap_xmlfree(isc_buffer_t *buffer, void *arg) {
} }
static isc_result_t static isc_result_t
render_xml(uint32_t flags, const char *url, isc_httpdurl_t *urlinfo, render_xml(isc_uint32_t flags, const char *url, isc_httpdurl_t *urlinfo,
const char *querystring, const char *headers, void *arg, const char *querystring, const char *headers, void *arg,
unsigned int *retcode, const char **retmsg, unsigned int *retcode, const char **retmsg,
const char **mimetype, isc_buffer_t *b, const char **mimetype, isc_buffer_t *b,
@@ -2231,7 +2228,7 @@ wrap_jsonfree(isc_buffer_t *buffer, void *arg) {
static json_object * static json_object *
addzone(char *name, char *classname, const char *ztype, addzone(char *name, char *classname, const char *ztype,
uint32_t serial, bool add_serial) isc_uint32_t serial, isc_boolean_t add_serial)
{ {
json_object *node = json_object_new_object(); json_object *node = json_object_new_object();
@@ -2258,7 +2255,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
char *zone_name_only = NULL; char *zone_name_only = NULL;
char *class_only = NULL; char *class_only = NULL;
dns_rdataclass_t rdclass; dns_rdataclass_t rdclass;
uint32_t serial; isc_uint32_t serial;
json_object *zonearray = (json_object *) arg; json_object *zonearray = (json_object *) arg;
json_object *zoneobj = NULL; json_object *zoneobj = NULL;
dns_zonestat_level_t statlevel; dns_zonestat_level_t statlevel;
@@ -2276,10 +2273,10 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
if (dns_zone_getserial(zone, &serial) != ISC_R_SUCCESS) if (dns_zone_getserial(zone, &serial) != ISC_R_SUCCESS)
zoneobj = addzone(zone_name_only, class_only, zoneobj = addzone(zone_name_only, class_only,
user_zonetype(zone), 0, false); user_zonetype(zone), 0, ISC_FALSE);
else else
zoneobj = addzone(zone_name_only, class_only, zoneobj = addzone(zone_name_only, class_only,
user_zonetype(zone), serial, true); user_zonetype(zone), serial, ISC_TRUE);
if (zoneobj == NULL) if (zoneobj == NULL)
return (ISC_R_NOMEMORY); return (ISC_R_NOMEMORY);
@@ -2288,8 +2285,8 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
isc_stats_t *zonestats; isc_stats_t *zonestats;
isc_stats_t *gluecachestats; isc_stats_t *gluecachestats;
dns_stats_t *rcvquerystats; dns_stats_t *rcvquerystats;
uint64_t nsstat_values[ns_statscounter_max]; isc_uint64_t nsstat_values[ns_statscounter_max];
uint64_t gluecachestats_values[dns_gluecachestatscounter_max]; isc_uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
zonestats = dns_zone_getrequeststats(zone); zonestats = dns_zone_getrequeststats(zone);
if (zonestats != NULL) { if (zonestats != NULL) {
@@ -2379,7 +2376,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
static isc_result_t static isc_result_t
generatejson(named_server_t *server, size_t *msglen, generatejson(named_server_t *server, size_t *msglen,
const char **msg, json_object **rootp, uint32_t flags) const char **msg, json_object **rootp, isc_uint32_t flags)
{ {
dns_view_t *view; dns_view_t *view;
isc_result_t result = ISC_R_SUCCESS; isc_result_t result = ISC_R_SUCCESS;
@@ -2389,17 +2386,17 @@ generatejson(named_server_t *server, size_t *msglen,
json_object *tcpreq4 = NULL, *tcpresp4 = NULL; json_object *tcpreq4 = NULL, *tcpresp4 = NULL;
json_object *udpreq6 = NULL, *udpresp6 = NULL; json_object *udpreq6 = NULL, *udpresp6 = NULL;
json_object *tcpreq6 = NULL, *tcpresp6 = NULL; json_object *tcpreq6 = NULL, *tcpresp6 = NULL;
uint64_t nsstat_values[ns_statscounter_max]; isc_uint64_t nsstat_values[ns_statscounter_max];
uint64_t resstat_values[dns_resstatscounter_max]; isc_uint64_t resstat_values[dns_resstatscounter_max];
uint64_t adbstat_values[dns_adbstats_max]; isc_uint64_t adbstat_values[dns_adbstats_max];
uint64_t zonestat_values[dns_zonestatscounter_max]; isc_uint64_t zonestat_values[dns_zonestatscounter_max];
uint64_t sockstat_values[isc_sockstatscounter_max]; isc_uint64_t sockstat_values[isc_sockstatscounter_max];
uint64_t udpinsizestat_values[dns_sizecounter_in_max]; isc_uint64_t udpinsizestat_values[dns_sizecounter_in_max];
uint64_t udpoutsizestat_values[dns_sizecounter_out_max]; isc_uint64_t udpoutsizestat_values[dns_sizecounter_out_max];
uint64_t tcpinsizestat_values[dns_sizecounter_in_max]; isc_uint64_t tcpinsizestat_values[dns_sizecounter_in_max];
uint64_t tcpoutsizestat_values[dns_sizecounter_out_max]; isc_uint64_t tcpoutsizestat_values[dns_sizecounter_out_max];
#ifdef HAVE_DNSTAP #ifdef HAVE_DNSTAP
uint64_t dnstapstat_values[dns_dnstapcounter_max]; isc_uint64_t dnstapstat_values[dns_dnstapcounter_max];
#endif #endif
stats_dumparg_t dumparg; stats_dumparg_t dumparg;
char boottime[sizeof "yyyy-mm-ddThh:mm:ss.sssZ"]; char boottime[sizeof "yyyy-mm-ddThh:mm:ss.sssZ"];
@@ -2613,7 +2610,7 @@ generatejson(named_server_t *server, size_t *msglen,
if ((flags & STATS_JSON_ZONES) != 0) { if ((flags & STATS_JSON_ZONES) != 0) {
result = dns_zt_apply(view->zonetable, result = dns_zt_apply(view->zonetable,
true, ISC_TRUE,
NULL, zone_jsonrender, NULL, zone_jsonrender,
za); za);
if (result != ISC_R_SUCCESS) { if (result != ISC_R_SUCCESS) {
@@ -2958,7 +2955,7 @@ generatejson(named_server_t *server, size_t *msglen,
} }
static isc_result_t static isc_result_t
render_json(uint32_t flags, render_json(isc_uint32_t flags,
const char *url, isc_httpdurl_t *urlinfo, const char *url, isc_httpdurl_t *urlinfo,
const char *querystring, const char *headers, const char *querystring, const char *headers,
void *arg, unsigned int *retcode, const char **retmsg, void *arg, unsigned int *retcode, const char **retmsg,
@@ -3185,7 +3182,7 @@ shutdown_listener(named_statschannel_t *listener) {
isc_httpdmgr_shutdown(&listener->httpdmgr); isc_httpdmgr_shutdown(&listener->httpdmgr);
} }
static bool static isc_boolean_t
client_ok(const isc_sockaddr_t *fromaddr, void *arg) { client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
named_statschannel_t *listener = arg; named_statschannel_t *listener = arg;
dns_aclenv_t *env = dns_aclenv_t *env =
@@ -3199,11 +3196,11 @@ client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
isc_netaddr_fromsockaddr(&netaddr, fromaddr); isc_netaddr_fromsockaddr(&netaddr, fromaddr);
LOCK(&listener->lock); LOCK(&listener->lock);
if ((dns_acl_match(&netaddr, NULL, listener->acl, env, if (dns_acl_match(&netaddr, NULL, NULL, 0, NULL, listener->acl, env,
&match, NULL) == ISC_R_SUCCESS) && match > 0) &match, NULL) == ISC_R_SUCCESS && match > 0)
{ {
UNLOCK(&listener->lock); UNLOCK(&listener->lock);
return (true); return (ISC_TRUE);
} }
UNLOCK(&listener->lock); UNLOCK(&listener->lock);
@@ -3212,7 +3209,7 @@ client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING, NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
"rejected statistics connection from %s", socktext); "rejected statistics connection from %s", socktext);
return (false); return (ISC_FALSE);
} }
static void static void
@@ -3284,7 +3281,7 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
isc_socket_setname(sock, "statchannel", NULL); isc_socket_setname(sock, "statchannel", NULL);
#ifndef ISC_ALLOW_MAPPED #ifndef ISC_ALLOW_MAPPED
isc_socket_ipv6only(sock, true); isc_socket_ipv6only(sock, ISC_TRUE);
#endif #endif
result = isc_socket_bind(sock, addr, ISC_SOCKET_REUSEADDRESS); result = isc_socket_bind(sock, addr, ISC_SOCKET_REUSEADDRESS);
@@ -3339,7 +3336,7 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/traffic", isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1/traffic",
render_json_traffic, server); render_json_traffic, server);
#endif #endif
isc_httpdmgr_addurl2(listener->httpdmgr, "/bind9.xsl", true, isc_httpdmgr_addurl2(listener->httpdmgr, "/bind9.xsl", ISC_TRUE,
render_xsl, server); render_xsl, server);
*listenerp = listener; *listenerp = listener;
@@ -3569,12 +3566,12 @@ named_stats_dump(named_server_t *server, FILE *fp) {
dns_view_t *view; dns_view_t *view;
dns_zone_t *zone, *next; dns_zone_t *zone, *next;
stats_dumparg_t dumparg; stats_dumparg_t dumparg;
uint64_t nsstat_values[ns_statscounter_max]; isc_uint64_t nsstat_values[ns_statscounter_max];
uint64_t resstat_values[dns_resstatscounter_max]; isc_uint64_t resstat_values[dns_resstatscounter_max];
uint64_t adbstat_values[dns_adbstats_max]; isc_uint64_t adbstat_values[dns_adbstats_max];
uint64_t zonestat_values[dns_zonestatscounter_max]; isc_uint64_t zonestat_values[dns_zonestatscounter_max];
uint64_t sockstat_values[isc_sockstatscounter_max]; isc_uint64_t sockstat_values[isc_sockstatscounter_max];
uint64_t gluecachestats_values[dns_gluecachestatscounter_max]; isc_uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
RUNTIME_CHECK(isc_once_do(&once, init_desc) == ISC_R_SUCCESS); RUNTIME_CHECK(isc_once_do(&once, init_desc) == ISC_R_SUCCESS);
+2 -4
View File
@@ -14,8 +14,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */ #include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/mem.h> #include <isc/mem.h>
@@ -52,7 +50,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
isc_result_t result; isc_result_t result;
dns_tkeyctx_t *tctx = NULL; dns_tkeyctx_t *tctx = NULL;
const char *s; const char *s;
uint32_t n; isc_uint32_t n;
dns_fixedname_t fname; dns_fixedname_t fname;
dns_name_t *name; dns_name_t *name;
isc_buffer_t b; isc_buffer_t b;
@@ -103,7 +101,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
isc_buffer_add(&b, strlen(s)); isc_buffer_add(&b, strlen(s));
name = dns_fixedname_initname(&fname); name = dns_fixedname_initname(&fname);
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL)); RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
RETERR(dst_gssapi_acquirecred(name, false, &tctx->gsscred)); RETERR(dst_gssapi_acquirecred(name, ISC_FALSE, &tctx->gsscred));
} }
obj = NULL; obj = NULL;
+2 -4
View File
@@ -14,8 +14,6 @@
#include <config.h> #include <config.h>
#include <inttypes.h>
#include <isc/base64.h> #include <isc/base64.h>
#include <isc/buffer.h> #include <isc/buffer.h>
#include <isc/mem.h> #include <isc/mem.h>
@@ -45,7 +43,7 @@ add_initial_keys(const cfg_obj_t *list, dns_tsig_keyring_t *ring,
int secretlen = 0; int secretlen = 0;
isc_result_t ret; isc_result_t ret;
isc_stdtime_t now; isc_stdtime_t now;
uint16_t bits; isc_uint16_t bits;
for (element = cfg_list_first(list); for (element = cfg_list_first(list);
element != NULL; element != NULL;
@@ -111,7 +109,7 @@ add_initial_keys(const cfg_obj_t *list, dns_tsig_keyring_t *ring,
isc_stdtime_get(&now); isc_stdtime_get(&now);
ret = dns_tsigkey_create(&keyname, alg, secret, secretlen, ret = dns_tsigkey_create(&keyname, alg, secret, secretlen,
false, NULL, now, now, ISC_FALSE, NULL, now, now,
mctx, ring, &tsigkey); mctx, ring, &tsigkey);
isc_mem_put(mctx, secret, secretalloc); isc_mem_put(mctx, secret, secretalloc);
secret = NULL; secret = NULL;
+1 -1
View File
@@ -15,7 +15,7 @@ top_srcdir = @top_srcdir@
CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \ CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \ ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@ ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
CDEFINES = CDEFINES =
CWARNINGS = CWARNINGS =

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