Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc4612a76c | ||
|
|
c99496f6a8 | ||
|
|
59227dc277 | ||
|
|
1cfaf783e2 | ||
|
|
234acfeffe | ||
|
|
b4967c5735 |
@@ -1,90 +0,0 @@
|
|||||||
;;; Directory Local Variables
|
|
||||||
;;; For more information see (info "(emacs) Directory Variables")
|
|
||||||
|
|
||||||
((c-mode .
|
|
||||||
((eval .
|
|
||||||
(set (make-local-variable 'directory-of-current-dir-locals-file)
|
|
||||||
(file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(eval .
|
|
||||||
(set (make-local-variable 'include-directories)
|
|
||||||
(list
|
|
||||||
|
|
||||||
;; top directory
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "./"))
|
|
||||||
|
|
||||||
;; libisc
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/isc/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/isc"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/isc/netmgr"))
|
|
||||||
|
|
||||||
;; libdns
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/dns/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/dns"))
|
|
||||||
|
|
||||||
;; libisccc
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/isccc/include"))
|
|
||||||
|
|
||||||
;; libisccfg
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/isccfg/include"))
|
|
||||||
|
|
||||||
;; libns
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/ns/include"))
|
|
||||||
|
|
||||||
;; libirs
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/irs/include"))
|
|
||||||
|
|
||||||
;; libbind9
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
|
|
||||||
|
|
||||||
;; bin
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/check"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/confgen"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/dig/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/named/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/named/unix/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/dnssec/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/named/include"))
|
|
||||||
(expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
|
|
||||||
|
|
||||||
(expand-file-name "/usr/local/opt/openssl@1.1/include")
|
|
||||||
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
|
|
||||||
(expand-file-name "/usr/local/include")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(eval setq flycheck-clang-include-path include-directories)
|
|
||||||
(eval setq flycheck-cppcheck-include-path include-directories)
|
|
||||||
)
|
|
||||||
))
|
|
||||||
@@ -1,12 +1,3 @@
|
|||||||
*.sln.in eol=crlf
|
*.sln.in eol=crlf
|
||||||
*.vcxproj.in eol=crlf
|
*.vcxproj.in eol=crlf
|
||||||
*.vcxproj.filters.in eol=crlf
|
*.vcxproj.filters.in eol=crlf
|
||||||
|
|
||||||
.gitignore export-ignore
|
|
||||||
/conftools export-ignore
|
|
||||||
/doc/design export-ignore
|
|
||||||
/doc/dev export-ignore
|
|
||||||
/util/** export-ignore
|
|
||||||
/util/bindkeys.pl -export-ignore
|
|
||||||
/util/check-make-install.in -export-ignore
|
|
||||||
/util/mksymtbl.pl -export-ignore
|
|
||||||
|
|||||||
+55
-53
@@ -1,62 +1,64 @@
|
|||||||
*-symtbl.c
|
Makefile
|
||||||
*.a
|
config.log
|
||||||
*.gcda
|
config.h
|
||||||
*.gcno
|
config.cache
|
||||||
*.la
|
config.status
|
||||||
*.lo
|
libtool
|
||||||
*.o
|
/isc-config.sh
|
||||||
*.orig
|
/configure.lineno
|
||||||
*.plist/ # ccc-analyzer store its results in .plist directories
|
autom4te.cache/
|
||||||
*.rej
|
*.rej
|
||||||
|
*.orig
|
||||||
|
*.o
|
||||||
|
*.lo
|
||||||
*.so
|
*.so
|
||||||
|
*.a
|
||||||
|
*.la
|
||||||
|
*.gcno
|
||||||
|
*.gcda
|
||||||
*_test
|
*_test
|
||||||
*~
|
*-symtbl.c
|
||||||
|
timestamp
|
||||||
|
ans.run
|
||||||
|
named.run
|
||||||
|
named.memstats
|
||||||
|
gen.dSYM/
|
||||||
.ccache/
|
.ccache/
|
||||||
.cproject
|
|
||||||
.deps/
|
.deps/
|
||||||
.dirstamp
|
.dirstamp
|
||||||
.libs/
|
.libs/
|
||||||
|
unit/atf-src/atf-c++/atf-c++.pc
|
||||||
|
unit/atf-src/atf-c/atf-c.pc
|
||||||
|
unit/atf-src/atf-c/defs.h
|
||||||
|
unit/atf-src/atf-c/detail/process_helpers
|
||||||
|
unit/atf-src/atf-config/atf-config
|
||||||
|
unit/atf-src/atf-report/atf-report
|
||||||
|
unit/atf-src/atf-report/fail_helper
|
||||||
|
unit/atf-src/atf-report/misc_helpers
|
||||||
|
unit/atf-src/atf-report/pass_helper
|
||||||
|
unit/atf-src/atf-run/atf-run
|
||||||
|
unit/atf-src/atf-run/bad_metadata_helper
|
||||||
|
unit/atf-src/atf-run/expect_helpers
|
||||||
|
unit/atf-src/atf-run/misc_helpers
|
||||||
|
unit/atf-src/atf-run/pass_helper
|
||||||
|
unit/atf-src/atf-run/several_tcs_helper
|
||||||
|
unit/atf-src/atf-run/zero_tcs_helper
|
||||||
|
unit/atf-src/atf-sh/atf-check
|
||||||
|
unit/atf-src/atf-sh/atf-sh
|
||||||
|
unit/atf-src/atf-sh/misc_helpers
|
||||||
|
unit/atf-src/atf-version/atf-version
|
||||||
|
unit/atf-src/atf-version/revision.h
|
||||||
|
unit/atf-src/atf-version/revision.h.stamp
|
||||||
|
unit/atf-src/bconfig.h
|
||||||
|
unit/atf-src/bootstrap/atconfig
|
||||||
|
unit/atf-src/doc/atf.7
|
||||||
|
unit/atf-src/stamp-h1
|
||||||
|
unit/atf-src/test-programs/c_helpers
|
||||||
|
unit/atf-src/test-programs/cpp_helpers
|
||||||
|
unit/atf-src/test-programs/sh_helpers
|
||||||
|
# ccc-analyzer store its results in .plist directories
|
||||||
|
*.plist/
|
||||||
|
*~
|
||||||
.project
|
.project
|
||||||
|
.cproject
|
||||||
.settings
|
.settings
|
||||||
/aclocal.m4
|
|
||||||
/ar-lib
|
|
||||||
/autom4te.cache/
|
|
||||||
/bind.keys.h
|
|
||||||
/compile
|
|
||||||
/config.cache
|
|
||||||
/config.guess
|
|
||||||
/config.h
|
|
||||||
/config.h.in
|
|
||||||
/config.log
|
|
||||||
/config.status
|
|
||||||
/config.sub
|
|
||||||
/configure
|
|
||||||
/configure.lineno
|
|
||||||
/depcomp
|
|
||||||
/install-sh
|
|
||||||
/isc-config.sh
|
|
||||||
/libltdl/*
|
|
||||||
/libtool
|
|
||||||
/ltmain.sh
|
|
||||||
/m4/libtool.m4
|
|
||||||
/m4/ltargz.m4
|
|
||||||
/m4/ltdl.m4
|
|
||||||
/m4/ltoptions.m4
|
|
||||||
/m4/ltsugar.m4
|
|
||||||
/m4/ltversion.m4
|
|
||||||
/m4/lt~obsolete.m4
|
|
||||||
/missing
|
|
||||||
/py-compile
|
|
||||||
/stamp-h1
|
|
||||||
/test-driver
|
|
||||||
Makefile
|
|
||||||
ans.run
|
|
||||||
gen.dSYM/
|
|
||||||
kyua.log
|
|
||||||
named.memstats
|
|
||||||
named.run
|
|
||||||
timestamp
|
|
||||||
/compile_commands.json
|
|
||||||
/cppcheck_html/
|
|
||||||
/cppcheck.results
|
|
||||||
/util/check-make-install
|
|
||||||
|
|||||||
+257
-1219
File diff suppressed because it is too large
Load Diff
@@ -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.)
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
## Release Checklist
|
|
||||||
|
|
||||||
- [ ] (Manager) Check for the presence of a milestone for the release:
|
|
||||||
- If there is a milestone, are all the issues for the milestone resolved? (other than this checklist).
|
|
||||||
- [ ] (Manager) Inform Support/Marketing of impending release (and give estimated release dates).
|
|
||||||
- (SwEng) Prepare the sources for tarball generation:
|
|
||||||
- [ ] Check perflab to ensure there has been no unexplained drop in performance for the version being released.
|
|
||||||
- [ ] Ensure that there are no outstanding merge requests in the private repository (subscription version only).
|
|
||||||
- [ ] Update API files for libraries with new version information.
|
|
||||||
- [ ] Change software version and library versions in configure.in (new major release only).
|
|
||||||
- [ ] Rebuild configure using autoconf on docs.isc.org.
|
|
||||||
- [ ] Update CHANGES.
|
|
||||||
- [ ] Update CHANGES.SE (subscription branch only).
|
|
||||||
- [ ] Update "version".
|
|
||||||
- [ ] Update "readme.md".
|
|
||||||
- Check the release notes are correct:
|
|
||||||
- [ ] Compare content with merge requests for the release.
|
|
||||||
- [ ] Check formatting.
|
|
||||||
- [ ] Build documentation on docs.isc.org.
|
|
||||||
- [ ] Commit changes and make sure the gitlab-ci tests are passing.
|
|
||||||
- [ ] Push the changes and tag ("alphatag" is an optional string such as "b1", "rc1" etc.). (```git tag -u <DEVELOPER_KEYID> -a -s -m "BIND 9.X.Y[alphatag]" v9_X_Y[alphatag]```)
|
|
||||||
- [ ] If this is the first tag for a release (e.g. beta), create a release branch named `release_v9_X_Y` (this allows development to continue on the release branch whilst release engineering continues).
|
|
||||||
- [ ] (SwEng) Run the "make release" Jenkins job to produce the tarballs and zips.
|
|
||||||
- [ ] (SwEng) Ask QA to sanity check the tarball and zips (passing to them the number of the Jenkins job).
|
|
||||||
- [ ] (QA) Sanity check the tarballs.
|
|
||||||
- [ ] (QA) Request the signature on the tarballs.
|
|
||||||
- [ ] (QA) Check signatures on tarballs.
|
|
||||||
- [ ] (QA) Tell Support to handle notification of release.
|
|
||||||
- [ ] (Manager) Inform Marketing of the release
|
|
||||||
- [ ] (Manager) Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
|
|
||||||
|
|
||||||
- [ ] (SwEng) Update DEB and RPM packages
|
|
||||||
- [ ] (SwEng) Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`)
|
|
||||||
|
|
||||||
## Support
|
|
||||||
- [ ] Make tarballs and signatures available to download.
|
|
||||||
- [ ] Write release email to bind9-announce.
|
|
||||||
- [ ] Write email to bind9-users (if a major release).
|
|
||||||
- [ ] Update tickets in case of waiting support customers.
|
|
||||||
|
|
||||||
## Marketing
|
|
||||||
- [ ] Post short note to Twitter.
|
|
||||||
- [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND).
|
|
||||||
- [ ] Write blog article (if a major release).
|
|
||||||
-1434
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
|||||||
|
Content-Type: application/X-atf-atffile; version="1"
|
||||||
|
|
||||||
|
prop: test-suite = bind9
|
||||||
|
|
||||||
|
tp: lib
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
CONTRIBUTING
|
|
||||||
|
|
||||||
BIND Source Access and Contributor Guidelines
|
BIND Source Access and Contributor Guidelines
|
||||||
|
|
||||||
Feb 22, 2018
|
Feb 22, 2018
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Copyright (C) 1996-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright (C) 1996-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
|
||||||
This Source Code Form is subject to the terms of the Mozilla Public
|
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
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
HISTORY
|
|
||||||
|
|
||||||
Functional enhancements from prior major releases of BIND 9
|
Functional enhancements from prior major releases of BIND 9
|
||||||
|
|
||||||
BIND 9.11
|
BIND 9.11
|
||||||
@@ -69,7 +67,7 @@ releases. New features include:
|
|||||||
* "rndc modzone" reconfigures a single zone, without requiring the
|
* "rndc modzone" reconfigures a single zone, without requiring the
|
||||||
entire server to be reconfigured.
|
entire server to be reconfigured.
|
||||||
* "rndc showzone" displays the current configuration of a zone.
|
* "rndc showzone" displays the current configuration of a zone.
|
||||||
* "rndc managed-keys" can be used to check the status of RFC 5011
|
* "rndc managed-keys" can be used to check the status of RFC 5001
|
||||||
managed trust anchors, or to force trust anchors to be refreshed.
|
managed trust anchors, or to force trust anchors to be refreshed.
|
||||||
* "max-cache-size" can now be set to a percentage of available memory.
|
* "max-cache-size" can now be set to a percentage of available memory.
|
||||||
The default is 90%.
|
The default is 90%.
|
||||||
@@ -433,11 +431,11 @@ BIND 9.4.0
|
|||||||
* Detect duplicates of UDP queries we are recursing on and drop them.
|
* Detect duplicates of UDP queries we are recursing on and drop them.
|
||||||
New stats category "duplicates".
|
New stats category "duplicates".
|
||||||
* "USE INTERNAL MALLOC" is now runtime selectable.
|
* "USE INTERNAL MALLOC" is now runtime selectable.
|
||||||
* The lame cache is now done on a <qname,qclass,qtype> basis as some
|
* The lame cache is now done on a basis as some servers only appear to
|
||||||
servers only appear to be lame for certain query types.
|
be lame for certain query types.
|
||||||
* Limit the number of recursive clients that can be waiting for a single
|
* Limit the number of recursive clients that can be waiting for a single
|
||||||
query (<qname,qtype,qclass>) to resolve. New options clients-per-query
|
query () to resolve. New options clients-per-query and
|
||||||
and max-clients-per-query.
|
max-clients-per-query.
|
||||||
* dig: report the number of extra bytes still left in the packet after
|
* dig: report the number of extra bytes still left in the packet after
|
||||||
processing all the records.
|
processing all the records.
|
||||||
* Support for IPSECKEY rdata type.
|
* Support for IPSECKEY rdata type.
|
||||||
|
|||||||
+1
-1
@@ -75,7 +75,7 @@ releases. New features include:
|
|||||||
- "rndc modzone" reconfigures a single zone, without requiring the entire
|
- "rndc modzone" reconfigures a single zone, without requiring the entire
|
||||||
server to be reconfigured.
|
server to be reconfigured.
|
||||||
- "rndc showzone" displays the current configuration of a zone.
|
- "rndc showzone" displays the current configuration of a zone.
|
||||||
- "rndc managed-keys" can be used to check the status of RFC 5011 managed
|
- "rndc managed-keys" can be used to check the status of RFC 5001 managed
|
||||||
trust anchors, or to force trust anchors to be refreshed.
|
trust anchors, or to force trust anchors to be refreshed.
|
||||||
- "max-cache-size" can now be set to a percentage of available memory. The
|
- "max-cache-size" can now be set to a percentage of available memory. The
|
||||||
default is 90%.
|
default is 90%.
|
||||||
|
|||||||
+6
-7
@@ -14,7 +14,7 @@ top_builddir = @top_builddir@
|
|||||||
|
|
||||||
VERSION=@BIND9_VERSION@
|
VERSION=@BIND9_VERSION@
|
||||||
|
|
||||||
SUBDIRS = make lib fuzz bin doc
|
SUBDIRS = make unit lib bin doc
|
||||||
TARGETS =
|
TARGETS =
|
||||||
PREREQS = bind.keys.h
|
PREREQS = bind.keys.h
|
||||||
|
|
||||||
@@ -90,34 +90,33 @@ 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; \
|
||||||
exit $$status
|
exit $$status
|
||||||
|
|
||||||
README: README.md
|
README: README.md
|
||||||
${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \
|
${PANDOC} --email-obfuscation=none -s -t html README.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;}' > $@
|
||||||
|
|
||||||
HISTORY: HISTORY.md
|
HISTORY: HISTORY.md
|
||||||
${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \
|
${PANDOC} --email-obfuscation=none -s -t html HISTORY.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;}' > $@
|
||||||
|
|
||||||
OPTIONS: OPTIONS.md
|
OPTIONS: OPTIONS.md
|
||||||
${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \
|
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.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;}' > $@
|
||||||
|
|
||||||
CONTRIBUTING: CONTRIBUTING.md
|
CONTRIBUTING: CONTRIBUTING.md
|
||||||
${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
|
${PANDOC} --email-obfuscation=none -s -t html 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
|
PLATFORMS: PLATFORMS.md
|
||||||
${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html PLATFORMS.md | \
|
${PANDOC} --email-obfuscation=none -s -t html PLATFORMS.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;}' > $@
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
OPTIONS
|
|
||||||
|
|
||||||
Setting the STD_CDEFINES environment variable before running configure can
|
Setting the STD_CDEFINES environment variable before running configure can
|
||||||
be used to enable certain compile-time options that are not explicitly
|
be used to enable certain compile-time options that are not explicitly
|
||||||
defined in configure.
|
defined in configure.
|
||||||
|
|
||||||
Some of these settings are:
|
Some of these settings are:
|
||||||
|
|
||||||
Setting Description
|
Setting Description
|
||||||
Overwrite memory with tag values when allocating
|
Overwrite memory with tag values when allocating
|
||||||
-DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but
|
-DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but
|
||||||
makes debugging of memory problems easier.
|
makes debugging of memory problems easier.
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
PLATFORMS
|
|
||||||
|
|
||||||
Supported platforms
|
Supported platforms
|
||||||
|
|
||||||
In general, this version of BIND will build and run on any POSIX-compliant
|
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
|
system with a C99-compliant C compiler, BSD-style sockets, and the OpenSSL
|
||||||
RFC-compliant IPv6 support, POSIX-compliant threads, and the OpenSSL
|
cryptography library. To build with multiprocessing support, a
|
||||||
cryptography library. Atomic operations support from the compiler is
|
C11-compliant C compiler will be needed for standard atomics.
|
||||||
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
|
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
|
lacks the resources to test all of them. Consequently, ISC is only able to
|
||||||
@@ -15,60 +11,46 @@ offer support on a "best effort" basis for some.
|
|||||||
|
|
||||||
Regularly tested platforms
|
Regularly tested platforms
|
||||||
|
|
||||||
As of Mar 2020, BIND 9.14 is fully supported and regularly tested on the
|
As of May 2018, BIND 9.13 is tested on the following systems:
|
||||||
following systems:
|
|
||||||
|
|
||||||
* Debian 8, 9, 10
|
* Debian 8, 9
|
||||||
* Ubuntu LTS 16.04, 18.04
|
* Ubuntu 16.04, 18.04
|
||||||
* Fedora 31
|
* Fedora 27, 28
|
||||||
* Red Hat Enterprise Linux / CentOS 6, 7, 8
|
* Red Hat/CentOS 6, 7
|
||||||
* FreeBSD 11.3, 12.1
|
* FreeBSD 10.x, 11.x
|
||||||
* OpenBSD 6.6
|
* OpenBSD 6.3
|
||||||
* Alpine Linux
|
|
||||||
|
|
||||||
The amd64, i386, armhf and arm64 CPU architectures are all fully
|
The amd64, i386, armhf and arm64 CPU architectures are all fully
|
||||||
supported.
|
supported.
|
||||||
|
|
||||||
Best effort
|
Best effort
|
||||||
|
|
||||||
The following are platforms on which BIND is known to build and run. ISC
|
The following are platforms on which BIND is known to build and run, but
|
||||||
makes every effort to fix bugs on these platforms, but may be unable to do
|
on which it is not routinely tested. ISC makes every effort to fix bugs on
|
||||||
so quickly due to lack of hardware, less familiarity on the part of
|
these platforms, but may be unable to do so quickly due to lack of
|
||||||
engineering staff, and other constraints. With the exception of Windows
|
hardware, less familiarity on the part of engineering staff, and other
|
||||||
Server 2012 R2, none of these are tested regularly by ISC.
|
constraints.
|
||||||
|
|
||||||
* Windows Server 2012 R2, 2016 / x64
|
|
||||||
* Windows 10 / x64
|
* Windows 10 / x64
|
||||||
|
* Windows Server 2012 R2, 2016 / x64
|
||||||
* macOS 10.12+
|
* macOS 10.12+
|
||||||
* Solaris 11
|
* Solaris 10
|
||||||
|
* FreeBSD 12+
|
||||||
|
* OpenBSD 6.2
|
||||||
* NetBSD
|
* NetBSD
|
||||||
* Other Linux distributions still supported by their vendors, such as:
|
* Older or less popular Linux distributions still supported by their
|
||||||
|
vendors, such as:
|
||||||
+ Ubuntu 14.04, 18.10+
|
+ Ubuntu 14.04, 18.10+
|
||||||
+ Gentoo
|
+ Gentoo
|
||||||
+ Arch Linux
|
+ ArchLinux
|
||||||
+ Alpine Linux
|
+ Alpine Linux
|
||||||
* OpenWRT/LEDE 17.01+
|
* OpenWRT/LEDE 17.0
|
||||||
* Other CPU architectures (mips, mipsel, sparc, ...)
|
* Other CPU architectures (mips, mipsel, sparc, ...)
|
||||||
|
|
||||||
Unsupported platforms
|
Unsupported platforms
|
||||||
|
|
||||||
These are platforms on which BIND 9.14 is known not to build or run:
|
These are platforms on which BIND is known not to build or run:
|
||||||
|
|
||||||
* Platforms without at least OpenSSL 1.0.2
|
* Platforms without at least OpenSSL 1.0.2
|
||||||
* Windows 10 / x86
|
* Windows 10 / x86
|
||||||
* Windows Server 2012 and older
|
* Windows Server 2012
|
||||||
* Solaris 10 and older
|
|
||||||
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
|
|
||||||
* Platforms that don't support atomic operations (via compiler or
|
|
||||||
library)
|
|
||||||
* Linux without NPTL (Native POSIX Thread Library)
|
|
||||||
|
|
||||||
Platform quirks
|
|
||||||
|
|
||||||
NetBSD 6 i386
|
|
||||||
|
|
||||||
The i386 build of NetBSD requires the libatomic library, available from
|
|
||||||
the gcc5-libs package. Because this library is in a non-standard path, its
|
|
||||||
location must be specified in the configure command line:
|
|
||||||
|
|
||||||
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
|
|
||||||
|
|||||||
+24
-42
@@ -11,11 +11,9 @@
|
|||||||
## Supported platforms
|
## Supported platforms
|
||||||
|
|
||||||
In general, this version of BIND will build and run on any POSIX-compliant
|
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
|
system with a C99-compliant C compiler, BSD-style sockets, and the OpenSSL
|
||||||
IPv6 support, POSIX-compliant threads, and the OpenSSL cryptography library.
|
cryptography library. To build with multiprocessing support, a
|
||||||
Atomic operations support from the compiler is needed, either in the form of
|
C11-compliant C compiler will be needed for standard atomics.
|
||||||
builtin operations, C11 atomics or the Interlocked family of functions on
|
|
||||||
Windows.
|
|
||||||
|
|
||||||
ISC regularly tests BIND on many operating systems and architectures, but
|
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
|
lacks the resources to test all of them. Consequently, ISC is only able to
|
||||||
@@ -23,60 +21,44 @@ offer support on a "best effort" basis for some.
|
|||||||
|
|
||||||
### Regularly tested platforms
|
### Regularly tested platforms
|
||||||
|
|
||||||
As of Mar 2020, BIND 9.14 is fully supported and regularly tested on the
|
As of May 2018, BIND 9.13 is tested on the following systems:
|
||||||
following systems:
|
|
||||||
|
|
||||||
* Debian 8, 9, 10
|
* Debian 8, 9
|
||||||
* Ubuntu LTS 16.04, 18.04
|
* Ubuntu 16.04, 18.04
|
||||||
* Fedora 31
|
* Fedora 27, 28
|
||||||
* Red Hat Enterprise Linux / CentOS 6, 7, 8
|
* Red Hat/CentOS 6, 7
|
||||||
* FreeBSD 11.3, 12.1
|
* FreeBSD 10.x, 11.x
|
||||||
* OpenBSD 6.6
|
* OpenBSD 6.3
|
||||||
* Alpine Linux
|
|
||||||
|
|
||||||
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
|
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
|
||||||
|
|
||||||
### Best effort
|
### Best effort
|
||||||
|
|
||||||
The following are platforms on which BIND is known to build and run.
|
The following are platforms on which BIND is known to build and run,
|
||||||
ISC makes every effort to fix bugs on these platforms, but may be unable to
|
but on which it is not routinely tested. ISC makes every effort to fix bugs
|
||||||
do so quickly due to lack of hardware, less familiarity on the part of
|
on these platforms, but may be unable to do so quickly due to lack of
|
||||||
engineering staff, and other constraints. With the exception of Windows
|
hardware, less familiarity on the part of engineering staff, and other
|
||||||
Server 2012 R2, none of these are tested regularly by ISC.
|
constraints.
|
||||||
|
|
||||||
* Windows Server 2012 R2, 2016 / x64
|
|
||||||
* Windows 10 / x64
|
* Windows 10 / x64
|
||||||
|
* Windows Server 2012 R2, 2016 / x64
|
||||||
* macOS 10.12+
|
* macOS 10.12+
|
||||||
* Solaris 11
|
* Solaris 10
|
||||||
|
* FreeBSD 12+
|
||||||
|
* OpenBSD 6.2
|
||||||
* NetBSD
|
* NetBSD
|
||||||
* Other Linux distributions still supported by their vendors, such as:
|
* Older or less popular Linux distributions still supported by their vendors, such as:
|
||||||
* Ubuntu 14.04, 18.10+
|
* Ubuntu 14.04, 18.10+
|
||||||
* Gentoo
|
* Gentoo
|
||||||
* Arch Linux
|
* ArchLinux
|
||||||
* Alpine Linux
|
* Alpine Linux
|
||||||
* OpenWRT/LEDE 17.01+
|
* OpenWRT/LEDE 17.0
|
||||||
* Other CPU architectures (mips, mipsel, sparc, ...)
|
* Other CPU architectures (mips, mipsel, sparc, ...)
|
||||||
|
|
||||||
## Unsupported platforms
|
## Unsupported platforms
|
||||||
|
|
||||||
These are platforms on which BIND 9.14 is known *not* to build or run:
|
These are platforms on which BIND is known *not* to build or run:
|
||||||
|
|
||||||
* Platforms without at least OpenSSL 1.0.2
|
* Platforms without at least OpenSSL 1.0.2
|
||||||
* Windows 10 / x86
|
* Windows 10 / x86
|
||||||
* Windows Server 2012 and older
|
* Windows Server 2012
|
||||||
* Solaris 10 and older
|
|
||||||
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
|
|
||||||
* Platforms that don't support atomic operations (via compiler or library)
|
|
||||||
* Linux without NPTL (Native POSIX Thread Library)
|
|
||||||
|
|
||||||
## Platform quirks
|
|
||||||
|
|
||||||
### NetBSD 6 i386
|
|
||||||
|
|
||||||
The i386 build of NetBSD requires the `libatomic` library, available from
|
|
||||||
the `gcc5-libs` package. Because this library is in a non-standard path,
|
|
||||||
its location must be specified in the `configure` command line:
|
|
||||||
|
|
||||||
```
|
|
||||||
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
README
|
|
||||||
|
|
||||||
BIND 9
|
BIND 9
|
||||||
|
|
||||||
Contents
|
Contents
|
||||||
@@ -7,15 +5,14 @@ Contents
|
|||||||
1. Introduction
|
1. Introduction
|
||||||
2. Reporting bugs and getting help
|
2. Reporting bugs and getting help
|
||||||
3. Contributing to BIND
|
3. Contributing to BIND
|
||||||
4. BIND 9.14 features
|
4. BIND 9.13 features
|
||||||
5. Building BIND
|
5. Building BIND
|
||||||
6. macOS
|
6. macOS
|
||||||
7. Dependencies
|
7. Compile-time options
|
||||||
8. Compile-time options
|
8. Automated testing
|
||||||
9. Automated testing
|
9. Documentation
|
||||||
10. Documentation
|
10. Change log
|
||||||
11. Change log
|
11. Acknowledgments
|
||||||
12. Acknowledgments
|
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
|
|
||||||
@@ -39,7 +36,7 @@ in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a
|
|||||||
501(c)(3) public benefit corporation dedicated to providing software and
|
501(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 licensed under the terms of the Mozilla Public License,
|
source software licenced under the terms of the Mozilla Public License,
|
||||||
version 2.0.
|
version 2.0.
|
||||||
|
|
||||||
For a summary of features introduced in past major releases of BIND, see
|
For a summary of features introduced in past major releases of BIND, see
|
||||||
@@ -48,8 +45,8 @@ the file HISTORY.
|
|||||||
For a detailed list of changes made throughout the history of BIND 9, see
|
For a detailed list of changes made throughout the history of BIND 9, see
|
||||||
the file CHANGES. See below for details on the CHANGES file format.
|
the file CHANGES. See below for details on the CHANGES file format.
|
||||||
|
|
||||||
For up-to-date versions and release notes, see https://www.isc.org/
|
For up-to-date release notes and errata, see http://www.isc.org/software/
|
||||||
download/.
|
bind9/releasenotes
|
||||||
|
|
||||||
For information about supported platforms, see PLATFORMS.
|
For information about supported platforms, see PLATFORMS.
|
||||||
|
|
||||||
@@ -69,13 +66,7 @@ named-checkconf -px.
|
|||||||
|
|
||||||
If the bug you are reporting is a potential security issue, such as an
|
If the bug you are reporting is a potential security issue, such as an
|
||||||
assertion failure or other crash in named, please do NOT use GitLab to
|
assertion failure or other crash in named, please do NOT use GitLab to
|
||||||
report it. Instead, send mail to security-officer@isc.org using our
|
report it. Instead, please send mail to security-officer@isc.org.
|
||||||
OpenPGP key to secure your message. (Information about OpenPGP and links
|
|
||||||
to our key can be found at https://www.isc.org/pgpkey.) Please do not
|
|
||||||
discuss the bug on any public mailing list.
|
|
||||||
|
|
||||||
For a general overview of ISC security policies, read the Knowledge Base
|
|
||||||
article at https://kb.isc.org/docs/aa-00861.
|
|
||||||
|
|
||||||
Professional support and training for BIND are available from ISC at
|
Professional support and training for BIND are available from ISC at
|
||||||
https://www.isc.org/support.
|
https://www.isc.org/support.
|
||||||
@@ -96,7 +87,7 @@ Information for BIND contributors can be found in the following files: -
|
|||||||
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
|
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
|
||||||
- BIND architecture and developer guide: doc/dev/dev.md
|
- BIND architecture and developer guide: doc/dev/dev.md
|
||||||
|
|
||||||
Patches for BIND may be submitted as merge requests in the ISC GitLab
|
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
|
||||||
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
|
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
|
||||||
|
|
||||||
By default, external contributors don't have ability to fork BIND in the
|
By default, external contributors don't have ability to fork BIND in the
|
||||||
@@ -108,19 +99,13 @@ If you prefer, you may also submit code by opening a GitLab Issue and
|
|||||||
including your patch as an attachment, preferably generated by git
|
including your patch as an attachment, preferably generated by git
|
||||||
format-patch.
|
format-patch.
|
||||||
|
|
||||||
BIND 9.14 features
|
BIND 9.13 features
|
||||||
|
|
||||||
BIND 9.14.0 is the first release from a new stable branch of BIND 9,
|
BIND 9.13 is the newest development branch of BIND 9. It includes a number
|
||||||
incorporating all changes from the 9.13 development branch, updating the
|
of changes from BIND 9.12 and earlier releases. New features include:
|
||||||
most recent stable branch, 9.12. These changes include:
|
|
||||||
|
|
||||||
* A new "plugin" mechanism has been added to allow query functionality
|
* The default value of "dnssec-validation" is now "auto".
|
||||||
to be extended using dynamically loadable libraries. The "filter-aaaa"
|
* Support for IDNA2008 when linking with libidn2.
|
||||||
feature has been removed from named and is now implemented as a
|
|
||||||
plugin.
|
|
||||||
* QNAME minimization, as described in RFC 7816, is now supported.
|
|
||||||
* Socket and task code has been refactored to improve performance on
|
|
||||||
most modern machines.
|
|
||||||
* "Root key sentinel" support, enabling validating resolvers to indicate
|
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||||
via a special query which trust anchors are configured for the root
|
via a special query which trust anchors are configured for the root
|
||||||
zone.
|
zone.
|
||||||
@@ -129,90 +114,20 @@ most recent stable branch, 9.12. These changes include:
|
|||||||
subject to DNSSEC validation and are not treated as authoritative data
|
subject to DNSSEC validation and are not treated as authoritative data
|
||||||
when answering. This makes it easier to configure a local copy of the
|
when answering. This makes it easier to configure a local copy of the
|
||||||
root zone as described in RFC 7706.
|
root zone as described in RFC 7706.
|
||||||
* The "validate-except" option allows configuration of domains below
|
|
||||||
which DNSSEC validation should not be performed.
|
|
||||||
* The default value of "dnssec-validation" is now "auto".
|
|
||||||
* IDNA2008 is now supported when linking with libidn2.
|
|
||||||
* "named -V" now outputs the default paths for files used by named and
|
|
||||||
other tools.
|
|
||||||
|
|
||||||
In addition, workarounds that were formerly in place to enable resolution
|
In addition, cryptographic support has been modernized. BIND now uses the
|
||||||
of domains whose authoritative servers did not respond to EDNS queries
|
best available pseudo-random number generator for the platform on which
|
||||||
have been removed. See https://dnsflagday.net for more details.
|
it's built. Very old versions of OpenSSL are no longer supported.
|
||||||
|
Cryptography is now mandatory; building BIND without DNSSEC is now longer
|
||||||
Cryptographic support has been modernized. BIND now uses the best
|
supported.
|
||||||
available pseudo-random number generator for the platform on which it's
|
|
||||||
built. Very old versions of OpenSSL are no longer supported. Cryptography
|
|
||||||
is now mandatory: building BIND without DNSSEC is no longer supported.
|
|
||||||
|
|
||||||
Special code to support certain legacy operating systems has also been
|
|
||||||
removed; see the file PLATFORMS.md for details of supported platforms. In
|
|
||||||
addition to OpenSSL, BIND now requires support for IPv6, threads, and
|
|
||||||
standard atomic operations provided by the C compiler. Non-threaded builds
|
|
||||||
are no longer supported.
|
|
||||||
|
|
||||||
BIND 9.14.1
|
|
||||||
|
|
||||||
BIND 9.14.1 is a maintenance release, and addresses security
|
|
||||||
vulnerabilities disclosed in CVE-2018-5743 and CVE-2019-6467.
|
|
||||||
|
|
||||||
BIND 9.14.2
|
|
||||||
|
|
||||||
BIND 9.14.2 is a maintenance release.
|
|
||||||
|
|
||||||
BIND 9.14.3
|
|
||||||
|
|
||||||
BIND 9.14.3 is a maintenance release, and addresses the security
|
|
||||||
vulnerability disclosed in CVE-2019-6471.
|
|
||||||
|
|
||||||
BIND 9.14.4
|
|
||||||
|
|
||||||
BIND 9.14.4 is a maintenance release, and also adds support for the new
|
|
||||||
MaxMind GeoIP2 geolocation API when built with configure --with-geoip2.
|
|
||||||
|
|
||||||
BIND 9.14.5
|
|
||||||
|
|
||||||
BIND 9.14.5 is a maintenance release.
|
|
||||||
|
|
||||||
BIND 9.14.6
|
|
||||||
|
|
||||||
BIND 9.14.6 is a maintenance release.
|
|
||||||
|
|
||||||
BIND 9.14.7
|
|
||||||
|
|
||||||
BIND 9.14.7 is a maintenance release, and also addresses the security
|
|
||||||
vulnerabilities disclosed in CVE-2019-6475 and CVE-2019-6476.
|
|
||||||
|
|
||||||
BIND 9.14.8
|
|
||||||
|
|
||||||
BIND 9.14.8 is a maintenance release, and also addresses the security
|
|
||||||
vulnerability disclosed in CVE-2019-6477.
|
|
||||||
|
|
||||||
BIND 9.14.9
|
|
||||||
|
|
||||||
BIND 9.14.9 is a maintenance release.
|
|
||||||
|
|
||||||
BIND 9.14.10
|
|
||||||
|
|
||||||
BIND 9.14.10 is a maintenance release.
|
|
||||||
|
|
||||||
BIND 9.14.11
|
|
||||||
|
|
||||||
BIND 9.14.11 is a maintenance release.
|
|
||||||
|
|
||||||
BIND 9.14.12
|
|
||||||
|
|
||||||
BIND 9.14.12 is a maintenance release, and also addresses the security
|
|
||||||
vulnerabilities disclosed in CVE-2020-8616 and CVE-2020-8617.
|
|
||||||
|
|
||||||
Building BIND
|
Building BIND
|
||||||
|
|
||||||
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
|
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
|
||||||
basic POSIX support, and a 64-bit integer type. Successful builds have
|
basic POSIX support, and a 64-bit integer type. Successful builds have
|
||||||
been observed on many versions of Linux and UNIX, including RHEL/CentOS,
|
been observed on many versions of Linux and UNIX, including RedHat,
|
||||||
Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD,
|
Fedora, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS
|
||||||
NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and
|
X, Solaris, HP-UX, AIX, SCO OpenServer, and OpenWRT.
|
||||||
OpenWRT.
|
|
||||||
|
|
||||||
BIND requires a cryptography provider library such as OpenSSL or a
|
BIND requires a cryptography provider library such as OpenSSL or a
|
||||||
hardware service module supporting PKCS#11. On Linux, BIND requires the
|
hardware service module supporting PKCS#11. On Linux, BIND requires the
|
||||||
@@ -221,8 +136,8 @@ overridden by disabling capability support at compile time. See
|
|||||||
Compile-time options below for details on other libraries that may be
|
Compile-time options below for details on other libraries that may be
|
||||||
required to support optional features.
|
required to support optional features.
|
||||||
|
|
||||||
BIND is also available for Windows Server 2008 and higher. See win32utils/
|
BIND is also available for Windows 2008 and higher. See win32utils/
|
||||||
build.txt for details on building for Windows systems.
|
readme1st.txt for details on building for Windows systems.
|
||||||
|
|
||||||
To build on a UNIX or Linux system, use:
|
To build on a UNIX or Linux system, use:
|
||||||
|
|
||||||
@@ -233,9 +148,9 @@ If you're planning on making changes to the BIND 9 source, you should run
|
|||||||
make depend. If you're using Emacs, you might find make tags helpful.
|
make depend. If you're using Emacs, you might find make tags helpful.
|
||||||
|
|
||||||
Several environment variables that can be set before running configure
|
Several environment variables that can be set before running configure
|
||||||
will affect compilation. Significant ones are:
|
will affect compilation:
|
||||||
|
|
||||||
Variable Description
|
Variable Description
|
||||||
CC The C compiler to use. configure tries to figure out the
|
CC The C compiler to use. configure tries to figure out the
|
||||||
right one for supported systems.
|
right one for supported systems.
|
||||||
C compiler flags. Defaults to include -g and/or -O2 as
|
C compiler flags. Defaults to include -g and/or -O2 as
|
||||||
@@ -250,39 +165,43 @@ STD_CDEFINES Defaults to empty string. For a list of possible settings,
|
|||||||
LDFLAGS Linker flags. Defaults to empty string.
|
LDFLAGS Linker flags. Defaults to empty string.
|
||||||
BUILD_CC Needed when cross-compiling: the native C compiler to use
|
BUILD_CC Needed when cross-compiling: the native C compiler to use
|
||||||
when building for the target system.
|
when building for the target system.
|
||||||
BUILD_CFLAGS CFLAGS for the target system during cross-compiling.
|
BUILD_CFLAGS Optional, used for cross-compiling
|
||||||
BUILD_CPPFLAGS CPPFLAGS for the target system during cross-compiling.
|
BUILD_CPPFLAGS
|
||||||
BUILD_LDFLAGS LDFLAGS for the target system during cross-compiling.
|
BUILD_LDFLAGS
|
||||||
BUILD_LIBS LIBS for the target system during cross-compiling.
|
BUILD_LIBS
|
||||||
|
|
||||||
Additional environment variables affecting the build are listed at the end
|
|
||||||
of the configure help text, which can be obtained by running the command:
|
|
||||||
|
|
||||||
$ ./configure --help
|
|
||||||
|
|
||||||
macOS
|
macOS
|
||||||
|
|
||||||
Building on macOS assumes that the "Command Tools for Xcode" is installed.
|
Building on macOS assumes that the "Command Tools for Xcode" is installed.
|
||||||
This can be downloaded from https://developer.apple.com/download/more/ or,
|
This can be downloaded from https://developer.apple.com/download/more/ or
|
||||||
if you have Xcode already installed, you can run xcode-select --install.
|
if you have Xcode already installed you can run "xcode-select --install".
|
||||||
(Note that an Apple ID may be required to access the download page.)
|
This will add /usr/include to the system and install the compiler and
|
||||||
|
other tools so that they can be easily found.
|
||||||
Dependencies
|
|
||||||
|
|
||||||
Portions of BIND that are written in Python, including dnssec-keymgr,
|
|
||||||
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
|
||||||
argparse, ply and distutils.core modules to be available. argparse is a
|
|
||||||
standard module as of Python 2.7 and Python 3.2. ply is available from
|
|
||||||
https://pypi.python.org/pypi/ply. distutils.core is required for
|
|
||||||
installation.
|
|
||||||
|
|
||||||
Compile-time options
|
Compile-time options
|
||||||
|
|
||||||
To see a full list of configuration options, run configure --help.
|
To see a full list of configuration options, run configure --help.
|
||||||
|
|
||||||
|
On most platforms, BIND 9 is built with multithreading support, allowing
|
||||||
|
it to take advantage of multiple CPUs. You can configure this by
|
||||||
|
specifying --enable-threads or --disable-threads on the configure command
|
||||||
|
line. The default is to enable threads, except on some older operating
|
||||||
|
systems on which threads are known to have had problems in the past.
|
||||||
|
(Note: Prior to BIND 9.10, the default was to disable threads on Linux
|
||||||
|
systems; this has now been reversed. On Linux systems, the threaded build
|
||||||
|
is known to change BIND's behavior with respect to file permissions; it
|
||||||
|
may be necessary to specify a user with the -u option when running named.)
|
||||||
|
|
||||||
To build shared libraries, specify --with-libtool on the configure command
|
To build shared libraries, specify --with-libtool on the configure command
|
||||||
line.
|
line.
|
||||||
|
|
||||||
|
Certain compiled-in constants and default settings can be increased to
|
||||||
|
values better suited to large servers with abundant memory resources (e.g,
|
||||||
|
64-bit servers with 12G or more of memory) by specifying --with-tuning=
|
||||||
|
large on the configure command line. This can improve performance on big
|
||||||
|
servers, but will consume more memory and may degrade performance on
|
||||||
|
smaller systems.
|
||||||
|
|
||||||
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,
|
||||||
@@ -292,12 +211,9 @@ 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 libraries: libxml2 http://xmlsoft.org or json-c
|
least one of the following: libxml2 http://xmlsoft.org or json-c https://
|
||||||
https://github.com/json-c/json-c. If these are installed at a nonstandard
|
github.com/json-c. If these are installed at a nonstandard location,
|
||||||
location, then:
|
specify the prefix using --with-libxml2=/prefix or --with-libjson=/prefix.
|
||||||
|
|
||||||
* for libxml2, specify the prefix using --with-libxml2=/prefix,
|
|
||||||
* for json-c, adjust PKG_CONFIG_PATH.
|
|
||||||
|
|
||||||
To support compression on the HTTP statistics channel, the server must be
|
To support compression on the HTTP statistics channel, the server must be
|
||||||
linked against libzlib. If this is installed in a nonstandard location,
|
linked against libzlib. If this is installed in a nonstandard location,
|
||||||
@@ -317,17 +233,16 @@ 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.
|
||||||
|
|
||||||
Certain compiled-in constants and default settings can be increased to
|
|
||||||
values better suited to large servers with abundant memory resources (e.g,
|
|
||||||
64-bit servers with 12G or more of memory) by specifying --with-tuning=
|
|
||||||
large on the configure command line. This can improve performance on big
|
|
||||||
servers, but will consume more memory and may degrade performance on
|
|
||||||
smaller systems.
|
|
||||||
|
|
||||||
On Linux, process capabilities are managed in user space using the libcap
|
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
|
library, which can be installed on most Linux systems via the libcap-dev
|
||||||
or libcap-devel package. Process capability support can also be disabled
|
or libcap-devel module. Process capability support can also be disabled by
|
||||||
by configuring with --disable-linux-caps.
|
configuring with --disable-linux-caps.
|
||||||
|
|
||||||
|
Portions of BIND that are written in Python, including dnssec-keymgr,
|
||||||
|
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
||||||
|
'argparse' and 'ply' modules to be available. 'argparse' is a standard
|
||||||
|
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
|
||||||
|
pypi.python.org/pypi/ply.
|
||||||
|
|
||||||
On some platforms it is necessary to explicitly request large file support
|
On some platforms it is necessary to explicitly request large file support
|
||||||
to handle files bigger than 2GB. This can be done by using
|
to handle files bigger than 2GB. This can be done by using
|
||||||
@@ -338,9 +253,9 @@ 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.
|
||||||
|
|
||||||
The --enable-querytrace option causes named to log every step of
|
If your operating system has integrated support for IPv6, it will be used
|
||||||
processing every query. This should only be enabled when debugging,
|
automatically. If you have installed KAME IPv6 separately, use --with-kame
|
||||||
because it has a significant negative impact on query performance.
|
[=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
|
||||||
@@ -364,18 +279,16 @@ ifconfig.sh up as root.
|
|||||||
|
|
||||||
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
|
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
|
||||||
and will be skipped if these are not available. Some tests require Python
|
and will be skipped if these are not available. Some tests require Python
|
||||||
and the dnspython module and will be skipped if these are not available.
|
and the 'dnspython' module and will be skipped if these are not available.
|
||||||
See bin/tests/system/README for further details.
|
See bin/tests/system/README for further details.
|
||||||
|
|
||||||
Unit tests are implemented using the CMocka unit testing framework. To
|
Unit tests are implemented using Automated Testing Framework (ATF). To run
|
||||||
build them, use configure --with-cmocka. Execution of tests is done by the
|
them, use configure --with-atf, then run make test or make unit.
|
||||||
Kyua test execution engine; if the kyua command is available, then unit
|
|
||||||
tests can be run via make test or make unit.
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
|
|
||||||
The BIND 9 Administrator Reference Manual is included with the source
|
The BIND 9 Administrator Reference Manual is included with the source
|
||||||
distribution, in DocBook XML, HTML, and PDF format, in the doc/arm
|
distribution, in DocBook XML, HTML and PDF format, in the doc/arm
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
Some of the programs in the BIND 9 distribution have man pages in their
|
Some of the programs in the BIND 9 distribution have man pages in their
|
||||||
@@ -395,7 +308,7 @@ development BIND 9 is included in the file CHANGES, with the most recent
|
|||||||
changes listed first. Change notes include tags indicating the category of
|
changes listed first. Change notes include tags indicating the category of
|
||||||
the change that was made; these categories are:
|
the change that was made; these categories are:
|
||||||
|
|
||||||
Category Description
|
Category Description
|
||||||
[func] New feature
|
[func] New feature
|
||||||
[bug] General bug fix
|
[bug] General bug fix
|
||||||
[security] Fix for a significant security flaw
|
[security] Fix for a significant security flaw
|
||||||
@@ -423,46 +336,26 @@ releases (i.e., those with version numbers ending in zero). Some new
|
|||||||
functionality may be backported to older releases on a case-by-case basis.
|
functionality may be backported to older releases on a case-by-case basis.
|
||||||
All other change types may be applied to all currently-supported releases.
|
All other change types may be applied to all currently-supported releases.
|
||||||
|
|
||||||
Bug report identifiers
|
|
||||||
|
|
||||||
Most notes in the CHANGES file include a reference to a bug report or
|
|
||||||
issue number. Prior to 2018, these were usually of the form [RT #NNN] and
|
|
||||||
referred to entries in the "bind9-bugs" RT database, which was not open to
|
|
||||||
the public. More recent entries use the form [GL #NNN] or, less often, [GL
|
|
||||||
!NNN], which, respectively, refer to issues or merge requests in the
|
|
||||||
GitLab database. Most of these are publicly readable, unless they include
|
|
||||||
information which is confidential or security sensitive.
|
|
||||||
|
|
||||||
To look up a GitLab issue by its number, use the URL https://
|
|
||||||
gitlab.isc.org/isc-projects/bind9/issues/NNN. To look up a merge request,
|
|
||||||
use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN.
|
|
||||||
|
|
||||||
In rare cases, an issue or merge request number may be followed with the
|
|
||||||
letter "P". This indicates that the information is in the private ISC
|
|
||||||
GitLab instance, which is not visible to the public.
|
|
||||||
|
|
||||||
Acknowledgments
|
Acknowledgments
|
||||||
|
|
||||||
* The original development of BIND 9 was underwritten by the following
|
* The original development of BIND 9 was underwritten by the following
|
||||||
organizations:
|
organizations:
|
||||||
|
|
||||||
Sun Microsystems, Inc.
|
Sun Microsystems, Inc.
|
||||||
Hewlett Packard
|
Hewlett Packard
|
||||||
Compaq Computer Corporation
|
Compaq Computer Corporation
|
||||||
IBM
|
IBM
|
||||||
Process Software Corporation
|
Process Software Corporation
|
||||||
Silicon Graphics, Inc.
|
Silicon Graphics, Inc.
|
||||||
Network Associates, Inc.
|
Network Associates, Inc.
|
||||||
U.S. Defense Information Systems Agency
|
U.S. Defense Information Systems Agency
|
||||||
USENIX Association
|
USENIX Association
|
||||||
Stichting NLnet - NLnet Foundation
|
Stichting NLnet - NLnet Foundation
|
||||||
Nominum, Inc.
|
Nominum, Inc.
|
||||||
|
|
||||||
* This product includes software developed by the OpenSSL Project for
|
* This product includes software developed by the OpenSSL Project for
|
||||||
use in the OpenSSL Toolkit. http://www.OpenSSL.org/
|
use in the OpenSSL Toolkit. http://www.OpenSSL.org/
|
||||||
|
|
||||||
* This product includes cryptographic software written by Eric Young
|
* This product includes cryptographic software written by Eric Young
|
||||||
(eay@cryptsoft.com)
|
(eay@cryptsoft.com)
|
||||||
|
|
||||||
* This product includes software written by Tim Hudson
|
* This product includes software written by Tim Hudson
|
||||||
(tjh@cryptsoft.com)
|
(tjh@cryptsoft.com)
|
||||||
|
|||||||
@@ -15,10 +15,9 @@
|
|||||||
1. [Introduction](#intro)
|
1. [Introduction](#intro)
|
||||||
1. [Reporting bugs and getting help](#help)
|
1. [Reporting bugs and getting help](#help)
|
||||||
1. [Contributing to BIND](#contrib)
|
1. [Contributing to BIND](#contrib)
|
||||||
1. [BIND 9.14 features](#features)
|
1. [BIND 9.13 features](#features)
|
||||||
1. [Building BIND](#build)
|
1. [Building BIND](#build)
|
||||||
1. [macOS](#macos)
|
1. [macOS](#macos)
|
||||||
1. [Dependencies](#dependencies)
|
|
||||||
1. [Compile-time options](#opts)
|
1. [Compile-time options](#opts)
|
||||||
1. [Automated testing](#testing)
|
1. [Automated testing](#testing)
|
||||||
1. [Documentation](#doc)
|
1. [Documentation](#doc)
|
||||||
@@ -48,7 +47,7 @@ used in versions 4 and 8. Internet Systems Consortium
|
|||||||
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
|
||||||
ongoing maintenance and improvement. BIND is open source software
|
ongoing maintenance and improvement. BIND is open source software
|
||||||
licensed under the terms of the Mozilla Public License, version 2.0.
|
licenced under the terms of the Mozilla Public License, version 2.0.
|
||||||
|
|
||||||
For a summary of features introduced in past major releases of BIND,
|
For a summary of features introduced in past major releases of BIND,
|
||||||
see the file [HISTORY](HISTORY.md).
|
see the file [HISTORY](HISTORY.md).
|
||||||
@@ -57,8 +56,8 @@ For a detailed list of changes made throughout the history of BIND 9, see
|
|||||||
the file [CHANGES](CHANGES). See [below](#changes) for details on the
|
the file [CHANGES](CHANGES). See [below](#changes) for details on the
|
||||||
CHANGES file format.
|
CHANGES file format.
|
||||||
|
|
||||||
For up-to-date versions and release notes, see
|
For up-to-date release notes and errata, see
|
||||||
[https://www.isc.org/download/](https://www.isc.org/download/).
|
[http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes)
|
||||||
|
|
||||||
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
|
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
|
||||||
|
|
||||||
@@ -79,15 +78,8 @@ using `named-checkconf -px`.
|
|||||||
|
|
||||||
If the bug you are reporting is a potential security issue, such as an
|
If the bug you are reporting is a potential security issue, such as an
|
||||||
assertion failure or other crash in `named`, please do *NOT* use GitLab to
|
assertion failure or other crash in `named`, please do *NOT* use GitLab to
|
||||||
report it. Instead, send mail to
|
report it. Instead, please send mail to
|
||||||
[security-officer@isc.org](mailto:security-officer@isc.org) using our
|
[security-officer@isc.org](mailto:security-officer@isc.org).
|
||||||
OpenPGP key to secure your message. (Information about OpenPGP and links
|
|
||||||
to our key can be found at
|
|
||||||
[https://www.isc.org/pgpkey](https://www.isc.org/pgpkey).) Please do not
|
|
||||||
discuss the bug on any public mailing list.
|
|
||||||
|
|
||||||
For a general overview of ISC security policies, read the Knowledge Base
|
|
||||||
article at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
|
|
||||||
|
|
||||||
Professional support and training for BIND are available from
|
Professional support and training for BIND are available from
|
||||||
ISC at [https://www.isc.org/support](https://www.isc.org/support).
|
ISC at [https://www.isc.org/support](https://www.isc.org/support).
|
||||||
@@ -110,7 +102,7 @@ Information for BIND contributors can be found in the following files:
|
|||||||
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
|
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
|
||||||
|
|
||||||
Patches for BIND may be submitted as
|
Patches for BIND may be submitted as
|
||||||
[merge requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
|
[Merge Requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
|
||||||
in the [ISC GitLab server](https://gitlab.isc.org) at
|
in the [ISC GitLab server](https://gitlab.isc.org) at
|
||||||
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
||||||
|
|
||||||
@@ -124,18 +116,14 @@ If you prefer, you may also submit code by opening a
|
|||||||
including your patch as an attachment, preferably generated by
|
including your patch as an attachment, preferably generated by
|
||||||
`git format-patch`.
|
`git format-patch`.
|
||||||
|
|
||||||
### <a name="features"/> BIND 9.14 features
|
### <a name="features"/> BIND 9.13 features
|
||||||
|
|
||||||
BIND 9.14.0 is the first release from a new stable branch of BIND 9,
|
BIND 9.13 is the newest development branch of BIND 9. It includes a
|
||||||
incorporating all changes from the 9.13 development branch, updating
|
number of changes from BIND 9.12 and earlier releases. New features
|
||||||
the most recent stable branch, 9.12. These changes include:
|
include:
|
||||||
|
|
||||||
* A new "plugin" mechanism has been added to allow query functionality
|
* The default value of "dnssec-validation" is now "auto".
|
||||||
to be extended using dynamically loadable libraries. The "filter-aaaa"
|
* Support for IDNA2008 when linking with `libidn2`.
|
||||||
feature has been removed from named and is now implemented as a plugin.
|
|
||||||
* QNAME minimization, as described in RFC 7816, is now supported.
|
|
||||||
* Socket and task code has been refactored to improve performance on most
|
|
||||||
modern machines.
|
|
||||||
* "Root key sentinel" support, enabling validating resolvers to indicate
|
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||||
via a special query which trust anchors are configured for the root zone.
|
via a special query which trust anchors are configured for the root zone.
|
||||||
* Secondary zones can now be configured as "mirror" zones; their contents
|
* Secondary zones can now be configured as "mirror" zones; their contents
|
||||||
@@ -143,92 +131,20 @@ the most recent stable branch, 9.12. These changes include:
|
|||||||
DNSSEC validation and are not treated as authoritative data when
|
DNSSEC validation and are not treated as authoritative data when
|
||||||
answering. This makes it easier to configure a local copy of the root
|
answering. This makes it easier to configure a local copy of the root
|
||||||
zone as described in RFC 7706.
|
zone as described in RFC 7706.
|
||||||
* The "validate-except" option allows configuration of domains below which
|
|
||||||
DNSSEC validation should not be performed.
|
|
||||||
* The default value of "dnssec-validation" is now "auto".
|
|
||||||
* IDNA2008 is now supported when linking with `libidn2`.
|
|
||||||
* "named -V" now outputs the default paths for files used by named
|
|
||||||
and other tools.
|
|
||||||
|
|
||||||
In addition, workarounds that were formerly in place to enable resolution
|
In addition, cryptographic support has been modernized. BIND now uses the
|
||||||
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
|
best available pseudo-random number generator for the platform on which
|
||||||
it's built. Very old versions of OpenSSL are no longer supported.
|
it's built. Very old versions of OpenSSL are no longer supported.
|
||||||
Cryptography is now mandatory: building BIND without DNSSEC is no
|
Cryptography is now mandatory; building BIND without DNSSEC is now
|
||||||
longer supported.
|
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. Non-threaded builds are no longer supported.
|
|
||||||
|
|
||||||
#### BIND 9.14.1
|
|
||||||
|
|
||||||
BIND 9.14.1 is a maintenance release, and addresses security
|
|
||||||
vulnerabilities disclosed in CVE-2018-5743 and CVE-2019-6467.
|
|
||||||
|
|
||||||
#### BIND 9.14.2
|
|
||||||
|
|
||||||
BIND 9.14.2 is a maintenance release.
|
|
||||||
|
|
||||||
#### BIND 9.14.3
|
|
||||||
|
|
||||||
BIND 9.14.3 is a maintenance release, and addresses the security
|
|
||||||
vulnerability disclosed in CVE-2019-6471.
|
|
||||||
|
|
||||||
#### BIND 9.14.4
|
|
||||||
|
|
||||||
BIND 9.14.4 is a maintenance release, and also adds support for
|
|
||||||
the new MaxMind GeoIP2 geolocation API when built with
|
|
||||||
`configure --with-geoip2`.
|
|
||||||
|
|
||||||
#### BIND 9.14.5
|
|
||||||
|
|
||||||
BIND 9.14.5 is a maintenance release.
|
|
||||||
|
|
||||||
#### BIND 9.14.6
|
|
||||||
|
|
||||||
BIND 9.14.6 is a maintenance release.
|
|
||||||
|
|
||||||
#### BIND 9.14.7
|
|
||||||
|
|
||||||
BIND 9.14.7 is a maintenance release, and also addresses the security
|
|
||||||
vulnerabilities disclosed in CVE-2019-6475 and CVE-2019-6476.
|
|
||||||
|
|
||||||
#### BIND 9.14.8
|
|
||||||
|
|
||||||
BIND 9.14.8 is a maintenance release, and also addresses the security
|
|
||||||
vulnerability disclosed in CVE-2019-6477.
|
|
||||||
|
|
||||||
#### BIND 9.14.9
|
|
||||||
|
|
||||||
BIND 9.14.9 is a maintenance release.
|
|
||||||
|
|
||||||
#### BIND 9.14.10
|
|
||||||
|
|
||||||
BIND 9.14.10 is a maintenance release.
|
|
||||||
|
|
||||||
#### BIND 9.14.11
|
|
||||||
|
|
||||||
BIND 9.14.11 is a maintenance release.
|
|
||||||
|
|
||||||
#### BIND 9.14.12
|
|
||||||
|
|
||||||
BIND 9.14.12 is a maintenance release, and also addresses the security
|
|
||||||
vulnerabilities disclosed in CVE-2020-8616 and CVE-2020-8617.
|
|
||||||
|
|
||||||
### <a name="build"/> Building BIND
|
### <a name="build"/> Building BIND
|
||||||
|
|
||||||
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
|
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
|
||||||
basic POSIX support, and a 64-bit integer type. Successful builds have been
|
basic POSIX support, and a 64-bit integer type. Successful builds have been
|
||||||
observed on many versions of Linux and UNIX, including RHEL/CentOS, Fedora,
|
observed on many versions of Linux and UNIX, including RedHat, Fedora,
|
||||||
Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD, NetBSD,
|
Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X,
|
||||||
OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
|
Solaris, HP-UX, AIX, SCO OpenServer, and OpenWRT.
|
||||||
|
|
||||||
BIND requires a cryptography provider library such as OpenSSL or a
|
BIND requires a cryptography provider library such as OpenSSL or a
|
||||||
hardware service module supporting PKCS#11. On Linux, BIND requires
|
hardware service module supporting PKCS#11. On Linux, BIND requires
|
||||||
@@ -237,8 +153,8 @@ can be overridden by disabling capability support at compile time.
|
|||||||
See [Compile-time options](#opts) below for details on other libraries
|
See [Compile-time options](#opts) below for details on other libraries
|
||||||
that may be required to support optional features.
|
that may be required to support optional features.
|
||||||
|
|
||||||
BIND is also available for Windows Server 2008 and higher. See
|
BIND is also available for Windows 2008 and higher. See
|
||||||
`win32utils/build.txt` for details on building for Windows
|
`win32utils/readme1st.txt` for details on building for Windows
|
||||||
systems.
|
systems.
|
||||||
|
|
||||||
To build on a UNIX or Linux system, use:
|
To build on a UNIX or Linux system, use:
|
||||||
@@ -250,7 +166,7 @@ If you're planning on making changes to the BIND 9 source, you should run
|
|||||||
`make depend`. If you're using Emacs, you might find `make tags` helpful.
|
`make depend`. If you're using Emacs, you might find `make tags` helpful.
|
||||||
|
|
||||||
Several environment variables that can be set before running `configure` will
|
Several environment variables that can be set before running `configure` will
|
||||||
affect compilation. Significant ones are:
|
affect compilation:
|
||||||
|
|
||||||
|Variable|Description |
|
|Variable|Description |
|
||||||
|--------------------|-----------------------------------------------|
|
|--------------------|-----------------------------------------------|
|
||||||
@@ -260,43 +176,44 @@ affect compilation. Significant ones are:
|
|||||||
|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).|
|
|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).|
|
||||||
|`LDFLAGS`|Linker flags. Defaults to empty string.|
|
|`LDFLAGS`|Linker flags. Defaults to empty string.|
|
||||||
|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|
|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|
||||||
|`BUILD_CFLAGS`|`CFLAGS` for the target system during cross-compiling.|
|
|`BUILD_CFLAGS`|Optional, used for cross-compiling|
|
||||||
|`BUILD_CPPFLAGS`|`CPPFLAGS` for the target system during cross-compiling.|
|
|`BUILD_CPPFLAGS`||
|
||||||
|`BUILD_LDFLAGS`|`LDFLAGS` for the target system during cross-compiling.|
|
|`BUILD_LDFLAGS`||
|
||||||
|`BUILD_LIBS`|`LIBS` for the target system during cross-compiling.|
|
|`BUILD_LIBS`||
|
||||||
|
|
||||||
Additional environment variables affecting the build are listed at the
|
|
||||||
end of the `configure` help text, which can be obtained by running the
|
|
||||||
command:
|
|
||||||
|
|
||||||
$ ./configure --help
|
|
||||||
|
|
||||||
#### <a name="macos"> macOS
|
#### <a name="macos"> macOS
|
||||||
|
|
||||||
Building on macOS assumes that the "Command Tools for Xcode" is installed.
|
Building on macOS assumes that the "Command Tools for Xcode" is installed.
|
||||||
This can be downloaded from
|
This can be downloaded from https://developer.apple.com/download/more/
|
||||||
[https://developer.apple.com/download/more/](https://developer.apple.com/download/more/)
|
or if you have Xcode already installed you can run "xcode-select --install".
|
||||||
or, if you have Xcode already installed, you can run `xcode-select
|
This will add /usr/include to the system and install the compiler and other
|
||||||
--install`. (Note that an Apple ID may be required to access the download
|
tools so that they can be easily found.
|
||||||
page.)
|
|
||||||
|
|
||||||
### <a name="dependencies"/> Dependencies
|
|
||||||
|
|
||||||
Portions of BIND that are written in Python, including
|
|
||||||
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
|
||||||
system tests, require the `argparse`, `ply` and `distutils.core` modules
|
|
||||||
to be available.
|
|
||||||
`argparse` is a standard module as of Python 2.7 and Python 3.2.
|
|
||||||
`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
|
|
||||||
`distutils.core` is required for installation.
|
|
||||||
|
|
||||||
#### <a name="opts"/> Compile-time options
|
#### <a name="opts"/> Compile-time options
|
||||||
|
|
||||||
To see a full list of configuration options, run `configure --help`.
|
To see a full list of configuration options, run `configure --help`.
|
||||||
|
|
||||||
|
On most platforms, BIND 9 is built with multithreading support, allowing it
|
||||||
|
to take advantage of multiple CPUs. You can configure this by specifying
|
||||||
|
`--enable-threads` or `--disable-threads` on the `configure` command line.
|
||||||
|
The default is to enable threads, except on some older operating systems on
|
||||||
|
which threads are known to have had problems in the past. (Note: Prior to
|
||||||
|
BIND 9.10, the default was to disable threads on Linux systems; this has
|
||||||
|
now been reversed. On Linux systems, the threaded build is known to change
|
||||||
|
BIND's behavior with respect to file permissions; it may be necessary to
|
||||||
|
specify a user with the -u option when running `named`.)
|
||||||
|
|
||||||
To build shared libraries, specify `--with-libtool` on the `configure`
|
To build shared libraries, specify `--with-libtool` on the `configure`
|
||||||
command line.
|
command line.
|
||||||
|
|
||||||
|
Certain compiled-in constants and default settings can be increased to
|
||||||
|
values better suited to large servers with abundant memory resources (e.g,
|
||||||
|
64-bit servers with 12G or more of memory) by specifying
|
||||||
|
`--with-tuning=large` on the `configure` command line. This can improve
|
||||||
|
performance on big servers, but will consume more memory and may degrade
|
||||||
|
performance on smaller systems.
|
||||||
|
|
||||||
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
|
||||||
@@ -306,16 +223,14 @@ path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, 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 libraries: `libxml2`
|
least one of the following: libxml2
|
||||||
[http://xmlsoft.org](http://xmlsoft.org) or `json-c`
|
[http://xmlsoft.org](http://xmlsoft.org) or json-c
|
||||||
[https://github.com/json-c/json-c](https://github.com/json-c/json-c).
|
[https://github.com/json-c](https://github.com/json-c). If these are
|
||||||
If these are installed at a nonstandard location, then:
|
installed at a nonstandard location, specify the prefix using
|
||||||
|
`--with-libxml2=/prefix` or `--with-libjson=/prefix`.
|
||||||
* for `libxml2`, specify the prefix using `--with-libxml2=/prefix`,
|
|
||||||
* for `json-c`, adjust `PKG_CONFIG_PATH`.
|
|
||||||
|
|
||||||
To support compression on the HTTP statistics channel, the server must be
|
To support compression on the HTTP statistics channel, the server must be
|
||||||
linked against `libzlib`. If this is installed in a nonstandard location,
|
linked against libzlib. If this is installed in a nonstandard location,
|
||||||
specify the prefix using `--with-zlib=/prefix`.
|
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
|
||||||
@@ -327,24 +242,23 @@ 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,
|
||||||
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`.
|
||||||
|
|
||||||
Certain compiled-in constants and default settings can be increased to
|
|
||||||
values better suited to large servers with abundant memory resources (e.g,
|
|
||||||
64-bit servers with 12G or more of memory) by specifying
|
|
||||||
`--with-tuning=large` on the `configure` command line. This can improve
|
|
||||||
performance on big servers, but will consume more memory and may degrade
|
|
||||||
performance on smaller systems.
|
|
||||||
|
|
||||||
On Linux, process capabilities are managed in user space using
|
On Linux, process capabilities are managed in user space using
|
||||||
the `libcap` library, which can be installed on most Linux systems via
|
the `libcap` library, which can be installed on most Linux systems via
|
||||||
the `libcap-dev` or `libcap-devel` package. Process capability support can
|
the `libcap-dev` or `libcap-devel` module. Process capability support can
|
||||||
also be disabled by configuring with `--disable-linux-caps`.
|
also be disabled by configuring with `--disable-linux-caps`.
|
||||||
|
|
||||||
|
Portions of BIND that are written in Python, including
|
||||||
|
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
||||||
|
system tests, require the 'argparse' and 'ply' modules to be available.
|
||||||
|
'argparse' is a standard module as of Python 2.7 and Python 3.2.
|
||||||
|
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
|
||||||
|
|
||||||
On some platforms it is necessary to explicitly request large file support
|
On some platforms it is necessary to explicitly request large file support
|
||||||
to handle files bigger than 2GB. This can be done by using
|
to handle files bigger than 2GB. This can be done by using
|
||||||
`--enable-largefile` on the `configure` command line.
|
`--enable-largefile` on the `configure` command line.
|
||||||
@@ -354,9 +268,9 @@ 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.
|
||||||
|
|
||||||
The `--enable-querytrace` option causes `named` to log every step of
|
If your operating system has integrated support for IPv6, it will be used
|
||||||
processing every query. This should only be enabled when debugging, because
|
automatically. If you have installed KAME IPv6 separately, use
|
||||||
it has a significant negative impact on query performance.
|
`--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
|
||||||
@@ -378,21 +292,19 @@ multiple servers to run locally and communicate with one another). These
|
|||||||
IP addresses can be configured by running the command
|
IP addresses can be configured by running the command
|
||||||
`bin/tests/system/ifconfig.sh up` as root.
|
`bin/tests/system/ifconfig.sh up` as root.
|
||||||
|
|
||||||
Some tests require Perl and the `Net::DNS` and/or `IO::Socket::INET6` modules,
|
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
|
||||||
and will be skipped if these are not available. Some tests require Python
|
and will be skipped if these are not available. Some tests require Python
|
||||||
and the `dnspython` module and will be skipped if these are not available.
|
and the 'dnspython' module and will be skipped if these are not available.
|
||||||
See bin/tests/system/README for further details.
|
See bin/tests/system/README for further details.
|
||||||
|
|
||||||
Unit tests are implemented using the [CMocka unit testing framework](https://cmocka.org/).
|
Unit tests are implemented using Automated Testing Framework (ATF).
|
||||||
To build them, use `configure --with-cmocka`. Execution of tests is done
|
To run them, use `configure --with-atf`, then run `make test` or
|
||||||
by the [Kyua test execution engine](https://github.com/jmmv/kyua); if the
|
`make unit`.
|
||||||
`kyua` command is available, then unit tests can be run via `make test`
|
|
||||||
or `make unit`.
|
|
||||||
|
|
||||||
### <a name="doc"/> Documentation
|
### <a name="doc"/> Documentation
|
||||||
|
|
||||||
The *BIND 9 Administrator Reference Manual* is included with the source
|
The *BIND 9 Administrator Reference Manual* is included with the source
|
||||||
distribution, in DocBook XML, HTML, and PDF format, in the `doc/arm`
|
distribution, in DocBook XML, HTML and PDF format, in the `doc/arm`
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
Some of the programs in the BIND 9 distribution have man pages in their
|
Some of the programs in the BIND 9 distribution have man pages in their
|
||||||
@@ -435,25 +347,6 @@ releases (i.e., those with version numbers ending in zero). Some new
|
|||||||
functionality may be backported to older releases on a case-by-case basis.
|
functionality may be backported to older releases on a case-by-case basis.
|
||||||
All other change types may be applied to all currently-supported releases.
|
All other change types may be applied to all currently-supported releases.
|
||||||
|
|
||||||
#### Bug report identifiers
|
|
||||||
|
|
||||||
Most notes in the CHANGES file include a reference to a bug report or
|
|
||||||
issue number. Prior to 2018, these were usually of the form `[RT #NNN]`
|
|
||||||
and referred to entries in the "bind9-bugs" RT database, which was not open
|
|
||||||
to the public. More recent entries use the form `[GL #NNN]` or, less often,
|
|
||||||
`[GL !NNN]`, which, respectively, refer to issues or merge requests in the
|
|
||||||
GitLab database. Most of these are publicly readable, unless they include
|
|
||||||
information which is confidential or security sensitive.
|
|
||||||
|
|
||||||
To look up a GitLab issue by its number, use the URL
|
|
||||||
[https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
|
|
||||||
To look up a merge request, use
|
|
||||||
[https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
|
||||||
|
|
||||||
In rare cases, an issue or merge request number may be followed with the
|
|
||||||
letter "P". This indicates that the information is in the private ISC
|
|
||||||
GitLab instance, which is not visible to the public.
|
|
||||||
|
|
||||||
### <a name="ack"/> Acknowledgments
|
### <a name="ack"/> Acknowledgments
|
||||||
|
|
||||||
* The original development of BIND 9 was underwritten by the
|
* The original development of BIND 9 was underwritten by the
|
||||||
|
|||||||
+131
@@ -0,0 +1,131 @@
|
|||||||
|
/*
|
||||||
|
* 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 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
+10
-14
@@ -1,6 +1,6 @@
|
|||||||
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
|
# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -12,9 +12,9 @@
|
|||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
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 -*-
|
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||||
# serial 12 (pkg-config-0.29.2)
|
dnl serial 11 (pkg-config-0.29.1)
|
||||||
|
dnl
|
||||||
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||||
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||||
dnl
|
dnl
|
||||||
@@ -55,7 +55,7 @@ dnl
|
|||||||
dnl See the "Since" comment for each macro you use to see what version
|
dnl See the "Since" comment for each macro you use to see what version
|
||||||
dnl of the macros you require.
|
dnl of the macros you require.
|
||||||
m4_defun([PKG_PREREQ],
|
m4_defun([PKG_PREREQ],
|
||||||
[m4_define([PKG_MACROS_VERSION], [0.29.2])
|
[m4_define([PKG_MACROS_VERSION], [0.29.1])
|
||||||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
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])])
|
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||||
])dnl PKG_PREREQ
|
])dnl PKG_PREREQ
|
||||||
@@ -156,7 +156,7 @@ 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
|
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||||
|
|
||||||
pkg_failed=no
|
pkg_failed=no
|
||||||
AC_MSG_CHECKING([for $2])
|
AC_MSG_CHECKING([for $1])
|
||||||
|
|
||||||
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||||
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||||
@@ -166,11 +166,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
|
|||||||
See the pkg-config man page for more details.])
|
See the pkg-config man page for more details.])
|
||||||
|
|
||||||
if test $pkg_failed = yes; then
|
if test $pkg_failed = yes; then
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
_PKG_SHORT_ERRORS_SUPPORTED
|
_PKG_SHORT_ERRORS_SUPPORTED
|
||||||
if test $_pkg_short_errors_supported = yes; then
|
if test $_pkg_short_errors_supported = yes; then
|
||||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||||
else
|
else
|
||||||
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||||
fi
|
fi
|
||||||
# Put the nasty error message in config.log where it belongs
|
# Put the nasty error message in config.log where it belongs
|
||||||
@@ -187,7 +187,7 @@ installed software in a non-standard prefix.
|
|||||||
_PKG_TEXT])[]dnl
|
_PKG_TEXT])[]dnl
|
||||||
])
|
])
|
||||||
elif test $pkg_failed = untried; then
|
elif test $pkg_failed = untried; then
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
m4_default([$4], [AC_MSG_FAILURE(
|
m4_default([$4], [AC_MSG_FAILURE(
|
||||||
[The pkg-config script could not be found or is too old. Make sure it
|
[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
|
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||||
@@ -289,10 +289,6 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
|||||||
])dnl PKG_CHECK_VAR
|
])dnl PKG_CHECK_VAR
|
||||||
|
|
||||||
m4_include([m4/ax_check_openssl.m4])
|
m4_include([m4/ax_check_openssl.m4])
|
||||||
m4_include([m4/ax_posix_shell.m4])
|
|
||||||
m4_include([m4/ax_pthread.m4])
|
|
||||||
m4_include([m4/ax_restore_flags.m4])
|
|
||||||
m4_include([m4/ax_save_flags.m4])
|
|
||||||
m4_include([m4/libtool.m4])
|
m4_include([m4/libtool.m4])
|
||||||
m4_include([m4/ltoptions.m4])
|
m4_include([m4/ltoptions.m4])
|
||||||
m4_include([m4/ltsugar.m4])
|
m4_include([m4/ltsugar.m4])
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ VPATH = @srcdir@
|
|||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
|
|
||||||
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
|
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
|
||||||
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
|
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
|
||||||
TARGETS =
|
TARGETS =
|
||||||
|
|
||||||
@BIND9_MAKE_RULES@
|
@BIND9_MAKE_RULES@
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES}
|
|||||||
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @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@ @OPENSSL_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
@@ -66,7 +66,7 @@ named-checkzone.@O@: named-checkzone.c
|
|||||||
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||||
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
|
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
|
||||||
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
|
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
|
||||||
export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
export LIBS0="${NSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
||||||
${FINALBUILDCMD}
|
${FINALBUILDCMD}
|
||||||
|
|
||||||
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||||
@@ -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@
|
||||||
|
|||||||
+65
-46
@@ -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, ®ion));
|
CHECK(dns_rdataclass_fromtext(&rdclass, ®ion));
|
||||||
|
|
||||||
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,13 +734,13 @@ 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;
|
||||||
const char *flags;
|
const char *flags;
|
||||||
|
|
||||||
flags = (fileformat == dns_masterformat_text) ? "w" : "wb";
|
flags = (fileformat == dns_masterformat_text) ? "w+" : "wb+";
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
if (filename != NULL && strcmp(filename, "-") != 0)
|
if (filename != NULL && strcmp(filename, "-") != 0)
|
||||||
@@ -771,3 +789,4 @@ DestroySockets(void) {
|
|||||||
WSACleanup();
|
WSACleanup();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
named-checkconf \- named configuration file syntax checking tool
|
named-checkconf \- named configuration file syntax checking tool
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.HP \w'\fBnamed\-checkconf\fR\ 'u
|
.HP \w'\fBnamed\-checkconf\fR\ 'u
|
||||||
\fBnamed\-checkconf\fR [\fB\-chjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
|
\fBnamed\-checkconf\fR [\fB\-hjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.PP
|
||||||
\fBnamed\-checkconf\fR
|
\fBnamed\-checkconf\fR
|
||||||
@@ -79,13 +79,6 @@ When loading a zonefile read the journal if it exists\&.
|
|||||||
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
|
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-c
|
|
||||||
.RS 4
|
|
||||||
Check "core" configuration only\&. This suppresses the loading of plugin modules, and causes all parameters to
|
|
||||||
\fBplugin\fR
|
|
||||||
statements to be ignored\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-p
|
\-p
|
||||||
.RS 4
|
.RS 4
|
||||||
Print out the
|
Print out the
|
||||||
@@ -143,5 +136,5 @@ BIND 9 Administrator Reference Manual\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+36
-58
@@ -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>
|
||||||
|
|
||||||
@@ -46,8 +45,6 @@
|
|||||||
|
|
||||||
static const char *program = "named-checkconf";
|
static const char *program = "named-checkconf";
|
||||||
|
|
||||||
static bool loadplugins = true;
|
|
||||||
|
|
||||||
isc_log_t *logc = NULL;
|
isc_log_t *logc = NULL;
|
||||||
|
|
||||||
#define CHECK(r)\
|
#define CHECK(r)\
|
||||||
@@ -63,7 +60,7 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
usage(void) {
|
usage(void) {
|
||||||
fprintf(stderr, "usage: %s [-chjlvz] [-p [-x]] [-t directory] "
|
fprintf(stderr, "usage: %s [-hjlvz] [-p [-x]] [-t directory] "
|
||||||
"[named.conf]\n", program);
|
"[named.conf]\n", program);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -94,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;
|
||||||
@@ -116,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;
|
||||||
@@ -138,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -171,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;
|
||||||
@@ -284,10 +281,8 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
|
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||||
} else {
|
} else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
|
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
|
||||||
@@ -304,10 +299,8 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKMX;
|
zone_options &= ~DNS_ZONEOPT_CHECKMX;
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||||
} else {
|
} else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
zone_options |= DNS_ZONEOPT_CHECKMX;
|
zone_options |= DNS_ZONEOPT_CHECKMX;
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
|
||||||
@@ -333,10 +326,8 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||||
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
|
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
|
||||||
} else {
|
} else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
|
||||||
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
zone_options &= ~DNS_ZONEOPT_IGNOREMXCNAME;
|
||||||
@@ -353,10 +344,8 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||||
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
|
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
|
||||||
} else {
|
} else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
|
||||||
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
zone_options &= ~DNS_ZONEOPT_IGNORESRVCNAME;
|
||||||
@@ -376,10 +365,8 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
|
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
|
||||||
} else {
|
} else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
zone_options |= DNS_ZONEOPT_CHECKSPF;
|
||||||
}
|
}
|
||||||
@@ -395,10 +382,8 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
|
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||||
} else {
|
} else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||||
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
|
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||||
@@ -408,16 +393,14 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
fmtobj = NULL;
|
fmtobj = NULL;
|
||||||
if (get_maps(maps, "masterfile-format", &fmtobj)) {
|
if (get_maps(maps, "masterfile-format", &fmtobj)) {
|
||||||
const char *masterformatstr = cfg_obj_asstring(fmtobj);
|
const char *masterformatstr = cfg_obj_asstring(fmtobj);
|
||||||
if (strcasecmp(masterformatstr, "text") == 0) {
|
if (strcasecmp(masterformatstr, "text") == 0)
|
||||||
masterformat = dns_masterformat_text;
|
masterformat = dns_masterformat_text;
|
||||||
} else if (strcasecmp(masterformatstr, "raw") == 0) {
|
else if (strcasecmp(masterformatstr, "raw") == 0)
|
||||||
masterformat = dns_masterformat_raw;
|
masterformat = dns_masterformat_raw;
|
||||||
} else if (strcasecmp(masterformatstr, "map") == 0) {
|
else if (strcasecmp(masterformatstr, "map") == 0)
|
||||||
masterformat = dns_masterformat_map;
|
masterformat = dns_masterformat_map;
|
||||||
} else {
|
else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = NULL;
|
obj = NULL;
|
||||||
@@ -437,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;
|
||||||
@@ -486,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;
|
||||||
@@ -554,17 +537,17 @@ 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.
|
||||||
*/
|
*/
|
||||||
#define CMDLINE_FLAGS "cdhjlm:t:pvxz"
|
#define CMDLINE_FLAGS "dhjlm:t:pvxz"
|
||||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'm':
|
case 'm':
|
||||||
@@ -583,26 +566,22 @@ 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);
|
||||||
|
|
||||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
|
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'c':
|
|
||||||
loadplugins = false;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
debug++;
|
debug++;
|
||||||
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':
|
||||||
@@ -618,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':
|
||||||
@@ -630,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 '?':
|
||||||
@@ -683,10 +662,9 @@ main(int argc, char **argv) {
|
|||||||
ISC_R_SUCCESS)
|
ISC_R_SUCCESS)
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
|
result = bind9_check_namedconf(config, logc, mctx);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS)
|
||||||
exit_status = 1;
|
exit_status = 1;
|
||||||
}
|
|
||||||
|
|
||||||
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
|
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
|
||||||
result = load_zones_fromconfig(config, mctx, list_zones);
|
result = load_zones_fromconfig(config, mctx, list_zones);
|
||||||
|
|||||||
@@ -40,8 +40,6 @@
|
|||||||
<year>2015</year>
|
<year>2015</year>
|
||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
@@ -54,7 +52,7 @@
|
|||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis sepchar=" ">
|
<cmdsynopsis sepchar=" ">
|
||||||
<command>named-checkconf</command>
|
<command>named-checkconf</command>
|
||||||
<arg choice="opt" rep="norepeat"><option>-chjlvz</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-hjlvz</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-p</option>
|
<arg choice="opt" rep="norepeat"><option>-p</option>
|
||||||
<arg choice="opt" rep="norepeat"><option>-x</option>
|
<arg choice="opt" rep="norepeat"><option>-x</option>
|
||||||
</arg></arg>
|
</arg></arg>
|
||||||
@@ -116,17 +114,6 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-c</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Check "core" configuration only. This suppresses the loading
|
|
||||||
of plugin modules, and causes all parameters to
|
|
||||||
<command>plugin</command> statements to be ignored.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-p</term>
|
<term>-p</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<h2>Synopsis</h2>
|
<h2>Synopsis</h2>
|
||||||
<div class="cmdsynopsis"><p>
|
<div class="cmdsynopsis"><p>
|
||||||
<code class="command">named-checkconf</code>
|
<code class="command">named-checkconf</code>
|
||||||
[<code class="option">-chjlvz</code>]
|
[<code class="option">-hjlvz</code>]
|
||||||
[<code class="option">-p</code>
|
[<code class="option">-p</code>
|
||||||
[<code class="option">-x</code>
|
[<code class="option">-x</code>
|
||||||
]]
|
]]
|
||||||
@@ -88,14 +88,6 @@
|
|||||||
(e.g. master or slave).
|
(e.g. master or slave).
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-c</span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Check "core" configuration only. This suppresses the loading
|
|
||||||
of plugin modules, and causes all parameters to
|
|
||||||
<span class="command"><strong>plugin</strong></span> statements to be ignored.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-p</span></dt>
|
<dt><span class="term">-p</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -325,5 +325,5 @@ BIND 9 Administrator Reference Manual\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+26
-30
@@ -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;
|
||||||
|
|
||||||
@@ -139,14 +137,12 @@ main(int argc, char **argv) {
|
|||||||
#define PROGCMP(X) \
|
#define PROGCMP(X) \
|
||||||
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
|
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
|
||||||
|
|
||||||
if (PROGCMP("named-checkzone")) {
|
if (PROGCMP("named-checkzone"))
|
||||||
progmode = progmode_check;
|
progmode = progmode_check;
|
||||||
} else if (PROGCMP("named-compilezone")) {
|
else if (PROGCMP("named-compilezone"))
|
||||||
progmode = progmode_compile;
|
progmode = progmode_compile;
|
||||||
} else {
|
else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Compilation specific defaults */
|
/* Compilation specific defaults */
|
||||||
if (progmode == progmode_compile) {
|
if (progmode == progmode_compile) {
|
||||||
@@ -163,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:"))
|
||||||
@@ -181,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);
|
||||||
@@ -224,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':
|
||||||
@@ -250,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') {
|
||||||
@@ -509,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)
|
||||||
|
|||||||
@@ -43,8 +43,6 @@
|
|||||||
<year>2015</year>
|
<year>2015</year>
|
||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid>
|
<ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>checkconf</RootNamespace>
|
<RootNamespace>checkconf</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@@ -73,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@'">
|
||||||
@@ -102,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>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -17,21 +17,18 @@
|
|||||||
<ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid>
|
<ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>checktool</RootNamespace>
|
<RootNamespace>checktool</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid>
|
<ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>checkzone</RootNamespace>
|
<RootNamespace>checkzone</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@@ -65,15 +62,15 @@
|
|||||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
<BrowseInformation>true</BrowseInformation>
|
<BrowseInformation>true</BrowseInformation>
|
||||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<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\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;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)
|
||||||
@@ -98,7 +95,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
|||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<CompileAs>CompileAsC</CompileAs>
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@@ -107,8 +104,8 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
|||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<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\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;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>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ 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@ @OPENSSL_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
|
|
||||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -144,5 +144,5 @@ BIND 9 Administrator Reference Manual\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+11
-13
@@ -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>
|
||||||
@@ -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;
|
||||||
@@ -124,15 +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_UNREACHABLE();
|
|
||||||
}
|
|
||||||
|
|
||||||
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) {
|
||||||
@@ -157,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;
|
||||||
|
|||||||
@@ -37,8 +37,6 @@
|
|||||||
<year>2015</year>
|
<year>2015</year>
|
||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -191,3 +192,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -206,5 +206,5 @@ BIND 9 Administrator Reference Manual\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
@@ -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 != '?') {
|
||||||
|
|||||||
@@ -44,8 +44,6 @@
|
|||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2017</year>
|
<year>2017</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
+2
-2
@@ -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
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{64964B03-4815-41F0-9057-E766A94AF197}</ProjectGuid>
|
<ProjectGuid>{64964B03-4815-41F0-9057-E766A94AF197}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>confgentool</RootNamespace>
|
<RootNamespace>confgentool</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}</ProjectGuid>
|
<ProjectGuid>{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>ddnsconfgen</RootNamespace>
|
<RootNamespace>ddnsconfgen</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@@ -73,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)
|
||||||
@@ -109,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)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{1E2C1635-3093-4D59-80E7-4743AC10F22F}</ProjectGuid>
|
<ProjectGuid>{1E2C1635-3093-4D59-80E7-4743AC10F22F}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>rndcconfgen</RootNamespace>
|
<RootNamespace>rndcconfgen</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@@ -73,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@'">
|
||||||
@@ -103,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>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ CDEFINES = -DVERSION=\"${VERSION}\" \
|
|||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @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@ @OPENSSL_LIBS@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -437,5 +437,5 @@ RFC5155\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+95
-131
@@ -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
|
||||||
@@ -160,43 +158,42 @@ usage(void) {
|
|||||||
" q-class is one of (in,hs,ch,...) [default: in]\n"
|
" q-class is one of (in,hs,ch,...) [default: in]\n"
|
||||||
" q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a]\n"
|
" q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a]\n"
|
||||||
" q-opt is one of:\n"
|
" q-opt is one of:\n"
|
||||||
" -4 (use IPv4 query transport only)\n"
|
" -x dot-notation (shortcut for reverse lookups)\n"
|
||||||
" -6 (use IPv6 query transport only)\n"
|
" -d level (set debugging level)\n"
|
||||||
" -a anchor-file (specify root and dlv trust anchors)\n"
|
" -a anchor-file (specify root and dlv trust anchors)\n"
|
||||||
" -b address[#port] (bind to source address/port)\n"
|
" -b address[#port] (bind to source address/port)\n"
|
||||||
" -c class (option included for compatibility;\n"
|
|
||||||
" -d level (set debugging level)\n"
|
|
||||||
" -h (print help and exit)\n"
|
|
||||||
" -i (disable DNSSEC validation)\n"
|
|
||||||
" -m (enable memory usage debugging)\n"
|
|
||||||
" -p port (specify port number)\n"
|
" -p port (specify port number)\n"
|
||||||
" -q name (specify query name)\n"
|
" -q name (specify query name)\n"
|
||||||
" -t type (specify query type)\n"
|
" -t type (specify query type)\n"
|
||||||
|
" -c class (option included for compatibility;\n"
|
||||||
" only IN is supported)\n"
|
" only IN is supported)\n"
|
||||||
" -v (print version and exit)\n"
|
" -4 (use IPv4 query transport only)\n"
|
||||||
" -x dot-notation (shortcut for reverse lookups)\n"
|
" -6 (use IPv6 query transport only)\n"
|
||||||
|
" -i (disable DNSSEC validation)\n"
|
||||||
|
" -m (enable memory usage debugging)\n"
|
||||||
" d-opt is of the form +keyword[=value], where keyword is:\n"
|
" d-opt is of the form +keyword[=value], where keyword is:\n"
|
||||||
" +[no]all (Set or clear all display flags)\n"
|
" +[no]all (Set or clear all display flags)\n"
|
||||||
" +[no]class (Control display of class)\n"
|
" +[no]class (Control display of class)\n"
|
||||||
" +[no]comments (Control display of comment lines)\n"
|
|
||||||
" +[no]crypto (Control display of cryptographic\n"
|
" +[no]crypto (Control display of cryptographic\n"
|
||||||
" fields in records)\n"
|
" fields in records)\n"
|
||||||
" +[no]dlv (DNSSEC lookaside validation anchor)\n"
|
|
||||||
" +[no]dnssec (Display DNSSEC records)\n"
|
|
||||||
" +[no]mtrace (Trace messages received)\n"
|
|
||||||
" +[no]multiline (Print records in an expanded format)\n"
|
" +[no]multiline (Print records in an expanded format)\n"
|
||||||
" +[no]root (DNSSEC validation trust anchor)\n"
|
" +[no]comments (Control display of comment lines)\n"
|
||||||
" +[no]rrcomments (Control display of per-record "
|
" +[no]rrcomments (Control display of per-record "
|
||||||
"comments)\n"
|
"comments)\n"
|
||||||
" +[no]rtrace (Trace resolver fetches)\n"
|
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" format)\n"
|
||||||
" +[no]short (Short form answer)\n"
|
" +[no]short (Short form answer)\n"
|
||||||
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
||||||
" +[no]tcp (TCP mode)\n"
|
" +[no]tcp (TCP mode)\n"
|
||||||
" +[no]ttl (Control display of ttls in records)\n"
|
" +[no]ttl (Control display of ttls in records)\n"
|
||||||
" +[no]trust (Control display of trust level)\n"
|
" +[no]trust (Control display of trust level)\n"
|
||||||
" +[no]unknownformat (Print RDATA in RFC 3597 "
|
" +[no]rtrace (Trace resolver fetches)\n"
|
||||||
"\"unknown\" format)\n"
|
" +[no]mtrace (Trace messages received)\n"
|
||||||
" +[no]vtrace (Trace validation process)\n",
|
" +[no]vtrace (Trace validation process)\n"
|
||||||
|
" +[no]dlv (DNSSEC lookaside validation anchor)\n"
|
||||||
|
" +[no]root (DNSSEC validation trust anchor)\n"
|
||||||
|
" +[no]dnssec (Display DNSSEC records)\n"
|
||||||
|
" -h (print help and exit)\n"
|
||||||
|
" -v (print version and exit)\n",
|
||||||
stderr);
|
stderr);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -411,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;
|
||||||
@@ -433,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 {
|
||||||
@@ -503,7 +500,7 @@ setup_style(dns_master_style_t **stylep) {
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
dns_master_style_t *style = NULL;
|
dns_master_style_t *style = NULL;
|
||||||
|
|
||||||
REQUIRE(stylep != NULL && *stylep == NULL);
|
REQUIRE(stylep != NULL || *stylep == NULL);
|
||||||
|
|
||||||
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
||||||
if (showcomments)
|
if (showcomments)
|
||||||
@@ -569,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;
|
||||||
@@ -579,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));
|
||||||
@@ -624,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));
|
||||||
@@ -744,8 +741,8 @@ setup_dnsseckeys(dns_client_t *client) {
|
|||||||
|
|
||||||
isc_buffer_init(&b, anchortext, sizeof(anchortext) - 1);
|
isc_buffer_init(&b, anchortext, sizeof(anchortext) - 1);
|
||||||
isc_buffer_add(&b, sizeof(anchortext) - 1);
|
isc_buffer_add(&b, sizeof(anchortext) - 1);
|
||||||
result = cfg_parse_buffer(parser, &b, NULL, 0,
|
result = cfg_parse_buffer(parser, &b, &cfg_type_bindkeys,
|
||||||
&cfg_type_bindkeys, 0, &bindkeys);
|
&bindkeys);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("Unable to parse built-in keys");
|
fatal("Unable to parse built-in keys");
|
||||||
}
|
}
|
||||||
@@ -766,14 +763,7 @@ setup_dnsseckeys(dns_client_t *client) {
|
|||||||
if (dlv_validation)
|
if (dlv_validation)
|
||||||
dns_client_setdlv(client, dns_rdataclass_in, dlv_anchor);
|
dns_client_setdlv(client, dns_rdataclass_in, dlv_anchor);
|
||||||
|
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (bindkeys != NULL) {
|
|
||||||
cfg_obj_destroy(parser, &bindkeys);
|
|
||||||
}
|
|
||||||
if (parser != NULL) {
|
|
||||||
cfg_parser_destroy(&parser);
|
|
||||||
}
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
delv_log(ISC_LOG_ERROR, "setup_dnsseckeys: %s",
|
delv_log(ISC_LOG_ERROR, "setup_dnsseckeys: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
@@ -788,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;
|
||||||
|
|
||||||
@@ -879,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)
|
||||||
@@ -954,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;
|
||||||
@@ -973,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);
|
||||||
|
|
||||||
@@ -984,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);
|
||||||
@@ -1011,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");
|
||||||
@@ -1019,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;
|
||||||
@@ -1092,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 */
|
||||||
@@ -1147,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;
|
||||||
@@ -1175,13 +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 const char *dash_opts = "46abcdhimpqtvx";
|
static isc_boolean_t
|
||||||
|
dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
||||||
static bool
|
|
||||||
dash_option(char *option, char *next, bool *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;
|
||||||
@@ -1189,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]) {
|
||||||
@@ -1205,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':
|
||||||
@@ -1213,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':
|
||||||
@@ -1221,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() */
|
||||||
@@ -1234,19 +1222,18 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
default:
|
default:
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
|
||||||
}
|
}
|
||||||
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)
|
||||||
@@ -1292,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
|
||||||
@@ -1323,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,
|
||||||
@@ -1335,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);
|
||||||
@@ -1353,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);
|
||||||
@@ -1365,7 +1352,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
return (false);
|
return (ISC_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1374,14 +1361,12 @@ 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++) {
|
||||||
if (argv[0][0] != '-') {
|
if (argv[0][0] != '-')
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
option = &argv[0][1];
|
option = &argv[0][1];
|
||||||
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
||||||
switch (option[0]) {
|
switch (option[0]) {
|
||||||
@@ -1393,38 +1378,17 @@ 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];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(option) == 0U) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Look for dash value option. */
|
|
||||||
if (strpbrk(option, dash_opts) != &option[0] ||
|
|
||||||
strlen(option) > 1U)
|
|
||||||
{
|
|
||||||
/* Error or value in option. */
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dash value is next argument so we need to skip it. */
|
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
|
|
||||||
/* Handle missing argument */
|
|
||||||
if (argc == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1440,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] == '@') {
|
||||||
@@ -1479,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,
|
||||||
@@ -1548,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;
|
||||||
|
|||||||
@@ -39,8 +39,6 @@
|
|||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2017</year>
|
<year>2017</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}</ProjectGuid>
|
<ProjectGuid>{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>delv</RootNamespace>
|
<RootNamespace>delv</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@@ -71,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@'">
|
||||||
@@ -101,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>
|
||||||
|
|||||||
+4
-4
@@ -25,7 +25,7 @@ CDEFINES = -DVERSION=\"${VERSION}\"
|
|||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @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@ @OPENSSL_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
@@ -101,12 +101,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@
|
||||||
|
|||||||
+24
-38
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2011, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -74,9 +74,7 @@ will perform an NS query for "\&." (the root)\&.
|
|||||||
It is possible to set per\-user defaults for
|
It is possible to set per\-user defaults for
|
||||||
\fBdig\fR
|
\fBdig\fR
|
||||||
via
|
via
|
||||||
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&. The
|
${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&.
|
||||||
\fB\-r\fR
|
|
||||||
option disables this feature, for scripts that need predictable behaviour\&.
|
|
||||||
.PP
|
.PP
|
||||||
The IN and CH class names overlap with the IN and CH top level domain names\&. Either use the
|
The IN and CH class names overlap with the IN and CH top level domain names\&. Either use the
|
||||||
\fB\-t\fR
|
\fB\-t\fR
|
||||||
@@ -176,6 +174,11 @@ reads a list of lookup requests to process from the given
|
|||||||
using the command\-line interface\&.
|
using the command\-line interface\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-i
|
||||||
|
.RS 4
|
||||||
|
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC 2874) are not attempted\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-k \fIkeyfile\fR
|
\-k \fIkeyfile\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Sign queries using TSIG using a key read from the given file\&. Key files can be generated using
|
Sign queries using TSIG using a key read from the given file\&. Key files can be generated using
|
||||||
@@ -205,12 +208,6 @@ The domain name to query\&. This is useful to distinguish the
|
|||||||
from other arguments\&.
|
from other arguments\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-r
|
|
||||||
.RS 4
|
|
||||||
Do not read options from
|
|
||||||
${HOME}/\&.digrc\&. This is useful for scripts that need predictable behaviour\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-t \fItype\fR
|
\-t \fItype\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
The resource record type to query\&. It can be any valid query type\&. If it is a resource record type supported in BIND 9, it can be given by the type mnemonic (such as "NS" or "AAAA")\&. The default query type is "A", unless the
|
The resource record type to query\&. It can be any valid query type\&. If it is a resource record type supported in BIND 9, it can be given by the type mnemonic (such as "NS" or "AAAA")\&. The default query type is "A", unless the
|
||||||
@@ -249,7 +246,9 @@ arguments\&.
|
|||||||
\fBdig\fR
|
\fBdig\fR
|
||||||
automatically performs a lookup for a name like
|
automatically performs a lookup for a name like
|
||||||
94\&.2\&.0\&.192\&.in\-addr\&.arpa
|
94\&.2\&.0\&.192\&.in\-addr\&.arpa
|
||||||
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain\&.
|
and sets the query type and class to PTR and IN respectively\&. IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain (but see also the
|
||||||
|
\fB\-i\fR
|
||||||
|
option)\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-y \fI[hmac:]\fR\fIkeyname:secret\fR
|
\-y \fI[hmac:]\fR\fIkeyname:secret\fR
|
||||||
@@ -361,20 +360,14 @@ Display [do not display] the CLASS when printing the record\&.
|
|||||||
.PP
|
.PP
|
||||||
\fB+[no]cmd\fR
|
\fB+[no]cmd\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Toggles the printing of the initial comment in the output, identifying the version of
|
Toggles the printing of the initial comment in the output identifying the version of
|
||||||
\fBdig\fR
|
\fBdig\fR
|
||||||
and the query options that have been applied\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&. The default is to print this comment\&.
|
and the query options that have been applied\&. This comment is printed by default\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]comments\fR
|
\fB+[no]comments\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Toggles the display of some comment lines in the output, containing information about the packet header and OPT pseudosection, and the names of the response section\&. The default is to print these comments\&.
|
Toggle the display of comment lines in the output\&. The default is to print comments\&.
|
||||||
.sp
|
|
||||||
Other types of comments in the output are not affected by this option, but can be controlled using other command line switches\&. These include
|
|
||||||
\fB+[no]cmd\fR,
|
|
||||||
\fB+[no]question\fR,
|
|
||||||
\fB+[no]stats\fR, and
|
|
||||||
\fB+[no]rrcomments\fR\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]cookie\fR\fB[=####]\fR
|
\fB+[no]cookie\fR\fB[=####]\fR
|
||||||
@@ -475,16 +468,12 @@ option is enabled\&. If short form answers are requested, the default is not to
|
|||||||
.PP
|
.PP
|
||||||
\fB+[no]idnin\fR
|
\fB+[no]idnin\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&.
|
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to process IDN input\&.
|
||||||
.sp
|
|
||||||
The default is to process IDN input when standard output is a tty\&. The IDN processing on input is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]idnout\fR
|
\fB+[no]idnout\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&.
|
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to convert output\&.
|
||||||
.sp
|
|
||||||
The default is to process puny code on output when standard output is a tty\&. The puny code processing on output is disabled when dig output is redirected to files, pipes, and other non\-tty file descriptors\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]ignore\fR
|
\fB+[no]ignore\fR
|
||||||
@@ -567,12 +556,12 @@ would cause a 48\-byte query to be padded to 64 bytes\&. The default block size
|
|||||||
.PP
|
.PP
|
||||||
\fB+[no]qr\fR
|
\fB+[no]qr\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Toggles the display of the query message as it is sent\&. By default, the query is not printed\&.
|
Print [do not print] the query as it is sent\&. By default, the query is not printed\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]question\fR
|
\fB+[no]question\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Toggles the display of the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]raflag\fR
|
\fB+[no]raflag\fR
|
||||||
@@ -590,11 +579,11 @@ A synonym for
|
|||||||
.RS 4
|
.RS 4
|
||||||
Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
|
Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
|
||||||
\fBdig\fR
|
\fBdig\fR
|
||||||
normally sends recursive queries\&. Recursion is automatically disabled when using the
|
normally sends recursive queries\&. Recursion is automatically disabled when the
|
||||||
\fI+nssearch\fR
|
\fI+nssearch\fR
|
||||||
option, and when using
|
or
|
||||||
\fI+trace\fR
|
\fI+trace\fR
|
||||||
except for an initial recursive query to get the list of root servers\&.
|
query options are used\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+retry=T\fR
|
\fB+retry=T\fR
|
||||||
@@ -625,7 +614,7 @@ determines if the name will be treated as relative or not and hence whether a se
|
|||||||
.PP
|
.PP
|
||||||
\fB+[no]short\fR
|
\fB+[no]short\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Provide a terse answer\&. The default is to print the answer in a verbose form\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&.
|
Provide a terse answer\&. The default is to print the answer in a verbose form\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]showsearch\fR
|
\fB+[no]showsearch\fR
|
||||||
@@ -655,7 +644,7 @@ causes fields not to be split at all\&. The default is 56 characters, or 44 char
|
|||||||
.PP
|
.PP
|
||||||
\fB+[no]stats\fR
|
\fB+[no]stats\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics as a comment after each lookup\&.
|
This query option toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]subnet=addr[/prefix\-length]\fR
|
\fB+[no]subnet=addr[/prefix\-length]\fR
|
||||||
@@ -806,10 +795,7 @@ has been built with IDN (internationalized domain name) support, it can accept a
|
|||||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, use parameters
|
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, use parameters
|
||||||
\fI+noidnin\fR
|
\fI+noidnin\fR
|
||||||
and
|
and
|
||||||
\fI+noidnout\fR
|
\fI+noidnout\fR\&.
|
||||||
or define the
|
|
||||||
\fBIDN_DISABLE\fR
|
|
||||||
environment variable\&.
|
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
.PP
|
.PP
|
||||||
/etc/resolv\&.conf
|
/etc/resolv\&.conf
|
||||||
@@ -830,5 +816,5 @@ There are probably too many query options\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2011, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+158
-201
@@ -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,
|
||||||
plusquest = false, pluscomm = false,
|
ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
|
||||||
ipv4only = false, ipv6only = false, digrc = true;
|
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[] = {
|
||||||
@@ -153,11 +150,11 @@ help(void) {
|
|||||||
" -b address[#port] (bind to source address/port)\n"
|
" -b address[#port] (bind to source address/port)\n"
|
||||||
" -c class (specify query class)\n"
|
" -c class (specify query class)\n"
|
||||||
" -f filename (batch mode)\n"
|
" -f filename (batch mode)\n"
|
||||||
|
" -i (use IP6.INT for IPv6 reverse lookups)\n"
|
||||||
" -k keyfile (specify tsig key file)\n"
|
" -k keyfile (specify tsig key file)\n"
|
||||||
" -m (enable memory usage debugging)\n"
|
" -m (enable memory usage debugging)\n"
|
||||||
" -p port (specify port number)\n"
|
" -p port (specify port number)\n"
|
||||||
" -q name (specify query name)\n"
|
" -q name (specify query name)\n"
|
||||||
" -r (do not read ~/.digrc)\n"
|
|
||||||
" -t type (specify query type)\n"
|
" -t type (specify query type)\n"
|
||||||
" -u (display times in usec instead of msec)\n"
|
" -u (display times in usec instead of msec)\n"
|
||||||
" -x dot-notation (shortcut for reverse lookups)\n"
|
" -x dot-notation (shortcut for reverse lookups)\n"
|
||||||
@@ -175,13 +172,11 @@ help(void) {
|
|||||||
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
|
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
|
||||||
" +[no]cdflag (Set checking disabled flag in query)\n"
|
" +[no]cdflag (Set checking disabled flag in query)\n"
|
||||||
" +[no]class (Control display of class in records)\n"
|
" +[no]class (Control display of class in records)\n"
|
||||||
" +[no]cmd (Control display of command line -\n"
|
" +[no]cmd (Control display of command line)\n"
|
||||||
" global option)\n"
|
" +[no]comments (Control display of comment lines)\n"
|
||||||
" +[no]comments (Control display of packet header\n"
|
|
||||||
" and section name comments)\n"
|
|
||||||
" +[no]cookie (Add a COOKIE option to the request)\n"
|
" +[no]cookie (Add a COOKIE option to the request)\n"
|
||||||
" +[no]crypto (Control display of cryptographic\n"
|
" +[no]crypto (Control display of cryptographic "
|
||||||
" fields in records)\n"
|
"fields in records)\n"
|
||||||
" +[no]defname (Use search list (+[no]search))\n"
|
" +[no]defname (Use search list (+[no]search))\n"
|
||||||
" +[no]dnssec (Request DNSSEC records)\n"
|
" +[no]dnssec (Request DNSSEC records)\n"
|
||||||
" +domain=### (Set default domainname)\n"
|
" +domain=### (Set default domainname)\n"
|
||||||
@@ -195,15 +190,11 @@ help(void) {
|
|||||||
" +[no]fail (Don't try next server on SERVFAIL)\n"
|
" +[no]fail (Don't try next server on SERVFAIL)\n"
|
||||||
" +[no]header-only (Send query without a question section)\n"
|
" +[no]header-only (Send query without a question section)\n"
|
||||||
" +[no]identify (ID responders in short answers)\n"
|
" +[no]identify (ID responders in short answers)\n"
|
||||||
#ifdef HAVE_LIBIDN2
|
" +[no]idnin (Parse IDN names)\n"
|
||||||
" +[no]idnin (Parse IDN names [default=on on tty])\n"
|
" +[no]idnout (Convert IDN response)\n"
|
||||||
" +[no]idnout (Convert IDN response "
|
|
||||||
"[default=on on tty])\n"
|
|
||||||
#endif
|
|
||||||
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
|
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
|
||||||
" +[no]keepalive (Request EDNS TCP keepalive)\n"
|
" +[no]keepalive (Request EDNS TCP keepalive)\n"
|
||||||
" +[no]keepopen (Keep the TCP socket open between "
|
" +[no]keepopen (Keep the TCP socket open between queries)\n"
|
||||||
"queries)\n"
|
|
||||||
" +[no]mapped (Allow mapped IPv4 over IPv6)\n"
|
" +[no]mapped (Allow mapped IPv4 over IPv6)\n"
|
||||||
" +[no]multiline (Print records in an expanded format)\n"
|
" +[no]multiline (Print records in an expanded format)\n"
|
||||||
" +ndots=### (Set search NDOTS value)\n"
|
" +ndots=### (Set search NDOTS value)\n"
|
||||||
@@ -222,7 +213,7 @@ help(void) {
|
|||||||
"comments)\n"
|
"comments)\n"
|
||||||
" +[no]search (Set whether to use searchlist)\n"
|
" +[no]search (Set whether to use searchlist)\n"
|
||||||
" +[no]short (Display nothing except short\n"
|
" +[no]short (Display nothing except short\n"
|
||||||
" form of answers - global option)\n"
|
" form of answer)\n"
|
||||||
" +[no]showsearch (Search with intermediate results)\n"
|
" +[no]showsearch (Search with intermediate results)\n"
|
||||||
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
||||||
" +[no]stats (Control display of statistics)\n"
|
" +[no]stats (Control display of statistics)\n"
|
||||||
@@ -230,13 +221,11 @@ help(void) {
|
|||||||
" +[no]tcflag (Set TC flag in query (+[no]tcflag))\n"
|
" +[no]tcflag (Set TC flag in query (+[no]tcflag))\n"
|
||||||
" +[no]tcp (TCP mode (+[no]vc))\n"
|
" +[no]tcp (TCP mode (+[no]vc))\n"
|
||||||
" +timeout=### (Set query timeout) [5]\n"
|
" +timeout=### (Set query timeout) [5]\n"
|
||||||
" +[no]trace (Trace delegation down from root "
|
" +[no]trace (Trace delegation down from root [+dnssec])\n"
|
||||||
"[+dnssec])\n"
|
|
||||||
" +tries=### (Set number of UDP attempts) [3]\n"
|
" +tries=### (Set number of UDP attempts) [3]\n"
|
||||||
" +[no]ttlid (Control display of ttls in records)\n"
|
" +[no]ttlid (Control display of ttls in records)\n"
|
||||||
" +[no]ttlunits (Display TTLs in human-readable units)\n"
|
" +[no]ttlunits (Display TTLs in human-readable units)\n"
|
||||||
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" "
|
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" format)\n"
|
||||||
"format)\n"
|
|
||||||
" +[no]vc (TCP mode (+[no]tcp))\n"
|
" +[no]vc (TCP mode (+[no]tcp))\n"
|
||||||
" +[no]zflag (Set Z flag in query)\n"
|
" +[no]zflag (Set Z flag in query)\n"
|
||||||
" global d-opts and servers (before host name) affect all queries.\n"
|
" global d-opts and servers (before host name) affect all queries.\n"
|
||||||
@@ -251,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
|
||||||
@@ -292,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 {
|
||||||
@@ -310,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -343,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;
|
||||||
|
|
||||||
@@ -371,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");
|
||||||
@@ -433,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" };
|
||||||
@@ -448,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;
|
||||||
@@ -508,9 +496,8 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
|||||||
check_result(result, "dns_master_stylecreate");
|
check_result(result, "dns_master_stylecreate");
|
||||||
|
|
||||||
if (query->lookup->cmdline[0] != 0) {
|
if (query->lookup->cmdline[0] != 0) {
|
||||||
if (!short_form && printcmd) {
|
if (!short_form)
|
||||||
fputs(query->lookup->cmdline, stdout);
|
fputs(query->lookup->cmdline, stdout);
|
||||||
}
|
|
||||||
query->lookup->cmdline[0]=0;
|
query->lookup->cmdline[0]=0;
|
||||||
}
|
}
|
||||||
debug("printmessage(%s %s %s)", headers ? "headers" : "noheaders",
|
debug("printmessage(%s %s %s)", headers ? "headers" : "noheaders",
|
||||||
@@ -533,7 +520,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
|||||||
check_result(result, "isc_buffer_allocate");
|
check_result(result, "isc_buffer_allocate");
|
||||||
|
|
||||||
if (query->lookup->comments && !short_form) {
|
if (query->lookup->comments && !short_form) {
|
||||||
if (query->lookup->cmdline[0] != 0 && printcmd)
|
if (query->lookup->cmdline[0] != 0)
|
||||||
printf("; %s\n", query->lookup->cmdline);
|
printf("; %s\n", query->lookup->cmdline);
|
||||||
if (msg == query->lookup->sendmsg)
|
if (msg == query->lookup->sendmsg)
|
||||||
printf(";; Sending:\n");
|
printf(";; Sending:\n");
|
||||||
@@ -702,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) {
|
||||||
@@ -729,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));
|
||||||
}
|
}
|
||||||
@@ -744,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);
|
||||||
@@ -761,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);
|
||||||
@@ -868,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");
|
||||||
@@ -904,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;
|
||||||
@@ -1017,7 +1004,7 @@ plus_option(char *option, bool is_batchfile,
|
|||||||
code = NULL;
|
code = NULL;
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
code = strtok_r(value,
|
code = strtok_r(value,
|
||||||
":",
|
":",
|
||||||
&last);
|
&last);
|
||||||
}
|
}
|
||||||
if (code == NULL) {
|
if (code == NULL) {
|
||||||
@@ -1175,17 +1162,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;
|
||||||
@@ -1243,7 +1230,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]) {
|
||||||
@@ -1319,13 +1306,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;
|
||||||
@@ -1419,7 +1406,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:
|
||||||
@@ -1452,17 +1439,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 = true;
|
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 */
|
||||||
@@ -1496,12 +1483,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;
|
||||||
@@ -1523,7 +1510,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 */
|
||||||
@@ -1549,19 +1536,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 = "46dhimnruv";
|
static const char *single_dash_opts = "46dhimnuv";
|
||||||
static const char *dash_opts = "46bcdfhikmnpqrtvyx";
|
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;
|
||||||
@@ -1570,7 +1557,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]) {
|
||||||
/*
|
/*
|
||||||
@@ -1583,21 +1570,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':
|
||||||
@@ -1605,17 +1592,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':
|
||||||
/* deprecated */
|
ip6_int = ISC_TRUE;
|
||||||
break;
|
break;
|
||||||
case 'm': /* memdebug */
|
case 'm': /* memdebug */
|
||||||
/* memdebug is handled in preparse_args() */
|
/* memdebug is handled in preparse_args() */
|
||||||
@@ -1623,12 +1610,8 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
case 'n':
|
case 'n':
|
||||||
/* deprecated */
|
/* deprecated */
|
||||||
break;
|
break;
|
||||||
case 'r':
|
|
||||||
debug("digrc (late)");
|
|
||||||
digrc = false;
|
|
||||||
break;
|
|
||||||
case 'u':
|
case 'u':
|
||||||
(*lookup)->use_usec = true;
|
(*lookup)->use_usec = ISC_TRUE;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
version();
|
version();
|
||||||
@@ -1638,14 +1621,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)
|
||||||
@@ -1675,20 +1658,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",
|
||||||
@@ -1710,23 +1693,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;
|
||||||
@@ -1746,9 +1729,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)
|
||||||
@@ -1757,19 +1740,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 "
|
||||||
@@ -1797,23 +1780,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,
|
||||||
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;
|
||||||
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 {
|
||||||
@@ -1827,7 +1811,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
return (false);
|
return (ISC_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
@@ -1853,50 +1837,24 @@ preparse_args(int argc, char **argv) {
|
|||||||
option = &rv[0][1];
|
option = &rv[0][1];
|
||||||
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
||||||
switch (option[0]) {
|
switch (option[0]) {
|
||||||
case 'd':
|
|
||||||
/* For debugging early startup */
|
|
||||||
debugging = true;
|
|
||||||
break;
|
|
||||||
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 'r':
|
|
||||||
/*
|
|
||||||
* Must be done early, because ~/.digrc
|
|
||||||
* is read before command line parsing
|
|
||||||
*/
|
|
||||||
debug("digrc (early)");
|
|
||||||
digrc = false;
|
|
||||||
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];
|
||||||
}
|
}
|
||||||
if (strlen(option) == 0U) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
/* Look for dash value option. */
|
|
||||||
if (strpbrk(option, dash_opts) != &option[0] ||
|
|
||||||
strlen(option) > 1U) {
|
|
||||||
/* Error or value in option. */
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
/* Dash value is next argument so we need to skip it. */
|
|
||||||
rc--, rv++;
|
|
||||||
/* Handle missing argument */
|
|
||||||
if (rc == 0)
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1917,16 +1875,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];
|
||||||
@@ -1936,7 +1894,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
|
||||||
@@ -1953,9 +1911,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
|
||||||
/*
|
/*
|
||||||
@@ -1963,9 +1921,8 @@ parse_args(bool is_batchfile, bool config_only,
|
|||||||
*/
|
*/
|
||||||
INSIST(batchfp == NULL);
|
INSIST(batchfp == NULL);
|
||||||
homedir = getenv("HOME");
|
homedir = getenv("HOME");
|
||||||
if (homedir != NULL && digrc) {
|
if (homedir != NULL) {
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
debug("digrc (open)");
|
|
||||||
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
|
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
|
||||||
homedir);
|
homedir);
|
||||||
if (n < sizeof(rcfile)) {
|
if (n < sizeof(rcfile)) {
|
||||||
@@ -1981,7 +1938,7 @@ parse_args(bool is_batchfile, bool config_only,
|
|||||||
".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);
|
||||||
@@ -1991,8 +1948,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;
|
||||||
}
|
}
|
||||||
@@ -2075,10 +2032,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,
|
||||||
@@ -2091,10 +2048,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 =
|
||||||
@@ -2104,8 +2061,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;
|
||||||
}
|
}
|
||||||
@@ -2117,7 +2074,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2125,16 +2082,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);
|
||||||
@@ -2170,7 +2127,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;
|
||||||
@@ -2180,17 +2137,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);
|
||||||
}
|
}
|
||||||
@@ -2227,7 +2184,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;
|
||||||
@@ -2264,7 +2221,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");
|
||||||
@@ -2276,7 +2233,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2313,7 +2270,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();
|
||||||
|
|
||||||
|
|||||||
+34
-64
@@ -52,8 +52,6 @@
|
|||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2017</year>
|
<year>2017</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
@@ -133,10 +131,9 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
It is possible to set per-user defaults for <command>dig</command> via
|
It is possible to set per-user defaults for <command>dig</command> via
|
||||||
<filename>${HOME}/.digrc</filename>. This file is read and any
|
<filename>${HOME}/.digrc</filename>. This file is read and
|
||||||
options in it are applied before the command line arguments.
|
any options in it
|
||||||
The <option>-r</option> option disables this feature, for
|
are applied before the command line arguments.
|
||||||
scripts that need predictable behaviour.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -274,6 +271,17 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-i</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
|
||||||
|
domain, which is no longer in use. Obsolete bit string
|
||||||
|
label queries (RFC 2874) are not attempted.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-k <replaceable class="parameter">keyfile</replaceable></term>
|
<term>-k <replaceable class="parameter">keyfile</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -326,16 +334,6 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-r</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Do not read options from <filename>${HOME}/.digrc</filename>.
|
|
||||||
This is useful for scripts that need predictable behaviour.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -396,7 +394,8 @@
|
|||||||
<literal>94.2.0.192.in-addr.arpa</literal> and sets the
|
<literal>94.2.0.192.in-addr.arpa</literal> and sets the
|
||||||
query type and class to PTR and IN respectively. IPv6
|
query type and class to PTR and IN respectively. IPv6
|
||||||
addresses are looked up using nibble format under the
|
addresses are looked up using nibble format under the
|
||||||
IP6.ARPA domain.
|
IP6.ARPA domain (but see also the <option>-i</option>
|
||||||
|
option).
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -594,11 +593,9 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Toggles the printing of the initial comment in the
|
Toggles the printing of the initial comment in the
|
||||||
output, identifying the version of <command>dig</command>
|
output identifying the version of <command>dig</command>
|
||||||
and the query options that have been applied. This option
|
and the query options that have been applied. This
|
||||||
always has global effect; it cannot be set globally
|
comment is printed by default.
|
||||||
and then overridden on a per-lookup basis. The default
|
|
||||||
is to print this comment.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -607,18 +604,8 @@
|
|||||||
<term><option>+[no]comments</option></term>
|
<term><option>+[no]comments</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Toggles the display of some comment lines in the output,
|
Toggle the display of comment lines in the output.
|
||||||
containing information about the packet header and
|
The default is to print comments.
|
||||||
OPT pseudosection, and the names of the response
|
|
||||||
section. The default is to print these comments.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Other types of comments in the output are not affected by
|
|
||||||
this option, but can be controlled using other command
|
|
||||||
line switches. These include <command>+[no]cmd</command>,
|
|
||||||
<command>+[no]question</command>,
|
|
||||||
<command>+[no]stats</command>, and
|
|
||||||
<command>+[no]rrcomments</command>.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -802,13 +789,7 @@
|
|||||||
<para>
|
<para>
|
||||||
Process [do not process] IDN domain names on input.
|
Process [do not process] IDN domain names on input.
|
||||||
This requires IDN SUPPORT to have been enabled at
|
This requires IDN SUPPORT to have been enabled at
|
||||||
compile time.
|
compile time. The default is to process IDN input.
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The default is to process IDN input when standard output
|
|
||||||
is a tty. The IDN processing on input is disabled when
|
|
||||||
dig output is redirected to files, pipes, and other
|
|
||||||
non-tty file descriptors.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -819,13 +800,7 @@
|
|||||||
<para>
|
<para>
|
||||||
Convert [do not convert] puny code on output.
|
Convert [do not convert] puny code on output.
|
||||||
This requires IDN SUPPORT to have been enabled at
|
This requires IDN SUPPORT to have been enabled at
|
||||||
compile time.
|
compile time. The default is to convert output.
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The default is to process puny code on output when
|
|
||||||
standard output is a tty. The puny code processing on
|
|
||||||
output is disabled when dig output is redirected to
|
|
||||||
files, pipes, and other non-tty file descriptors.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -968,8 +943,8 @@
|
|||||||
<term><option>+[no]qr</option></term>
|
<term><option>+[no]qr</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Toggles the display of the query message as it is sent.
|
Print [do not print] the query as it is sent. By
|
||||||
By default, the query is not printed.
|
default, the query is not printed.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -978,7 +953,7 @@
|
|||||||
<term><option>+[no]question</option></term>
|
<term><option>+[no]question</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Toggles the display of the question section of a query
|
Print [do not print] the question section of a query
|
||||||
when an answer is returned. The default is to print
|
when an answer is returned. The default is to print
|
||||||
the question section as a comment.
|
the question section as a comment.
|
||||||
</para>
|
</para>
|
||||||
@@ -1013,10 +988,8 @@
|
|||||||
in the query. This bit is set by default, which means
|
in the query. This bit is set by default, which means
|
||||||
<command>dig</command> normally sends recursive
|
<command>dig</command> normally sends recursive
|
||||||
queries. Recursion is automatically disabled when
|
queries. Recursion is automatically disabled when
|
||||||
using the <parameter>+nssearch</parameter> option, and
|
the <parameter>+nssearch</parameter> or
|
||||||
when using <parameter>+trace</parameter> except for
|
<parameter>+trace</parameter> query options are used.
|
||||||
an initial recursive query to get the list of root
|
|
||||||
servers.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -1069,9 +1042,7 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Provide a terse answer. The default is to print the
|
Provide a terse answer. The default is to print the
|
||||||
answer in a verbose form. This option always has global
|
answer in a verbose form.
|
||||||
effect; it cannot be set globally and then overridden on
|
|
||||||
a per-lookup basis.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -1116,9 +1087,10 @@
|
|||||||
<term><option>+[no]stats</option></term>
|
<term><option>+[no]stats</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Toggles the printing of statistics: when the query was made,
|
This query option toggles the printing of statistics:
|
||||||
the size of the reply and so on. The default behavior is to
|
when the query was made, the size of the reply and
|
||||||
print the query statistics as a comment after each lookup.
|
so on. The default behavior is to print the query
|
||||||
|
statistics.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -1358,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>
|
||||||
|
|
||||||
|
|||||||
+32
-60
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2011, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -106,10 +106,9 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
|
It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
|
||||||
<code class="filename">${HOME}/.digrc</code>. This file is read and any
|
<code class="filename">${HOME}/.digrc</code>. This file is read and
|
||||||
options in it are applied before the command line arguments.
|
any options in it
|
||||||
The <code class="option">-r</code> option disables this feature, for
|
are applied before the command line arguments.
|
||||||
scripts that need predictable behaviour.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -228,6 +227,14 @@
|
|||||||
<span class="command"><strong>dig</strong></span> using the command-line interface.
|
<span class="command"><strong>dig</strong></span> using the command-line interface.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term">-i</span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
|
||||||
|
domain, which is no longer in use. Obsolete bit string
|
||||||
|
label queries (RFC 2874) are not attempted.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
|
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -267,13 +274,6 @@
|
|||||||
the <em class="parameter"><code>name</code></em> from other arguments.
|
the <em class="parameter"><code>name</code></em> from other arguments.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-r</span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Do not read options from <code class="filename">${HOME}/.digrc</code>.
|
|
||||||
This is useful for scripts that need predictable behaviour.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -324,7 +324,8 @@
|
|||||||
<code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
|
<code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
|
||||||
query type and class to PTR and IN respectively. IPv6
|
query type and class to PTR and IN respectively. IPv6
|
||||||
addresses are looked up using nibble format under the
|
addresses are looked up using nibble format under the
|
||||||
IP6.ARPA domain.
|
IP6.ARPA domain (but see also the <code class="option">-i</code>
|
||||||
|
option).
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
|
<dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
|
||||||
@@ -481,28 +482,16 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Toggles the printing of the initial comment in the
|
Toggles the printing of the initial comment in the
|
||||||
output, identifying the version of <span class="command"><strong>dig</strong></span>
|
output identifying the version of <span class="command"><strong>dig</strong></span>
|
||||||
and the query options that have been applied. This option
|
and the query options that have been applied. This
|
||||||
always has global effect; it cannot be set globally
|
comment is printed by default.
|
||||||
and then overridden on a per-lookup basis. The default
|
|
||||||
is to print this comment.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Toggles the display of some comment lines in the output,
|
Toggle the display of comment lines in the output.
|
||||||
containing information about the packet header and
|
The default is to print comments.
|
||||||
OPT pseudosection, and the names of the response
|
|
||||||
section. The default is to print these comments.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Other types of comments in the output are not affected by
|
|
||||||
this option, but can be controlled using other command
|
|
||||||
line switches. These include <span class="command"><strong>+[no]cmd</strong></span>,
|
|
||||||
<span class="command"><strong>+[no]question</strong></span>,
|
|
||||||
<span class="command"><strong>+[no]stats</strong></span>, and
|
|
||||||
<span class="command"><strong>+[no]rrcomments</strong></span>.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
|
||||||
@@ -642,13 +631,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Process [do not process] IDN domain names on input.
|
Process [do not process] IDN domain names on input.
|
||||||
This requires IDN SUPPORT to have been enabled at
|
This requires IDN SUPPORT to have been enabled at
|
||||||
compile time.
|
compile time. The default is to process IDN input.
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The default is to process IDN input when standard output
|
|
||||||
is a tty. The IDN processing on input is disabled when
|
|
||||||
dig output is redirected to files, pipes, and other
|
|
||||||
non-tty file descriptors.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
|
||||||
@@ -656,13 +639,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Convert [do not convert] puny code on output.
|
Convert [do not convert] puny code on output.
|
||||||
This requires IDN SUPPORT to have been enabled at
|
This requires IDN SUPPORT to have been enabled at
|
||||||
compile time.
|
compile time. The default is to convert output.
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The default is to process puny code on output when
|
|
||||||
standard output is a tty. The puny code processing on
|
|
||||||
output is disabled when dig output is redirected to
|
|
||||||
files, pipes, and other non-tty file descriptors.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
|
||||||
@@ -769,14 +746,14 @@
|
|||||||
<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Toggles the display of the query message as it is sent.
|
Print [do not print] the query as it is sent. By
|
||||||
By default, the query is not printed.
|
default, the query is not printed.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]question</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]question</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Toggles the display of the question section of a query
|
Print [do not print] the question section of a query
|
||||||
when an answer is returned. The default is to print
|
when an answer is returned. The default is to print
|
||||||
the question section as a comment.
|
the question section as a comment.
|
||||||
</p>
|
</p>
|
||||||
@@ -802,10 +779,8 @@
|
|||||||
in the query. This bit is set by default, which means
|
in the query. This bit is set by default, which means
|
||||||
<span class="command"><strong>dig</strong></span> normally sends recursive
|
<span class="command"><strong>dig</strong></span> normally sends recursive
|
||||||
queries. Recursion is automatically disabled when
|
queries. Recursion is automatically disabled when
|
||||||
using the <em class="parameter"><code>+nssearch</code></em> option, and
|
the <em class="parameter"><code>+nssearch</code></em> or
|
||||||
when using <em class="parameter"><code>+trace</code></em> except for
|
<em class="parameter"><code>+trace</code></em> query options are used.
|
||||||
an initial recursive query to get the list of root
|
|
||||||
servers.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
|
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
|
||||||
@@ -846,9 +821,7 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Provide a terse answer. The default is to print the
|
Provide a terse answer. The default is to print the
|
||||||
answer in a verbose form. This option always has global
|
answer in a verbose form.
|
||||||
effect; it cannot be set globally and then overridden on
|
|
||||||
a per-lookup basis.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
|
||||||
@@ -881,9 +854,10 @@
|
|||||||
<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Toggles the printing of statistics: when the query was made,
|
This query option toggles the printing of statistics:
|
||||||
the size of the reply and so on. The default behavior is to
|
when the query was made, the size of the reply and
|
||||||
print the query statistics as a comment after each lookup.
|
so on. The default behavior is to print the query
|
||||||
|
statistics.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
|
||||||
@@ -1087,9 +1061,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 <em class="parameter"><code>+noidnin</code></em> and
|
parameters <em class="parameter"><code>+noidnin</code></em> and
|
||||||
<em class="parameter"><code>+noidnout</code></em> or define
|
<em class="parameter"><code>+noidnout</code></em>.
|
||||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+423
-497
File diff suppressed because it is too large
Load Diff
+8
-3
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -112,6 +112,11 @@ Print debugging traces\&. Equivalent to the
|
|||||||
verbose option\&.
|
verbose option\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-i
|
||||||
|
.RS 4
|
||||||
|
Obsolete\&. Use the IP6\&.INT domain for reverse lookups of IPv6 addresses as defined in RFC1886 and deprecated in RFC4159\&. The default is to use IP6\&.ARPA as specified in RFC3596\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-l
|
\-l
|
||||||
.RS 4
|
.RS 4
|
||||||
List zone: The
|
List zone: The
|
||||||
@@ -252,7 +257,7 @@ If
|
|||||||
\fBhost\fR
|
\fBhost\fR
|
||||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
||||||
\fBhost\fR
|
\fBhost\fR
|
||||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, define the
|
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, defines the
|
||||||
\fBIDN_DISABLE\fR
|
\fBIDN_DISABLE\fR
|
||||||
environment variable\&. The IDN support is disabled if the variable is set when
|
environment variable\&. The IDN support is disabled if the variable is set when
|
||||||
\fBhost\fR
|
\fBhost\fR
|
||||||
@@ -269,5 +274,5 @@ runs\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+96
-99
@@ -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",
|
||||||
@@ -143,6 +141,7 @@ show_usage(void) {
|
|||||||
" -c specifies query class for non-IN data\n"
|
" -c specifies query class for non-IN data\n"
|
||||||
" -C compares SOA records on authoritative nameservers\n"
|
" -C compares SOA records on authoritative nameservers\n"
|
||||||
" -d is equivalent to -v\n"
|
" -d is equivalent to -v\n"
|
||||||
|
" -i IP6.INT reverse lookups\n"
|
||||||
" -l lists all hosts in a domain, using AXFR\n"
|
" -l lists all hosts in a domain, using AXFR\n"
|
||||||
" -m set memory debugging flag (trace|record|usage)\n"
|
" -m set memory debugging flag (trace|record|usage)\n"
|
||||||
" -N changes the number of dots allowed before root lookup is done\n"
|
" -N changes the number of dots allowed before root lookup is done\n"
|
||||||
@@ -151,7 +150,6 @@ show_usage(void) {
|
|||||||
" -s a SERVFAIL response should stop query\n"
|
" -s a SERVFAIL response should stop query\n"
|
||||||
" -t specifies the query type\n"
|
" -t specifies the query type\n"
|
||||||
" -T enables TCP/IP mode\n"
|
" -T enables TCP/IP mode\n"
|
||||||
" -U enables UDP mode\n"
|
|
||||||
" -v enables verbose output\n"
|
" -v enables verbose output\n"
|
||||||
" -V print version number and exit\n"
|
" -V print version number and exit\n"
|
||||||
" -w specifies to wait forever for a reply\n"
|
" -w specifies to wait forever for a reply\n"
|
||||||
@@ -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);
|
||||||
@@ -396,14 +394,14 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
|||||||
dns_rdataset_current(rdataset, &rdata);
|
dns_rdataset_current(rdataset, &rdata);
|
||||||
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
||||||
check_result(result, "dns_rdata_tostruct");
|
check_result(result, "dns_rdata_tostruct");
|
||||||
dns_name_copynf(&cname.cname, qname);
|
dns_name_copy(&cname.cname, qname, NULL);
|
||||||
dns_rdata_freestruct(&cname);
|
dns_rdata_freestruct(&cname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
||||||
@@ -455,25 +453,25 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
|||||||
|
|
||||||
/* Add AAAA and MX lookups. */
|
/* Add AAAA and MX lookups. */
|
||||||
name = dns_fixedname_initname(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
dns_name_copynf(query->lookup->name, name);
|
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,50 +613,49 @@ 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;
|
||||||
case 'c': break;
|
case 'c': break;
|
||||||
case 'C': break;
|
|
||||||
case 'd': break;
|
case 'd': break;
|
||||||
case 'D':
|
|
||||||
if (debugging)
|
|
||||||
debugtiming = true;
|
|
||||||
debugging = true;
|
|
||||||
break;
|
|
||||||
case 'i': break;
|
case 'i': break;
|
||||||
case 'l': break;
|
case 'l': break;
|
||||||
case 'n': break;
|
case 'n': break;
|
||||||
case 'N': break;
|
|
||||||
case 'r': break;
|
case 'r': break;
|
||||||
case 'R': break;
|
|
||||||
case 's': break;
|
case 's': break;
|
||||||
case 't': break;
|
case 't': break;
|
||||||
case 'T': break;
|
|
||||||
case 'U': break;
|
|
||||||
case 'v': break;
|
case 'v': break;
|
||||||
case 'V':
|
case 'V':
|
||||||
version();
|
version();
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case 'w': break;
|
case 'w': break;
|
||||||
|
case 'C': break;
|
||||||
|
case 'D':
|
||||||
|
if (debugging)
|
||||||
|
debugtiming = ISC_TRUE;
|
||||||
|
debugging = ISC_TRUE;
|
||||||
|
break;
|
||||||
|
case 'N': break;
|
||||||
|
case 'R': break;
|
||||||
|
case 'T': break;
|
||||||
case 'W': break;
|
case 'W': break;
|
||||||
default:
|
default:
|
||||||
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;
|
||||||
@@ -667,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,
|
||||||
@@ -715,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;
|
||||||
@@ -745,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':
|
||||||
/* deprecated */
|
lookup->ip6_int = ISC_TRUE;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
/* deprecated */
|
/* deprecated */
|
||||||
@@ -789,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",
|
||||||
@@ -822,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -837,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, true)
|
if (get_reverse(store, sizeof(store), hostname,
|
||||||
== 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -881,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)
|
||||||
|
|||||||
+13
-3
@@ -47,8 +47,6 @@
|
|||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2017</year>
|
<year>2017</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
@@ -181,6 +179,18 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-i</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Obsolete.
|
||||||
|
Use the IP6.INT domain for reverse lookups of IPv6
|
||||||
|
addresses as defined in RFC1886 and deprecated in RFC4159.
|
||||||
|
The default is to use IP6.ARPA as specified in RFC3596.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-l</term>
|
<term>-l</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -379,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.
|
||||||
|
|||||||
+11
-2
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -138,6 +138,15 @@
|
|||||||
Equivalent to the <code class="option">-v</code> verbose option.
|
Equivalent to the <code class="option">-v</code> verbose option.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term">-i</span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Obsolete.
|
||||||
|
Use the IP6.INT domain for reverse lookups of IPv6
|
||||||
|
addresses as defined in RFC1886 and deprecated in RFC4159.
|
||||||
|
The default is to use IP6.ARPA as specified in RFC3596.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt><span class="term">-l</span></dt>
|
<dt><span class="term">-l</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -302,7 +311,7 @@
|
|||||||
<span class="command"><strong>host</strong></span> appropriately converts character encoding of
|
<span class="command"><strong>host</strong></span> 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 <code class="envar">IDN_DISABLE</code> environment variable.
|
the <code class="envar">IDN_DISABLE</code> environment variable.
|
||||||
The IDN support is disabled if the variable is set when
|
The IDN support is disabled if the variable is set when
|
||||||
<span class="command"><strong>host</strong></span> runs.
|
<span class="command"><strong>host</strong></span> runs.
|
||||||
|
|||||||
+42
-45
@@ -14,19 +14,16 @@
|
|||||||
|
|
||||||
/*! \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>
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
#include <isc/list.h>
|
#include <isc/list.h>
|
||||||
#include <isc/magic.h>
|
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/sockaddr.h>
|
#include <isc/sockaddr.h>
|
||||||
@@ -82,14 +79,9 @@ typedef struct dig_server dig_server_t;
|
|||||||
typedef ISC_LIST(dig_server_t) dig_serverlist_t;
|
typedef ISC_LIST(dig_server_t) dig_serverlist_t;
|
||||||
typedef struct dig_searchlist dig_searchlist_t;
|
typedef struct dig_searchlist dig_searchlist_t;
|
||||||
|
|
||||||
#define DIG_QUERY_MAGIC ISC_MAGIC('D','i','g','q')
|
|
||||||
|
|
||||||
#define DIG_VALID_QUERY(x) ISC_MAGIC_VALID((x), DIG_QUERY_MAGIC)
|
|
||||||
|
|
||||||
|
|
||||||
/*% The dig_lookup structure */
|
/*% 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,
|
||||||
@@ -109,6 +101,7 @@ struct dig_lookup {
|
|||||||
trace_root, /*% initial query for either +trace or +nssearch */
|
trace_root, /*% initial query for either +trace or +nssearch */
|
||||||
tcp_mode,
|
tcp_mode,
|
||||||
tcp_mode_set,
|
tcp_mode_set,
|
||||||
|
ip6_int,
|
||||||
comments,
|
comments,
|
||||||
stats,
|
stats,
|
||||||
section_question,
|
section_question,
|
||||||
@@ -146,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;
|
||||||
@@ -165,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;
|
||||||
@@ -190,9 +183,8 @@ struct dig_lookup {
|
|||||||
|
|
||||||
/*% The dig_query structure */
|
/*% The dig_query structure */
|
||||||
struct dig_query {
|
struct dig_query {
|
||||||
unsigned int magic;
|
|
||||||
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,
|
||||||
@@ -202,26 +194,30 @@ 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,
|
||||||
|
recvlist,
|
||||||
|
lengthlist;
|
||||||
isc_buffer_t recvbuf,
|
isc_buffer_t recvbuf,
|
||||||
lengthbuf,
|
lengthbuf,
|
||||||
tmpsendbuf,
|
slbuf;
|
||||||
sendbuf;
|
char *recvspace,
|
||||||
char *recvspace, *tmpsendspace,
|
lengthspace[4],
|
||||||
lengthspace[4];
|
slspace[4];
|
||||||
isc_socket_t *sock;
|
isc_socket_t *sock;
|
||||||
ISC_LINK(dig_query_t) link;
|
ISC_LINK(dig_query_t) link;
|
||||||
ISC_LINK(dig_query_t) clink;
|
ISC_LINK(dig_query_t) clink;
|
||||||
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_timer_t *timer;
|
isc_timer_t *timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -248,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;
|
||||||
@@ -264,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.
|
||||||
@@ -286,7 +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 strict);
|
get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
|
||||||
|
isc_boolean_t strict);
|
||||||
|
|
||||||
ISC_PLATFORM_NORETURN_PRE void
|
ISC_PLATFORM_NORETURN_PRE void
|
||||||
fatal(const char *format, ...)
|
fatal(const char *format, ...)
|
||||||
@@ -305,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
|
||||||
@@ -327,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
|
||||||
@@ -344,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);
|
||||||
@@ -379,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.
|
||||||
*/
|
*/
|
||||||
@@ -421,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
|
||||||
|
|||||||
+3
-17
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2004-2007, 2010, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -233,10 +233,7 @@ Change the default TCP/UDP name server port to
|
|||||||
.RS 4
|
.RS 4
|
||||||
Change the type of the information query\&.
|
Change the type of the information query\&.
|
||||||
.sp
|
.sp
|
||||||
(Default = A and then AAAA; abbreviations = q, ty)
|
(Default = A; abbreviations = q, ty)
|
||||||
.sp
|
|
||||||
\fBNote:\fR
|
|
||||||
It is only possible to specify one query type, only the default behavior looks up both when an alternative is not specified\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB\fI[no]\fR\fR\fBrecurse\fR
|
\fB\fI[no]\fR\fR\fBrecurse\fR
|
||||||
@@ -280,17 +277,6 @@ Try the next nameserver if a nameserver responds with SERVFAIL or a referral (no
|
|||||||
.PP
|
.PP
|
||||||
\fBnslookup\fR
|
\fBnslookup\fR
|
||||||
returns with an exit status of 1 if any query failed, and 0 otherwise\&.
|
returns with an exit status of 1 if any query failed, and 0 otherwise\&.
|
||||||
.SH "IDN SUPPORT"
|
|
||||||
.PP
|
|
||||||
If
|
|
||||||
\fBnslookup\fR
|
|
||||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
|
||||||
\fBnslookup\fR
|
|
||||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, define the
|
|
||||||
\fBIDN_DISABLE\fR
|
|
||||||
environment variable\&. The IDN support is disabled if the variable is set when
|
|
||||||
\fBnslookup\fR
|
|
||||||
runs or when the standard output is not a tty\&.
|
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
.PP
|
.PP
|
||||||
/etc/resolv\&.conf
|
/etc/resolv\&.conf
|
||||||
@@ -304,5 +290,5 @@ runs or when the standard output is not a tty\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2004-2007, 2010, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+95
-111
@@ -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;
|
||||||
@@ -425,13 +423,13 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
|||||||
dns_rdataset_current(rdataset, &rdata);
|
dns_rdataset_current(rdataset, &rdata);
|
||||||
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
||||||
check_result(result, "dns_rdata_tostruct");
|
check_result(result, "dns_rdata_tostruct");
|
||||||
dns_name_copynf(&cname.cname, qname);
|
dns_name_copy(&cname.cname, qname, NULL);
|
||||||
dns_rdata_freestruct(&cname);
|
dns_rdata_freestruct(&cname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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("------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,15 +476,15 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
|||||||
|
|
||||||
/* Add AAAA lookup. */
|
/* Add AAAA lookup. */
|
||||||
name = dns_fixedname_initname(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
dns_name_copynf(query->lookup->name, name);
|
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, 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
|
||||||
@@ -879,29 +877,12 @@ get_next_command(void) {
|
|||||||
isc_mem_free(mctx, buf);
|
isc_mem_free(mctx, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
ISC_PLATFORM_NORETURN_PRE static void
|
|
||||||
usage(void) ISC_PLATFORM_NORETURN_POST;
|
|
||||||
|
|
||||||
static void
|
|
||||||
usage(void) {
|
|
||||||
fprintf(stderr, "Usage:\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" nslookup [-opt ...] # interactive mode using default server\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" nslookup [-opt ...] - server # interactive mode using 'server'\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" nslookup [-opt ...] host # just look up 'host' using default server\n");
|
|
||||||
fprintf(stderr,
|
|
||||||
" nslookup [-opt ...] host server # just look up 'host' using 'server'\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 && argv[0] != NULL; 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] == '-') {
|
||||||
if (strncasecmp(argv[0], "-ver", 4) == 0) {
|
if (strncasecmp(argv[0], "-ver", 4) == 0) {
|
||||||
@@ -910,18 +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 {
|
||||||
if (argv[1] != NULL) {
|
|
||||||
usage();
|
|
||||||
}
|
|
||||||
set_nameserver(argv[0]);
|
set_nameserver(argv[0]);
|
||||||
check_ra = false;
|
check_ra = ISC_FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -943,6 +921,12 @@ flush_lookup_list(void) {
|
|||||||
ISC_SOCKCANCEL_ALL);
|
ISC_SOCKCANCEL_ALL);
|
||||||
isc_socket_detach(&q->sock);
|
isc_socket_detach(&q->sock);
|
||||||
}
|
}
|
||||||
|
if (ISC_LINK_LINKED(&q->recvbuf, link))
|
||||||
|
ISC_LIST_DEQUEUE(q->recvlist, &q->recvbuf,
|
||||||
|
link);
|
||||||
|
if (ISC_LINK_LINKED(&q->lengthbuf, link))
|
||||||
|
ISC_LIST_DEQUEUE(q->lengthlist, &q->lengthbuf,
|
||||||
|
link);
|
||||||
isc_buffer_invalidate(&q->recvbuf);
|
isc_buffer_invalidate(&q->recvbuf);
|
||||||
isc_buffer_invalidate(&q->lengthbuf);
|
isc_buffer_invalidate(&q->lengthbuf);
|
||||||
qp = q;
|
qp = q;
|
||||||
@@ -986,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;
|
||||||
@@ -1006,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();
|
||||||
@@ -1020,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();
|
||||||
|
|
||||||
|
|||||||
+22
-46
@@ -71,8 +71,6 @@
|
|||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2017</year>
|
<year>2017</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
@@ -308,7 +306,7 @@ nslookup -query=hinfo -timeout=10
|
|||||||
The class specifies the protocol group of the information.
|
The class specifies the protocol group of the information.
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = IN; abbreviation = cl)
|
(Default = IN; abbreviation = cl)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -318,10 +316,10 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<term><constant><replaceable><optional>no</optional></replaceable>debug</constant></term>
|
<term><constant><replaceable><optional>no</optional></replaceable>debug</constant></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Turn on or off the display of the full response packet and
|
Turn on or off the display of the full response packet and
|
||||||
any intermediate response packets when searching.
|
any intermediate response packets when searching.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = nodebug; abbreviation = <optional>no</optional>deb)
|
(Default = nodebug; abbreviation = <optional>no</optional>deb)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -332,9 +330,9 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Turn debugging mode on or off. This displays more about
|
Turn debugging mode on or off. This displays more about
|
||||||
what nslookup is doing.
|
what nslookup is doing.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = nod2)
|
(Default = nod2)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -358,7 +356,7 @@ nslookup -query=hinfo -timeout=10
|
|||||||
names in the domain search list to the request until an
|
names in the domain search list to the request until an
|
||||||
answer is received.
|
answer is received.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = search)
|
(Default = search)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -370,7 +368,7 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<para>
|
<para>
|
||||||
Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
|
Change the default TCP/UDP name server port to <replaceable>value</replaceable>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = 53; abbreviation = po)
|
(Default = 53; abbreviation = po)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -389,15 +387,9 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<para>
|
<para>
|
||||||
Change the type of the information query.
|
Change the type of the information query.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = A and then AAAA; abbreviations = q, ty)
|
(Default = A; abbreviations = q, ty)
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
<emphasis role="bold">Note:</emphasis> It is
|
|
||||||
only possible to specify one query type, only
|
|
||||||
the default behavior looks up both when an
|
|
||||||
alternative is not specified.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@@ -409,7 +401,7 @@ nslookup -query=hinfo -timeout=10
|
|||||||
have the
|
have the
|
||||||
information.
|
information.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = recurse; abbreviation = [no]rec)
|
(Default = recurse; abbreviation = [no]rec)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -419,9 +411,9 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<term><constant>ndots=</constant><replaceable>number</replaceable></term>
|
<term><constant>ndots=</constant><replaceable>number</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set the number of dots (label separators) in a domain
|
Set the number of dots (label separators) in a domain
|
||||||
that will disable searching. Absolute names always
|
that will disable searching. Absolute names always
|
||||||
stop searching.
|
stop searching.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -452,7 +444,7 @@ nslookup -query=hinfo -timeout=10
|
|||||||
Always use a virtual circuit when sending requests to the
|
Always use a virtual circuit when sending requests to the
|
||||||
server.
|
server.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = novc)
|
(Default = novc)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -462,15 +454,15 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<term><constant><replaceable><optional>no</optional></replaceable>fail</constant></term>
|
<term><constant><replaceable><optional>no</optional></replaceable>fail</constant></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Try the next nameserver if a nameserver responds with
|
Try the next nameserver if a nameserver responds with
|
||||||
SERVFAIL or a referral (nofail) or terminate query
|
SERVFAIL or a referral (nofail) or terminate query
|
||||||
(fail) on such a response.
|
(fail) on such a response.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
(Default = nofail)
|
(Default = nofail)
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
@@ -486,22 +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 or when the standard output is not
|
|
||||||
a tty.
|
|
||||||
</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>
|
||||||
|
|||||||
+24
-47
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2004-2007, 2010, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -229,17 +229,17 @@ nslookup -query=hinfo -timeout=10
|
|||||||
The class specifies the protocol group of the information.
|
The class specifies the protocol group of the information.
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = IN; abbreviation = cl)
|
(Default = IN; abbreviation = cl)
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
|
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>debug</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Turn on or off the display of the full response packet and
|
Turn on or off the display of the full response packet and
|
||||||
any intermediate response packets when searching.
|
any intermediate response packets when searching.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
|
(Default = nodebug; abbreviation = [<span class="optional">no</span>]deb)
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -247,9 +247,9 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Turn debugging mode on or off. This displays more about
|
Turn debugging mode on or off. This displays more about
|
||||||
what nslookup is doing.
|
what nslookup is doing.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = nod2)
|
(Default = nod2)
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -267,7 +267,7 @@ nslookup -query=hinfo -timeout=10
|
|||||||
names in the domain search list to the request until an
|
names in the domain search list to the request until an
|
||||||
answer is received.
|
answer is received.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = search)
|
(Default = search)
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -276,7 +276,7 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<p>
|
<p>
|
||||||
Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
|
Change the default TCP/UDP name server port to <em class="replaceable"><code>value</code></em>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = 53; abbreviation = po)
|
(Default = 53; abbreviation = po)
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -289,15 +289,9 @@ nslookup -query=hinfo -timeout=10
|
|||||||
<p>
|
<p>
|
||||||
Change the type of the information query.
|
Change the type of the information query.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = A and then AAAA; abbreviations = q, ty)
|
(Default = A; abbreviations = q, ty)
|
||||||
</p>
|
</p>
|
||||||
<p>
|
|
||||||
<span class="bold"><strong>Note:</strong></span> It is
|
|
||||||
only possible to specify one query type, only
|
|
||||||
the default behavior looks up both when an
|
|
||||||
alternative is not specified.
|
|
||||||
</p>
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
|
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>recurse</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -306,16 +300,16 @@ nslookup -query=hinfo -timeout=10
|
|||||||
have the
|
have the
|
||||||
information.
|
information.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = recurse; abbreviation = [no]rec)
|
(Default = recurse; abbreviation = [no]rec)
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="constant">ndots=</code><em class="replaceable"><code>number</code></em></span></dt>
|
<dt><span class="term"><code class="constant">ndots=</code><em class="replaceable"><code>number</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Set the number of dots (label separators) in a domain
|
Set the number of dots (label separators) in a domain
|
||||||
that will disable searching. Absolute names always
|
that will disable searching. Absolute names always
|
||||||
stop searching.
|
stop searching.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
|
<dt><span class="term"><code class="constant">retry=</code><em class="replaceable"><code>number</code></em></span></dt>
|
||||||
@@ -337,21 +331,21 @@ nslookup -query=hinfo -timeout=10
|
|||||||
Always use a virtual circuit when sending requests to the
|
Always use a virtual circuit when sending requests to the
|
||||||
server.
|
server.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = novc)
|
(Default = novc)
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>fail</code></span></dt>
|
<dt><span class="term"><code class="constant"><em class="replaceable"><code>[<span class="optional">no</span>]</code></em>fail</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Try the next nameserver if a nameserver responds with
|
Try the next nameserver if a nameserver responds with
|
||||||
SERVFAIL or a referral (nofail) or terminate query
|
SERVFAIL or a referral (nofail) or terminate query
|
||||||
(fail) on such a response.
|
(fail) on such a response.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
(Default = nofail)
|
(Default = nofail)
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl></div>
|
</dl></div>
|
||||||
<p>
|
<p>
|
||||||
</p>
|
</p>
|
||||||
@@ -368,31 +362,14 @@ nslookup -query=hinfo -timeout=10
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="refsection">
|
<div class="refsection">
|
||||||
<a name="id-1.11"></a><h2>IDN SUPPORT</h2>
|
<a name="id-1.11"></a><h2>FILES</h2>
|
||||||
|
|
||||||
<p>
|
|
||||||
If <span class="command"><strong>nslookup</strong></span> has been built with IDN (internationalized
|
|
||||||
domain name) support, it can accept and display non-ASCII domain names.
|
|
||||||
<span class="command"><strong>nslookup</strong></span> appropriately converts character encoding of
|
|
||||||
domain name before sending a request to DNS server or displaying a
|
|
||||||
reply from the server.
|
|
||||||
If you'd like to turn off the IDN support for some reason, define
|
|
||||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
|
||||||
The IDN support is disabled if the variable is set when
|
|
||||||
<span class="command"><strong>nslookup</strong></span> runs or when the standard output is not
|
|
||||||
a tty.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="refsection">
|
|
||||||
<a name="id-1.12"></a><h2>FILES</h2>
|
|
||||||
|
|
||||||
<p><code class="filename">/etc/resolv.conf</code>
|
<p><code class="filename">/etc/resolv.conf</code>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="refsection">
|
<div class="refsection">
|
||||||
<a name="id-1.13"></a><h2>SEE ALSO</h2>
|
<a name="id-1.12"></a><h2>SEE ALSO</h2>
|
||||||
|
|
||||||
<p><span class="citerefentry">
|
<p><span class="citerefentry">
|
||||||
<span class="refentrytitle">dig</span>(1)
|
<span class="refentrytitle">dig</span>(1)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{F938F9B8-D395-4A40-BEC7-0122D289C692}</ProjectGuid>
|
<ProjectGuid>{F938F9B8-D395-4A40-BEC7-0122D289C692}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>dig</RootNamespace>
|
<RootNamespace>dig</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@@ -71,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@'">
|
||||||
@@ -101,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>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{140DE800-E552-43CC-B0C7-A33A92E368CA}</ProjectGuid>
|
<ProjectGuid>{140DE800-E552-43CC-B0C7-A33A92E368CA}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>dighost</RootNamespace>
|
<RootNamespace>dighost</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{BA1048A8-6961-4A20-BE12-08BE20611C9D}</ProjectGuid>
|
<ProjectGuid>{BA1048A8-6961-4A20-BE12-08BE20611C9D}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>host</RootNamespace>
|
<RootNamespace>host</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@@ -71,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@'">
|
||||||
@@ -101,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>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
<ProjectGuid>{C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}</ProjectGuid>
|
<ProjectGuid>{C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}</ProjectGuid>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>nslookup</RootNamespace>
|
<RootNamespace>nslookup</RootNamespace>
|
||||||
@WINDOWS_TARGET_PLATFORM_VERSION@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
@PLATFORM_TOOLSET@
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@@ -71,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@'">
|
||||||
@@ -101,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>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
|||||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
|
|
||||||
@@ -115,12 +115,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,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -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, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&.
|
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), 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
|
||||||
@@ -293,5 +293,5 @@ RFC 7344\&.
|
|||||||
.RE
|
.RE
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2017-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+57
-54
@@ -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>
|
||||||
@@ -28,7 +26,6 @@
|
|||||||
#include <isc/file.h>
|
#include <isc/file.h>
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/platform.h>
|
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/serial.h>
|
#include <isc/serial.h>
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
@@ -62,6 +59,10 @@
|
|||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *program = "dnssec-cds";
|
const char *program = "dnssec-cds";
|
||||||
int verbose;
|
int verbose;
|
||||||
|
|
||||||
@@ -83,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 dns_dsdigest_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 */
|
||||||
@@ -126,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;
|
||||||
dns_secalg_t algo;
|
isc_uint8_t algo;
|
||||||
dns_keytag_t tag;
|
dns_keytag_t tag;
|
||||||
} keyinfo_t;
|
} keyinfo_t;
|
||||||
|
|
||||||
@@ -160,8 +161,8 @@ verbose_time(int level, const char *msg, isc_stdtime_t time) {
|
|||||||
if (verbose < 3) {
|
if (verbose < 3) {
|
||||||
vbprintf(level, "%s %s\n", msg, timestr);
|
vbprintf(level, "%s %s\n", msg, timestr);
|
||||||
} else {
|
} else {
|
||||||
vbprintf(level, "%s %s (%" PRIu32 ")\n",
|
vbprintf(level, "%s %s (%lld)\n",
|
||||||
msg, timestr, time);
|
msg, timestr, (long long)time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,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);
|
||||||
}
|
}
|
||||||
@@ -311,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);
|
||||||
@@ -399,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;
|
||||||
@@ -466,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;
|
||||||
@@ -479,7 +480,8 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
|||||||
dns_rdata_ds_t ds;
|
dns_rdata_ds_t ds;
|
||||||
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;
|
||||||
bool c;
|
dns_rdatatype_t keytype;
|
||||||
|
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);
|
||||||
@@ -489,8 +491,12 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* allow for both DNSKEY and CDNSKEY */
|
||||||
|
keytype = ki->rdata.type;
|
||||||
|
ki->rdata.type = dns_rdatatype_dnskey;
|
||||||
result = dns_ds_buildrdata(name, &ki->rdata, ds.digest_type,
|
result = dns_ds_buildrdata(name, &ki->rdata, ds.digest_type,
|
||||||
dsbuf, &newdsrdata);
|
dsbuf, &newdsrdata);
|
||||||
|
ki->rdata.type = keytype;
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
vbprintf(3, "dns_ds_buildrdata("
|
vbprintf(3, "dns_ds_buildrdata("
|
||||||
"keytag=%d, algo=%d, digest=%d): %s\n",
|
"keytag=%d, algo=%d, digest=%d): %s\n",
|
||||||
@@ -505,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -565,7 +571,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
|
|||||||
ki->algo = dnskey.algorithm;
|
ki->algo = dnskey.algorithm;
|
||||||
|
|
||||||
dns_rdata_toregion(keyrdata, &r);
|
dns_rdata_toregion(keyrdata, &r);
|
||||||
ki->tag = dst_region_computeid(&r);
|
ki->tag = dst_region_computeid(&r, ki->algo);
|
||||||
|
|
||||||
ki->dst = NULL;
|
ki->dst = NULL;
|
||||||
if (!match_key_dsset(ki, dsset, strictness)) {
|
if (!match_key_dsset(ki, dsset, strictness)) {
|
||||||
@@ -611,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 dns_secalg_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;
|
||||||
dns_secalg_t *algo;
|
isc_uint8_t *algo;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
algo = isc_mem_get(mctx, nkey);
|
algo = isc_mem_get(mctx, nkey);
|
||||||
@@ -662,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 &&
|
||||||
@@ -698,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(dns_secalg_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);
|
||||||
@@ -717,10 +723,10 @@ signed_loose(dns_secalg_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, dns_secalg_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;
|
||||||
@@ -728,23 +734,23 @@ signed_strict(dns_rdataset_t *dsset, dns_secalg_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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -788,8 +794,6 @@ ds_from_cds(dns_rdatalist_t *dslist, isc_buffer_t *buf, dns_rdata_t *cds) {
|
|||||||
dns_rdata_ds_t ds;
|
dns_rdata_ds_t ds;
|
||||||
dns_rdata_t *rdata;
|
dns_rdata_t *rdata;
|
||||||
|
|
||||||
REQUIRE(buf != NULL);
|
|
||||||
|
|
||||||
rdata = rdata_get();
|
rdata = rdata_get();
|
||||||
|
|
||||||
result = dns_rdata_tostruct(cds, &ds, NULL);
|
result = dns_rdata_tostruct(cds, &ds, NULL);
|
||||||
@@ -809,8 +813,6 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
unsigned i, n;
|
unsigned i, n;
|
||||||
|
|
||||||
REQUIRE(buf != NULL);
|
|
||||||
|
|
||||||
n = sizeof(dtype)/sizeof(dtype[0]);
|
n = sizeof(dtype)/sizeof(dtype[0]);
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
if (dtype[i] != 0) {
|
if (dtype[i] != 0) {
|
||||||
@@ -822,6 +824,7 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
|
|||||||
return (ISC_R_NOSPACE);
|
return (ISC_R_NOSPACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cdnskey->type = dns_rdatatype_dnskey;
|
||||||
rdata = rdata_get();
|
rdata = rdata_get();
|
||||||
result = dns_ds_buildrdata(name, cdnskey, dtype[i],
|
result = dns_ds_buildrdata(name, cdnskey, dtype[i],
|
||||||
r.base, rdata);
|
r.base, rdata);
|
||||||
@@ -845,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 dns_dsdigest_t *)ap;
|
int a = *(const isc_uint8_t *)ap;
|
||||||
int b = *(const dns_dsdigest_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) {
|
||||||
dns_dsdigest_t dt;
|
isc_uint8_t dt;
|
||||||
unsigned i, n;
|
unsigned i, n;
|
||||||
|
|
||||||
dt = strtodsdigest(dn);
|
dt = strtodsdigest(dn);
|
||||||
@@ -869,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 (;;) {
|
||||||
@@ -931,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;
|
||||||
dns_secalg_t algorithm;
|
isc_uint8_t algorithm;
|
||||||
bool match;
|
isc_boolean_t match;
|
||||||
int i, j, n, d;
|
int i, j, n, d;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -992,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;
|
||||||
@@ -1001,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;
|
||||||
@@ -1036,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;
|
||||||
@@ -1044,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,
|
||||||
@@ -1056,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);
|
||||||
@@ -1080,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");
|
||||||
}
|
}
|
||||||
@@ -1133,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,7 +1152,7 @@ main(int argc, char *argv[]) {
|
|||||||
#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) {
|
||||||
@@ -1161,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;
|
||||||
@@ -1194,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. */
|
||||||
|
|||||||
@@ -40,8 +40,6 @@
|
|||||||
<copyright>
|
<copyright>
|
||||||
<year>2017</year>
|
<year>2017</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
@@ -145,9 +143,9 @@
|
|||||||
record. This option has no effect when using CDS records.
|
record. This option has no effect when using CDS records.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The <replaceable>algorithm</replaceable> must be one of
|
The <replaceable>algorithm</replaceable> must be one of SHA-1
|
||||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
|
||||||
and the hyphen may be omitted. 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>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -129,9 +129,9 @@
|
|||||||
record. This option has no effect when using CDS records.
|
record. This option has no effect when using CDS records.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The <em class="replaceable"><code>algorithm</code></em> must be one of
|
The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
|
||||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
|
||||||
and the hyphen may be omitted. 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>
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
+46
-105
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2008-2012, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -39,103 +39,61 @@
|
|||||||
dnssec-dsfromkey \- DNSSEC DS RR generation tool
|
dnssec-dsfromkey \- DNSSEC DS RR generation tool
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {keyfile}
|
\fBdnssec\-dsfromkey\fR [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] {keyfile}
|
||||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-A\fR] {\fB\-f\ \fR\fB\fIfile\fR\fR} [dnsname]
|
\fBdnssec\-dsfromkey\fR {\-s} [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-s\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-A\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {dnsname}
|
||||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {\-s} {dnsname}
|
\fBdnssec\-dsfromkey\fR [\fB\-h\fR] [\fB\-V\fR]
|
||||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
|
||||||
\fBdnssec\-dsfromkey\fR [\fB\-h\fR | \fB\-V\fR]
|
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.PP
|
||||||
The
|
|
||||||
\fBdnssec\-dsfromkey\fR
|
\fBdnssec\-dsfromkey\fR
|
||||||
command outputs DS (Delegation Signer) resource records (RRs) and other similarly\-constructed RRs: with the
|
outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s)\&.
|
||||||
\fB\-l\fR
|
|
||||||
option it outputs DLV (DNSSEC Lookaside Validation) RRs; or with the
|
|
||||||
\fB\-C\fR
|
|
||||||
it outputs CDS (Child DS) RRs\&.
|
|
||||||
.PP
|
|
||||||
The input keys can be specified in a number of ways:
|
|
||||||
.PP
|
|
||||||
By default,
|
|
||||||
\fBdnssec\-dsfromkey\fR
|
|
||||||
reads a key file named like
|
|
||||||
Knnnn\&.+aaa+iiiii\&.key, as generated by
|
|
||||||
\fBdnssec\-keygen\fR\&.
|
|
||||||
.PP
|
|
||||||
With the
|
|
||||||
\fB\-f \fR\fB\fIfile\fR\fR
|
|
||||||
option,
|
|
||||||
\fBdnssec\-dsfromkey\fR
|
|
||||||
reads keys from a zone file or partial zone file (which can contain just the DNSKEY records)\&.
|
|
||||||
.PP
|
|
||||||
With the
|
|
||||||
\fB\-s\fR
|
|
||||||
option,
|
|
||||||
\fBdnssec\-dsfromkey\fR
|
|
||||||
reads a
|
|
||||||
keyset\-
|
|
||||||
file, as generated by
|
|
||||||
\fBdnssec\-keygen\fR\fB\-C\fR\&.
|
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
.PP
|
.PP
|
||||||
\-1
|
\-1
|
||||||
.RS 4
|
.RS 4
|
||||||
An abbreviation for
|
Use SHA\-1 as the digest algorithm (the default is to use both SHA\-1 and SHA\-256)\&.
|
||||||
\fB\-a SHA1\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-2
|
\-2
|
||||||
.RS 4
|
.RS 4
|
||||||
An abbreviation for
|
Use SHA\-256 as the digest algorithm\&.
|
||||||
\fB\-a SHA\-256\fR
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-a \fIalgorithm\fR
|
\-a \fIalgorithm\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Specify a digest algorithm to use when converting DNSKEY records to DS records\&. This option can be repeated, so that multiple DS records are created for each DNSKEY record\&.
|
Select the digest algorithm\&. The value of
|
||||||
.sp
|
\fBalgorithm\fR
|
||||||
The
|
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256) or SHA\-384 (SHA384)\&. These values are case insensitive\&.
|
||||||
\fIalgorithm\fR
|
|
||||||
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-A
|
|
||||||
.RS 4
|
|
||||||
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in
|
|
||||||
\fB\-f\fR
|
|
||||||
zone file mode\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-c \fIclass\fR
|
|
||||||
.RS 4
|
|
||||||
Specifies the DNS class (default is IN)\&. Useful only in
|
|
||||||
\fB\-s\fR
|
|
||||||
keyset or
|
|
||||||
\fB\-f\fR
|
|
||||||
zone file mode\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-C
|
\-C
|
||||||
.RS 4
|
.RS 4
|
||||||
Generate CDS records rather than DS records\&. This is mutually exclusive with the
|
Generate CDS records rather than DS records\&. This is mutually exclusive with generating lookaside records\&.
|
||||||
\fB\-l\fR
|
.RE
|
||||||
option for generating DLV records\&.
|
.PP
|
||||||
|
\-T \fITTL\fR
|
||||||
|
.RS 4
|
||||||
|
Specifies the TTL of the DS records\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\-K \fIdirectory\fR
|
||||||
|
.RS 4
|
||||||
|
Look for key files (or, in keyset mode,
|
||||||
|
keyset\-
|
||||||
|
files) in
|
||||||
|
\fBdirectory\fR\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-f \fIfile\fR
|
\-f \fIfile\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Zone file mode:
|
Zone file mode: in place of the keyfile name, the argument is the DNS domain name of a zone master file, which can be read from
|
||||||
\fBdnssec\-dsfromkey\fR\*(Aqs final
|
|
||||||
\fIdnsname\fR
|
|
||||||
argument is the DNS domain name of a zone whose master file can be read from
|
|
||||||
\fBfile\fR\&. If the zone name is the same as
|
\fBfile\fR\&. If the zone name is the same as
|
||||||
\fBfile\fR, then it may be omitted\&.
|
\fBfile\fR, then it may be omitted\&.
|
||||||
.sp
|
.sp
|
||||||
If
|
If
|
||||||
\fIfile\fR
|
\fBfile\fR
|
||||||
is
|
is set to
|
||||||
"\-", then the zone data is read from the standard input\&. This makes it possible to use the output of the
|
"\-", then the zone data is read from the standard input\&. This makes it possible to use the output of the
|
||||||
\fBdig\fR
|
\fBdig\fR
|
||||||
command as input, as in:
|
command as input, as in:
|
||||||
@@ -143,41 +101,26 @@ command as input, as in:
|
|||||||
\fBdig dnskey example\&.com | dnssec\-dsfromkey \-f \- example\&.com\fR
|
\fBdig dnskey example\&.com | dnssec\-dsfromkey \-f \- example\&.com\fR
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-h
|
\-A
|
||||||
.RS 4
|
.RS 4
|
||||||
Prints usage information\&.
|
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in zone file mode\&.
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-K \fIdirectory\fR
|
|
||||||
.RS 4
|
|
||||||
Look for key files or
|
|
||||||
keyset\-
|
|
||||||
files in
|
|
||||||
\fBdirectory\fR\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-l \fIdomain\fR
|
\-l \fIdomain\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Generate a DLV set instead of a DS set\&. The specified
|
Generate a DLV set instead of a DS set\&. The specified
|
||||||
\fIdomain\fR
|
\fBdomain\fR
|
||||||
is appended to the name for each record in the set\&. This is mutually exclusive with the
|
is appended to the name for each record in the set\&. The DNSSEC Lookaside Validation (DLV) RR is described in RFC 4431\&. This is mutually exclusive with generating CDS records\&.
|
||||||
\fB\-C\fR
|
|
||||||
option for generating CDS records\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-s
|
\-s
|
||||||
.RS 4
|
.RS 4
|
||||||
Keyset mode:
|
Keyset mode: in place of the keyfile name, the argument is the DNS domain name of a keyset file\&.
|
||||||
\fBdnssec\-dsfromkey\fR\*(Aqs final
|
|
||||||
\fIdnsname\fR
|
|
||||||
argument is the DNS domain name used to locate a
|
|
||||||
keyset\-
|
|
||||||
file\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-T \fITTL\fR
|
\-c \fIclass\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Specifies the TTL of the DS records\&. By default the TTL is omitted\&.
|
Specifies the DNS class (default is IN)\&. Useful only in keyset or zone file mode\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-v \fIlevel\fR
|
\-v \fIlevel\fR
|
||||||
@@ -185,6 +128,11 @@ Specifies the TTL of the DS records\&. By default the TTL is omitted\&.
|
|||||||
Sets the debugging level\&.
|
Sets the debugging level\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-h
|
||||||
|
.RS 4
|
||||||
|
Prints usage information\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-V
|
\-V
|
||||||
.RS 4
|
.RS 4
|
||||||
Prints version information\&.
|
Prints version information\&.
|
||||||
@@ -193,16 +141,16 @@ Prints version information\&.
|
|||||||
.PP
|
.PP
|
||||||
To build the SHA\-256 DS RR from the
|
To build the SHA\-256 DS RR from the
|
||||||
\fBKexample\&.com\&.+003+26160\fR
|
\fBKexample\&.com\&.+003+26160\fR
|
||||||
keyfile name, you can issue the following command:
|
keyfile name, the following command would be issued:
|
||||||
.PP
|
.PP
|
||||||
\fBdnssec\-dsfromkey \-2 Kexample\&.com\&.+003+26160\fR
|
\fBdnssec\-dsfromkey \-2 Kexample\&.com\&.+003+26160\fR
|
||||||
.PP
|
.PP
|
||||||
The command would print something like:
|
The command would print something like:
|
||||||
.PP
|
.PP
|
||||||
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94\fR
|
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94\fR
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
.PP
|
.PP
|
||||||
The keyfile can be designated by the key identification
|
The keyfile can be designed by the key identification
|
||||||
Knnnn\&.+aaa+iiiii
|
Knnnn\&.+aaa+iiiii
|
||||||
or the full file name
|
or the full file name
|
||||||
Knnnn\&.+aaa+iiiii\&.key
|
Knnnn\&.+aaa+iiiii\&.key
|
||||||
@@ -222,20 +170,13 @@ A keyfile error can give a "file not found" even if the file exists\&.
|
|||||||
\fBdnssec-keygen\fR(8),
|
\fBdnssec-keygen\fR(8),
|
||||||
\fBdnssec-signzone\fR(8),
|
\fBdnssec-signzone\fR(8),
|
||||||
BIND 9 Administrator Reference Manual,
|
BIND 9 Administrator Reference Manual,
|
||||||
RFC 3658
|
RFC 3658,
|
||||||
(DS RRs),
|
RFC 4431\&.
|
||||||
RFC 4431
|
RFC 4509\&.
|
||||||
(DLV RRs),
|
|
||||||
RFC 4509
|
|
||||||
(SHA\-256 for DS RRs),
|
|
||||||
RFC 6605
|
|
||||||
(SHA\-384 for DS RRs),
|
|
||||||
RFC 7344
|
|
||||||
(CDS and CDNSKEY RRs)\&.
|
|
||||||
.SH "AUTHOR"
|
.SH "AUTHOR"
|
||||||
.PP
|
.PP
|
||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2008-2012, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
@@ -13,15 +13,12 @@
|
|||||||
|
|
||||||
#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>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/platform.h>
|
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
@@ -50,6 +47,10 @@
|
|||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *program = "dnssec-dsfromkey";
|
const char *program = "dnssec-dsfromkey";
|
||||||
int verbose;
|
int verbose;
|
||||||
|
|
||||||
@@ -57,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) {
|
||||||
@@ -117,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);
|
||||||
|
|
||||||
@@ -158,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);
|
||||||
@@ -204,7 +205,9 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
|||||||
rdclass = dst_key_class(key);
|
rdclass = dst_key_class(key);
|
||||||
|
|
||||||
name = dns_fixedname_initname(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
dns_name_copynf(dst_key_name(key), name);
|
result = dns_name_copy(dst_key_name(key), name, NULL);
|
||||||
|
if (result != ISC_R_SUCCESS)
|
||||||
|
fatal("can't copy name");
|
||||||
|
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
}
|
}
|
||||||
@@ -230,8 +233,8 @@ logkey(dns_rdata_t *rdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
emit(dns_dsdigest_t 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];
|
||||||
@@ -260,7 +263,7 @@ emit(dns_dsdigest_t 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");
|
||||||
|
|
||||||
@@ -313,27 +316,30 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
|
|||||||
static void
|
static void
|
||||||
usage(void) {
|
usage(void) {
|
||||||
fprintf(stderr, "Usage:\n");
|
fprintf(stderr, "Usage:\n");
|
||||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
fprintf(stderr, " %s options [-K dir] keyfile\n\n", program);
|
||||||
fprintf(stderr, " %s [options] -f zonefile [zonename]\n\n", program);
|
fprintf(stderr, " %s options [-K dir] [-c class] -s dnsname\n\n",
|
||||||
fprintf(stderr, " %s [options] -s dnsname\n\n", program);
|
program);
|
||||||
fprintf(stderr, " %s [-h|-V]\n\n", program);
|
fprintf(stderr, " %s options -f zonefile (as zone name)\n\n", program);
|
||||||
|
fprintf(stderr, " %s options -f zonefile zonename\n\n", program);
|
||||||
fprintf(stderr, "Version: %s\n", VERSION);
|
fprintf(stderr, "Version: %s\n", VERSION);
|
||||||
fprintf(stderr, "Options:\n"
|
fprintf(stderr, "Options:\n");
|
||||||
" -1: digest algorithm SHA-1\n"
|
fprintf(stderr, " -v <verbose level>\n");
|
||||||
" -2: digest algorithm SHA-256\n"
|
fprintf(stderr, " -V: print version information\n");
|
||||||
" -a algorithm: digest algorithm (SHA-1, SHA-256 or SHA-384)\n"
|
fprintf(stderr, " -K <directory>: directory in which to find "
|
||||||
" -A: include all keys in DS set, not just KSKs (-f only)\n"
|
"key file or keyset file\n");
|
||||||
" -c class: rdata class for DS set (default IN) (-f or -s only)\n"
|
fprintf(stderr, " -a algorithm: digest algorithm "
|
||||||
" -C: print CDS records\n"
|
"(SHA-1, SHA-256, GOST or SHA-384)\n");
|
||||||
" -f zonefile: read keys from a zone file\n"
|
fprintf(stderr, " -1: use SHA-1\n");
|
||||||
" -h: print help information\n"
|
fprintf(stderr, " -2: use SHA-256\n");
|
||||||
" -K directory: where to find key or keyset files\n"
|
fprintf(stderr, " -C: print CDS record\n");
|
||||||
" -l zone: print DLV records in the given lookaside zone\n"
|
fprintf(stderr, " -l: add lookaside zone and print DLV records\n");
|
||||||
" -s: read keys from keyset-<dnsname> file\n"
|
fprintf(stderr, " -s: read keyset from keyset-<dnsname> file\n");
|
||||||
" -T: TTL of output records (omitted by default)\n"
|
fprintf(stderr, " -c class: rdata class for DS set (default: IN)\n");
|
||||||
" -v level: verbosity\n"
|
fprintf(stderr, " -T TTL\n");
|
||||||
" -V: print version information\n");
|
fprintf(stderr, " -f file: read keyset from zone file\n");
|
||||||
fprintf(stderr, "Output: DS, DLV, or CDS RRs\n");
|
fprintf(stderr, " -A: when used with -f, "
|
||||||
|
"include all keys in DS set, not just KSKs\n");
|
||||||
|
fprintf(stderr, "Output: DS or DLV RRs\n");
|
||||||
|
|
||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
@@ -343,13 +349,13 @@ main(int argc, char **argv) {
|
|||||||
char *classname = NULL;
|
char *classname = NULL;
|
||||||
char *filename = NULL, *dir = NULL, *namestr;
|
char *filename = NULL, *dir = NULL, *namestr;
|
||||||
char *lookaside = NULL;
|
char *lookaside = NULL;
|
||||||
char *endp, *arg1;
|
char *endp;
|
||||||
int ch;
|
int ch;
|
||||||
dns_dsdigest_t 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;
|
||||||
@@ -357,46 +363,43 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
dns_rdata_init(&rdata);
|
dns_rdata_init(&rdata);
|
||||||
|
|
||||||
if (argc == 1) {
|
if (argc == 1)
|
||||||
usage();
|
usage();
|
||||||
}
|
|
||||||
|
|
||||||
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 USE_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 = ISC_TRUE;
|
||||||
cds = true;
|
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
classname = isc_commandline_argument;
|
classname = isc_commandline_argument;
|
||||||
@@ -407,43 +410,39 @@ main(int argc, char **argv) {
|
|||||||
/* fall through */
|
/* fall through */
|
||||||
case 'K':
|
case 'K':
|
||||||
dir = isc_commandline_argument;
|
dir = isc_commandline_argument;
|
||||||
if (strlen(dir) == 0U) {
|
if (strlen(dir) == 0U)
|
||||||
fatal("directory must be non-empty string");
|
fatal("directory must be non-empty string");
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
filename = isc_commandline_argument;
|
filename = isc_commandline_argument;
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
if (cds) {
|
if (cds)
|
||||||
fatal("lookaside and CDS are mutually"
|
fatal("lookaside and CDS are mutually"
|
||||||
" exclusive");
|
" exclusive");
|
||||||
}
|
|
||||||
lookaside = isc_commandline_argument;
|
lookaside = isc_commandline_argument;
|
||||||
if (strlen(lookaside) == 0U)
|
if (strlen(lookaside) == 0U)
|
||||||
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':
|
||||||
verbose = strtol(isc_commandline_argument, &endp, 0);
|
verbose = strtol(isc_commandline_argument, &endp, 0);
|
||||||
if (*endp != '\0') {
|
if (*endp != '\0')
|
||||||
fatal("-v must be followed by a number");
|
fatal("-v must be followed by a number");
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'F':
|
case 'F':
|
||||||
/* Reserved for FIPS mode */
|
/* Reserved for FIPS mode */
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case '?':
|
case '?':
|
||||||
if (isc_commandline_option != '?') {
|
if (isc_commandline_option != '?')
|
||||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||||
program, isc_commandline_option);
|
program, isc_commandline_option);
|
||||||
}
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case 'h':
|
case 'h':
|
||||||
/* Does not return. */
|
/* Does not return. */
|
||||||
@@ -462,61 +461,46 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
rdclass = strtoclass(classname);
|
rdclass = strtoclass(classname);
|
||||||
|
|
||||||
if (usekeyset && filename != NULL) {
|
if (usekeyset && filename != NULL)
|
||||||
fatal("cannot use both -s and -f");
|
fatal("cannot use both -s and -f");
|
||||||
}
|
|
||||||
|
|
||||||
/* 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)
|
||||||
* Use local variable arg1 so that clang can correctly analyse
|
|
||||||
* reachable paths rather than 'argc < isc_commandline_index + 1'.
|
|
||||||
*/
|
|
||||||
arg1 = argv[isc_commandline_index];
|
|
||||||
if (arg1 == NULL && filename == NULL) {
|
|
||||||
fatal("the key file name was not specified");
|
fatal("the key file name was not specified");
|
||||||
}
|
if (argc > isc_commandline_index + 1)
|
||||||
if (arg1 != NULL && argv[isc_commandline_index + 1] != NULL) {
|
|
||||||
fatal("extraneous arguments");
|
fatal("extraneous arguments");
|
||||||
}
|
|
||||||
|
|
||||||
result = dst_lib_init(mctx, NULL);
|
result = dst_lib_init(mctx, NULL);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize dst: %s",
|
fatal("could not initialize dst: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
|
||||||
|
|
||||||
setup_logging(mctx, &log);
|
setup_logging(mctx, &log);
|
||||||
|
|
||||||
dns_rdataset_init(&rdataset);
|
dns_rdataset_init(&rdataset);
|
||||||
|
|
||||||
if (usekeyset || filename != NULL) {
|
if (usekeyset || filename != NULL) {
|
||||||
if (arg1 == NULL) {
|
if (argc < isc_commandline_index + 1 && filename != NULL) {
|
||||||
/* using file name as the zone name */
|
/* using zone name as the zone file name */
|
||||||
namestr = filename;
|
namestr = filename;
|
||||||
} else {
|
} else
|
||||||
namestr = arg1;
|
namestr = argv[isc_commandline_index];
|
||||||
}
|
|
||||||
|
|
||||||
result = initname(namestr);
|
result = initname(namestr);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize name %s", namestr);
|
fatal("could not initialize name %s", namestr);
|
||||||
}
|
|
||||||
|
|
||||||
if (usekeyset) {
|
if (usekeyset)
|
||||||
result = loadkeyset(dir, &rdataset);
|
result = loadkeyset(dir, &rdataset);
|
||||||
} else {
|
else
|
||||||
INSIST(filename != NULL);
|
|
||||||
result = loadset(filename, &rdataset);
|
result = loadset(filename, &rdataset);
|
||||||
}
|
|
||||||
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("could not load DNSKEY set: %s\n",
|
fatal("could not load DNSKEY set: %s\n",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
|
||||||
|
|
||||||
for (result = dns_rdataset_first(&rdataset);
|
for (result = dns_rdataset_first(&rdataset);
|
||||||
result == ISC_R_SUCCESS;
|
result == ISC_R_SUCCESS;
|
||||||
@@ -524,32 +508,30 @@ main(int argc, char **argv) {
|
|||||||
dns_rdata_init(&rdata);
|
dns_rdata_init(&rdata);
|
||||||
dns_rdataset_current(&rdataset, &rdata);
|
dns_rdataset_current(&rdataset, &rdata);
|
||||||
|
|
||||||
if (verbose > 2) {
|
if (verbose > 2)
|
||||||
logkey(&rdata);
|
logkey(&rdata);
|
||||||
}
|
|
||||||
|
|
||||||
if (both) {
|
if (both) {
|
||||||
emit(DNS_DSDIGEST_SHA1, showall, lookaside,
|
emit(DNS_DSDIGEST_SHA1, showall, lookaside,
|
||||||
cds, &rdata);
|
cds, &rdata);
|
||||||
emit(DNS_DSDIGEST_SHA256, showall, lookaside,
|
emit(DNS_DSDIGEST_SHA256, showall, lookaside,
|
||||||
cds, &rdata);
|
cds, &rdata);
|
||||||
} else {
|
} else
|
||||||
emit(dtype, showall, lookaside, cds, &rdata);
|
emit(dtype, showall, lookaside, cds, &rdata);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
unsigned char key_buf[DST_KEY_MAXSIZE];
|
unsigned char key_buf[DST_KEY_MAXSIZE];
|
||||||
|
|
||||||
loadkey(arg1, key_buf, DST_KEY_MAXSIZE, &rdata);
|
loadkey(argv[isc_commandline_index], key_buf,
|
||||||
|
DST_KEY_MAXSIZE, &rdata);
|
||||||
|
|
||||||
if (both) {
|
if (both) {
|
||||||
emit(DNS_DSDIGEST_SHA1, showall, lookaside, cds,
|
emit(DNS_DSDIGEST_SHA1, showall, lookaside, cds,
|
||||||
&rdata);
|
&rdata);
|
||||||
emit(DNS_DSDIGEST_SHA256, showall, lookaside, cds,
|
emit(DNS_DSDIGEST_SHA256, showall, lookaside, cds,
|
||||||
&rdata);
|
&rdata);
|
||||||
} else {
|
} else
|
||||||
emit(dtype, showall, lookaside, cds, &rdata);
|
emit(dtype, showall, lookaside, cds, &rdata);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dns_rdataset_isassociated(&rdataset))
|
if (dns_rdataset_isassociated(&rdataset))
|
||||||
@@ -557,16 +539,14 @@ main(int argc, char **argv) {
|
|||||||
cleanup_logging(&log);
|
cleanup_logging(&log);
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
dns_name_destroy();
|
dns_name_destroy();
|
||||||
if (verbose > 10) {
|
if (verbose > 10)
|
||||||
isc_mem_stats(mctx, stdout);
|
isc_mem_stats(mctx, stdout);
|
||||||
}
|
|
||||||
isc_mem_destroy(&mctx);
|
isc_mem_destroy(&mctx);
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
if (ferror(stdout)) {
|
if (ferror(stdout)) {
|
||||||
fprintf(stderr, "write error\n");
|
fprintf(stderr, "write error\n");
|
||||||
return (1);
|
return (1);
|
||||||
} else {
|
} else
|
||||||
return (0);
|
return (0);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,8 +41,6 @@
|
|||||||
<year>2015</year>
|
<year>2015</year>
|
||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
@@ -50,108 +48,56 @@
|
|||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis sepchar=" ">
|
<cmdsynopsis sepchar=" ">
|
||||||
<command>dnssec-dsfromkey</command>
|
<command>dnssec-dsfromkey</command>
|
||||||
<group choice="opt">
|
|
||||||
<arg choice="plain"><option>-1</option></arg>
|
|
||||||
<arg choice="plain"><option>-2</option></arg>
|
|
||||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
|
||||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
|
||||||
</group>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||||
<arg choice="req" rep="norepeat">keyfile</arg>
|
<arg choice="req" rep="norepeat">keyfile</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis sepchar=" ">
|
<cmdsynopsis sepchar=" ">
|
||||||
<command>dnssec-dsfromkey</command>
|
<command>dnssec-dsfromkey</command>
|
||||||
<group choice="opt">
|
|
||||||
<arg choice="plain"><option>-1</option></arg>
|
|
||||||
<arg choice="plain"><option>-2</option></arg>
|
|
||||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
|
||||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
|
||||||
</group>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
|
|
||||||
<arg choice="req" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat">dnsname</arg>
|
|
||||||
</cmdsynopsis>
|
|
||||||
<cmdsynopsis sepchar=" ">
|
|
||||||
<command>dnssec-dsfromkey</command>
|
|
||||||
<group choice="opt">
|
|
||||||
<arg choice="plain"><option>-1</option></arg>
|
|
||||||
<arg choice="plain"><option>-2</option></arg>
|
|
||||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
|
||||||
</group>
|
|
||||||
<group>
|
|
||||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
|
||||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
|
||||||
</group>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
|
||||||
<arg choice="req" rep="norepeat">-s</arg>
|
<arg choice="req" rep="norepeat">-s</arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-s</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||||
<arg choice="req" rep="norepeat">dnsname</arg>
|
<arg choice="req" rep="norepeat">dnsname</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis sepchar=" ">
|
<cmdsynopsis sepchar=" ">
|
||||||
<command>dnssec-dsfromkey</command>
|
<command>dnssec-dsfromkey</command>
|
||||||
<group choice="opt">
|
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||||
<arg choice="plain" rep="norepeat"><option>-h</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
||||||
<arg choice="plain" rep="norepeat"><option>-V</option></arg>
|
</cmdsynopsis>
|
||||||
</group>
|
|
||||||
</cmdsynopsis>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsection><info><title>DESCRIPTION</title></info>
|
<refsection><info><title>DESCRIPTION</title></info>
|
||||||
|
|
||||||
<para>
|
<para><command>dnssec-dsfromkey</command>
|
||||||
The <command>dnssec-dsfromkey</command> command outputs DS (Delegation
|
outputs the Delegation Signer (DS) resource record (RR), as defined in
|
||||||
Signer) resource records (RRs) and other similarly-constructed RRs:
|
RFC 3658 and RFC 4509, for the given key(s).
|
||||||
with the <option>-l</option> option it outputs DLV (DNSSEC Lookaside
|
|
||||||
Validation) RRs; or with the <option>-C</option> it outputs CDS (Child
|
|
||||||
DS) RRs.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
The input keys can be specified in a number of ways:
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
By default, <command>dnssec-dsfromkey</command> reads a key file
|
|
||||||
named like <filename>Knnnn.+aaa+iiiii.key</filename>, as generated
|
|
||||||
by <command>dnssec-keygen</command>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
With the <option>-f <replaceable>file</replaceable></option>
|
|
||||||
option, <command>dnssec-dsfromkey</command> reads keys from a zone file
|
|
||||||
or partial zone file (which can contain just the DNSKEY records).
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
With the <option>-s</option>
|
|
||||||
option, <command>dnssec-dsfromkey</command> reads
|
|
||||||
a <filename>keyset-</filename> file, as generated
|
|
||||||
by <command>dnssec-keygen</command> <option>-C</option>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
<refsection><info><title>OPTIONS</title></info>
|
<refsection><info><title>OPTIONS</title></info>
|
||||||
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-1</term>
|
<term>-1</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
An abbreviation for <option>-a SHA1</option>
|
Use SHA-1 as the digest algorithm (the default is to use
|
||||||
|
both SHA-1 and SHA-256).
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -160,7 +106,7 @@
|
|||||||
<term>-2</term>
|
<term>-2</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
An abbreviation for <option>-a SHA-256</option>
|
Use SHA-256 as the digest algorithm.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -169,49 +115,40 @@
|
|||||||
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Specify a digest algorithm to use when converting DNSKEY
|
Select the digest algorithm. The value of
|
||||||
records to DS records. This option can be repeated, so
|
<option>algorithm</option> must be one of SHA-1 (SHA1),
|
||||||
that multiple DS records are created for each DNSKEY
|
SHA-256 (SHA256) or SHA-384 (SHA384).
|
||||||
record.
|
These values are case insensitive.
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The <replaceable>algorithm</replaceable> must be one of
|
|
||||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
|
||||||
and the hyphen may be omitted. If no algorithm is specified,
|
|
||||||
the default is SHA-256.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-A</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Include ZSKs when generating DS records. Without this option, only
|
|
||||||
keys which have the KSK flag set will be converted to DS records
|
|
||||||
and printed. Useful only in <option>-f</option> zone file mode.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies the DNS class (default is IN). Useful only
|
|
||||||
in <option>-s</option> keyset or <option>-f</option>
|
|
||||||
zone file mode.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-C</term>
|
<term>-C</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Generate CDS records rather than DS records. This is mutually
|
Generate CDS records rather than DS records. This is mutually
|
||||||
exclusive with the <option>-l</option> option for generating DLV
|
exclusive with generating lookaside records.
|
||||||
records.
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-T <replaceable class="parameter">TTL</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Specifies the TTL of the DS records.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-K <replaceable class="parameter">directory</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Look for key files (or, in keyset mode,
|
||||||
|
<filename>keyset-</filename> files) in
|
||||||
|
<option>directory</option>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -220,14 +157,13 @@
|
|||||||
<term>-f <replaceable class="parameter">file</replaceable></term>
|
<term>-f <replaceable class="parameter">file</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Zone file mode: <command>dnssec-dsfromkey</command>'s
|
Zone file mode: in place of the keyfile name, the argument is
|
||||||
final <replaceable>dnsname</replaceable> argument is
|
the DNS domain name of a zone master file, which can be read
|
||||||
the DNS domain name of a zone whose master file can be read
|
|
||||||
from <option>file</option>. If the zone name is the same as
|
from <option>file</option>. If the zone name is the same as
|
||||||
<option>file</option>, then it may be omitted.
|
<option>file</option>, then it may be omitted.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If <replaceable>file</replaceable> is <literal>"-"</literal>, then
|
If <option>file</option> is set to <literal>"-"</literal>, then
|
||||||
the zone data is read from the standard input. This makes it
|
the zone data is read from the standard input. This makes it
|
||||||
possible to use the output of the <command>dig</command>
|
possible to use the output of the <command>dig</command>
|
||||||
command as input, as in:
|
command as input, as in:
|
||||||
@@ -239,33 +175,26 @@
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-h</term>
|
<term>-A</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Prints usage information.
|
Include ZSKs when generating DS records. Without this option,
|
||||||
</para>
|
only keys which have the KSK flag set will be converted to DS
|
||||||
</listitem>
|
records and printed. Useful only in zone file mode.
|
||||||
</varlistentry>
|
</para>
|
||||||
|
</listitem>
|
||||||
<varlistentry>
|
|
||||||
<term>-K <replaceable class="parameter">directory</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Look for key files or <filename>keyset-</filename> files in
|
|
||||||
<option>directory</option>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Generate a DLV set instead of a DS set. The specified
|
Generate a DLV set instead of a DS set. The specified
|
||||||
<replaceable>domain</replaceable> is appended to the name for each
|
<option>domain</option> is appended to the name for each
|
||||||
record in the set.
|
record in the set.
|
||||||
This is mutually exclusive with the <option>-C</option> option
|
The DNSSEC Lookaside Validation (DLV) RR is described
|
||||||
for generating CDS records.
|
in RFC 4431. This is mutually exclusive with generating
|
||||||
|
CDS records.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -274,18 +203,18 @@
|
|||||||
<term>-s</term>
|
<term>-s</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Keyset mode: <command>dnssec-dsfromkey</command>'s
|
Keyset mode: in place of the keyfile name, the argument is
|
||||||
final <replaceable>dnsname</replaceable> argument is the DNS
|
the DNS domain name of a keyset file.
|
||||||
domain name used to locate a <filename>keyset-</filename> file.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-T <replaceable class="parameter">TTL</replaceable></term>
|
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Specifies the TTL of the DS records. By default the TTL is omitted.
|
Specifies the DNS class (default is IN). Useful only
|
||||||
|
in keyset or zone file mode.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -299,6 +228,15 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-h</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Prints usage information.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-V</term>
|
<term>-V</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -315,22 +253,21 @@
|
|||||||
<para>
|
<para>
|
||||||
To build the SHA-256 DS RR from the
|
To build the SHA-256 DS RR from the
|
||||||
<userinput>Kexample.com.+003+26160</userinput>
|
<userinput>Kexample.com.+003+26160</userinput>
|
||||||
keyfile name, you can issue the following command:
|
keyfile name, the following command would be issued:
|
||||||
</para>
|
</para>
|
||||||
<para><userinput>dnssec-dsfromkey -2 Kexample.com.+003+26160</userinput>
|
<para><userinput>dnssec-dsfromkey -2 Kexample.com.+003+26160</userinput>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The command would print something like:
|
The command would print something like:
|
||||||
</para>
|
</para>
|
||||||
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</userinput>
|
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</userinput>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
<refsection><info><title>FILES</title></info>
|
<refsection><info><title>FILES</title></info>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The keyfile can be designated by the key identification
|
The keyfile can be designed by the key identification
|
||||||
<filename>Knnnn.+aaa+iiiii</filename> or the full file name
|
<filename>Knnnn.+aaa+iiiii</filename> or the full file name
|
||||||
<filename>Knnnn.+aaa+iiiii.key</filename> as generated by
|
<filename>Knnnn.+aaa+iiiii.key</filename> as generated by
|
||||||
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>.
|
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>.
|
||||||
@@ -358,11 +295,9 @@
|
|||||||
<refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
|
<refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
|
||||||
</citerefentry>,
|
</citerefentry>,
|
||||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
||||||
<citetitle>RFC 3658</citetitle> (DS RRs),
|
<citetitle>RFC 3658</citetitle>,
|
||||||
<citetitle>RFC 4431</citetitle> (DLV RRs),
|
<citetitle>RFC 4431</citetitle>.
|
||||||
<citetitle>RFC 4509</citetitle> (SHA-256 for DS RRs),
|
<citetitle>RFC 4509</citetitle>.
|
||||||
<citetitle>RFC 6605</citetitle> (SHA-384 for DS RRs),
|
|
||||||
<citetitle>RFC 7344</citetitle> (CDS and CDNSKEY RRs).
|
|
||||||
</para>
|
</para>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2008-2012, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -33,167 +33,105 @@
|
|||||||
<h2>Synopsis</h2>
|
<h2>Synopsis</h2>
|
||||||
<div class="cmdsynopsis"><p>
|
<div class="cmdsynopsis"><p>
|
||||||
<code class="command">dnssec-dsfromkey</code>
|
<code class="command">dnssec-dsfromkey</code>
|
||||||
[
|
|
||||||
<code class="option">-1</code>
|
|
||||||
| <code class="option">-2</code>
|
|
||||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
|
||||||
]
|
|
||||||
[
|
|
||||||
<code class="option">-C</code>
|
|
||||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
|
||||||
]
|
|
||||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
|
||||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
[<code class="option">-1</code>]
|
||||||
|
[<code class="option">-2</code>]
|
||||||
|
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
|
||||||
|
[<code class="option">-C</code>]
|
||||||
|
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
|
||||||
|
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||||
{keyfile}
|
{keyfile}
|
||||||
</p></div>
|
</p></div>
|
||||||
<div class="cmdsynopsis"><p>
|
<div class="cmdsynopsis"><p>
|
||||||
<code class="command">dnssec-dsfromkey</code>
|
<code class="command">dnssec-dsfromkey</code>
|
||||||
[
|
|
||||||
<code class="option">-1</code>
|
|
||||||
| <code class="option">-2</code>
|
|
||||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
|
||||||
]
|
|
||||||
[
|
|
||||||
<code class="option">-C</code>
|
|
||||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
|
||||||
]
|
|
||||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
|
||||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
|
||||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
|
||||||
[<code class="option">-A</code>]
|
|
||||||
{<code class="option">-f <em class="replaceable"><code>file</code></em></code>}
|
|
||||||
[dnsname]
|
|
||||||
</p></div>
|
|
||||||
<div class="cmdsynopsis"><p>
|
|
||||||
<code class="command">dnssec-dsfromkey</code>
|
|
||||||
[
|
|
||||||
<code class="option">-1</code>
|
|
||||||
| <code class="option">-2</code>
|
|
||||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
|
||||||
]
|
|
||||||
[
|
|
||||||
<code class="option">-C</code>
|
|
||||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
|
||||||
]
|
|
||||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
|
||||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
|
||||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
|
||||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
|
||||||
{-s}
|
{-s}
|
||||||
|
[<code class="option">-1</code>]
|
||||||
|
[<code class="option">-2</code>]
|
||||||
|
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
|
||||||
|
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||||
|
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
|
||||||
|
[<code class="option">-s</code>]
|
||||||
|
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||||
|
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||||
|
[<code class="option">-f <em class="replaceable"><code>file</code></em></code>]
|
||||||
|
[<code class="option">-A</code>]
|
||||||
|
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||||
{dnsname}
|
{dnsname}
|
||||||
</p></div>
|
</p></div>
|
||||||
<div class="cmdsynopsis"><p>
|
<div class="cmdsynopsis"><p>
|
||||||
<code class="command">dnssec-dsfromkey</code>
|
<code class="command">dnssec-dsfromkey</code>
|
||||||
[
|
[<code class="option">-h</code>]
|
||||||
<code class="option">-h</code>
|
[<code class="option">-V</code>]
|
||||||
| <code class="option">-V</code>
|
</p></div>
|
||||||
]
|
|
||||||
</p></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="refsection">
|
<div class="refsection">
|
||||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||||
|
|
||||||
<p>
|
<p><span class="command"><strong>dnssec-dsfromkey</strong></span>
|
||||||
The <span class="command"><strong>dnssec-dsfromkey</strong></span> command outputs DS (Delegation
|
outputs the Delegation Signer (DS) resource record (RR), as defined in
|
||||||
Signer) resource records (RRs) and other similarly-constructed RRs:
|
RFC 3658 and RFC 4509, for the given key(s).
|
||||||
with the <code class="option">-l</code> option it outputs DLV (DNSSEC Lookaside
|
|
||||||
Validation) RRs; or with the <code class="option">-C</code> it outputs CDS (Child
|
|
||||||
DS) RRs.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
The input keys can be specified in a number of ways:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
By default, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads a key file
|
|
||||||
named like <code class="filename">Knnnn.+aaa+iiiii.key</code>, as generated
|
|
||||||
by <span class="command"><strong>dnssec-keygen</strong></span>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
With the <code class="option">-f <em class="replaceable"><code>file</code></em></code>
|
|
||||||
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads keys from a zone file
|
|
||||||
or partial zone file (which can contain just the DNSKEY records).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
With the <code class="option">-s</code>
|
|
||||||
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads
|
|
||||||
a <code class="filename">keyset-</code> file, as generated
|
|
||||||
by <span class="command"><strong>dnssec-keygen</strong></span> <code class="option">-C</code>.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="refsection">
|
<div class="refsection">
|
||||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||||
|
|
||||||
|
|
||||||
<div class="variablelist"><dl class="variablelist">
|
<div class="variablelist"><dl class="variablelist">
|
||||||
<dt><span class="term">-1</span></dt>
|
<dt><span class="term">-1</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
An abbreviation for <code class="option">-a SHA1</code>
|
Use SHA-1 as the digest algorithm (the default is to use
|
||||||
|
both SHA-1 and SHA-256).
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-2</span></dt>
|
<dt><span class="term">-2</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
An abbreviation for <code class="option">-a SHA-256</code>
|
Use SHA-256 as the digest algorithm.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Specify a digest algorithm to use when converting DNSKEY
|
Select the digest algorithm. The value of
|
||||||
records to DS records. This option can be repeated, so
|
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
|
||||||
that multiple DS records are created for each DNSKEY
|
SHA-256 (SHA256) or SHA-384 (SHA384).
|
||||||
record.
|
These values are case insensitive.
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The <em class="replaceable"><code>algorithm</code></em> must be one of
|
|
||||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
|
||||||
and the hyphen may be omitted. If no algorithm is specified,
|
|
||||||
the default is SHA-256.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-A</span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Include ZSKs when generating DS records. Without this option, only
|
|
||||||
keys which have the KSK flag set will be converted to DS records
|
|
||||||
and printed. Useful only in <code class="option">-f</code> zone file mode.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Specifies the DNS class (default is IN). Useful only
|
|
||||||
in <code class="option">-s</code> keyset or <code class="option">-f</code>
|
|
||||||
zone file mode.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-C</span></dt>
|
<dt><span class="term">-C</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Generate CDS records rather than DS records. This is mutually
|
Generate CDS records rather than DS records. This is mutually
|
||||||
exclusive with the <code class="option">-l</code> option for generating DLV
|
exclusive with generating lookaside records.
|
||||||
records.
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Specifies the TTL of the DS records.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Look for key files (or, in keyset mode,
|
||||||
|
<code class="filename">keyset-</code> files) in
|
||||||
|
<code class="option">directory</code>.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
|
<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Zone file mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s
|
Zone file mode: in place of the keyfile name, the argument is
|
||||||
final <em class="replaceable"><code>dnsname</code></em> argument is
|
the DNS domain name of a zone master file, which can be read
|
||||||
the DNS domain name of a zone whose master file can be read
|
|
||||||
from <code class="option">file</code>. If the zone name is the same as
|
from <code class="option">file</code>. If the zone name is the same as
|
||||||
<code class="option">file</code>, then it may be omitted.
|
<code class="option">file</code>, then it may be omitted.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
If <em class="replaceable"><code>file</code></em> is <code class="literal">"-"</code>, then
|
If <code class="option">file</code> is set to <code class="literal">"-"</code>, then
|
||||||
the zone data is read from the standard input. This makes it
|
the zone data is read from the standard input. This makes it
|
||||||
possible to use the output of the <span class="command"><strong>dig</strong></span>
|
possible to use the output of the <span class="command"><strong>dig</strong></span>
|
||||||
command as input, as in:
|
command as input, as in:
|
||||||
@@ -202,41 +140,37 @@
|
|||||||
<strong class="userinput"><code>dig dnskey example.com | dnssec-dsfromkey -f - example.com</code></strong>
|
<strong class="userinput"><code>dig dnskey example.com | dnssec-dsfromkey -f - example.com</code></strong>
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-h</span></dt>
|
<dt><span class="term">-A</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Prints usage information.
|
Include ZSKs when generating DS records. Without this option,
|
||||||
</p>
|
only keys which have the KSK flag set will be converted to DS
|
||||||
</dd>
|
records and printed. Useful only in zone file mode.
|
||||||
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
|
</p>
|
||||||
<dd>
|
</dd>
|
||||||
<p>
|
|
||||||
Look for key files or <code class="filename">keyset-</code> files in
|
|
||||||
<code class="option">directory</code>.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Generate a DLV set instead of a DS set. The specified
|
Generate a DLV set instead of a DS set. The specified
|
||||||
<em class="replaceable"><code>domain</code></em> is appended to the name for each
|
<code class="option">domain</code> is appended to the name for each
|
||||||
record in the set.
|
record in the set.
|
||||||
This is mutually exclusive with the <code class="option">-C</code> option
|
The DNSSEC Lookaside Validation (DLV) RR is described
|
||||||
for generating CDS records.
|
in RFC 4431. This is mutually exclusive with generating
|
||||||
|
CDS records.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-s</span></dt>
|
<dt><span class="term">-s</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Keyset mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s
|
Keyset mode: in place of the keyfile name, the argument is
|
||||||
final <em class="replaceable"><code>dnsname</code></em> argument is the DNS
|
the DNS domain name of a keyset file.
|
||||||
domain name used to locate a <code class="filename">keyset-</code> file.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
|
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Specifies the TTL of the DS records. By default the TTL is omitted.
|
Specifies the DNS class (default is IN). Useful only
|
||||||
|
in keyset or zone file mode.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||||
@@ -245,6 +179,12 @@
|
|||||||
Sets the debugging level.
|
Sets the debugging level.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term">-h</span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Prints usage information.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt><span class="term">-V</span></dt>
|
<dt><span class="term">-V</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -260,23 +200,22 @@
|
|||||||
<p>
|
<p>
|
||||||
To build the SHA-256 DS RR from the
|
To build the SHA-256 DS RR from the
|
||||||
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||||
keyfile name, you can issue the following command:
|
keyfile name, the following command would be issued:
|
||||||
</p>
|
</p>
|
||||||
<p><strong class="userinput"><code>dnssec-dsfromkey -2 Kexample.com.+003+26160</code></strong>
|
<p><strong class="userinput"><code>dnssec-dsfromkey -2 Kexample.com.+003+26160</code></strong>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The command would print something like:
|
The command would print something like:
|
||||||
</p>
|
</p>
|
||||||
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</code></strong>
|
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</code></strong>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="refsection">
|
<div class="refsection">
|
||||||
<a name="id-1.10"></a><h2>FILES</h2>
|
<a name="id-1.10"></a><h2>FILES</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The keyfile can be designated by the key identification
|
The keyfile can be designed by the key identification
|
||||||
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
|
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
|
||||||
<code class="filename">Knnnn.+aaa+iiiii.key</code> as generated by
|
<code class="filename">Knnnn.+aaa+iiiii.key</code> as generated by
|
||||||
<span class="refentrytitle">dnssec-keygen</span>(8).
|
<span class="refentrytitle">dnssec-keygen</span>(8).
|
||||||
@@ -306,11 +245,9 @@
|
|||||||
<span class="refentrytitle">dnssec-signzone</span>(8)
|
<span class="refentrytitle">dnssec-signzone</span>(8)
|
||||||
</span>,
|
</span>,
|
||||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||||
<em class="citetitle">RFC 3658</em> (DS RRs),
|
<em class="citetitle">RFC 3658</em>,
|
||||||
<em class="citetitle">RFC 4431</em> (DLV RRs),
|
<em class="citetitle">RFC 4431</em>.
|
||||||
<em class="citetitle">RFC 4509</em> (SHA-256 for DS RRs),
|
<em class="citetitle">RFC 4509</em>.
|
||||||
<em class="citetitle">RFC 6605</em> (SHA-384 for DS RRs),
|
|
||||||
<em class="citetitle">RFC 7344</em> (CDS and CDNSKEY RRs).
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -134,5 +134,5 @@ RFC 5011\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
@@ -13,14 +13,12 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/platform.h>
|
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
@@ -49,6 +47,10 @@
|
|||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#define PATH_MAX 1024 /* AIX, WIN32, and others don't define this. */
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *program = "dnssec-importkey";
|
const char *program = "dnssec-importkey";
|
||||||
int verbose;
|
int verbose;
|
||||||
|
|
||||||
@@ -56,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) {
|
||||||
@@ -122,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);
|
||||||
|
|
||||||
@@ -178,7 +180,9 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
|||||||
rdclass = dst_key_class(key);
|
rdclass = dst_key_class(key);
|
||||||
|
|
||||||
name = dns_fixedname_initname(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
dns_name_copynf(dst_key_name(key), name);
|
result = dns_name_copy(dst_key_name(key), name, NULL);
|
||||||
|
if (result != ISC_R_SUCCESS)
|
||||||
|
fatal("can't copy name");
|
||||||
|
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
}
|
}
|
||||||
@@ -222,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,7 +315,7 @@ main(int argc, char **argv) {
|
|||||||
#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) {
|
||||||
@@ -342,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 ? */
|
||||||
|
|||||||
@@ -38,8 +38,6 @@
|
|||||||
<year>2015</year>
|
<year>2015</year>
|
||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2013-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2008-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -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 RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
|
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, 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
|
||||||
@@ -63,9 +63,9 @@ option is specified, in which case NSEC3RSASHA1 will be used instead\&. (If
|
|||||||
\fB\-3\fR
|
\fB\-3\fR
|
||||||
is used and an algorithm is specified, that algorithm will be checked for compatibility with NSEC3\&.)
|
is used and an algorithm is specified, that algorithm will be checked for compatibility with NSEC3\&.)
|
||||||
.sp
|
.sp
|
||||||
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 is specified along with the
|
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
|
||||||
\fB\-3\fR
|
\fB\-3\fR
|
||||||
option, then NSEC3RSASHA1 will be used instead\&.
|
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
|
||||||
.sp
|
.sp
|
||||||
As of BIND 9\&.12\&.0, this option is mandatory except when using the
|
As of BIND 9\&.12\&.0, this option is mandatory except when using the
|
||||||
\fB\-S\fR
|
\fB\-S\fR
|
||||||
@@ -92,7 +92,7 @@ Specifies the label for a key pair in the crypto hardware\&.
|
|||||||
.sp
|
.sp
|
||||||
When
|
When
|
||||||
BIND
|
BIND
|
||||||
9 is built with OpenSSL\-based PKCS#11 support, the label is an arbitrary string that identifies a particular key\&.
|
9 is built with OpenSSL\-based PKCS#11 support, the label is an arbitrary string that identifies a particular key\&. It may be preceded by an optional OpenSSL engine name, followed by a colon, as in "pkcs11:\fIkeylabel\fR"\&.
|
||||||
.sp
|
.sp
|
||||||
When
|
When
|
||||||
BIND
|
BIND
|
||||||
@@ -307,5 +307,5 @@ The PKCS#11 URI Scheme (draft\-pechanec\-pkcs11uri\-13)\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2008-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -64,8 +62,8 @@ usage(void) {
|
|||||||
fprintf(stderr, " name: owner of the key\n");
|
fprintf(stderr, " name: owner of the key\n");
|
||||||
fprintf(stderr, "Other options:\n");
|
fprintf(stderr, "Other options:\n");
|
||||||
fprintf(stderr, " -a algorithm: \n"
|
fprintf(stderr, " -a algorithm: \n"
|
||||||
" DH | RSASHA1 |\n"
|
" RSA | RSAMD5 | DH | DSA | RSASHA1 |\n"
|
||||||
" NSEC3RSASHA1 |\n"
|
" NSEC3DSA | NSEC3RSASHA1 |\n"
|
||||||
" RSASHA256 | RSASHA512 |\n"
|
" RSASHA256 | RSASHA512 |\n"
|
||||||
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
|
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
|
||||||
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
||||||
@@ -129,9 +127,9 @@ 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 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,20 +146,20 @@ 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();
|
||||||
@@ -173,7 +171,7 @@ main(int argc, char **argv) {
|
|||||||
#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 +179,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 +215,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 +238,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 ? */
|
||||||
@@ -382,21 +380,33 @@ main(int argc, char **argv) {
|
|||||||
fatal("no algorithm specified");
|
fatal("no algorithm specified");
|
||||||
}
|
}
|
||||||
|
|
||||||
r.base = algname;
|
if (strcasecmp(algname, "RSA") == 0) {
|
||||||
r.length = strlen(algname);
|
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
||||||
ret = dns_secalg_fromtext(&alg, &r);
|
"recommended.\nIf you still wish to "
|
||||||
if (ret != ISC_R_SUCCESS) {
|
"use RSA (RSAMD5) please specify "
|
||||||
fatal("unknown algorithm %s", algname);
|
"\"-a RSAMD5\"\n");
|
||||||
}
|
if (freeit != NULL)
|
||||||
if (alg == DST_ALG_DH) {
|
free(freeit);
|
||||||
options |= DST_TYPE_KEY;
|
return (1);
|
||||||
|
} else {
|
||||||
|
r.base = algname;
|
||||||
|
r.length = strlen(algname);
|
||||||
|
ret = dns_secalg_fromtext(&alg, &r);
|
||||||
|
if (ret != ISC_R_SUCCESS)
|
||||||
|
fatal("unknown algorithm %s", algname);
|
||||||
|
if (alg == DST_ALG_DH)
|
||||||
|
options |= DST_TYPE_KEY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (use_nsec3) {
|
if (use_nsec3) {
|
||||||
switch (alg) {
|
switch (alg) {
|
||||||
|
case DST_ALG_DSA:
|
||||||
|
alg = DST_ALG_NSEC3DSA;
|
||||||
|
break;
|
||||||
case DST_ALG_RSASHA1:
|
case DST_ALG_RSASHA1:
|
||||||
alg = DST_ALG_NSEC3RSASHA1;
|
alg = DST_ALG_NSEC3RSASHA1;
|
||||||
break;
|
break;
|
||||||
|
case DST_ALG_NSEC3DSA:
|
||||||
case DST_ALG_NSEC3RSASHA1:
|
case DST_ALG_NSEC3RSASHA1:
|
||||||
case DST_ALG_RSASHA256:
|
case DST_ALG_RSASHA256:
|
||||||
case DST_ALG_RSASHA512:
|
case DST_ALG_RSASHA512:
|
||||||
@@ -432,14 +442,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -522,7 +532,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) {
|
||||||
@@ -631,10 +641,10 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (setdel)
|
if (setdel)
|
||||||
dst_key_settime(key, DST_TIME_DELETE, deltime);
|
dst_key_settime(key, DST_TIME_DELETE, deltime);
|
||||||
if (setsyncadd)
|
if (setsyncadd)
|
||||||
dst_key_settime(key, DST_TIME_SYNCPUBLISH, syncadd);
|
dst_key_settime(key, DST_TIME_SYNCPUBLISH, syncadd);
|
||||||
if (setsyncdel)
|
if (setsyncdel)
|
||||||
dst_key_settime(key, DST_TIME_SYNCDELETE, syncdel);
|
dst_key_settime(key, DST_TIME_SYNCDELETE, syncdel);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (setpub || setact || setrev || setinact ||
|
if (setpub || setact || setrev || setinact ||
|
||||||
|
|||||||
@@ -43,8 +43,6 @@
|
|||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2017</year>
|
<year>2017</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
@@ -107,8 +105,8 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Selects the cryptographic algorithm. The value of
|
Selects the cryptographic algorithm. The value of
|
||||||
<option>algorithm</option> must be one of RSASHA1,
|
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
|
||||||
NSEC3RSASHA1, RSASHA256, RSASHA512,
|
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -121,9 +119,9 @@
|
|||||||
<para>
|
<para>
|
||||||
These values are case insensitive. In some cases, abbreviations
|
These values are case insensitive. In some cases, abbreviations
|
||||||
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
||||||
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
|
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
|
||||||
along with the <option>-3</option> option, then NSEC3RSASHA1
|
along with the <option>-3</option> option, then NSEC3RSASHA1
|
||||||
will be used instead.
|
or NSEC3DSA will be used instead.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
As of BIND 9.12.0, this option is mandatory except when using
|
As of BIND 9.12.0, this option is mandatory except when using
|
||||||
@@ -173,7 +171,9 @@
|
|||||||
<para>
|
<para>
|
||||||
When <acronym>BIND</acronym> 9 is built with OpenSSL-based
|
When <acronym>BIND</acronym> 9 is built with OpenSSL-based
|
||||||
PKCS#11 support, the label is an arbitrary string that
|
PKCS#11 support, the label is an arbitrary string that
|
||||||
identifies a particular key.
|
identifies a particular key. It may be preceded by an
|
||||||
|
optional OpenSSL engine name, followed by a colon, as in
|
||||||
|
"pkcs11:<replaceable>keylabel</replaceable>".
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
When <acronym>BIND</acronym> 9 is built with native PKCS#11
|
When <acronym>BIND</acronym> 9 is built with native PKCS#11
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2008-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -89,8 +89,8 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<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 RSASHA1,
|
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
|
||||||
NSEC3RSASHA1, RSASHA256, RSASHA512,
|
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@@ -103,9 +103,9 @@
|
|||||||
<p>
|
<p>
|
||||||
These values are case insensitive. In some cases, abbreviations
|
These values are case insensitive. In some cases, abbreviations
|
||||||
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
||||||
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
|
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
|
||||||
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
|
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
|
||||||
will be used instead.
|
or NSEC3DSA will be used instead.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
As of BIND 9.12.0, this option is mandatory except when using
|
As of BIND 9.12.0, this option is mandatory except when using
|
||||||
@@ -146,7 +146,9 @@
|
|||||||
<p>
|
<p>
|
||||||
When <acronym class="acronym">BIND</acronym> 9 is built with OpenSSL-based
|
When <acronym class="acronym">BIND</acronym> 9 is built with OpenSSL-based
|
||||||
PKCS#11 support, the label is an arbitrary string that
|
PKCS#11 support, the label is an arbitrary string that
|
||||||
identifies a particular key.
|
identifies a particular key. It may be preceded by an
|
||||||
|
optional OpenSSL engine name, followed by a colon, as in
|
||||||
|
"pkcs11:<em class="replaceable"><code>keylabel</code></em>".
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
When <acronym class="acronym">BIND</acronym> 9 is built with native PKCS#11
|
When <acronym class="acronym">BIND</acronym> 9 is built with native PKCS#11
|
||||||
|
|||||||
+50
-49
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2005, 2007-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2005, 2007-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
dnssec-keygen \- DNSSEC key generation tool
|
dnssec-keygen \- DNSSEC key generation tool
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.HP \w'\fBdnssec\-keygen\fR\ 'u
|
.HP \w'\fBdnssec\-keygen\fR\ 'u
|
||||||
\fBdnssec\-keygen\fR [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
|
\fBdnssec\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {name}
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.PP
|
||||||
\fBdnssec\-keygen\fR
|
\fBdnssec\-keygen\fR
|
||||||
@@ -58,24 +58,17 @@ may be preferable to direct use of
|
|||||||
\fBdnssec\-keygen\fR\&.
|
\fBdnssec\-keygen\fR\&.
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
.PP
|
.PP
|
||||||
\-3
|
|
||||||
.RS 4
|
|
||||||
Use an NSEC3\-capable algorithm to generate a DNSSEC key\&. If this option is used with an algorithm that has both NSEC and NSEC3 versions, then the NSEC3 version will be used; for example,
|
|
||||||
\fBdnssec\-keygen \-3a RSASHA1\fR
|
|
||||||
specifies the NSEC3RSASHA1 algorithm\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-a \fIalgorithm\fR
|
\-a \fIalgorithm\fR
|
||||||
.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 RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
|
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, 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
|
||||||
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 is specified along with the
|
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
|
||||||
\fB\-3\fR
|
\fB\-3\fR
|
||||||
option, then NSEC3RSASHA1 will be used instead\&.
|
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
|
||||||
.sp
|
.sp
|
||||||
This parameter
|
This parameter
|
||||||
\fImust\fR
|
\fImust\fR
|
||||||
@@ -90,15 +83,29 @@ to generate TSIG keys\&.
|
|||||||
.PP
|
.PP
|
||||||
\-b \fIkeysize\fR
|
\-b \fIkeysize\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Specifies the number of bits in the key\&. The choice of key size depends on the algorithm used\&. RSA keys must be between 1024 and 4096 bits\&. Diffie Hellman keys must be between 128 and 4096 bits\&. Elliptic curve algorithms don\*(Aqt need this parameter\&.
|
Specifies the number of bits in the key\&. The choice of key size depends on the algorithm used\&. RSA keys must be between 1024 and 2048 bits\&. Diffie Hellman keys must be between 128 and 4096 bits\&. DSA keys must be between 512 and 1024 bits and an exact multiple of 64\&. HMAC keys must be between 1 and 512 bits\&. Elliptic curve algorithms don\*(Aqt need this parameter\&.
|
||||||
.sp
|
.sp
|
||||||
If the key size is not specified, some algorithms have pre\-defined defaults\&. For example, RSA keys for use as DNSSEC zone signing keys have a default size of 1024 bits; RSA keys for use as key signing keys (KSKs, generated with
|
If the key size is not specified, some algorithms have pre\-defined defaults\&. For example, RSA keys for use as DNSSEC zone signing keys have a default size of 1024 bits; RSA keys for use as key signing keys (KSKs, generated with
|
||||||
\fB\-f KSK\fR) default to 2048 bits\&.
|
\fB\-f KSK\fR) default to 2048 bits\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-n \fInametype\fR
|
||||||
|
.RS 4
|
||||||
|
Specifies the owner type of the key\&. The value of
|
||||||
|
\fBnametype\fR
|
||||||
|
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\-3
|
||||||
|
.RS 4
|
||||||
|
Use an NSEC3\-capable algorithm to generate a DNSSEC key\&. If this option is used with an algorithm that has both NSEC and NSEC3 versions, then the NSEC3 version will be used; for example,
|
||||||
|
\fBdnssec\-keygen \-3a RSASHA1\fR
|
||||||
|
specifies the NSEC3RSASHA1 algorithm\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-C
|
\-C
|
||||||
.RS 4
|
.RS 4
|
||||||
Compatibility mode: generates an old\-style key, without any timing metadata\&. By default,
|
Compatibility mode: generates an old\-style key, without any metadata\&. By default,
|
||||||
\fBdnssec\-keygen\fR
|
\fBdnssec\-keygen\fR
|
||||||
will include the key\*(Aqs creation date in the metadata stored with the private key, and other dates may be set there as well (publication date, activation date, etc)\&. Keys that include this data may be incompatible with older versions of BIND; the
|
will include the key\*(Aqs creation date in the metadata stored with the private key, and other dates may be set there as well (publication date, activation date, etc)\&. Keys that include this data may be incompatible with older versions of BIND; the
|
||||||
\fB\-C\fR
|
\fB\-C\fR
|
||||||
@@ -143,6 +150,11 @@ Prints a short summary of the options and arguments to
|
|||||||
Sets the directory in which the key files are to be written\&.
|
Sets the directory in which the key files are to be written\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\-k
|
||||||
|
.RS 4
|
||||||
|
Deprecated in favor of \-T KEY\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\-L \fIttl\fR
|
\-L \fIttl\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Sets the default TTL to use for this key when it is converted into a DNSKEY RR\&. If the key is imported into a zone, this is the TTL that will be used for it, unless there was already a DNSKEY RRset in place, in which case the existing TTL would take precedence\&. If this value is not set and there is no existing DNSKEY RRset, the TTL will default to the SOA TTL\&. Setting the default TTL to
|
Sets the default TTL to use for this key when it is converted into a DNSKEY RR\&. If the key is imported into a zone, this is the TTL that will be used for it, unless there was already a DNSKEY RRset in place, in which case the existing TTL would take precedence\&. If this value is not set and there is no existing DNSKEY RRset, the TTL will default to the SOA TTL\&. Setting the default TTL to
|
||||||
@@ -152,17 +164,9 @@ none
|
|||||||
is the same as leaving it unset\&.
|
is the same as leaving it unset\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-n \fInametype\fR
|
|
||||||
.RS 4
|
|
||||||
Specifies the owner type of the key\&. The value of
|
|
||||||
\fBnametype\fR
|
|
||||||
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY)\&. These values are case insensitive\&. Defaults to ZONE for DNSKEY generation\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-p \fIprotocol\fR
|
\-p \fIprotocol\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Sets the protocol value for the generated key, for use with
|
Sets the protocol value for the generated key\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
|
||||||
\fB\-T KEY\fR\&. The protocol is a number between 0 and 255\&. The default is 3 (DNSSEC)\&. Other possible values for this argument are listed in RFC 2535 and its successors\&.
|
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-q
|
\-q
|
||||||
@@ -189,25 +193,27 @@ Specifies the strength value of the key\&. The strength is a number between 0 an
|
|||||||
Specifies the resource record type to use for the key\&.
|
Specifies the resource record type to use for the key\&.
|
||||||
\fBrrtype\fR
|
\fBrrtype\fR
|
||||||
must be either DNSKEY or KEY\&. The default is DNSKEY when using a DNSSEC algorithm, but it can be overridden to KEY for use with SIG(0)\&.
|
must be either DNSKEY or KEY\&. The default is DNSKEY when using a DNSSEC algorithm, but it can be overridden to KEY for use with SIG(0)\&.
|
||||||
|
Specifying any TSIG algorithm (HMAC\-* or DH) with
|
||||||
|
\fB\-a\fR
|
||||||
|
forces this option to KEY\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-t \fItype\fR
|
\-t \fItype\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Indicates the use of the key, for use with
|
Indicates the use of the key\&.
|
||||||
\fB\-T KEY\fR\&.
|
|
||||||
\fBtype\fR
|
\fBtype\fR
|
||||||
must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF\&. The default is AUTHCONF\&. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data\&.
|
must be one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF\&. The default is AUTHCONF\&. AUTH refers to the ability to authenticate data, and CONF the ability to encrypt data\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-V
|
|
||||||
.RS 4
|
|
||||||
Prints version information\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-v \fIlevel\fR
|
\-v \fIlevel\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Sets the debugging level\&.
|
Sets the debugging level\&.
|
||||||
.RE
|
.RE
|
||||||
|
.PP
|
||||||
|
\-V
|
||||||
|
.RS 4
|
||||||
|
Prints version information\&.
|
||||||
|
.RE
|
||||||
.SH "TIMING OPTIONS"
|
.SH "TIMING OPTIONS"
|
||||||
.PP
|
.PP
|
||||||
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS\&. If the argument begins with a \*(Aq+\*(Aq or \*(Aq\-\*(Aq, it is interpreted as an offset from the present time\&. For convenience, if such an offset is followed by one of the suffixes \*(Aqy\*(Aq, \*(Aqmo\*(Aq, \*(Aqw\*(Aq, \*(Aqd\*(Aq, \*(Aqh\*(Aq, or \*(Aqmi\*(Aq, then the offset is computed in years (defined as 365 24\-hour days, ignoring leap years), months (defined as 30 24\-hour days), weeks, days, hours, or minutes, respectively\&. Without a suffix, the offset is computed in seconds\&. To explicitly prevent a date from being set, use \*(Aqnone\*(Aq or \*(Aqnever\*(Aq\&.
|
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS\&. If the argument begins with a \*(Aq+\*(Aq or \*(Aq\-\*(Aq, it is interpreted as an offset from the present time\&. For convenience, if such an offset is followed by one of the suffixes \*(Aqy\*(Aq, \*(Aqmo\*(Aq, \*(Aqw\*(Aq, \*(Aqd\*(Aq, \*(Aqh\*(Aq, or \*(Aqmi\*(Aq, then the offset is computed in years (defined as 365 24\-hour days, ignoring leap years), months (defined as 30 24\-hour days), weeks, days, hours, or minutes, respectively\&. Without a suffix, the offset is computed in seconds\&. To explicitly prevent a date from being set, use \*(Aqnone\*(Aq or \*(Aqnever\*(Aq\&.
|
||||||
@@ -308,39 +314,34 @@ contains the private key\&.
|
|||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
\&.key
|
\&.key
|
||||||
file contains a DNSKEY or KEY record\&. When a zone is being signed by
|
file contains a DNS KEY record that can be inserted into a zone file (directly or with a $INCLUDE statement)\&.
|
||||||
\fBnamed\fR
|
|
||||||
or
|
|
||||||
\fBdnssec\-signzone\fR\fB\-S\fR, DNSKEY records are included automatically\&. In other cases, the
|
|
||||||
\&.key
|
|
||||||
file can be inserted into a zone file manually or with a
|
|
||||||
\fB$INCLUDE\fR
|
|
||||||
statement\&.
|
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
\&.private
|
\&.private
|
||||||
file contains algorithm\-specific fields\&. For obvious security reasons, this file does not have general read permission\&.
|
file contains algorithm\-specific fields\&. For obvious security reasons, this file does not have general read permission\&.
|
||||||
|
.PP
|
||||||
|
Both
|
||||||
|
\&.key
|
||||||
|
and
|
||||||
|
\&.private
|
||||||
|
files are generated for symmetric cryptography algorithms such as HMAC\-MD5, even though the public and private key are equivalent\&.
|
||||||
.SH "EXAMPLE"
|
.SH "EXAMPLE"
|
||||||
.PP
|
.PP
|
||||||
To generate an ECDSAP256SHA256 zone\-signing key for the zone
|
To generate a 768\-bit DSA key for the domain
|
||||||
\fBexample\&.com\fR, issue the command:
|
\fBexample\&.com\fR, the following command would be issued:
|
||||||
.PP
|
.PP
|
||||||
\fBdnssec\-keygen \-a ECDSAP256SHA256 example\&.com\fR
|
\fBdnssec\-keygen \-a DSA \-b 768 \-n ZONE example\&.com\fR
|
||||||
.PP
|
.PP
|
||||||
The command would print a string of the form:
|
The command would print a string of the form:
|
||||||
.PP
|
.PP
|
||||||
\fBKexample\&.com\&.+013+26160\fR
|
\fBKexample\&.com\&.+003+26160\fR
|
||||||
.PP
|
.PP
|
||||||
In this example,
|
In this example,
|
||||||
\fBdnssec\-keygen\fR
|
\fBdnssec\-keygen\fR
|
||||||
creates the files
|
creates the files
|
||||||
Kexample\&.com\&.+013+26160\&.key
|
Kexample\&.com\&.+003+26160\&.key
|
||||||
and
|
and
|
||||||
Kexample\&.com\&.+013+26160\&.private\&.
|
Kexample\&.com\&.+003+26160\&.private\&.
|
||||||
.PP
|
|
||||||
To generate a matching key\-signing key, issue the command:
|
|
||||||
.PP
|
|
||||||
\fBdnssec\-keygen \-a ECDSAP256SHA256 \-f KSK example\&.com\fR
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.PP
|
.PP
|
||||||
\fBdnssec-signzone\fR(8),
|
\fBdnssec-signzone\fR(8),
|
||||||
@@ -353,5 +354,5 @@ RFC 4034\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2005, 2007-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2005, 2007-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+88
-46
@@ -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>
|
||||||
|
|
||||||
@@ -79,17 +77,23 @@ usage(void) {
|
|||||||
fprintf(stderr, "Options:\n");
|
fprintf(stderr, "Options:\n");
|
||||||
fprintf(stderr, " -K <directory>: write keys into directory\n");
|
fprintf(stderr, " -K <directory>: write keys into directory\n");
|
||||||
fprintf(stderr, " -a <algorithm>:\n");
|
fprintf(stderr, " -a <algorithm>:\n");
|
||||||
fprintf(stderr, " RSASHA1 | NSEC3RSASHA1 |\n");
|
fprintf(stderr, " RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1"
|
||||||
|
" | NSEC3DSA |\n");
|
||||||
fprintf(stderr, " RSASHA256 | RSASHA512 |\n");
|
fprintf(stderr, " RSASHA256 | RSASHA512 |\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");
|
||||||
fprintf(stderr, " -b <key size in bits>:\n");
|
fprintf(stderr, " -b <key size in bits>:\n");
|
||||||
|
fprintf(stderr, " RSAMD5:\t[1024..%d]\n", MAX_RSA);
|
||||||
fprintf(stderr, " RSASHA1:\t[1024..%d]\n", MAX_RSA);
|
fprintf(stderr, " RSASHA1:\t[1024..%d]\n", MAX_RSA);
|
||||||
fprintf(stderr, " NSEC3RSASHA1:\t[1024..%d]\n", MAX_RSA);
|
fprintf(stderr, " NSEC3RSASHA1:\t[1024..%d]\n", MAX_RSA);
|
||||||
fprintf(stderr, " RSASHA256:\t[1024..%d]\n", MAX_RSA);
|
fprintf(stderr, " RSASHA256:\t[1024..%d]\n", MAX_RSA);
|
||||||
fprintf(stderr, " RSASHA512:\t[1024..%d]\n", MAX_RSA);
|
fprintf(stderr, " RSASHA512:\t[1024..%d]\n", MAX_RSA);
|
||||||
fprintf(stderr, " DH:\t\t[128..4096]\n");
|
fprintf(stderr, " DH:\t\t[128..4096]\n");
|
||||||
|
fprintf(stderr, " DSA:\t\t[512..1024] and divisible by 64\n");
|
||||||
|
fprintf(stderr, " NSEC3DSA:\t[512..1024] and divisible "
|
||||||
|
"by 64\n");
|
||||||
|
fprintf(stderr, " ECCGOST:\tignored\n");
|
||||||
fprintf(stderr, " ECDSAP256SHA256:\tignored\n");
|
fprintf(stderr, " ECDSAP256SHA256:\tignored\n");
|
||||||
fprintf(stderr, " ECDSAP384SHA384:\tignored\n");
|
fprintf(stderr, " ECDSAP384SHA384:\tignored\n");
|
||||||
fprintf(stderr, " ED25519:\tignored\n");
|
fprintf(stderr, " ED25519:\tignored\n");
|
||||||
@@ -155,6 +159,11 @@ usage(void) {
|
|||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static isc_boolean_t
|
||||||
|
dsa_size_ok(int size) {
|
||||||
|
return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
progress(int p)
|
progress(int p)
|
||||||
{
|
{
|
||||||
@@ -189,10 +198,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;
|
||||||
@@ -209,24 +218,24 @@ main(int argc, char **argv) {
|
|||||||
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();
|
||||||
@@ -236,12 +245,12 @@ main(int argc, char **argv) {
|
|||||||
#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.
|
||||||
*/
|
*/
|
||||||
#define CMDLINE_FLAGS "3A:a:b:Cc:D:d:E:eFf:Gg:hI:i:K:L:m:n:P:p:qR:r:S:s:T:t:" \
|
#define CMDLINE_FLAGS "3A:a:b:Cc:D:d:E:eFf:Gg:hI:i:K:kL:m:n:P:p:qR:r:S:s:T:t:" \
|
||||||
"v:V"
|
"v:V"
|
||||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
@@ -261,7 +270,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);
|
||||||
|
|
||||||
@@ -270,7 +279,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;
|
||||||
@@ -281,7 +290,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;
|
||||||
@@ -297,7 +306,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]);
|
||||||
@@ -322,9 +331,14 @@ main(int argc, char **argv) {
|
|||||||
fatal("cannot open directory %s: %s",
|
fatal("cannot open directory %s: %s",
|
||||||
directory, isc_result_totext(ret));
|
directory, isc_result_totext(ret));
|
||||||
break;
|
break;
|
||||||
|
case 'k':
|
||||||
|
fatal("The -k option has been deprecated.\n"
|
||||||
|
"To generate a key-signing key, use -f KSK.\n"
|
||||||
|
"To generate a key with TYPE=KEY, use -T KEY.\n");
|
||||||
|
break;
|
||||||
case 'L':
|
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;
|
||||||
@@ -338,7 +352,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"
|
||||||
@@ -375,7 +389,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 ? */
|
||||||
@@ -469,7 +483,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)
|
||||||
@@ -501,14 +515,23 @@ main(int argc, char **argv) {
|
|||||||
fatal("no algorithm specified");
|
fatal("no algorithm specified");
|
||||||
}
|
}
|
||||||
|
|
||||||
r.base = algname;
|
if (strcasecmp(algname, "RSA") == 0) {
|
||||||
r.length = strlen(algname);
|
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
||||||
ret = dns_secalg_fromtext(&alg, &r);
|
"recommended.\nIf you still wish to "
|
||||||
if (ret != ISC_R_SUCCESS) {
|
"use RSA (RSAMD5) please specify "
|
||||||
fatal("unknown algorithm %s", algname);
|
"\"-a RSAMD5\"\n");
|
||||||
}
|
INSIST(freeit == NULL);
|
||||||
if (alg == DST_ALG_DH) {
|
return (1);
|
||||||
options |= DST_TYPE_KEY;
|
} else {
|
||||||
|
r.base = algname;
|
||||||
|
r.length = strlen(algname);
|
||||||
|
ret = dns_secalg_fromtext(&alg, &r);
|
||||||
|
if (ret != ISC_R_SUCCESS) {
|
||||||
|
fatal("unknown algorithm %s", algname);
|
||||||
|
}
|
||||||
|
if (alg == DST_ALG_DH) {
|
||||||
|
options |= DST_TYPE_KEY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dst_algorithm_supported(alg)) {
|
if (!dst_algorithm_supported(alg)) {
|
||||||
@@ -517,12 +540,17 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (use_nsec3) {
|
if (use_nsec3) {
|
||||||
switch (alg) {
|
switch (alg) {
|
||||||
|
case DST_ALG_DSA:
|
||||||
|
alg = DST_ALG_NSEC3DSA;
|
||||||
|
break;
|
||||||
case DST_ALG_RSASHA1:
|
case DST_ALG_RSASHA1:
|
||||||
alg = DST_ALG_NSEC3RSASHA1;
|
alg = DST_ALG_NSEC3RSASHA1;
|
||||||
break;
|
break;
|
||||||
|
case DST_ALG_NSEC3DSA:
|
||||||
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:
|
||||||
@@ -568,6 +596,7 @@ main(int argc, char **argv) {
|
|||||||
" to %d\n", size);
|
" to %d\n", size);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
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:
|
||||||
@@ -585,14 +614,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -678,10 +707,11 @@ 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) {
|
||||||
|
case DNS_KEYALG_RSAMD5:
|
||||||
case DNS_KEYALG_RSASHA1:
|
case DNS_KEYALG_RSASHA1:
|
||||||
case DNS_KEYALG_NSEC3RSASHA1:
|
case DNS_KEYALG_NSEC3RSASHA1:
|
||||||
case DNS_KEYALG_RSASHA256:
|
case DNS_KEYALG_RSASHA256:
|
||||||
@@ -696,6 +726,14 @@ main(int argc, char **argv) {
|
|||||||
if (size != 0 && (size < 128 || size > 4096))
|
if (size != 0 && (size < 128 || size > 4096))
|
||||||
fatal("DH key size %d out of range", size);
|
fatal("DH key size %d out of range", size);
|
||||||
break;
|
break;
|
||||||
|
case DNS_KEYALG_DSA:
|
||||||
|
case DNS_KEYALG_NSEC3DSA:
|
||||||
|
if (size != 0 && !dsa_size_ok(size))
|
||||||
|
fatal("invalid DSS key size: %d", size);
|
||||||
|
break;
|
||||||
|
case DST_ALG_ECCGOST:
|
||||||
|
size = 256;
|
||||||
|
break;
|
||||||
case DST_ALG_ECDSA256:
|
case DST_ALG_ECDSA256:
|
||||||
size = 256;
|
size = 256;
|
||||||
break;
|
break;
|
||||||
@@ -763,32 +801,36 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch(alg) {
|
switch(alg) {
|
||||||
|
case DNS_KEYALG_RSAMD5:
|
||||||
case DNS_KEYALG_RSASHA1:
|
case DNS_KEYALG_RSASHA1:
|
||||||
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:
|
||||||
param = generator;
|
param = generator;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DNS_KEYALG_DSA:
|
||||||
|
case DNS_KEYALG_NSEC3DSA:
|
||||||
|
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:
|
||||||
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.");
|
||||||
@@ -909,7 +951,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;
|
||||||
@@ -930,7 +972,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 "
|
||||||
|
|||||||
@@ -50,8 +50,6 @@
|
|||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2017</year>
|
<year>2017</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
@@ -59,10 +57,11 @@
|
|||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis sepchar=" ">
|
<cmdsynopsis sepchar=" ">
|
||||||
<command>dnssec-keygen</command>
|
<command>dnssec-keygen</command>
|
||||||
<arg choice="opt" rep="norepeat"><option>-3</option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-A <replaceable class="parameter">date/offset</replaceable></option></arg>
|
|
||||||
<arg rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
<arg rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-3</option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-A <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-D <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||||
@@ -77,7 +76,6 @@
|
|||||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-k</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-k</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">ttl</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">ttl</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">nametype</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-P <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-P sync <replaceable class="parameter">date/offset</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-P sync <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
|
||||||
@@ -88,6 +86,7 @@
|
|||||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||||
|
<arg choice="opt" rep="norepeat"><option>-z</option></arg>
|
||||||
<arg choice="req" rep="norepeat">name</arg>
|
<arg choice="req" rep="norepeat">name</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
@@ -118,27 +117,13 @@
|
|||||||
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-3</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Use an NSEC3-capable algorithm to generate a DNSSEC key.
|
|
||||||
If this option is used with an algorithm that has both
|
|
||||||
NSEC and NSEC3 versions, then the NSEC3 version will be
|
|
||||||
used; for example, <command>dnssec-keygen -3a RSASHA1</command>
|
|
||||||
specifies the NSEC3RSASHA1 algorithm.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<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 RSASHA1,
|
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
|
||||||
NSEC3RSASHA1, RSASHA256, RSASHA512,
|
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||||
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>
|
||||||
@@ -147,9 +132,9 @@
|
|||||||
<para>
|
<para>
|
||||||
These values are case insensitive. In some cases, abbreviations
|
These values are case insensitive. In some cases, abbreviations
|
||||||
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
||||||
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
|
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
|
||||||
along with the <option>-3</option> option, then NSEC3RSASHA1
|
along with the <option>-3</option> option, then NSEC3RSASHA1
|
||||||
will be used instead.
|
or NSEC3DSA will be used instead.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
This parameter <emphasis>must</emphasis> be specified except
|
This parameter <emphasis>must</emphasis> be specified except
|
||||||
@@ -171,9 +156,11 @@
|
|||||||
<para>
|
<para>
|
||||||
Specifies the number of bits in the key. The choice of key
|
Specifies the number of bits in the key. The choice of key
|
||||||
size depends on the algorithm used. RSA keys must be
|
size depends on the algorithm used. RSA keys must be
|
||||||
between 1024 and 4096 bits. Diffie Hellman keys must be between
|
between 1024 and 2048 bits. Diffie Hellman keys must be between
|
||||||
128 and 4096 bits. Elliptic curve algorithms don't need this
|
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||||
parameter.
|
bits and an exact multiple of 64. HMAC keys must be
|
||||||
|
between 1 and 512 bits. Elliptic curve algorithms don't need
|
||||||
|
this parameter.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If the key size is not specified, some algorithms have
|
If the key size is not specified, some algorithms have
|
||||||
@@ -185,16 +172,43 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-n <replaceable class="parameter">nametype</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Specifies the owner type of the key. The value of
|
||||||
|
<option>nametype</option> must either be ZONE (for a DNSSEC
|
||||||
|
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
|
||||||
|
with a host (KEY)), USER (for a key associated with a
|
||||||
|
user(KEY)) or OTHER (DNSKEY). These values are case
|
||||||
|
insensitive. Defaults to ZONE for DNSKEY generation.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-3</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Use an NSEC3-capable algorithm to generate a DNSSEC key.
|
||||||
|
If this option is used with an algorithm that has both
|
||||||
|
NSEC and NSEC3 versions, then the NSEC3 version will be
|
||||||
|
used; for example, <command>dnssec-keygen -3a RSASHA1</command>
|
||||||
|
specifies the NSEC3RSASHA1 algorithm.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-C</term>
|
<term>-C</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Compatibility mode: generates an old-style key, without any
|
Compatibility mode: generates an old-style key, without
|
||||||
timing metadata. By default, <command>dnssec-keygen</command>
|
any metadata. By default, <command>dnssec-keygen</command>
|
||||||
will include the key's creation date in the metadata stored with
|
will include the key's creation date in the metadata stored
|
||||||
the private key, and other dates may be set there as well
|
with the private key, and other dates may be set there as well
|
||||||
(publication date, activation date, etc). Keys that include this
|
(publication date, activation date, etc). Keys that include
|
||||||
data may be incompatible with older versions of BIND; the
|
this data may be incompatible with older versions of BIND; the
|
||||||
<option>-C</option> option suppresses them.
|
<option>-C</option> option suppresses them.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
@@ -278,6 +292,15 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-k</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Deprecated in favor of -T KEY.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-L <replaceable class="parameter">ttl</replaceable></term>
|
<term>-L <replaceable class="parameter">ttl</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -294,28 +317,14 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-n <replaceable class="parameter">nametype</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies the owner type of the key. The value of
|
|
||||||
<option>nametype</option> must either be ZONE (for a DNSSEC
|
|
||||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
|
|
||||||
with a host (KEY)), USER (for a key associated with a
|
|
||||||
user(KEY)) or OTHER (DNSKEY). These values are case
|
|
||||||
insensitive. Defaults to ZONE for DNSKEY generation.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-p <replaceable class="parameter">protocol</replaceable></term>
|
<term>-p <replaceable class="parameter">protocol</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Sets the protocol value for the generated key, for use
|
Sets the protocol value for the generated key. The protocol
|
||||||
with <option>-T KEY</option>. The protocol is a number between 0
|
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||||
and 255. The default is 3 (DNSSEC). Other possible values for
|
Other possible values for this argument are listed in
|
||||||
this argument are listed in RFC 2535 and its successors.
|
RFC 2535 and its successors.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -373,6 +382,10 @@
|
|||||||
<option>rrtype</option> must be either DNSKEY or KEY. The
|
<option>rrtype</option> must be either DNSKEY or KEY. The
|
||||||
default is DNSKEY when using a DNSSEC algorithm, but it can be
|
default is DNSKEY when using a DNSSEC algorithm, but it can be
|
||||||
overridden to KEY for use with SIG(0).
|
overridden to KEY for use with SIG(0).
|
||||||
|
<para>
|
||||||
|
</para>
|
||||||
|
Specifying any TSIG algorithm (HMAC-* or DH) with
|
||||||
|
<option>-a</option> forces this option to KEY.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -381,20 +394,10 @@
|
|||||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Indicates the use of the key, for use with <option>-T
|
Indicates the use of the key. <option>type</option> must be
|
||||||
KEY</option>. <option>type</option> must be one of AUTHCONF,
|
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||||
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH
|
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||||
refers to the ability to authenticate data, and CONF the ability
|
data, and CONF the ability to encrypt data.
|
||||||
to encrypt data.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-V</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Prints version information.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -408,6 +411,15 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>-V</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Prints version information.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
@@ -572,12 +584,10 @@
|
|||||||
key.
|
key.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The <filename>.key</filename> file contains a DNSKEY or KEY record.
|
The <filename>.key</filename> file contains a DNS KEY record
|
||||||
When a zone is being signed by <command>named</command>
|
that
|
||||||
or <command>dnssec-signzone</command> <option>-S</option>, DNSKEY
|
can be inserted into a zone file (directly or with a $INCLUDE
|
||||||
records are included automatically. In other cases,
|
statement).
|
||||||
the <filename>.key</filename> file can be inserted into a zone file
|
|
||||||
manually or with a <userinput>$INCLUDE</userinput> statement.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The <filename>.private</filename> file contains
|
The <filename>.private</filename> file contains
|
||||||
@@ -585,33 +595,32 @@
|
|||||||
fields. For obvious security reasons, this file does not have
|
fields. For obvious security reasons, this file does not have
|
||||||
general read permission.
|
general read permission.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
Both <filename>.key</filename> and <filename>.private</filename>
|
||||||
|
files are generated for symmetric cryptography algorithms such as
|
||||||
|
HMAC-MD5, even though the public and private key are equivalent.
|
||||||
|
</para>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
<refsection><info><title>EXAMPLE</title></info>
|
<refsection><info><title>EXAMPLE</title></info>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To generate an ECDSAP256SHA256 zone-signing key for the zone
|
To generate a 768-bit DSA key for the domain
|
||||||
<userinput>example.com</userinput>, issue the command:
|
<userinput>example.com</userinput>, the following command would be
|
||||||
|
issued:
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para><userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
|
||||||
<userinput>dnssec-keygen -a ECDSAP256SHA256 example.com</userinput>
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The command would print a string of the form:
|
The command would print a string of the form:
|
||||||
</para>
|
</para>
|
||||||
<para><userinput>Kexample.com.+013+26160</userinput>
|
<para><userinput>Kexample.com.+003+26160</userinput>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In this example, <command>dnssec-keygen</command> creates
|
In this example, <command>dnssec-keygen</command> creates
|
||||||
the files <filename>Kexample.com.+013+26160.key</filename>
|
the files <filename>Kexample.com.+003+26160.key</filename>
|
||||||
and
|
and
|
||||||
<filename>Kexample.com.+013+26160.private</filename>.
|
<filename>Kexample.com.+003+26160.private</filename>.
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
To generate a matching key-signing key, issue the command:
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
<userinput>dnssec-keygen -a ECDSAP256SHA256 -f KSK example.com</userinput>
|
|
||||||
</para>
|
</para>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2005, 2007-2012, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2005, 2007-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -33,10 +33,11 @@
|
|||||||
<h2>Synopsis</h2>
|
<h2>Synopsis</h2>
|
||||||
<div class="cmdsynopsis"><p>
|
<div class="cmdsynopsis"><p>
|
||||||
<code class="command">dnssec-keygen</code>
|
<code class="command">dnssec-keygen</code>
|
||||||
[<code class="option">-3</code>]
|
|
||||||
[<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>]
|
|
||||||
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
|
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
|
||||||
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
|
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
|
||||||
|
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
|
||||||
|
[<code class="option">-3</code>]
|
||||||
|
[<code class="option">-A <em class="replaceable"><code>date/offset</code></em></code>]
|
||||||
[<code class="option">-C</code>]
|
[<code class="option">-C</code>]
|
||||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||||
[<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>]
|
[<code class="option">-D <em class="replaceable"><code>date/offset</code></em></code>]
|
||||||
@@ -51,7 +52,6 @@
|
|||||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||||
[<code class="option">-k</code>]
|
[<code class="option">-k</code>]
|
||||||
[<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>]
|
[<code class="option">-L <em class="replaceable"><code>ttl</code></em></code>]
|
||||||
[<code class="option">-n <em class="replaceable"><code>nametype</code></em></code>]
|
|
||||||
[<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>]
|
[<code class="option">-P <em class="replaceable"><code>date/offset</code></em></code>]
|
||||||
[<code class="option">-P sync <em class="replaceable"><code>date/offset</code></em></code>]
|
[<code class="option">-P sync <em class="replaceable"><code>date/offset</code></em></code>]
|
||||||
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
|
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
|
||||||
@@ -62,6 +62,7 @@
|
|||||||
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
|
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
|
||||||
[<code class="option">-V</code>]
|
[<code class="option">-V</code>]
|
||||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||||
|
[<code class="option">-z</code>]
|
||||||
{name}
|
{name}
|
||||||
</p></div>
|
</p></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -94,22 +95,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="variablelist"><dl class="variablelist">
|
<div class="variablelist"><dl class="variablelist">
|
||||||
<dt><span class="term">-3</span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Use an NSEC3-capable algorithm to generate a DNSSEC key.
|
|
||||||
If this option is used with an algorithm that has both
|
|
||||||
NSEC and NSEC3 versions, then the NSEC3 version will be
|
|
||||||
used; for example, <span class="command"><strong>dnssec-keygen -3a RSASHA1</strong></span>
|
|
||||||
specifies the NSEC3RSASHA1 algorithm.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<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 RSASHA1,
|
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
|
||||||
NSEC3RSASHA1, RSASHA256, RSASHA512,
|
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||||
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>
|
||||||
@@ -118,9 +109,9 @@
|
|||||||
<p>
|
<p>
|
||||||
These values are case insensitive. In some cases, abbreviations
|
These values are case insensitive. In some cases, abbreviations
|
||||||
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
are supported, such as ECDSA256 for ECDSAP256SHA256 and
|
||||||
ECDSA384 for ECDSAP384SHA384. If RSASHA1 is specified
|
ECDSA384 for ECDSAP384SHA384. If RSASHA1 or DSA is specified
|
||||||
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
|
along with the <code class="option">-3</code> option, then NSEC3RSASHA1
|
||||||
will be used instead.
|
or NSEC3DSA will be used instead.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This parameter <span class="emphasis"><em>must</em></span> be specified except
|
This parameter <span class="emphasis"><em>must</em></span> be specified except
|
||||||
@@ -139,9 +130,11 @@
|
|||||||
<p>
|
<p>
|
||||||
Specifies the number of bits in the key. The choice of key
|
Specifies the number of bits in the key. The choice of key
|
||||||
size depends on the algorithm used. RSA keys must be
|
size depends on the algorithm used. RSA keys must be
|
||||||
between 1024 and 4096 bits. Diffie Hellman keys must be between
|
between 1024 and 2048 bits. Diffie Hellman keys must be between
|
||||||
128 and 4096 bits. Elliptic curve algorithms don't need this
|
128 and 4096 bits. DSA keys must be between 512 and 1024
|
||||||
parameter.
|
bits and an exact multiple of 64. HMAC keys must be
|
||||||
|
between 1 and 512 bits. Elliptic curve algorithms don't need
|
||||||
|
this parameter.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
If the key size is not specified, some algorithms have
|
If the key size is not specified, some algorithms have
|
||||||
@@ -151,15 +144,36 @@
|
|||||||
<code class="option">-f KSK</code>) default to 2048 bits.
|
<code class="option">-f KSK</code>) default to 2048 bits.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Specifies the owner type of the key. The value of
|
||||||
|
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
|
||||||
|
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
|
||||||
|
with a host (KEY)), USER (for a key associated with a
|
||||||
|
user(KEY)) or OTHER (DNSKEY). These values are case
|
||||||
|
insensitive. Defaults to ZONE for DNSKEY generation.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
|
<dt><span class="term">-3</span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Use an NSEC3-capable algorithm to generate a DNSSEC key.
|
||||||
|
If this option is used with an algorithm that has both
|
||||||
|
NSEC and NSEC3 versions, then the NSEC3 version will be
|
||||||
|
used; for example, <span class="command"><strong>dnssec-keygen -3a RSASHA1</strong></span>
|
||||||
|
specifies the NSEC3RSASHA1 algorithm.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt><span class="term">-C</span></dt>
|
<dt><span class="term">-C</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Compatibility mode: generates an old-style key, without any
|
Compatibility mode: generates an old-style key, without
|
||||||
timing metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
|
any metadata. By default, <span class="command"><strong>dnssec-keygen</strong></span>
|
||||||
will include the key's creation date in the metadata stored with
|
will include the key's creation date in the metadata stored
|
||||||
the private key, and other dates may be set there as well
|
with the private key, and other dates may be set there as well
|
||||||
(publication date, activation date, etc). Keys that include this
|
(publication date, activation date, etc). Keys that include
|
||||||
data may be incompatible with older versions of BIND; the
|
this data may be incompatible with older versions of BIND; the
|
||||||
<code class="option">-C</code> option suppresses them.
|
<code class="option">-C</code> option suppresses them.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -220,6 +234,12 @@
|
|||||||
Sets the directory in which the key files are to be written.
|
Sets the directory in which the key files are to be written.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term">-k</span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Deprecated in favor of -T KEY.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt><span class="term">-L <em class="replaceable"><code>ttl</code></em></span></dt>
|
<dt><span class="term">-L <em class="replaceable"><code>ttl</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -233,24 +253,13 @@
|
|||||||
or <code class="literal">none</code> is the same as leaving it unset.
|
or <code class="literal">none</code> is the same as leaving it unset.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-n <em class="replaceable"><code>nametype</code></em></span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Specifies the owner type of the key. The value of
|
|
||||||
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
|
|
||||||
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated
|
|
||||||
with a host (KEY)), USER (for a key associated with a
|
|
||||||
user(KEY)) or OTHER (DNSKEY). These values are case
|
|
||||||
insensitive. Defaults to ZONE for DNSKEY generation.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
|
<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Sets the protocol value for the generated key, for use
|
Sets the protocol value for the generated key. The protocol
|
||||||
with <code class="option">-T KEY</code>. The protocol is a number between 0
|
is a number between 0 and 255. The default is 3 (DNSSEC).
|
||||||
and 255. The default is 3 (DNSSEC). Other possible values for
|
Other possible values for this argument are listed in
|
||||||
this argument are listed in RFC 2535 and its successors.
|
RFC 2535 and its successors.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-q</span></dt>
|
<dt><span class="term">-q</span></dt>
|
||||||
@@ -297,21 +306,20 @@
|
|||||||
default is DNSKEY when using a DNSSEC algorithm, but it can be
|
default is DNSKEY when using a DNSSEC algorithm, but it can be
|
||||||
overridden to KEY for use with SIG(0).
|
overridden to KEY for use with SIG(0).
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Specifying any TSIG algorithm (HMAC-* or DH) with
|
||||||
|
<code class="option">-a</code> forces this option to KEY.
|
||||||
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Indicates the use of the key, for use with <code class="option">-T
|
Indicates the use of the key. <code class="option">type</code> must be
|
||||||
KEY</code>. <code class="option">type</code> must be one of AUTHCONF,
|
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||||
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH
|
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||||
refers to the ability to authenticate data, and CONF the ability
|
data, and CONF the ability to encrypt data.
|
||||||
to encrypt data.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-V</span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Prints version information.
|
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||||
@@ -320,6 +328,12 @@
|
|||||||
Sets the debugging level.
|
Sets the debugging level.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term">-V</span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Prints version information.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
</dl></div>
|
</dl></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -462,12 +476,10 @@
|
|||||||
key.
|
key.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The <code class="filename">.key</code> file contains a DNSKEY or KEY record.
|
The <code class="filename">.key</code> file contains a DNS KEY record
|
||||||
When a zone is being signed by <span class="command"><strong>named</strong></span>
|
that
|
||||||
or <span class="command"><strong>dnssec-signzone</strong></span> <code class="option">-S</code>, DNSKEY
|
can be inserted into a zone file (directly or with a $INCLUDE
|
||||||
records are included automatically. In other cases,
|
statement).
|
||||||
the <code class="filename">.key</code> file can be inserted into a zone file
|
|
||||||
manually or with a <strong class="userinput"><code>$INCLUDE</code></strong> statement.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The <code class="filename">.private</code> file contains
|
The <code class="filename">.private</code> file contains
|
||||||
@@ -475,34 +487,33 @@
|
|||||||
fields. For obvious security reasons, this file does not have
|
fields. For obvious security reasons, this file does not have
|
||||||
general read permission.
|
general read permission.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
Both <code class="filename">.key</code> and <code class="filename">.private</code>
|
||||||
|
files are generated for symmetric cryptography algorithms such as
|
||||||
|
HMAC-MD5, even though the public and private key are equivalent.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="refsection">
|
<div class="refsection">
|
||||||
<a name="id-1.11"></a><h2>EXAMPLE</h2>
|
<a name="id-1.11"></a><h2>EXAMPLE</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To generate an ECDSAP256SHA256 zone-signing key for the zone
|
To generate a 768-bit DSA key for the domain
|
||||||
<strong class="userinput"><code>example.com</code></strong>, issue the command:
|
<strong class="userinput"><code>example.com</code></strong>, the following command would be
|
||||||
|
issued:
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p><strong class="userinput"><code>dnssec-keygen -a DSA -b 768 -n ZONE example.com</code></strong>
|
||||||
<strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 example.com</code></strong>
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The command would print a string of the form:
|
The command would print a string of the form:
|
||||||
</p>
|
</p>
|
||||||
<p><strong class="userinput"><code>Kexample.com.+013+26160</code></strong>
|
<p><strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
In this example, <span class="command"><strong>dnssec-keygen</strong></span> creates
|
In this example, <span class="command"><strong>dnssec-keygen</strong></span> creates
|
||||||
the files <code class="filename">Kexample.com.+013+26160.key</code>
|
the files <code class="filename">Kexample.com.+003+26160.key</code>
|
||||||
and
|
and
|
||||||
<code class="filename">Kexample.com.+013+26160.private</code>.
|
<code class="filename">Kexample.com.+003+26160.private</code>.
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To generate a matching key-signing key, issue the command:
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<strong class="userinput"><code>dnssec-keygen -a ECDSAP256SHA256 -f KSK example.com</code></strong>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2009, 2011, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" 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
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -99,5 +99,5 @@ RFC 5011\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2009, 2011, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+14
-16
@@ -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>
|
||||||
|
|
||||||
@@ -57,13 +55,13 @@ usage(void) {
|
|||||||
#else
|
#else
|
||||||
fprintf(stderr, " -E engine: specify OpenSSL engine\n");
|
fprintf(stderr, " -E engine: specify OpenSSL engine\n");
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr, " -f: force overwrite\n");
|
fprintf(stderr, " -f: force overwrite\n");
|
||||||
fprintf(stderr, " -h: help\n");
|
|
||||||
fprintf(stderr, " -K directory: use directory for key files\n");
|
fprintf(stderr, " -K directory: use directory for key files\n");
|
||||||
fprintf(stderr, " -r: remove old keyfiles after "
|
fprintf(stderr, " -h: help\n");
|
||||||
|
fprintf(stderr, " -r: remove old keyfiles after "
|
||||||
"creating revoked version\n");
|
"creating revoked version\n");
|
||||||
fprintf(stderr, " -v level: set level of verbosity\n");
|
fprintf(stderr, " -v level: set level of verbosity\n");
|
||||||
fprintf(stderr, " -V: print version information\n");
|
fprintf(stderr, " -V: print version information\n");
|
||||||
fprintf(stderr, "Output:\n");
|
fprintf(stderr, "Output:\n");
|
||||||
fprintf(stderr, " K<name>+<alg>+<new id>.key, "
|
fprintf(stderr, " K<name>+<alg>+<new id>.key, "
|
||||||
"K<name>+<alg>+<new id>.private\n");
|
"K<name>+<alg>+<new id>.private\n");
|
||||||
@@ -82,11 +80,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 +98,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 +106,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 +120,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);
|
||||||
@@ -239,7 +237,7 @@ main(int argc, char **argv) {
|
|||||||
* Remove old key file, if told to (and if
|
* Remove old key file, if told to (and if
|
||||||
* it isn't the same as the new file)
|
* it isn't the same as the new file)
|
||||||
*/
|
*/
|
||||||
if (removefile) {
|
if (removefile && dst_key_alg(key) != DST_ALG_RSAMD5) {
|
||||||
isc_buffer_init(&buf, oldname, sizeof(oldname));
|
isc_buffer_init(&buf, oldname, sizeof(oldname));
|
||||||
dst_key_setflags(key, flags & ~DNS_KEYFLAG_REVOKE);
|
dst_key_setflags(key, flags & ~DNS_KEYFLAG_REVOKE);
|
||||||
dst_key_buildfilename(key, DST_TYPE_PRIVATE, dir, &buf);
|
dst_key_buildfilename(key, DST_TYPE_PRIVATE, dir, &buf);
|
||||||
|
|||||||
@@ -38,8 +38,6 @@
|
|||||||
<year>2015</year>
|
<year>2015</year>
|
||||||
<year>2016</year>
|
<year>2016</year>
|
||||||
<year>2018</year>
|
<year>2018</year>
|
||||||
<year>2019</year>
|
|
||||||
<year>2020</year>
|
|
||||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
</docinfo>
|
</docinfo>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2009, 2011, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- 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
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user