Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a16276abce |
@@ -11,7 +11,6 @@ BraceWrapping:
|
|||||||
AfterFunction: false # should also be MultiLine, but not yet supported
|
AfterFunction: false # should also be MultiLine, but not yet supported
|
||||||
AfterExternBlock: false
|
AfterExternBlock: false
|
||||||
BeforeElse: false
|
BeforeElse: false
|
||||||
BeforeWhile: false
|
|
||||||
IndentBraces: false
|
IndentBraces: false
|
||||||
SplitEmptyFunction: true
|
SplitEmptyFunction: true
|
||||||
AllowShortIfStatementsOnASingleLine: false
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
@@ -20,7 +19,6 @@ AlwaysBreakAfterReturnType: All
|
|||||||
Cpp11BracedListStyle: false
|
Cpp11BracedListStyle: false
|
||||||
ColumnLimit: 80
|
ColumnLimit: 80
|
||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveBitFields: true
|
|
||||||
AlignConsecutiveDeclarations: false
|
AlignConsecutiveDeclarations: false
|
||||||
AlignConsecutiveMacros: true
|
AlignConsecutiveMacros: true
|
||||||
AlignTrailingComments: true
|
AlignTrailingComments: true
|
||||||
@@ -64,7 +62,6 @@ IncludeCategories:
|
|||||||
Priority: 1
|
Priority: 1
|
||||||
- Regex: '.*'
|
- Regex: '.*'
|
||||||
Priority: 0
|
Priority: 0
|
||||||
IndentExternBlock: NoIndent
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
MaxEmptyLinesToKeep: 1
|
MaxEmptyLinesToKeep: 1
|
||||||
PenaltyBreakAssignment: 30
|
PenaltyBreakAssignment: 30
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ BraceWrapping:
|
|||||||
AfterFunction: false # should also be MultiLine, but not yet supported
|
AfterFunction: false # should also be MultiLine, but not yet supported
|
||||||
AfterExternBlock: false
|
AfterExternBlock: false
|
||||||
BeforeElse: false
|
BeforeElse: false
|
||||||
BeforeWhile: false
|
|
||||||
IndentBraces: false
|
IndentBraces: false
|
||||||
SplitEmptyFunction: true
|
SplitEmptyFunction: true
|
||||||
AllowShortIfStatementsOnASingleLine: false
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
@@ -20,7 +19,6 @@ AlwaysBreakAfterReturnType: All
|
|||||||
Cpp11BracedListStyle: false
|
Cpp11BracedListStyle: false
|
||||||
ColumnLimit: 80
|
ColumnLimit: 80
|
||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveBitFields: true
|
|
||||||
AlignConsecutiveDeclarations: true
|
AlignConsecutiveDeclarations: true
|
||||||
AlignConsecutiveMacros: true
|
AlignConsecutiveMacros: true
|
||||||
AlignTrailingComments: true
|
AlignTrailingComments: true
|
||||||
@@ -52,7 +50,6 @@ IncludeCategories:
|
|||||||
Priority: 1
|
Priority: 1
|
||||||
- Regex: '".*"'
|
- Regex: '".*"'
|
||||||
Priority: 9
|
Priority: 9
|
||||||
IndentExternBlock: NoIndent
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
MaxEmptyLinesToKeep: 1
|
MaxEmptyLinesToKeep: 1
|
||||||
PenaltyBreakAssignment: 30
|
PenaltyBreakAssignment: 30
|
||||||
|
|||||||
+4
-3
@@ -16,6 +16,10 @@
|
|||||||
(concat directory-of-current-dir-locals-file "./"))
|
(concat directory-of-current-dir-locals-file "./"))
|
||||||
|
|
||||||
;; libisc
|
;; 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
|
(expand-file-name
|
||||||
(concat directory-of-current-dir-locals-file "lib/isc/include"))
|
(concat directory-of-current-dir-locals-file "lib/isc/include"))
|
||||||
(expand-file-name
|
(expand-file-name
|
||||||
@@ -102,9 +106,6 @@
|
|||||||
(list
|
(list
|
||||||
"--enable=all"
|
"--enable=all"
|
||||||
"--suppress=missingIncludeSystem"
|
"--suppress=missingIncludeSystem"
|
||||||
"--suppress=nullPointerRedundantCheck"
|
|
||||||
(concat "--suppressions-list=" (expand-file-name
|
|
||||||
(concat directory-of-current-dir-locals-file "util/suppressions.txt")))
|
|
||||||
(concat "-include=" (expand-file-name
|
(concat "-include=" (expand-file-name
|
||||||
(concat directory-of-current-dir-locals-file "config.h")))
|
(concat directory-of-current-dir-locals-file "config.h")))
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
*.sln.in eol=crlf
|
*.sln.in eol=crlf
|
||||||
*.vcxproj.* eol=crlf
|
*.vcxproj.* eol=crlf
|
||||||
|
|
||||||
/fuzz/dns_rdata_fromwire_text.in/input-* -text
|
|
||||||
|
|
||||||
.gitignore export-ignore
|
.gitignore export-ignore
|
||||||
/conftools export-ignore
|
/conftools export-ignore
|
||||||
/doc/design export-ignore
|
/doc/design export-ignore
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
name: 'Lock down mirror repository'
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types: opened
|
|
||||||
pull_request:
|
|
||||||
types: opened
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lockdown:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: dessant/repo-lockdown@v2
|
|
||||||
with:
|
|
||||||
github-token: ${{ github.token }}
|
|
||||||
+2
-33
@@ -39,6 +39,7 @@ __pycache__/
|
|||||||
/depcomp
|
/depcomp
|
||||||
/install-sh
|
/install-sh
|
||||||
/isc-config.sh
|
/isc-config.sh
|
||||||
|
/libltdl/*
|
||||||
/libtool
|
/libtool
|
||||||
/ltmain.sh
|
/ltmain.sh
|
||||||
/m4/libtool.m4
|
/m4/libtool.m4
|
||||||
@@ -56,45 +57,13 @@ Makefile
|
|||||||
Makefile.in
|
Makefile.in
|
||||||
ans.run
|
ans.run
|
||||||
gen.dSYM/
|
gen.dSYM/
|
||||||
|
kyua.log
|
||||||
named.memstats
|
named.memstats
|
||||||
named.run
|
named.run
|
||||||
timestamp
|
timestamp
|
||||||
/compile_commands.json
|
/compile_commands.json
|
||||||
# Gets generated by Build Ear (bear)
|
|
||||||
/compile_commands.commands.json
|
|
||||||
/cppcheck_html/
|
/cppcheck_html/
|
||||||
/cppcheck.results
|
/cppcheck.results
|
||||||
/tsan
|
/tsan
|
||||||
/util/check-make-install
|
/util/check-make-install
|
||||||
/INSTALL
|
/INSTALL
|
||||||
doc/man/dnssec-cds.8in
|
|
||||||
doc/man/dnssec-checkds.8in
|
|
||||||
doc/man/dnssec-coverage.8in
|
|
||||||
doc/man/dnssec-dsfromkey.8in
|
|
||||||
doc/man/dnssec-importkey.8in
|
|
||||||
doc/man/dnssec-keyfromlabel.8in
|
|
||||||
doc/man/dnssec-keygen.8in
|
|
||||||
doc/man/dnssec-keymgr.8in
|
|
||||||
doc/man/dnssec-revoke.8in
|
|
||||||
doc/man/dnssec-settime.8in
|
|
||||||
doc/man/dnssec-signzone.8in
|
|
||||||
doc/man/dnssec-verify.8in
|
|
||||||
doc/man/named-checkconf.8in
|
|
||||||
doc/man/named-checkzone.8in
|
|
||||||
doc/man/named-journalprint.8in
|
|
||||||
doc/man/named-nzd2nzf.8in
|
|
||||||
doc/man/nsec3hash.8in
|
|
||||||
doc/man/pkcs11-destroy.8in
|
|
||||||
doc/man/pkcs11-keygen.8in
|
|
||||||
doc/man/pkcs11-list.8in
|
|
||||||
doc/man/pkcs11-tokens.8in
|
|
||||||
# clangd index directory
|
|
||||||
/\.cache/
|
|
||||||
# GNU Global index files
|
|
||||||
/GPATH
|
|
||||||
/GRTAGS
|
|
||||||
/GTAGS
|
|
||||||
# Emacs specific files
|
|
||||||
\.dir-locals-2.el
|
|
||||||
/emacs.desktop
|
|
||||||
/emacs.desktop-lock
|
|
||||||
|
|||||||
+528
-608
File diff suppressed because it is too large
Load Diff
@@ -1,37 +0,0 @@
|
|||||||
<!--
|
|
||||||
THIS ISSUE TEMPLATE IS INTENDED ONLY FOR INTERNAL USE.
|
|
||||||
|
|
||||||
If the bug you are reporting is potentially security-related - for example,
|
|
||||||
if it involves an assertion failure or other crash in `named` that can be
|
|
||||||
triggered repeatedly - then please do *NOT* report it here, but send an
|
|
||||||
email to [security-officer@isc.org](security-officer@isc.org).
|
|
||||||
-->
|
|
||||||
|
|
||||||
### CVE-specific actions
|
|
||||||
|
|
||||||
- [ ] Assign a CVE identifier
|
|
||||||
- [ ] Determine CVSS score
|
|
||||||
- [ ] Determine the range of BIND versions affected (including the Subscription Edition)
|
|
||||||
- [ ] Determine whether workarounds for the problem exists
|
|
||||||
- [ ] Create a draft of the security advisory and put the information above in there
|
|
||||||
- [ ] Prepare a detailed description of the problem which should include the following by default:
|
|
||||||
- instructions for reproducing the problem (a system test is good enough)
|
|
||||||
- explanation of code flow which triggers the problem (a system test is *not* good enough)
|
|
||||||
- [ ] Prepare a private merge request containing the following items in separate commits:
|
|
||||||
- a test for the issue (may be moved to a separate merge request for deferred merging)
|
|
||||||
- a fix for the issue
|
|
||||||
- documentation updates (`CHANGES`, release notes, anything else applicable)
|
|
||||||
- [ ] Ensure the merge request from the previous step is reviewed by SWENG staff and has no outstanding discussions
|
|
||||||
- [ ] Ensure the documentation changes introduced by the merge request addressing the problem are reviewed by Support and Marketing staff
|
|
||||||
- [ ] Prepare backports of the merge request addressing the problem for all affected (and still maintained) BIND branches (backporting might affect the issue's scope and/or description)
|
|
||||||
- [ ] Prepare a standalone patch for the last stable release of each affected (and still maintained) BIND branch
|
|
||||||
|
|
||||||
### Release-specific actions
|
|
||||||
|
|
||||||
- [ ] Create/update the private issue containing links to fixes & reproducers for all CVEs fixed in a given release cycle
|
|
||||||
- [ ] Reserve a block of `CHANGES` placeholders once the complete set of vulnerabilities fixed in a given release cycle is determined
|
|
||||||
- [ ] Ensure the merge requests containing CVE fixes are merged into `security-*` branches in CVE identifier order
|
|
||||||
|
|
||||||
### Post-disclosure actions
|
|
||||||
|
|
||||||
- [ ] Merge a regression test reproducing the bug into all affected (and still maintained) BIND branches
|
|
||||||
@@ -6,26 +6,6 @@
|
|||||||
|
|
||||||
**Public Release:**
|
**Public Release:**
|
||||||
|
|
||||||
## Documentation Review Links
|
|
||||||
|
|
||||||
**Closed issues assigned to the milestone without a release note:**
|
|
||||||
|
|
||||||
- []()
|
|
||||||
- []()
|
|
||||||
- []()
|
|
||||||
|
|
||||||
**Merge requests merged into the milestone without a release note:**
|
|
||||||
|
|
||||||
- []()
|
|
||||||
- []()
|
|
||||||
- []()
|
|
||||||
|
|
||||||
**Merge requests merged into the milestone without a `CHANGES` entry:**
|
|
||||||
|
|
||||||
- []()
|
|
||||||
- []()
|
|
||||||
- []()
|
|
||||||
|
|
||||||
## Release Checklist
|
## Release Checklist
|
||||||
|
|
||||||
### Before the Code Freeze
|
### Before the Code Freeze
|
||||||
@@ -36,28 +16,29 @@
|
|||||||
- [ ] ***(QA)*** Check whether all issues assigned to the release milestone are resolved[^1].
|
- [ ] ***(QA)*** Check whether all issues assigned to the release milestone are resolved[^1].
|
||||||
- [ ] ***(QA)*** Ensure that there are no outstanding merge requests in the private repository[^1] (Subscription Edition only).
|
- [ ] ***(QA)*** Ensure that there are no outstanding merge requests in the private repository[^1] (Subscription Edition only).
|
||||||
- [ ] ***(QA)*** Ensure all merge requests marked for backporting have been indeed backported.
|
- [ ] ***(QA)*** Ensure all merge requests marked for backporting have been indeed backported.
|
||||||
- [ ] ***(QA)*** Announce (on Mattermost) that the code freeze is in effect.
|
|
||||||
|
|
||||||
### Before the Tagging Deadline
|
### Before the Tagging Deadline
|
||||||
|
|
||||||
- [ ] ***(QA)*** Look for outstanding documentation issues (e.g. `CHANGES` mistakes) and address them if any are found.
|
- [ ] ***(QA)*** Look for outstanding documentation issues (e.g. `CHANGES` mistakes) and address them if any are found.
|
||||||
- [ ] ***(QA)*** Ensure release notes are correct, ask Support and Marketing to check them as well.
|
- [ ] ***(QA)*** Ensure release notes are correct, ask Support and Marketing to check them as well.
|
||||||
- [ ] ***(QA)*** Update API files for libraries with new version information.
|
- [ ] ***(Support)*** Check release notes, ask QA to correct any mistakes found.
|
||||||
- [ ] ***(QA)*** Change software version and library versions in `configure.ac` (new major release only).
|
- [ ] ***(Marketing)*** Check release notes, ask QA to correct any mistakes found.
|
||||||
- [ ] ***(QA)*** Rebuild `configure` using Autoconf on `docs.isc.org`.
|
- [ ] ***(SwEng)*** Update API files for libraries with new version information.
|
||||||
- [ ] ***(QA)*** Update `CHANGES`.
|
- [ ] ***(SwEng)*** Change software version and library versions in `configure.ac` (new major release only).
|
||||||
- [ ] ***(QA)*** Update `CHANGES.SE` (Subscription Edition only).
|
- [ ] ***(SwEng)*** Rebuild `configure` using Autoconf on `docs.isc.org`.
|
||||||
- [ ] ***(QA)*** Update `README.md`.
|
- [ ] ***(SwEng)*** Update `CHANGES`.
|
||||||
- [ ] ***(QA)*** Update `version`.
|
- [ ] ***(SwEng)*** Update `CHANGES.SE` (Subscription Edition only).
|
||||||
- [ ] ***(QA)*** Build documentation on `docs.isc.org`.
|
- [ ] ***(SwEng)*** Update `README.md`.
|
||||||
|
- [ ] ***(SwEng)*** Update `version`.
|
||||||
|
- [ ] ***(SwEng)*** Build documentation on `docs.isc.org`.
|
||||||
|
- [ ] ***(QA)*** Check that all the above steps were performed correctly.
|
||||||
- [ ] ***(QA)*** Check that the formatting is correct for text, PDF, and HTML versions of release notes.
|
- [ ] ***(QA)*** Check that the formatting is correct for text, PDF, and HTML versions of release notes.
|
||||||
- [ ] ***(QA)*** Check that the formatting of the generated man pages is correct.
|
- [ ] ***(SwEng)*** Tag the releases[^2]. (Tags may only be pushed to the public repository for releases which are *not* security releases.)
|
||||||
- [ ] ***(QA)*** Tag the releases in the private repository (`git tag -s -m "BIND 9.x.y" v9_x_y`).
|
- [ ] ***(SwEng)*** If this is the first tag for a release (e.g. beta), create a release branch named `release_v9_X_Y` to allow development to continue on the maintenance branch whilst release engineering continues.
|
||||||
|
|
||||||
### Before the ASN Deadline (for ASN Releases) or the Public Release Date (for Regular Releases)
|
### Before the ASN Deadline (for ASN Releases) or the Public Release Date (for Regular Releases)
|
||||||
|
|
||||||
- [ ] ***(QA)*** Verify GitLab CI results for the tags created and prepare a QA report for the releases to be published.
|
- [ ] ***(QA)*** Verify GitLab CI results for the tags created and prepare a QA report for the releases to be published.
|
||||||
- [ ] ***(QA)*** Announce (on Mattermost) that the code freeze is over.
|
|
||||||
- [ ] ***(QA)*** Request signatures for the tarballs, providing their location and checksums.
|
- [ ] ***(QA)*** Request signatures for the tarballs, providing their location and checksums.
|
||||||
- [ ] ***(Signers)*** Validate tarball checksums, sign tarballs, and upload signatures.
|
- [ ] ***(Signers)*** Validate tarball checksums, sign tarballs, and upload signatures.
|
||||||
- [ ] ***(QA)*** Verify tarball signatures and check tarball checksums again.
|
- [ ] ***(QA)*** Verify tarball signatures and check tarball checksums again.
|
||||||
@@ -73,25 +54,21 @@
|
|||||||
- [ ] ***(Support)*** Publish links to downloads on ISC website.
|
- [ ] ***(Support)*** Publish links to downloads on ISC website.
|
||||||
- [ ] ***(Support)*** Write release email to *bind-announce*.
|
- [ ] ***(Support)*** Write release email to *bind-announce*.
|
||||||
- [ ] ***(Support)*** Write email to *bind-users* (if a major release).
|
- [ ] ***(Support)*** Write email to *bind-users* (if a major release).
|
||||||
- [ ] ***(Support)*** Send eligible customers updated links to the Subscription Edition (update the -S edition delivery tickets, even if those links were provided earlier via an ASN ticket).
|
|
||||||
- [ ] ***(Support)*** Update tickets in case of waiting support customers.
|
- [ ] ***(Support)*** Update tickets in case of waiting support customers.
|
||||||
- [ ] ***(QA)*** Build and test any outstanding private packages.
|
- [ ] ***(QA)*** Build and test any outstanding private packages.
|
||||||
- [ ] ***(QA)*** Build public RPMs.
|
- [ ] ***(QA)*** Build public packages (`*.deb`, RPMs).
|
||||||
- [ ] ***(SwEng) *** Build Debian/Ubuntu packages.
|
|
||||||
- [ ] ***(SwEng) *** Update Docker images.
|
|
||||||
- [ ] ***(QA)*** Inform Marketing of the release.
|
- [ ] ***(QA)*** Inform Marketing of the release.
|
||||||
- [ ] ***(QA)*** Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
|
- [ ] ***(QA)*** Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
|
||||||
- [ ] ***(Marketing)*** Post short note to Twitter.
|
- [ ] ***(Marketing)*** Post short note to Twitter.
|
||||||
- [ ] ***(Marketing)*** Update [Wikipedia entry for BIND](https://en.wikipedia.org/wiki/BIND).
|
- [ ] ***(Marketing)*** Update [Wikipedia entry for BIND](https://en.wikipedia.org/wiki/BIND).
|
||||||
- [ ] ***(Marketing)*** Write blog article (if a major release).
|
- [ ] ***(Marketing)*** Write blog article (if a major release).
|
||||||
- [ ] ***(QA)*** Ensure all new tags are annotated and signed.
|
- [ ] ***(QA)*** Ensure all new tags are annotated and signed.
|
||||||
- [ ] ***(QA)*** Push tags for the published releases to the public repository.
|
- [ ] ***(SwEng)*** Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`).
|
||||||
- [ ] ***(QA)*** 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`).
|
- [ ] ***(SwEng)*** Push tags for the published releases to the public repository.
|
||||||
- [ ] ***(QA)*** For each maintained branch, update the `BIND_BASELINE_VERSION` variable for the `abi-check` job in `.gitlab-ci.yml` to the latest published BIND version tag for a given branch.
|
- [ ] ***(QA)*** For each maintained branch, update the `BIND_BASELINE_VERSION` variable for the `abi-check` job in `.gitlab-ci.yml` to the latest published BIND version tag for a given branch.
|
||||||
- [ ] ***(QA)*** Prepare empty release notes for the next set of releases.
|
- [ ] ***(QA)*** Prepare empty release notes for the next set of releases.
|
||||||
- [ ] ***(QA)*** Sanitize confidential issues which are assigned to the current release milestone and do not describe a security vulnerability, then make them public.
|
|
||||||
- [ ] ***(QA)*** Sanitize confidential issues which are assigned to older release milestones and describe security vulnerabilities, then make them public if appropriate[^2].
|
|
||||||
- [ ] ***(QA)*** Update QA tools used in GitLab CI (e.g. Flake8, PyLint) by modifying the relevant `Dockerfile`.
|
- [ ] ***(QA)*** Update QA tools used in GitLab CI (e.g. Flake8, PyLint) by modifying the relevant `Dockerfile`.
|
||||||
|
|
||||||
[^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone.
|
[^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone.
|
||||||
[^2]: As a rule of thumb, security vulnerabilities which have reproducers merged to the public repository are considered okay for full disclosure.
|
|
||||||
|
[^2]: Preferred command line: `git tag -u <DEVELOPER_KEYID> -a -s -m "BIND 9.X.Y[alphatag]" v9_X_Y[alphatag]`, where `[alphatag]` is an optional string such as `b1`, `rc1`, etc.
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ extraction:
|
|||||||
- "libidn2-dev"
|
- "libidn2-dev"
|
||||||
- "libmaxminddb-dev"
|
- "libmaxminddb-dev"
|
||||||
- "libuv1-dev"
|
- "libuv1-dev"
|
||||||
- "libnghttp2-dev"
|
|
||||||
configure:
|
configure:
|
||||||
command:
|
command:
|
||||||
- "autoreconf -fi"
|
- "autoreconf -fi"
|
||||||
@@ -30,6 +29,7 @@ path_classifiers:
|
|||||||
- "**/*.5"
|
- "**/*.5"
|
||||||
- "**/*.8"
|
- "**/*.8"
|
||||||
queries:
|
queries:
|
||||||
|
- exclude: libltdl/
|
||||||
- exclude: fuzz/
|
- exclude: fuzz/
|
||||||
- exclude: "bin/tests/system/*/ans*/*.py"
|
- exclude: "bin/tests/system/*/ans*/*.py"
|
||||||
- exclude: cpp/use-of-goto
|
- exclude: cpp/use-of-goto
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
[MASTER]
|
[MASTER]
|
||||||
disable=
|
disable=
|
||||||
C0103, # invalid-name
|
|
||||||
C0114, # missing-module-docstring
|
C0114, # missing-module-docstring
|
||||||
C0115, # missing-class-docstring
|
C0115, # missing-class-docstring
|
||||||
C0116, # missing-function-docstring
|
C0116, # missing-function-docstring
|
||||||
C0209, # consider-using-f-string
|
|
||||||
C0415, # import-outside-toplevel
|
|
||||||
R0801, # duplicate-code
|
R0801, # duplicate-code
|
||||||
|
C0103, # invalid-name
|
||||||
|
|||||||
+2
-2
@@ -7,8 +7,8 @@ people.
|
|||||||
|
|
||||||
Diversity is one of our huge strengths, but it can also lead to communication
|
Diversity is one of our huge strengths, but it can also lead to communication
|
||||||
issues and unhappiness. To that end, we have a few ground rules that we ask
|
issues and unhappiness. To that end, we have a few ground rules that we ask
|
||||||
people to adhere to. This code applies equally to the core development team,
|
people to adhere to. This code applies equally to the core development team, open source contributors and those
|
||||||
open source contributors and those seeking help and guidance.
|
seeking help and guidance.
|
||||||
|
|
||||||
This isn't an exhaustive list of things that you can't do. Rather, take it in
|
This isn't an exhaustive list of things that you can't do. Rather, take it in
|
||||||
the spirit in which it's intended - a guide to make it easier to enrich all of
|
the spirit in which it's intended - a guide to make it easier to enrich all of
|
||||||
|
|||||||
+16
-19
@@ -39,28 +39,29 @@ anyone can see the source, but only ISC employees have commit access.
|
|||||||
In the past, the source could only be seen once ISC had published
|
In the past, the source could only be seen once ISC had published
|
||||||
a release; read access to the source repository was restricted just
|
a release; read access to the source repository was restricted just
|
||||||
as commit access was. That has changed, as ISC now provides a
|
as commit access was. That has changed, as ISC now provides a
|
||||||
public git repository of the BIND source tree (see below).
|
public git mirror to the BIND source tree (see below).
|
||||||
|
|
||||||
At ISC, we're committed to
|
At ISC, we're committed to
|
||||||
building communities that are welcoming and inclusive: environments where people
|
building communities that are welcoming and inclusive: environments where people
|
||||||
are encouraged to share ideas, treat each other with respect, and collaborate
|
are encouraged to share ideas, treat each other with respect, and collaborate
|
||||||
towards the best solutions. To reinforce our commitment, ISC
|
towards the best solutions. To reinforce our commitment, ISC
|
||||||
has adopted a slightly modified version of the Django
|
has adopted a slightly modified version of the Django
|
||||||
[Code of Conduct](https://gitlab.isc.org/isc-projects/bind9/-/blob/main/CODE_OF_CONDUCT.md)
|
[Code of Conduct](https://gitlab.isc.org/isc-projects/bind9/-/blob/master/CODE_OF_CONDUCT.md) for the BIND 9 project, as well as for the conduct of our
|
||||||
for the BIND 9 project, as well as for the conduct of our developers throughout
|
developers throughout the industry.
|
||||||
the industry.
|
|
||||||
|
|
||||||
### <a name="access"></a>Access to source code
|
### <a name="access"></a>Access to source code
|
||||||
|
|
||||||
Public BIND releases are always available from the
|
Public BIND releases are always available from the
|
||||||
[ISC FTP site](ftp://ftp.isc.org/isc/bind9).
|
[ISC FTP site](ftp://ftp.isc.org/isc/bind9).
|
||||||
|
|
||||||
A public-access git repository is also available at
|
A public-access GIT repository is also available at
|
||||||
[https://gitlab.isc.org](https://gitlab.isc.org). This repository
|
[https://gitlab.isc.org](https://gitlab.isc.org).
|
||||||
contains all public release branches. Upcoming releases can be viewed in
|
This repository is a mirror, updated several times per day, of the
|
||||||
their current state at any time. Short-lived development branches
|
source repository maintained by ISC. It contains all the public release
|
||||||
contain unreviewed work in progress. Commits which address security
|
branches; upcoming releases can be viewed in their current state at any
|
||||||
vulnerablilities are withheld until after public disclosure.
|
time. It does *not* contain development branches or unreviewed work in
|
||||||
|
progress. Commits which address security vulnerablilities are withheld
|
||||||
|
until after public disclosure.
|
||||||
|
|
||||||
You can browse the source online via
|
You can browse the source online via
|
||||||
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9)
|
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9)
|
||||||
@@ -79,7 +80,7 @@ Whenever a branch is ready for publication, a tag is placed of the
|
|||||||
form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`.
|
form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`.
|
||||||
|
|
||||||
The branch in which the next major release is being developed is called
|
The branch in which the next major release is being developed is called
|
||||||
`main`.
|
`master`.
|
||||||
|
|
||||||
### <a name="bugs"></a>Reporting bugs
|
### <a name="bugs"></a>Reporting bugs
|
||||||
|
|
||||||
@@ -99,7 +100,6 @@ use credentials from an existing account at GitHub, GitLab, Google,
|
|||||||
Twitter, or Facebook.
|
Twitter, or Facebook.
|
||||||
|
|
||||||
### Reporting possible security issues
|
### Reporting possible security issues
|
||||||
|
|
||||||
If you think you may be seeing a potential security vulnerability in BIND
|
If you think you may be seeing a potential security vulnerability in BIND
|
||||||
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
|
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
|
||||||
report it immediately by emailing to security-officer@isc.org. Plain-text
|
report it immediately by emailing to security-officer@isc.org. Plain-text
|
||||||
@@ -111,8 +111,7 @@ Do not discuss undisclosed security vulnerabilities on any public mailing list.
|
|||||||
ISC has a long history of handling reported vulnerabilities promptly and
|
ISC has a long history of handling reported vulnerabilities promptly and
|
||||||
effectively and we respect and acknowledge responsible reporters.
|
effectively and we respect and acknowledge responsible reporters.
|
||||||
|
|
||||||
ISC's Security Vulnerability Disclosure Policy is documented at
|
ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
|
||||||
[https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
|
|
||||||
|
|
||||||
If you have a crash, you may want to consult
|
If you have a crash, you may want to consult
|
||||||
["What to do if your BIND or DHCP server has crashed."](https://kb.isc.org/docs/aa-00340)
|
["What to do if your BIND or DHCP server has crashed."](https://kb.isc.org/docs/aa-00340)
|
||||||
@@ -121,8 +120,7 @@ If you have a crash, you may want to consult
|
|||||||
|
|
||||||
BIND is licensed under the
|
BIND is licensed under the
|
||||||
[Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
|
[Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
|
||||||
Earlier versions (BIND 9.10 and earlier) were licensed under the
|
Earlier versions (BIND 9.10 and earlier) were licensed under the [ISC License](https://www.isc.org/licenses/)
|
||||||
[ISC License](https://www.isc.org/licenses/)
|
|
||||||
|
|
||||||
ISC does not require an explicit copyright assignment for patch
|
ISC does not require an explicit copyright assignment for patch
|
||||||
contributions. However, by submitting a patch to ISC, you implicitly
|
contributions. However, by submitting a patch to ISC, you implicitly
|
||||||
@@ -138,7 +136,7 @@ Patches for BIND may be submitted directly via merge requests in
|
|||||||
repository for BIND.
|
repository for BIND.
|
||||||
|
|
||||||
Patches can also be submitted as diffs against a specific version of
|
Patches can also be submitted as diffs against a specific version of
|
||||||
BIND -- preferably the current top of the `main` branch. Diffs may
|
BIND -- preferably the current top of the `master` branch. Diffs may
|
||||||
be generated using either `git format-patch` or `git diff`.
|
be generated using either `git format-patch` or `git diff`.
|
||||||
|
|
||||||
Those wanting to write code for BIND may be interested in the
|
Those wanting to write code for BIND may be interested in the
|
||||||
@@ -186,8 +184,7 @@ of documentation in the BIND source tree:
|
|||||||
they document, in files ending in `.rst`: for example, the
|
they document, in files ending in `.rst`: for example, the
|
||||||
`named` man page is `bin/named/named.rst`.
|
`named` man page is `bin/named/named.rst`.
|
||||||
* The *BIND 9 Administrator Reference Manual* is in the .rst files in
|
* The *BIND 9 Administrator Reference Manual* is in the .rst files in
|
||||||
`doc/arm/`; the PDF and HTML versions are automatically generated from
|
`doc/arm/`; the PDF and HTML versions are automatically generated from the `.rst` files.
|
||||||
the `.rst` files.
|
|
||||||
* API documentation is in the header file describing the API, in
|
* API documentation is in the header file describing the API, in
|
||||||
Doxygen-formatted comments.
|
Doxygen-formatted comments.
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Copyright (C) 1996-2021 Internet Systems Consortium, Inc. ("ISC")
|
Copyright (C) 1996-2020 Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
|
||||||
This Source Code Form is subject to the terms of the Mozilla Public
|
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -367,25 +367,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to
|
|
||||||
deal in the Software without restriction, including without limitation the
|
|
||||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
IN THE SOFTWARE.
|
|
||||||
|
|||||||
+632
@@ -0,0 +1,632 @@
|
|||||||
|
<!--
|
||||||
|
- 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.
|
||||||
|
-->
|
||||||
|
### Functional enhancements from prior major releases of BIND 9
|
||||||
|
|
||||||
|
#### BIND 9.16
|
||||||
|
|
||||||
|
BIND 9.16 (a stable branch based on the 9.15 development branch)
|
||||||
|
includes a number of changes from BIND 9.14 and earlier releases.
|
||||||
|
New features include:
|
||||||
|
|
||||||
|
* New `dnssec-policy` statement to configure a key and signing policy
|
||||||
|
for zones, enabling automatic key regeneration and rollover.
|
||||||
|
* New network manager based on `libuv`.
|
||||||
|
* Added support for the new GeoIP2 geolocation API, `libmaxminddb`.
|
||||||
|
* Improved DNSSEC trust anchor configuration using the `trust-anchors`
|
||||||
|
statement, permitting configuration of trust anchors in DS as well as
|
||||||
|
DNSKEY format.
|
||||||
|
* YAML output for `dig`, `mdig`, and `delv`.
|
||||||
|
|
||||||
|
#### BIND 9.14
|
||||||
|
|
||||||
|
BIND 9.14 (a stable branch based on the 9.13 development branch)
|
||||||
|
includes a number of changes from BIND 9.12 and earlier releases.
|
||||||
|
New features include:
|
||||||
|
|
||||||
|
* A new "plugin" mechanism has been added to allow query functionality
|
||||||
|
to be extended using dynamically loadable libraries. The "filter-aaaa"
|
||||||
|
feature has been removed from named and is now implemented as a plugin.
|
||||||
|
* Socket and task code has been refactored to improve performance.
|
||||||
|
* QNAME minimization, as described in RFC 7816, is now supported.
|
||||||
|
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||||
|
via a special query which trust anchors are configured for the root zone.
|
||||||
|
* Secondary zones can now be configured as "mirror" zones; their contents
|
||||||
|
are transferred in as with traditional slave zones, but are subject to
|
||||||
|
DNSSEC validation and are not treated as authoritative data when
|
||||||
|
answering. This makes it easier to configure a local copy of the root
|
||||||
|
zone as described in RFC 7706.
|
||||||
|
* The "validate-except" option allows configuration of domains below which
|
||||||
|
DNSSEC validation should not be performed.
|
||||||
|
* The default value of "dnssec-validation" is now "auto".
|
||||||
|
* IDNA2008 is now supported when linking with `libidn2`.
|
||||||
|
* "named -V" now outputs the default paths for files used by named
|
||||||
|
and other tools.
|
||||||
|
|
||||||
|
In addition, workarounds that were formerly in place to enable resolution
|
||||||
|
of domains whose authoritative servers did not respond to EDNS queries
|
||||||
|
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
Cryptographic support has been modernized. BIND now uses the
|
||||||
|
best available pseudo-random number generator for the platform on which
|
||||||
|
it's built. Very old versions of OpenSSL are no longer supported.
|
||||||
|
Cryptography is now mandatory: building BIND without DNSSEC is no
|
||||||
|
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.
|
||||||
|
|
||||||
|
#### BIND 9.12
|
||||||
|
|
||||||
|
BIND 9.12 includes a number of changes from BIND 9.11 and earlier releases.
|
||||||
|
New features include:
|
||||||
|
|
||||||
|
* `named` and related libraries have been substantially refactored for
|
||||||
|
improved query performance -- particularly on delegation heavy zones --
|
||||||
|
and for improved readability, maintainability, and testability.
|
||||||
|
* Code implementing the name server query processing logic has been moved
|
||||||
|
into a new `libns` library, for easier testing and use in tools other
|
||||||
|
than `named`.
|
||||||
|
* Cached, validated NSEC and other records can now be used to synthesize
|
||||||
|
NXDOMAIN responses.
|
||||||
|
* The DNS Response Policy Service API (DNSRPS) is now supported.
|
||||||
|
* Setting `'max-journal-size default'` now limits the size of journal files
|
||||||
|
to twice the size of the zone.
|
||||||
|
* `dnstap-read -x` prints a hex dump of the wire format of each logged
|
||||||
|
DNS message.
|
||||||
|
* `dnstap` output files can now be configured to roll automatically when
|
||||||
|
reaching a given size.
|
||||||
|
* Log file timestamps can now also be formatted in ISO 8601 (local) or ISO
|
||||||
|
8601 (UTC) formats.
|
||||||
|
* Logging channels and `dnstap` output files can now be configured to use a
|
||||||
|
timestamp as the suffix when rolling to a new file.
|
||||||
|
* `'named-checkconf -l'` lists zones found in `named.conf`.
|
||||||
|
* Added support for the EDNS Padding and Keepalive options.
|
||||||
|
* 'new-zones-directory' option sets the location where the configuration
|
||||||
|
data for zones added by rndc addzone is stored.
|
||||||
|
* The default key algorithm in `rndc-confgen` is now hmac-sha256.
|
||||||
|
* `filter-aaaa-on-v4` and `filter-aaaa-on-v6` options are now available
|
||||||
|
by default without a configure option.
|
||||||
|
* The obsolete `isc-hmac-fixup` command has been removed.
|
||||||
|
|
||||||
|
#### BIND 9.11
|
||||||
|
|
||||||
|
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier
|
||||||
|
releases. New features include:
|
||||||
|
|
||||||
|
- Added support for Catalog Zones, a new method for provisioning servers: a
|
||||||
|
list of zones to be served is stored in a DNS zone, along with their
|
||||||
|
configuration parameters. Changes to the catalog zone are propagated to
|
||||||
|
slaves via normal AXFR/IXFR, whereupon the zones that are listed in it
|
||||||
|
are automatically added, deleted or reconfigured.
|
||||||
|
- Added support for "dnstap", a fast and flexible method of capturing and
|
||||||
|
logging DNS traffic.
|
||||||
|
- Added support for "dyndb", a new API for loading zone data from an
|
||||||
|
external database, developed by Red Hat for the FreeIPA project.
|
||||||
|
- "fetchlimit" quotas are now compiled in by default. These are for the
|
||||||
|
use of recursive resolvers that are are under high query load for domains
|
||||||
|
whose authoritative servers are nonresponsive or are experiencing a
|
||||||
|
denial of service attack:
|
||||||
|
- "fetches-per-server" limits the number of simultaneous queries that
|
||||||
|
can be sent to any single authoritative server. The configured value
|
||||||
|
is a starting point; it is automatically adjusted downward if the
|
||||||
|
server is partially or completely non-responsive. The algorithm used
|
||||||
|
to adjust the quota can be configured via the "fetch-quota-params"
|
||||||
|
option.
|
||||||
|
- "fetches-per-zone" limits the number of simultaneous queries that can
|
||||||
|
be sent for names within a single domain. (Note: Unlike
|
||||||
|
"fetches-per-server", this value is not self-tuning.)
|
||||||
|
- New stats counters have been added to count queries spilled due to
|
||||||
|
these quotas.
|
||||||
|
- Added a new "dnssec-keymgr" key mainenance utility, which can generate or
|
||||||
|
update keys as needed to ensure that a zone's keys match a defined DNSSEC
|
||||||
|
policy.
|
||||||
|
- The experimental "SIT" feature in BIND 9.10 has been renamed "COOKIE" and
|
||||||
|
is no longer optional. EDNS COOKIE is a mechanism enabling clients to
|
||||||
|
detect off-path spoofed responses, and servers to detect spoofed-source
|
||||||
|
queries. Clients that identify themselves using COOKIE options are not
|
||||||
|
subject to response rate limiting (RRL) and can receive larger UDP
|
||||||
|
responses.
|
||||||
|
- SERVFAIL responses can now be cached for a limited time (defaulting to 1
|
||||||
|
second, with an upper limit of 30). This can reduce the frequency of
|
||||||
|
retries when a query is persistently failing.
|
||||||
|
- Added an "nsip-wait-recurse" switch to RPZ. This causes NSIP rules to be
|
||||||
|
skipped if a name server IP address isn't in the cache yet; the address
|
||||||
|
will be looked up and the rule will be applied on future queries.
|
||||||
|
- Added a Python RNDC module. This allows multiple commands to sent over a
|
||||||
|
persistent RNDC channel, which saves time.
|
||||||
|
- The "controls" block in named.conf can now grant read-only "rndc" access
|
||||||
|
to specified clients or keys. Read-only clients could, for example, check
|
||||||
|
"rndc status" but could not reconfigure or shut down the server.
|
||||||
|
- "rndc" commands can now return arbitrarily large amounts of text to the
|
||||||
|
caller.
|
||||||
|
- The zone serial number of a dynamically updatable zone can now be set via
|
||||||
|
"rndc signing -serial <number> <zonename>". This allows inline-signing
|
||||||
|
zones to be set to a specific serial number.
|
||||||
|
- The new "rndc nta" command can be used to set a Negative Trust Anchor
|
||||||
|
(NTA), disabling DNSSEC validation for a specific domain; this can be
|
||||||
|
used when responses from a domain are known to be failing validation due
|
||||||
|
to administrative error rather than because of a spoofing attack.
|
||||||
|
Negative trust anchors are strictly temporary; by default they expire
|
||||||
|
after one hour, but can be configured to last up to one week.
|
||||||
|
- "rndc delzone" can now be used on zones that were not originally created
|
||||||
|
by "rndc addzone".
|
||||||
|
- "rndc modzone" reconfigures a single zone, without requiring the entire
|
||||||
|
server to be reconfigured.
|
||||||
|
- "rndc showzone" displays the current configuration of a zone.
|
||||||
|
- "rndc managed-keys" can be used to check the status of RFC 5011 managed
|
||||||
|
trust anchors, or to force trust anchors to be refreshed.
|
||||||
|
- "max-cache-size" can now be set to a percentage of available memory. The
|
||||||
|
default is 90%.
|
||||||
|
- Update forwarding performance has been improved by allowing a single TCP
|
||||||
|
connection to be shared by multiple updates.
|
||||||
|
- The EDNS Client Subnet (ECS) option is now supported for authoritative
|
||||||
|
servers; if a query contains an ECS option then ACLs containing "geoip"
|
||||||
|
or "ecs" elements can match against the the address encoded in the
|
||||||
|
option. This can be used to select a view for a query, so that different
|
||||||
|
answers can be provided depending on the client network.
|
||||||
|
- The EDNS EXPIRE option has been implemented on the client side, allowing
|
||||||
|
a slave server to set the expiration timer correctly when transferring
|
||||||
|
zone data from another slave server.
|
||||||
|
- The key generation and manipulation tools (dnssec-keygen, dnssec-settime,
|
||||||
|
dnssec-importkey, dnssec-keyfromlabel) now take "-Psync" and "-Dsync"
|
||||||
|
options to set the publication and deletion times of CDS and CDNSKEY
|
||||||
|
parent-synchronization records. Both named and dnssec-signzone can now
|
||||||
|
publish and remove these records at the scheduled times.
|
||||||
|
- A new "minimal-any" option reduces the size of UDP responses for query
|
||||||
|
type ANY by returning a single arbitrarily selected RRset instead of all
|
||||||
|
RRsets.
|
||||||
|
- A new "masterfile-style" zone option controls the formatting of text zone
|
||||||
|
files: When set to "full", a zone file is dumped in
|
||||||
|
single-line-per-record format.
|
||||||
|
- "serial-update-method" can now be set to "date". On update, the serial
|
||||||
|
number will be set to the current date in YYYYMMDDNN format.
|
||||||
|
- "dnssec-signzone -N date" sets the serial number to YYYYMMDDNN.
|
||||||
|
- "named -L <filename>" causes named to send log messages to the specified
|
||||||
|
file by default instead of to the system log.
|
||||||
|
- "dig +ttlunits" prints TTL values with time-unit suffixes: w, d, h, m, s
|
||||||
|
for weeks, days, hours, minutes, and seconds.
|
||||||
|
- "dig +unknownformat" prints dig output in RFC 3597 "unknown record"
|
||||||
|
presentation format.
|
||||||
|
- "dig +ednsopt" allows dig to set arbitrary EDNS options on requests.
|
||||||
|
- "dig +ednsflags" allows dig to set yet-to-be-defined EDNS flags on
|
||||||
|
requests.
|
||||||
|
- "mdig" is an alternate version of dig which sends multiple pipelined TCP
|
||||||
|
queries to a server. Instead of waiting for a response after sending a
|
||||||
|
query, it sends all queries immediately and displays responses in the
|
||||||
|
order received.
|
||||||
|
- "serial-query-rate" no longer controls NOTIFY messages. These are
|
||||||
|
separately controlled by "notify-rate" and "startup-notify-rate".
|
||||||
|
- "nsupdate" now performs "check-names" processing by default on records to
|
||||||
|
be added. This can be disabled with "check-names no".
|
||||||
|
- The statistics channel now supports DEFLATE compression, reducing the
|
||||||
|
size of the data sent over the network when querying statistics.
|
||||||
|
- New counters have been added to the statistics channel to track the sizes
|
||||||
|
of incoming queries and outgoing responses in histogram buckets, as
|
||||||
|
specified in RSSAC002.
|
||||||
|
- A new NXDOMAIN redirect method (option "nxdomain-redirect") has been
|
||||||
|
added, allowing redirection to a specified DNS namespace instead of a
|
||||||
|
single redirect zone.
|
||||||
|
- When starting up, named now ensures that no other named process is
|
||||||
|
already running.
|
||||||
|
- Files created by named to store information, including "mkeys" and "nzf"
|
||||||
|
files, are now named after their corresponding views unless the view name
|
||||||
|
contains characters incompatible with use as a filename. Old style
|
||||||
|
filenames (based on the hash of the view name) will still work.
|
||||||
|
|
||||||
|
#### BIND 9.10.0
|
||||||
|
|
||||||
|
BIND 9.10.0 includes a number of changes from BIND 9.9 and earlier
|
||||||
|
releases. New features include:
|
||||||
|
|
||||||
|
- DNS Response-rate limiting (DNS RRL), which blunts the
|
||||||
|
impact of reflection and amplification attacks, is always
|
||||||
|
compiled in and no longer requires a compile-time option
|
||||||
|
to enable it.
|
||||||
|
- An experimental "Source Identity Token" (SIT) EDNS option
|
||||||
|
is now available. Similar to DNS Cookies as invented by
|
||||||
|
Donald Eastlake 3rd, these are designed to enable clients
|
||||||
|
to detect off-path spoofed responses, and to enable servers
|
||||||
|
to detect spoofed-source queries. Servers can be configured
|
||||||
|
to send smaller responses to clients that have not identified
|
||||||
|
themselves using a SIT option, reducing the effectiveness of
|
||||||
|
amplification attacks. RRL processing has also been updated;
|
||||||
|
clients proven to be legitimate via SIT are not subject to
|
||||||
|
rate limiting. Use "configure --enable-sit" to enable this
|
||||||
|
feature in BIND.
|
||||||
|
- A new zone file format, "map", stores zone data in a
|
||||||
|
format that can be mapped directly into memory, allowing
|
||||||
|
significantly faster zone loading.
|
||||||
|
- "delv" (domain entity lookup and validation) is a new tool
|
||||||
|
with dig-like semantics for looking up DNS data and performing
|
||||||
|
internal DNSSEC validation. This allows easy validation in
|
||||||
|
environments where the resolver may not be trustworthy, and
|
||||||
|
assists with troubleshooting of DNSSEC problems. (NOTE:
|
||||||
|
In previous development releases of BIND 9.10, this utility
|
||||||
|
was called "delve". The spelling has been changed to avoid
|
||||||
|
confusion with the "delve" utility included with the Xapian
|
||||||
|
search engine.)
|
||||||
|
- Improved EDNS(0) processing for better resolver performance
|
||||||
|
and reliability over slow or lossy connections.
|
||||||
|
- A new "configure --with-tuning=large" option tunes certain
|
||||||
|
compiled-in constants and default settings to values better
|
||||||
|
suited to large servers with abundant memory. This can
|
||||||
|
improve performance on such servers, but will consume more
|
||||||
|
memory and may degrade performance on smaller systems.
|
||||||
|
- Substantial improvement in response-policy zone (RPZ)
|
||||||
|
performance. Up to 32 response-policy zones can be
|
||||||
|
configured with minimal performance loss.
|
||||||
|
- To improve recursive resolver performance, cache records
|
||||||
|
which are still being requested by clients can now be
|
||||||
|
automatically refreshed from the authoritative server
|
||||||
|
before they expire, reducing or eliminating the time
|
||||||
|
window in which no answer is available in the cache.
|
||||||
|
- New "rpz-client-ip" triggers and drop policies allowing
|
||||||
|
response policies based on the IP address of the client.
|
||||||
|
- ACLs can now be specified based on geographic location
|
||||||
|
using the MaxMind GeoIP databases. Use "configure
|
||||||
|
--with-geoip" to enable.
|
||||||
|
- Zone data can now be shared between views, allowing
|
||||||
|
multiple views to serve the same zones authoritatively
|
||||||
|
without storing multiple copies in memory.
|
||||||
|
- New XML schema (version 3) for the statistics channel
|
||||||
|
includes many new statistics and uses a flattened XML tree
|
||||||
|
for faster parsing. The older schema is now deprecated.
|
||||||
|
- A new stylesheet, based on the Google Charts API, displays
|
||||||
|
XML statistics in charts and graphs on javascript-enabled
|
||||||
|
browsers.
|
||||||
|
- The statistics channel can now provide data in JSON
|
||||||
|
format as well as XML.
|
||||||
|
- New stats counters track TCP and UDP queries received
|
||||||
|
per zone, and EDNS options received in total.
|
||||||
|
- The internal and export versions of the BIND libraries
|
||||||
|
(libisc, libdns, etc) have been unified so that external
|
||||||
|
library clients can use the same libraries as BIND itself.
|
||||||
|
- A new compile-time option, "configure --enable-native-pkcs11",
|
||||||
|
allows BIND 9 cryptography functions to use the PKCS#11 API
|
||||||
|
natively, so that BIND can drive a cryptographic hardware
|
||||||
|
service module (HSM) directly instead of using a modified
|
||||||
|
OpenSSL as an intermediary. (Note: This feature requires an
|
||||||
|
HSM to have a full implementation of the PKCS#11 API; many
|
||||||
|
current HSMs only have partial implementations. The new
|
||||||
|
"pkcs11-tokens" command can be used to check API completeness.
|
||||||
|
Native PKCS#11 is known to work with the Thales nShield HSM
|
||||||
|
and with SoftHSM version 2 from the Open DNSSEC project.)
|
||||||
|
- The new "max-zone-ttl" option enforces maximum TTLs for
|
||||||
|
zones. This can simplify the process of rolling DNSSEC keys
|
||||||
|
by guaranteeing that cached signatures will have expired
|
||||||
|
within the specified amount of time.
|
||||||
|
- "dig +subnet" sends an EDNS CLIENT-SUBNET option when
|
||||||
|
querying.
|
||||||
|
- "dig +expire" sends an EDNS EXPIRE option when querying.
|
||||||
|
When this option is sent with an SOA query to a server
|
||||||
|
that supports it, it will report the expiry time of
|
||||||
|
a slave zone.
|
||||||
|
- New "dnssec-coverage" tool to check DNSSEC key coverage
|
||||||
|
for a zone and report if a lapse in signing coverage has
|
||||||
|
been inadvertently scheduled.
|
||||||
|
- Signing algorithm flexibility and other improvements
|
||||||
|
for the "rndc" control channel.
|
||||||
|
- "named-checkzone" and "named-compilezone" can now read
|
||||||
|
journal files, allowing them to process dynamic zones.
|
||||||
|
- Multiple DLZ databases can now be configured. Individual
|
||||||
|
zones can be configured to be served from a specific DLZ
|
||||||
|
database. DLZ databases now serve zones of type "master"
|
||||||
|
and "redirect".
|
||||||
|
- "rndc zonestatus" reports information about a specified zone.
|
||||||
|
- "named" now listens on IPv6 as well as IPv4 interfaces
|
||||||
|
by default.
|
||||||
|
- "named" now preserves the capitalization of names
|
||||||
|
when responding to queries: for instance, a query for
|
||||||
|
"example.com" may be answered with "example.COM" if the
|
||||||
|
name was configured that way in the zone file. Some
|
||||||
|
clients have a bug causing them to depend on the older
|
||||||
|
behavior, in which the case of the answer always matched
|
||||||
|
the case of the query, rather than the case of the name
|
||||||
|
configured in the DNS. Such clients can now be specified
|
||||||
|
in the new "no-case-compress" ACL; this will restore the
|
||||||
|
older behavior of "named" for those clients only.
|
||||||
|
- new "dnssec-importkey" command allows the use of offline
|
||||||
|
DNSSEC keys with automatic DNSKEY management.
|
||||||
|
- New "named-rrchecker" tool to verify the syntactic
|
||||||
|
correctness of individual resource records.
|
||||||
|
- When re-signing a zone, the new "dnssec-signzone -Q" option
|
||||||
|
drops signatures from keys that are still published but are
|
||||||
|
no longer active.
|
||||||
|
- "named-checkconf -px" will print the contents of configuration
|
||||||
|
files with the shared secrets obscured, making it easier to
|
||||||
|
share configuration (e.g. when submitting a bug report)
|
||||||
|
without revealing private information.
|
||||||
|
- "rndc scan" causes named to re-scan network interfaces for
|
||||||
|
changes in local addresses.
|
||||||
|
- On operating systems with support for routing sockets,
|
||||||
|
network interfaces are re-scanned automatically whenever
|
||||||
|
they change.
|
||||||
|
- "tsig-keygen" is now available as an alternate command
|
||||||
|
name to use for "ddns-confgen".
|
||||||
|
|
||||||
|
#### BIND 9.9.0
|
||||||
|
|
||||||
|
BIND 9.9.0 includes a number of changes from BIND 9.8 and earlier
|
||||||
|
releases. New features include:
|
||||||
|
|
||||||
|
- Inline signing, allowing automatic DNSSEC signing of
|
||||||
|
master zones without modification of the zonefile, or
|
||||||
|
"bump in the wire" signing in slaves.
|
||||||
|
- NXDOMAIN redirection.
|
||||||
|
- New 'rndc flushtree' command clears all data under a given
|
||||||
|
name from the DNS cache.
|
||||||
|
- New 'rndc sync' command dumps pending changes in a dynamic
|
||||||
|
zone to disk without a freeze/thaw cycle.
|
||||||
|
- New 'rndc signing' command displays or clears signing status
|
||||||
|
records in 'auto-dnssec' zones.
|
||||||
|
- NSEC3 parameters for 'auto-dnssec' zones can now be set prior
|
||||||
|
to signing, eliminating the need to initially sign with NSEC.
|
||||||
|
- Startup time improvements on large authoritative servers.
|
||||||
|
- Slave zones are now saved in raw format by default.
|
||||||
|
- Several improvements to response policy zones (RPZ).
|
||||||
|
- Improved hardware scalability by using multiple threads
|
||||||
|
to listen for queries and using finer-grained client locking
|
||||||
|
- The 'also-notify' option now takes the same syntax as
|
||||||
|
'masters', so it can used named masterlists and TSIG keys.
|
||||||
|
- 'dnssec-signzone -D' writes an output file containing only DNSSEC
|
||||||
|
data, which can be included by the primary zone file.
|
||||||
|
- 'dnssec-signzone -R' forces removal of signatures that are
|
||||||
|
not expired but were created by a key which no longer exists.
|
||||||
|
- 'dnssec-signzone -X' allows a separate expiration date to
|
||||||
|
be specified for DNSKEY signatures from other signatures.
|
||||||
|
- New '-L' option to dnssec-keygen, dnssec-settime, and
|
||||||
|
dnssec-keyfromlabel sets the default TTL for the key.
|
||||||
|
- dnssec-dsfromkey now supports reading from standard input,
|
||||||
|
to make it easier to convert DNSKEY to DS.
|
||||||
|
- RFC 1918 reverse zones have been added to the empty-zones
|
||||||
|
table per RFC 6303.
|
||||||
|
- Dynamic updates can now optionally set the zone's SOA serial
|
||||||
|
number to the current UNIX time.
|
||||||
|
- DLZ modules can now retrieve the source IP address of
|
||||||
|
the querying client.
|
||||||
|
- 'request-ixfr' option can now be set at the per-zone level.
|
||||||
|
- 'dig +rrcomments' turns on comments about DNSKEY records,
|
||||||
|
indicating their key ID, algorithm and function
|
||||||
|
- Simplified nsupdate syntax and added readline support
|
||||||
|
|
||||||
|
#### BIND 9.8.0
|
||||||
|
|
||||||
|
BIND 9.8.0 includes a number of changes from BIND 9.7 and earlier
|
||||||
|
releases. New features include:
|
||||||
|
|
||||||
|
- Built-in trust anchor for the root zone, which can be
|
||||||
|
switched on via "dnssec-validation auto;"
|
||||||
|
- Support for DNS64.
|
||||||
|
- Support for response policy zones (RPZ).
|
||||||
|
- Support for writable DLZ zones.
|
||||||
|
- Improved ease of configuration of GSS/TSIG for
|
||||||
|
interoperability with Active Directory
|
||||||
|
- Support for GOST signing algorithm for DNSSEC.
|
||||||
|
- Removed RTT Banding from server selection algorithm.
|
||||||
|
- New "static-stub" zone type.
|
||||||
|
- Allow configuration of resolver timeouts via
|
||||||
|
"resolver-query-timeout" option.
|
||||||
|
- The DLZ "dlopen" driver is now built by default.
|
||||||
|
- Added a new include file with function typedefs
|
||||||
|
for the DLZ "dlopen" driver.
|
||||||
|
- Made "--with-gssapi" default.
|
||||||
|
- More verbose error reporting from DLZ LDAP.
|
||||||
|
|
||||||
|
#### BIND 9.7.0
|
||||||
|
|
||||||
|
BIND 9.7.0 includes a number of changes from BIND 9.6 and earlier
|
||||||
|
releases. Most are intended to simplify DNSSEC configuration.
|
||||||
|
New features include:
|
||||||
|
|
||||||
|
- Fully automatic signing of zones by "named".
|
||||||
|
- Simplified configuration of DNSSEC Lookaside Validation (DLV).
|
||||||
|
- Simplified configuration of Dynamic DNS, using the "ddns-confgen"
|
||||||
|
command line tool or the "local" update-policy option. (As a side
|
||||||
|
effect, this also makes it easier to configure automatic zone
|
||||||
|
re-signing.)
|
||||||
|
- New named option "attach-cache" that allows multiple views to
|
||||||
|
share a single cache.
|
||||||
|
- DNS rebinding attack prevention.
|
||||||
|
- New default values for dnssec-keygen parameters.
|
||||||
|
- Support for RFC 5011 automated trust anchor maintenance
|
||||||
|
- Smart signing: simplified tools for zone signing and key
|
||||||
|
maintenance.
|
||||||
|
- The "statistics-channels" option is now available on Windows.
|
||||||
|
- A new DNSSEC-aware libdns API for use by non-BIND9 applications
|
||||||
|
- On some platforms, named and other binaries can now print out
|
||||||
|
a stack backtrace on assertion failure, to aid in debugging.
|
||||||
|
- A "tools only" installation mode on Windows, which only installs
|
||||||
|
dig, host, nslookup and nsupdate.
|
||||||
|
- Improved PKCS#11 support, including Keyper support and explicit
|
||||||
|
OpenSSL engine selection.
|
||||||
|
|
||||||
|
#### BIND 9.6.0
|
||||||
|
|
||||||
|
- Full NSEC3 support
|
||||||
|
- Automatic zone re-signing
|
||||||
|
- New update-policy methods tcp-self and 6to4-self
|
||||||
|
- The BIND 8 resolver library, libbind, has been removed from the BIND 9
|
||||||
|
distribution and is now available as a separate download.
|
||||||
|
- Change the default pid file location from /var/run to
|
||||||
|
/var/run/{named,lwresd} for improved chroot/setuid support.
|
||||||
|
|
||||||
|
#### BIND 9.5.0
|
||||||
|
|
||||||
|
- GSS-TSIG support (RFC 3645).
|
||||||
|
- DHCID support.
|
||||||
|
- Experimental http server and statistics support for named via xml.
|
||||||
|
- More detailed statistics counters including those supported in BIND 8.
|
||||||
|
- Faster ACL processing.
|
||||||
|
- Use Doxygen to generate internal documentation.
|
||||||
|
- Efficient LRU cache-cleaning mechanism.
|
||||||
|
- NSID support.
|
||||||
|
|
||||||
|
BIND 9.4.0
|
||||||
|
|
||||||
|
- Implemented "additional section caching (or acache)", an internal cache
|
||||||
|
framework for additional section content to improve response performance.
|
||||||
|
Several configuration options were provided to control the behavior.
|
||||||
|
- New notify type 'master-only'. Enable notify for master zones only.
|
||||||
|
- Accept 'notify-source' style syntax for query-source.
|
||||||
|
- rndc now allows addresses to be set in the server clauses.
|
||||||
|
- New option "allow-query-cache". This lets "allow-query" be used to
|
||||||
|
specify the default zone access level rather than having to have every
|
||||||
|
zone override the global value. "allow-query-cache" can be set at both
|
||||||
|
the options and view levels. If "allow-query-cache" is not set then
|
||||||
|
"allow-recursion" is used if set, otherwise "allow-query" is used if set
|
||||||
|
unless "recursion no;" is set in which case "none;" is used, otherwise
|
||||||
|
the default (localhost; localnets;) is used.
|
||||||
|
- rndc: the source address can now be specified.
|
||||||
|
- ixfr-from-differences now takes master and slave in addition to yes and
|
||||||
|
no at the options and view levels.
|
||||||
|
- Allow the journal's name to be changed via named.conf.
|
||||||
|
- 'rndc notify zone [class [view]]' resend the NOTIFY messages for the
|
||||||
|
specified zone.
|
||||||
|
- 'dig +trace' now randomly selects the next servers to try. Report if
|
||||||
|
there is a bad delegation.
|
||||||
|
- Improve check-names error messages.
|
||||||
|
- Make public the function to read a key file, dst_key_read_public().
|
||||||
|
- dig now returns the byte count for axfr/ixfr.
|
||||||
|
- allow-update is now settable at the options / view level.
|
||||||
|
- named-checkconf now checks the logging configuration.
|
||||||
|
- host now can turn on memory debugging flags with '-m'.
|
||||||
|
- Don't send notify messages to self.
|
||||||
|
- Perform sanity checks on NS records which refer to 'in zone' names.
|
||||||
|
- New zone option "notify-delay". Specify a minimum delay between sets of
|
||||||
|
NOTIFY messages.
|
||||||
|
- Extend adjusting TTL warning messages.
|
||||||
|
- Named and named-checkzone can now both check for non-terminal wildcard
|
||||||
|
records.
|
||||||
|
- "rndc freeze/thaw" now freezes/thaws all zones.
|
||||||
|
- named-checkconf now check acls to verify that they only refer to existing
|
||||||
|
acls.
|
||||||
|
- The server syntax has been extended to support a range of servers.
|
||||||
|
- Report differences between hints and real NS rrset and associated address
|
||||||
|
records.
|
||||||
|
- Preserve the case of domain names in rdata during zone transfers.
|
||||||
|
- Restructured the data locking framework using architecture dependent
|
||||||
|
atomic operations (when available), improving response performance on
|
||||||
|
multi-processor machines significantly. x86, x86_64, alpha, powerpc, and
|
||||||
|
mips are currently supported.
|
||||||
|
- UNIX domain controls are now supported.
|
||||||
|
- Add support for additional zone file formats for improving loading
|
||||||
|
performance. The masterfile-format option in named.conf can be used to
|
||||||
|
specify a non-default format. A separate command named-compilezone was
|
||||||
|
provided to generate zone files in the new format. Additionally, the -I
|
||||||
|
and -O options for dnssec-signzone specify the input and output formats.
|
||||||
|
- dnssec-signzone can now randomize signature end times (dnssec-signzone -j
|
||||||
|
jitter).
|
||||||
|
- Add support for CH A record.
|
||||||
|
- Add additional zone data constancy checks. named-checkzone has extended
|
||||||
|
checking of NS, MX and SRV record and the hosts they reference. named
|
||||||
|
has extended post zone load checks. New zone options: check-mx and
|
||||||
|
integrity-check.
|
||||||
|
- edns-udp-size can now be overridden on a per server basis.
|
||||||
|
- dig can now specify the EDNS version when making a query.
|
||||||
|
- Added framework for handling multiple EDNS versions.
|
||||||
|
- Additional memory debugging support to track size and mctx arguments.
|
||||||
|
- Detect duplicates of UDP queries we are recursing on and drop them. New
|
||||||
|
stats category "duplicates".
|
||||||
|
- "USE INTERNAL MALLOC" is now runtime selectable.
|
||||||
|
- The lame cache is now done on a <qname,qclass,qtype> basis as some
|
||||||
|
servers only appear to be lame for certain query types.
|
||||||
|
- Limit the number of recursive clients that can be waiting for a single
|
||||||
|
query (<qname,qtype,qclass>) to resolve. New options clients-per-query
|
||||||
|
and max-clients-per-query.
|
||||||
|
- dig: report the number of extra bytes still left in the packet after
|
||||||
|
processing all the records.
|
||||||
|
- Support for IPSECKEY rdata type.
|
||||||
|
- Raise the UDP receive buffer size to 32k if it is less than 32k.
|
||||||
|
- x86 and x86_64 now have separate atomic locking implementations.
|
||||||
|
- named-checkconf now validates update-policy entries.
|
||||||
|
- Attempt to make the amount of work performed in a iteration self tuning.
|
||||||
|
The covers nodes clean from the cache per iteration, nodes written to
|
||||||
|
disk when rewriting a master file and nodes destroyed per iteration when
|
||||||
|
destroying a zone or a cache.
|
||||||
|
- ISC string copy API.
|
||||||
|
- Automatic empty zone creation for D.F.IP6.ARPA and friends. Note: RFC
|
||||||
|
1918 zones are not yet covered by this but are likely to be in a future
|
||||||
|
release.
|
||||||
|
- New options: empty-server, empty-contact, empty-zones-enable and
|
||||||
|
disable-empty-zone.
|
||||||
|
- dig now has a '-q queryname' and '+showsearch' options.
|
||||||
|
- host/nslookup now continue (default)/fail on SERVFAIL.
|
||||||
|
- dig now warns if 'RA' is not set in the answer when 'RD' was set in the
|
||||||
|
query. host/nslookup skip servers that fail to set 'RA' when 'RD' is set
|
||||||
|
unless a server is explicitly set.
|
||||||
|
- Integrate contributed DLZ code into named.
|
||||||
|
- Integrate contributed IDN code from JPNIC.
|
||||||
|
- libbind: corresponds to that from BIND 8.4.7.
|
||||||
|
|
||||||
|
#### BIND 9.3.0
|
||||||
|
|
||||||
|
- DNSSEC is now DS based (RFC 3658).
|
||||||
|
- DNSSEC lookaside validation.
|
||||||
|
- check-names is now implemented.
|
||||||
|
- rrset-order is more complete.
|
||||||
|
- IPv4/IPv6 transition support, dual-stack-servers.
|
||||||
|
- IXFR deltas can now be generated when loading master files,
|
||||||
|
ixfr-from-differences.
|
||||||
|
- It is now possible to specify the size of a journal, max-journal-size.
|
||||||
|
- It is now possible to define a named set of master servers to be used in
|
||||||
|
masters clause, masters.
|
||||||
|
- The advertised EDNS UDP size can now be set, edns-udp-size.
|
||||||
|
- allow-v6-synthesis has been obsoleted.
|
||||||
|
- Zones containing MD and MF will now be rejected.
|
||||||
|
- dig, nslookup name. now report "Not Implemented" as NOTIMP rather than
|
||||||
|
NOTIMPL. This will have impact on scripts that are looking for NOTIMPL.
|
||||||
|
- libbind: corresponds to that from BIND 8.4.5.
|
||||||
|
|
||||||
|
#### BIND 9.2.0
|
||||||
|
|
||||||
|
- The size of the cache can now be limited using the "max-cache-size"
|
||||||
|
option.
|
||||||
|
- The server can now automatically convert RFC1886-style recursive lookup
|
||||||
|
requests into RFC2874-style lookups, when enabled using the new option
|
||||||
|
"allow-v6-synthesis". This allows stub resolvers that support AAAA
|
||||||
|
records but not A6 record chains or binary labels to perform lookups in
|
||||||
|
domains that make use of these IPv6 DNS features.
|
||||||
|
- Performance has been improved.
|
||||||
|
- The man pages now use the more portable "man" macros rather than the
|
||||||
|
"mandoc" macros, and are installed by "make install".
|
||||||
|
- The named.conf parser has been completely rewritten. It now supports
|
||||||
|
"include" directives in more places such as inside "view" statements, and
|
||||||
|
it no longer has any reserved words.
|
||||||
|
- The "rndc status" command is now implemented.
|
||||||
|
- rndc can now be configured automatically.
|
||||||
|
- A BIND 8 compatible stub resolver library is now included in lib/bind.
|
||||||
|
- OpenSSL has been removed from the distribution. This means that to use
|
||||||
|
DNSSEC, OpenSSL must be installed and the --with-openssl option must be
|
||||||
|
supplied to configure. This does not apply to the use of TSIG, which
|
||||||
|
does not require OpenSSL.
|
||||||
|
- The source distribution now builds on Windows. See
|
||||||
|
win32utils/readme1.txt and win32utils/win32-build.txt for details.
|
||||||
|
- This distribution also includes a new lightweight stub resolver library
|
||||||
|
and associated resolver daemon that fully support forward and reverse
|
||||||
|
lookups of both IPv4 and IPv6 addresses. This library is considered
|
||||||
|
experimental and is not a complete replacement for the BIND 8 resolver
|
||||||
|
library. Applications that use the BIND 8 `res_*` functions to perform
|
||||||
|
DNS lookups or dynamic updates still need to be linked against the BIND 8
|
||||||
|
libraries. For DNS lookups, they can also use the new "getrrsetbyname()"
|
||||||
|
API.
|
||||||
|
- BIND 9.2 is capable of acting as an authoritative server for DNSSEC
|
||||||
|
secured zones. This functionality is believed to be stable and complete
|
||||||
|
except for lacking support for verifications involving wildcard records
|
||||||
|
in secure zones.
|
||||||
|
- When acting as a caching server, BIND 9.2 can be configured to perform
|
||||||
|
DNSSEC secure resolution on behalf of its clients. This part of the
|
||||||
|
DNSSEC implementation is still considered experimental. For detailed
|
||||||
|
information about the state of the DNSSEC implementation, see the file
|
||||||
|
doc/misc/dnssec.
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
include $(top_srcdir)/Makefile.top
|
include $(top_srcdir)/Makefile.top
|
||||||
|
|
||||||
SUBDIRS = . lib doc bin fuzz
|
SUBDIRS = . libltdl lib doc bin
|
||||||
|
|
||||||
BUILT_SOURCES = bind.keys.h
|
BUILT_SOURCES = bind.keys.h
|
||||||
CLEANFILES = bind.keys.h
|
CLEANFILES = bind.keys.h
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ AM_V_SPHINX_0 = @echo " SPHINX $@";
|
|||||||
SPHINXBUILDDIR = $(builddir)/_build
|
SPHINXBUILDDIR = $(builddir)/_build
|
||||||
|
|
||||||
common_SPHINXOPTS = \
|
common_SPHINXOPTS = \
|
||||||
-W \
|
|
||||||
-c $(srcdir) \
|
-c $(srcdir) \
|
||||||
-a \
|
-a \
|
||||||
$(SPHINX_V)
|
$(SPHINX_V)
|
||||||
|
|||||||
+3
-10
@@ -1,17 +1,10 @@
|
|||||||
# Hey Emacs, this is -*- makefile-automake -*- file!
|
# Hey Emacs, this is -*- makefile-automake -*- file!
|
||||||
# vim: filetype=automake
|
# vim: filetype=automake
|
||||||
|
|
||||||
unit-local: check
|
|
||||||
|
|
||||||
TESTS = $(check_PROGRAMS)
|
|
||||||
|
|
||||||
LOG_COMPILER = $(builddir)/../../unit-test-driver.sh
|
|
||||||
|
|
||||||
AM_CPPFLAGS += \
|
AM_CPPFLAGS += \
|
||||||
$(CMOCKA_CFLAGS) \
|
$(CMOCKA_CFLAGS) \
|
||||||
-DNAMED_PLUGINDIR=\"$(libdir)/named\" \
|
-DTESTS_DIR=\"$(abs_srcdir)\" \
|
||||||
-DSKIPPED_TEST_EXIT_CODE=77 \
|
-DNAMED_PLUGINDIR=\"$(libdir)/named\"
|
||||||
-DTESTS_DIR=\"$(abs_srcdir)\"
|
|
||||||
|
|
||||||
LDADD += \
|
LDADD = \
|
||||||
$(CMOCKA_LIBS)
|
$(CMOCKA_LIBS)
|
||||||
|
|||||||
+22
-7
@@ -11,19 +11,28 @@ AM_CPPFLAGS = \
|
|||||||
-include $(top_builddir)/config.h \
|
-include $(top_builddir)/config.h \
|
||||||
-I$(srcdir)/include
|
-I$(srcdir)/include
|
||||||
|
|
||||||
AM_LDFLAGS =
|
if HAVE_GSSAPI
|
||||||
LDADD =
|
AM_CPPFLAGS += \
|
||||||
|
$(GSSAPI_CFLAGS)
|
||||||
if HOST_MACOS
|
endif
|
||||||
AM_LDFLAGS += \
|
|
||||||
-Wl,-flat_namespace
|
|
||||||
endif HOST_MACOS
|
|
||||||
|
|
||||||
LIBISC_CFLAGS = \
|
LIBISC_CFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
|
-I$(top_srcdir)/lib/isc/unix/include \
|
||||||
|
-I$(top_srcdir)/lib/isc/pthreads/include \
|
||||||
-I$(top_srcdir)/lib/isc/include \
|
-I$(top_srcdir)/lib/isc/include \
|
||||||
-I$(top_builddir)/lib/isc/include
|
-I$(top_builddir)/lib/isc/include
|
||||||
|
|
||||||
|
if HAVE_JSON_C
|
||||||
|
LIBISC_CFLAGS += \
|
||||||
|
$(JSON_C_CFLAGS)
|
||||||
|
endif HAVE_JSON_C
|
||||||
|
|
||||||
|
if HAVE_LIBXML2
|
||||||
|
LIBISC_CFLAGS += \
|
||||||
|
$(LIBXML2_CFLAGS)
|
||||||
|
endif HAVE_LIBXML2
|
||||||
|
|
||||||
LIBISC_LIBS = $(top_builddir)/lib/isc/libisc.la
|
LIBISC_LIBS = $(top_builddir)/lib/isc/libisc.la
|
||||||
|
|
||||||
LIBDNS_CFLAGS = \
|
LIBDNS_CFLAGS = \
|
||||||
@@ -62,3 +71,9 @@ LIBBIND9_CFLAGS = \
|
|||||||
|
|
||||||
LIBBIND9_LIBS = \
|
LIBBIND9_LIBS = \
|
||||||
$(top_builddir)/lib/bind9/libbind9.la
|
$(top_builddir)/lib/bind9/libbind9.la
|
||||||
|
|
||||||
|
LIBLTDL_CFLAGS = \
|
||||||
|
-I$(top_srcdir)/libltdl
|
||||||
|
|
||||||
|
LIBLTDL_LIBS = \
|
||||||
|
$(top_builddir)/libltdl/libltdlc.la
|
||||||
|
|||||||
+14
-13
@@ -8,19 +8,20 @@
|
|||||||
- See the COPYRIGHT file distributed with this work for additional
|
- See the COPYRIGHT file distributed with this work for additional
|
||||||
- information regarding copyright ownership.
|
- information regarding copyright ownership.
|
||||||
-->
|
-->
|
||||||
Setting the `CPPFLAGS` environment variable before running `configure`
|
Setting the `STD_CDEFINES` environment variable before running `configure`
|
||||||
can be used to enable certain compile-time options that are not
|
can be used to enable certain compile-time options that are not explicitly
|
||||||
explicitly defined in `configure`.
|
defined in `configure`.
|
||||||
|
|
||||||
Some of these settings are:
|
Some of these settings are:
|
||||||
|
|
||||||
| Setting | Description |
|
|Setting |Description |
|
||||||
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|-----------------------------------|----------------------------------------|
|
||||||
| `-DCHECK_LOCAL=0` | Don't check out-of-zone addresses in `named-checkzone` |
|
|`-DISC_MEM_DEFAULTFILL=1`|Overwrite memory with tag values when allocating or freeing it; this impairs performance but makes debugging of memory problems easier.|
|
||||||
| `-DCHECK_SIBLING=0` | Don't check sibling glue in `named-checkzone` |
|
|`-DISC_MEM_TRACKLINES=0`|Don't track memory allocations by file and line number; this improves performance but makes debugging more difficult.|
|
||||||
| `-DISC_FACILITY=LOG_LOCAL0` | Change the default syslog facility for `named` |
|
|<nobr>`-DISC_FACILITY=LOG_LOCAL0`</nobr>|Change the default syslog facility for `named`|
|
||||||
| `-DISC_HEAP_CHECK` | Test heap consistency after every heap operation; used when debugging |
|
|`-DNS_CLIENT_DROPPORT=0`|Disable dropping queries from particular well-known ports:|
|
||||||
| `-DISC_MEM_DEFAULTFILL=1` | Overwrite memory with tag values when allocating or freeing it; this impairs performance but makes debugging of memory problems easier |
|
|`-DCHECK_SIBLING=0`|Don't check sibling glue in `named-checkzone`|
|
||||||
| `-DISC_MEM_TRACKLINES=0` | Don't track memory allocations by file and line number; this improves performance but makes debugging more difficult |
|
|`-DCHECK_LOCAL=0`|Don't check out-of-zone addresses in `named-checkzone`|
|
||||||
| `-DNAMED_RUN_PID_DIR=0` | Create default PID files in `${localstatedir}/run` rather than `${localstatedir}/run/named/` |
|
|`-DNS_RUN_PID_DIR=0`|Create default PID files in `${localstatedir}/run` rather than `${localstatedir}/run/named/`|
|
||||||
| `-DNS_CLIENT_DROPPORT=0` | Disable dropping queries from particular well-known ports |
|
|`-DISC_BUFFER_USEINLINE=0`|Disable the use of inline functions to implement the `isc_buffer` API: this reduces performance but may be useful when debugging |
|
||||||
|
|`-DISC_HEAP_CHECK`|Test heap consistency after every heap operation; used when debugging|
|
||||||
|
|||||||
+29
-41
@@ -12,26 +12,18 @@
|
|||||||
|
|
||||||
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 C11-compliant C compiler, BSD-style sockets with RFC-compliant
|
system with a C11-compliant C compiler, BSD-style sockets with RFC-compliant
|
||||||
IPv6 support, and POSIX-compliant threads, plus the following mandatory
|
IPv6 support, POSIX-compliant threads, the `libuv` asynchronous I/O library,
|
||||||
libraries:
|
and the OpenSSL cryptography library.
|
||||||
|
|
||||||
- `libuv` for asynchronous I/O operations and event loops
|
|
||||||
- `libssl` and `libcrypto` from OpenSSL for cryptography
|
|
||||||
|
|
||||||
Use of the following libraries is optional:
|
|
||||||
|
|
||||||
- `libjemalloc` for improved memory allocation performance
|
|
||||||
- `libnghttp2` for DNS-over-HTTPS (DoH) support
|
|
||||||
|
|
||||||
The following C11 features are used in BIND 9:
|
The following C11 features are used in BIND 9:
|
||||||
|
|
||||||
* Atomic operations support, either in the form of C11 atomics or
|
* Atomic operations support from the compiler is needed, either in the form of
|
||||||
`__atomic` builtin operations.
|
builtin operations, C11 atomics, or the `Interlocked` family of functions on
|
||||||
|
Windows.
|
||||||
|
|
||||||
* Thread Local Storage support, either in the form of C11
|
* Thread Local Storage support from the compiler is needed, either in the form
|
||||||
`_Thread_local`/`thread_local`, or the `__thread` GCC extension.
|
of C11 `_Thread_local`/`thread_local`, the `__thread` GCC extension, or
|
||||||
|
the `__declspec(thread)` MSVC extension on Windows.
|
||||||
The C11 variants are preferred.
|
|
||||||
|
|
||||||
BIND 9.17 requires a fairly recent version of `libuv` (at least 1.x). For
|
BIND 9.17 requires a fairly recent version of `libuv` (at least 1.x). For
|
||||||
some of the older systems listed below, you will have to install an updated
|
some of the older systems listed below, you will have to install an updated
|
||||||
@@ -40,16 +32,9 @@ updated packages. The other option is to build and install `libuv` from
|
|||||||
source.
|
source.
|
||||||
|
|
||||||
Certain optional BIND features have additional library dependencies.
|
Certain optional BIND features have additional library dependencies.
|
||||||
These include:
|
These include `libxml2` and `libjson-c` for statistics, `libmaxminddb` for
|
||||||
|
geolocation, `libfstrm` and `libprotobuf-c` for DNSTAP, and `libidn2` for
|
||||||
* `libfstrm` and `libprotobuf-c` for DNSTAP
|
internationalized domain name conversion.
|
||||||
* `libidn2` for display of internationalized domain names in `dig`
|
|
||||||
* `libjson-c` for JSON statistics
|
|
||||||
* `libmaxminddb` for geolocation
|
|
||||||
* `libnghttp2` for DNS over HTTPS
|
|
||||||
* `libxml2` for XML statistics
|
|
||||||
* `libz` for compression of the HTTP statistics channel
|
|
||||||
* `readline` for line editing in `nsupdate` and `nslookup`
|
|
||||||
|
|
||||||
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
|
||||||
@@ -57,32 +42,34 @@ offer support on a "best effort" basis for some.
|
|||||||
|
|
||||||
### Regularly tested platforms
|
### Regularly tested platforms
|
||||||
|
|
||||||
As of Oct 2021, BIND 9.17 is fully supported and regularly tested on the
|
As of Mar 2020, BIND 9.17 is fully supported and regularly tested on the
|
||||||
following systems:
|
following systems:
|
||||||
|
|
||||||
* Debian 9, 10, 11
|
* Debian 9, 10
|
||||||
* Ubuntu LTS 18.04, 20.04
|
* Ubuntu LTS 16.04, 18.04
|
||||||
* Fedora 34
|
* Fedora 31
|
||||||
* Red Hat Enterprise Linux / CentOS / Oracle Linux 7, 8
|
* Red Hat Enterprise Linux / CentOS 7, 8
|
||||||
* FreeBSD 11.4, 12.2, 13.0
|
* FreeBSD 11.3, 12.1
|
||||||
* OpenBSD 7.0
|
* OpenBSD 6.6
|
||||||
* Alpine Linux 3.14
|
* 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
|
ISC makes every effort to fix bugs on these platforms, but may be unable to
|
||||||
to do so quickly due to lack of hardware, less familiarity on the part
|
do so quickly due to lack of hardware, less familiarity on the part of
|
||||||
of engineering staff, and other constraints. None of these are tested
|
engineering staff, and other constraints. With the exception of Windows
|
||||||
regularly by ISC.
|
Server 2012 R2, none of these are tested regularly by ISC.
|
||||||
|
|
||||||
|
* Windows Server 2012 R2, 2016 / x64
|
||||||
|
* Windows 10 / x64
|
||||||
* macOS 10.12+
|
* macOS 10.12+
|
||||||
* Solaris 11
|
* Solaris 11
|
||||||
* NetBSD
|
* NetBSD
|
||||||
* Other Linux distributions still supported by their vendors, such as:
|
* Other Linux distributions still supported by their vendors, such as:
|
||||||
* Ubuntu 20.10+
|
* Ubuntu 19.04+
|
||||||
* Gentoo
|
* Gentoo
|
||||||
* Arch Linux
|
* Arch Linux
|
||||||
* OpenWRT/LEDE 17.01+
|
* OpenWRT/LEDE 17.01+
|
||||||
@@ -99,7 +86,7 @@ assessed against the risk of adverse effect on officially supported
|
|||||||
platforms.
|
platforms.
|
||||||
|
|
||||||
* Platforms past or close to their respective EOL dates, such as:
|
* Platforms past or close to their respective EOL dates, such as:
|
||||||
* Ubuntu 14.04, 16.04 (Ubuntu ESM releases are not supported)
|
* Ubuntu 14.04, 18.10
|
||||||
* CentOS 6
|
* CentOS 6
|
||||||
* Debian Jessie
|
* Debian Jessie
|
||||||
* FreeBSD 10.x
|
* FreeBSD 10.x
|
||||||
@@ -109,7 +96,8 @@ platforms.
|
|||||||
These are platforms on which BIND 9.17 is known *not* to build or run:
|
These are platforms on which BIND 9.17 is known *not* to build or run:
|
||||||
|
|
||||||
* Platforms without at least OpenSSL 1.0.2
|
* Platforms without at least OpenSSL 1.0.2
|
||||||
* Windows
|
* Windows 10 / x86
|
||||||
|
* Windows Server 2012 and older
|
||||||
* Solaris 10 and older
|
* Solaris 10 and older
|
||||||
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
|
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
|
||||||
* Platforms that don't support atomic operations (via compiler or library)
|
* Platforms that don't support atomic operations (via compiler or library)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
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.17 features](#features)
|
||||||
1. [Building BIND](#build)
|
1. [Building BIND](#build)
|
||||||
1. [macOS](#macos)
|
1. [macOS](#macos)
|
||||||
1. [Dependencies](#dependencies)
|
1. [Dependencies](#dependencies)
|
||||||
@@ -49,6 +50,9 @@ 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.
|
licensed under the terms of the Mozilla Public License, version 2.0.
|
||||||
|
|
||||||
|
For a summary of features introduced in past major releases of BIND,
|
||||||
|
see the file [HISTORY](HISTORY.md).
|
||||||
|
|
||||||
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](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.
|
||||||
@@ -121,22 +125,36 @@ 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.17 features
|
||||||
|
|
||||||
|
BIND 9.17 is the newest development branch of BIND 9. It includes a
|
||||||
|
number of changes from BIND 9.16 and earlier releases. New features include:
|
||||||
|
|
||||||
|
* The new option `max-ixfr-ratio` to limit the size of outgoing IXFR responses
|
||||||
|
before falling back to full zone transfers.
|
||||||
|
* `rndc nta -d` and `rndc secroots` now include `validate-except` entries
|
||||||
|
when listing negative trust anchors.
|
||||||
|
|
||||||
### <a name="build"/> Building BIND 9
|
### <a name="build"/> Building BIND 9
|
||||||
|
|
||||||
At a minimum, BIND requires a Unix or Linux system with an ANSI C compiler,
|
At a minimum, BIND requires a Unix or Linux system with an ANSI C compiler,
|
||||||
basic POSIX support, and a 64-bit integer type. BIND also requires the
|
basic POSIX support, and a 64-bit integer type. BIND also requires the
|
||||||
`libuv` asynchronous I/O library, the `nghttp2` HTTP/2 library, the
|
`libuv` asynchronous I/O library, and a cryptography provider library
|
||||||
`jemalloc` memory allocation library, and the OpenSSL cryptography
|
such as OpenSSL or a hardware service module supporting PKCS#11. On
|
||||||
library. On Linux, BIND requires the `libcap` library to set process
|
Linux, BIND requires the `libcap` library to set process privileges,
|
||||||
privileges, though this requirement can be overridden by disabling
|
though this requirement can be overridden by disabling capability
|
||||||
capability support at compile time. See [Compile-time options](#opts)
|
support at compile time. See [Compile-time options](#opts) below
|
||||||
below for details on other libraries that may be required to support
|
for details on other libraries that may be required to support
|
||||||
optional features.
|
optional features.
|
||||||
|
|
||||||
Successful builds have been observed on many versions of Linux and Unix,
|
Successful builds have been observed on many versions of Linux and
|
||||||
including RHEL/CentOS/Oracle Linux, Fedora, Debian, Ubuntu, SLES, openSUSE,
|
Unix, including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE,
|
||||||
Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris, OpenIndiana,
|
Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris,
|
||||||
OmniOS CE, HP-UX, and OpenWRT.
|
OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
|
||||||
|
|
||||||
|
BIND 9 is also available for Windows Server 2012 R2 and higher. See
|
||||||
|
`win32utils/build.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:
|
||||||
|
|
||||||
@@ -144,7 +162,8 @@ To build on a Unix or Linux system, use:
|
|||||||
$ ./configure
|
$ ./configure
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
If you're using Emacs, you might find `make tags` helpful.
|
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.
|
||||||
|
|
||||||
Several environment variables, which can be set before running `configure`,
|
Several environment variables, which can be set before running `configure`,
|
||||||
affect compilation. Significant ones are:
|
affect compilation. Significant ones are:
|
||||||
@@ -166,8 +185,9 @@ command:
|
|||||||
Building on macOS assumes that the "Command Tools for Xcode" are installed.
|
Building on macOS assumes that the "Command Tools for Xcode" are installed.
|
||||||
These can be downloaded from
|
These can be downloaded from
|
||||||
[https://developer.apple.com/download/more/](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
|
||||||
(Note that an Apple ID may be required to access the download page.)
|
`xcode-select--install`. (Note that an Apple ID may be required to access the download
|
||||||
|
page.)
|
||||||
|
|
||||||
#### <a name="dependencies"> Dependencies
|
#### <a name="dependencies"> Dependencies
|
||||||
|
|
||||||
@@ -182,19 +202,22 @@ installed:
|
|||||||
autoconf (includes autoreconf)
|
autoconf (includes autoreconf)
|
||||||
automake
|
automake
|
||||||
libtool
|
libtool
|
||||||
|
libltdl-dev (Debian) / libtool-ltdl-dev (Fedora/CentOS) / libltdl (FreeBSD)
|
||||||
|
|
||||||
#### <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`.
|
||||||
|
|
||||||
|
To build shared libraries, specify `--with-libtool` on the `configure`
|
||||||
|
command line.
|
||||||
|
|
||||||
For the server to support DNSSEC, you need to build it with crypto support.
|
For the server to support DNSSEC, you need to build it with crypto support.
|
||||||
To use OpenSSL, you must have OpenSSL 1.0.2e or newer installed. If the
|
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
|
||||||
OpenSSL library is installed in a nonstandard location, specify the prefix
|
OpenSSL library is installed in a nonstandard location, specify the prefix
|
||||||
using `--with-openssl=<PREFIX>` on the configure command line. To use a
|
using `--with-openssl=<PREFIX>` on the configure command line. To use a
|
||||||
PKCS#11 hardware service module for cryptographic operations, it will
|
PKCS#11 hardware service module for cryptographic operations, specify the
|
||||||
be necessary to compile and use engine_pkcs11 from the OpenSC project.
|
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
|
||||||
|
configure BIND with `--enable-native-pkcs11`.
|
||||||
To support DNS over HTTPS, the server must be linked with `libnghttp2`.
|
|
||||||
|
|
||||||
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 libraries: `libxml2`
|
||||||
@@ -316,7 +339,7 @@ the change that was made; these categories are:
|
|||||||
| [cleanup] | Minor corrections and refactoring |
|
| [cleanup] | Minor corrections and refactoring |
|
||||||
| [doc] | Documentation |
|
| [doc] | Documentation |
|
||||||
| [contrib] | Changes to the contributed tools and libraries in the 'contrib' subdirectory |
|
| [contrib] | Changes to the contributed tools and libraries in the 'contrib' subdirectory |
|
||||||
| [placeholder] | Used in the main development branch to reserve change numbers for use in other branches, e.g., when fixing a bug that only exists in older releases |
|
| [placeholder] | Used in the master development branch to reserve change numbers for use in other branches, e.g., when fixing a bug that only exists in older releases |
|
||||||
|
|
||||||
In general, [func] and [experimental] tags only appear in new-feature
|
In general, [func] and [experimental] tags only appear in new-feature
|
||||||
releases (i.e., those with version numbers ending in zero). Some new
|
releases (i.e., those with version numbers ending in zero). Some new
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen tests plugins
|
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen tests plugins
|
||||||
|
|
||||||
|
if HAVE_PKCS11
|
||||||
|
SUBDIRS += pkcs11
|
||||||
|
endif
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ AM_CPPFLAGS += \
|
|||||||
$(LIBISCCFG_CFLAGS) \
|
$(LIBISCCFG_CFLAGS) \
|
||||||
$(LIBBIND9_CFLAGS)
|
$(LIBBIND9_CFLAGS)
|
||||||
|
|
||||||
AM_CPPFLAGS += \
|
AM_CPPFLAGS += \
|
||||||
-DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
-DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libcheck-tool.la
|
noinst_LTLIBRARIES = libcheck-tool.la
|
||||||
@@ -16,7 +16,7 @@ libcheck_tool_la_SOURCES = \
|
|||||||
check-tool.h \
|
check-tool.h \
|
||||||
check-tool.c
|
check-tool.c
|
||||||
|
|
||||||
LDADD += \
|
LDADD = \
|
||||||
libcheck-tool.la \
|
libcheck-tool.la \
|
||||||
$(LIBISC_LIBS) \
|
$(LIBISC_LIBS) \
|
||||||
$(LIBDNS_LIBS) \
|
$(LIBDNS_LIBS) \
|
||||||
|
|||||||
+127
-3
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -15,6 +15,10 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <Winsock2.h>
|
||||||
|
#endif /* ifdef _WIN32 */
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/log.h>
|
#include <isc/log.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -22,7 +26,6 @@
|
|||||||
#include <isc/netdb.h>
|
#include <isc/netdb.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/region.h>
|
#include <isc/region.h>
|
||||||
#include <isc/result.h>
|
|
||||||
#include <isc/stdio.h>
|
#include <isc/stdio.h>
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/symtab.h>
|
#include <isc/symtab.h>
|
||||||
@@ -39,6 +42,7 @@
|
|||||||
#include <dns/rdataset.h>
|
#include <dns/rdataset.h>
|
||||||
#include <dns/rdatasetiter.h>
|
#include <dns/rdatasetiter.h>
|
||||||
#include <dns/rdatatype.h>
|
#include <dns/rdatatype.h>
|
||||||
|
#include <dns/result.h>
|
||||||
#include <dns/types.h>
|
#include <dns/types.h>
|
||||||
#include <dns/zone.h>
|
#include <dns/zone.h>
|
||||||
|
|
||||||
@@ -571,6 +575,96 @@ setup_logging(isc_mem_t *mctx, FILE *errout, isc_log_t **logp) {
|
|||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*% scan the zone for oversize TTLs */
|
||||||
|
static isc_result_t
|
||||||
|
check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
|
||||||
|
isc_result_t result;
|
||||||
|
dns_db_t *db = NULL;
|
||||||
|
dns_dbversion_t *version = NULL;
|
||||||
|
dns_dbnode_t *node = NULL;
|
||||||
|
dns_dbiterator_t *dbiter = NULL;
|
||||||
|
dns_rdatasetiter_t *rdsiter = NULL;
|
||||||
|
dns_rdataset_t rdataset;
|
||||||
|
dns_fixedname_t fname;
|
||||||
|
dns_name_t *name;
|
||||||
|
name = dns_fixedname_initname(&fname);
|
||||||
|
dns_rdataset_init(&rdataset);
|
||||||
|
|
||||||
|
CHECK(dns_zone_getdb(zone, &db));
|
||||||
|
INSIST(db != NULL);
|
||||||
|
|
||||||
|
CHECK(dns_db_newversion(db, &version));
|
||||||
|
CHECK(dns_db_createiterator(db, 0, &dbiter));
|
||||||
|
|
||||||
|
for (result = dns_dbiterator_first(dbiter); result == ISC_R_SUCCESS;
|
||||||
|
result = dns_dbiterator_next(dbiter))
|
||||||
|
{
|
||||||
|
result = dns_dbiterator_current(dbiter, &node, name);
|
||||||
|
if (result == DNS_R_NEWORIGIN) {
|
||||||
|
result = ISC_R_SUCCESS;
|
||||||
|
}
|
||||||
|
CHECK(result);
|
||||||
|
|
||||||
|
CHECK(dns_db_allrdatasets(db, node, version, 0, &rdsiter));
|
||||||
|
for (result = dns_rdatasetiter_first(rdsiter);
|
||||||
|
result == ISC_R_SUCCESS;
|
||||||
|
result = dns_rdatasetiter_next(rdsiter))
|
||||||
|
{
|
||||||
|
dns_rdatasetiter_current(rdsiter, &rdataset);
|
||||||
|
if (rdataset.ttl > maxttl) {
|
||||||
|
char nbuf[DNS_NAME_FORMATSIZE];
|
||||||
|
char tbuf[255];
|
||||||
|
isc_buffer_t b;
|
||||||
|
isc_region_t r;
|
||||||
|
|
||||||
|
dns_name_format(name, nbuf, sizeof(nbuf));
|
||||||
|
isc_buffer_init(&b, tbuf, sizeof(tbuf) - 1);
|
||||||
|
CHECK(dns_rdatatype_totext(rdataset.type, &b));
|
||||||
|
isc_buffer_usedregion(&b, &r);
|
||||||
|
r.base[r.length] = 0;
|
||||||
|
|
||||||
|
dns_zone_log(zone, ISC_LOG_ERROR,
|
||||||
|
"%s/%s TTL %d exceeds "
|
||||||
|
"maximum TTL %d",
|
||||||
|
nbuf, tbuf, rdataset.ttl, maxttl);
|
||||||
|
dns_rdataset_disassociate(&rdataset);
|
||||||
|
CHECK(ISC_R_RANGE);
|
||||||
|
}
|
||||||
|
dns_rdataset_disassociate(&rdataset);
|
||||||
|
}
|
||||||
|
if (result == ISC_R_NOMORE) {
|
||||||
|
result = ISC_R_SUCCESS;
|
||||||
|
}
|
||||||
|
CHECK(result);
|
||||||
|
|
||||||
|
dns_rdatasetiter_destroy(&rdsiter);
|
||||||
|
dns_db_detachnode(db, &node);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == ISC_R_NOMORE) {
|
||||||
|
result = ISC_R_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
if (node != NULL) {
|
||||||
|
dns_db_detachnode(db, &node);
|
||||||
|
}
|
||||||
|
if (rdsiter != NULL) {
|
||||||
|
dns_rdatasetiter_destroy(&rdsiter);
|
||||||
|
}
|
||||||
|
if (dbiter != NULL) {
|
||||||
|
dns_dbiterator_destroy(&dbiter);
|
||||||
|
}
|
||||||
|
if (version != NULL) {
|
||||||
|
dns_db_closeversion(db, &version, false);
|
||||||
|
}
|
||||||
|
if (db != NULL) {
|
||||||
|
dns_db_detach(&db);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
|
|
||||||
/*% load the zone */
|
/*% load the zone */
|
||||||
isc_result_t
|
isc_result_t
|
||||||
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||||
@@ -593,7 +687,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
|||||||
|
|
||||||
CHECK(dns_zone_create(&zone, mctx));
|
CHECK(dns_zone_create(&zone, mctx));
|
||||||
|
|
||||||
dns_zone_settype(zone, dns_zone_primary);
|
dns_zone_settype(zone, dns_zone_master);
|
||||||
|
|
||||||
isc_buffer_constinit(&buffer, zonename, strlen(zonename));
|
isc_buffer_constinit(&buffer, zonename, strlen(zonename));
|
||||||
isc_buffer_add(&buffer, strlen(zonename));
|
isc_buffer_add(&buffer, strlen(zonename));
|
||||||
@@ -634,6 +728,14 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
|||||||
|
|
||||||
CHECK(dns_zone_load(zone, false));
|
CHECK(dns_zone_load(zone, false));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When loading map files we can't catch oversize TTLs during
|
||||||
|
* load, so we check for them here.
|
||||||
|
*/
|
||||||
|
if (fileformat == dns_masterformat_map && maxttl != 0) {
|
||||||
|
CHECK(check_ttls(zone, maxttl));
|
||||||
|
}
|
||||||
|
|
||||||
if (zonep != NULL) {
|
if (zonep != NULL) {
|
||||||
*zonep = zone;
|
*zonep = zone;
|
||||||
zone = NULL;
|
zone = NULL;
|
||||||
@@ -686,3 +788,25 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
|||||||
|
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
void
|
||||||
|
InitSockets(void) {
|
||||||
|
WORD wVersionRequested;
|
||||||
|
WSADATA wsaData;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
wVersionRequested = MAKEWORD(2, 0);
|
||||||
|
|
||||||
|
err = WSAStartup(wVersionRequested, &wsaData);
|
||||||
|
if (err != 0) {
|
||||||
|
fprintf(stderr, "WSAStartup() failed: %d\n", err);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DestroySockets(void) {
|
||||||
|
WSACleanup();
|
||||||
|
}
|
||||||
|
#endif /* ifdef _WIN32 */
|
||||||
|
|||||||
+12
-2
@@ -3,13 +3,14 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef CHECK_TOOL_H
|
||||||
|
#define CHECK_TOOL_H
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -39,6 +40,13 @@ 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 uint32_t rawversion);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
void
|
||||||
|
InitSockets(void);
|
||||||
|
void
|
||||||
|
DestroySockets(void);
|
||||||
|
#endif /* ifdef _WIN32 */
|
||||||
|
|
||||||
extern int debug;
|
extern int debug;
|
||||||
extern const char *journal;
|
extern const char *journal;
|
||||||
extern bool nomerge;
|
extern bool nomerge;
|
||||||
@@ -48,3 +56,5 @@ extern bool dochecksrv;
|
|||||||
extern dns_zoneopt_t zone_options;
|
extern dns_zoneopt_t zone_options;
|
||||||
|
|
||||||
ISC_LANG_ENDDECLS
|
ISC_LANG_ENDDECLS
|
||||||
|
|
||||||
|
#endif /* ifndef CHECK_TOOL_H */
|
||||||
|
|||||||
+25
-10
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
#include <dns/log.h>
|
#include <dns/log.h>
|
||||||
#include <dns/name.h>
|
#include <dns/name.h>
|
||||||
#include <dns/rdataclass.h>
|
#include <dns/rdataclass.h>
|
||||||
|
#include <dns/result.h>
|
||||||
#include <dns/rootns.h>
|
#include <dns/rootns.h>
|
||||||
#include <dns/zone.h>
|
#include <dns/zone.h>
|
||||||
|
|
||||||
@@ -184,7 +185,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||||||
const char *zname;
|
const char *zname;
|
||||||
const char *zfile = NULL;
|
const char *zfile = NULL;
|
||||||
const cfg_obj_t *maps[4];
|
const cfg_obj_t *maps[4];
|
||||||
const cfg_obj_t *primariesobj = NULL;
|
const cfg_obj_t *mastersobj = NULL;
|
||||||
const cfg_obj_t *inviewobj = NULL;
|
const cfg_obj_t *inviewobj = NULL;
|
||||||
const cfg_obj_t *zoptions = NULL;
|
const cfg_obj_t *zoptions = NULL;
|
||||||
const cfg_obj_t *classobj = NULL;
|
const cfg_obj_t *classobj = NULL;
|
||||||
@@ -275,15 +276,11 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Is the redirect zone configured as a secondary?
|
* Is the redirect zone configured as a slave?
|
||||||
*/
|
*/
|
||||||
if (strcasecmp(cfg_obj_asstring(typeobj), "redirect") == 0) {
|
if (strcasecmp(cfg_obj_asstring(typeobj), "redirect") == 0) {
|
||||||
cfg_map_get(zoptions, "primaries", &primariesobj);
|
cfg_map_get(zoptions, "masters", &mastersobj);
|
||||||
if (primariesobj == NULL) {
|
if (mastersobj != NULL) {
|
||||||
cfg_map_get(zoptions, "masters", &primariesobj);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (primariesobj != NULL) {
|
|
||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -434,6 +431,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||||||
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) {
|
||||||
|
masterformat = dns_masterformat_map;
|
||||||
} else {
|
} else {
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
ISC_UNREACHABLE();
|
ISC_UNREACHABLE();
|
||||||
@@ -450,7 +449,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
|||||||
NULL);
|
NULL);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
|
fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
|
||||||
isc_result_totext(result));
|
dns_result_totext(result));
|
||||||
}
|
}
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@@ -608,6 +607,12 @@ main(int argc, char **argv) {
|
|||||||
{
|
{
|
||||||
isc_mem_debugging |= ISC_MEM_DEBUGUSAGE;
|
isc_mem_debugging |= ISC_MEM_DEBUGUSAGE;
|
||||||
}
|
}
|
||||||
|
if (strcasecmp(isc_commandline_argument, "size") == 0) {
|
||||||
|
isc_mem_debugging |= ISC_MEM_DEBUGSIZE;
|
||||||
|
}
|
||||||
|
if (strcasecmp(isc_commandline_argument, "mctx") == 0) {
|
||||||
|
isc_mem_debugging |= ISC_MEM_DEBUGCTX;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -705,8 +710,14 @@ main(int argc, char **argv) {
|
|||||||
conffile = NAMED_CONFFILE;
|
conffile = NAMED_CONFFILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
InitSockets();
|
||||||
|
#endif /* ifdef _WIN32 */
|
||||||
|
|
||||||
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
|
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
|
||||||
|
|
||||||
|
dns_result_register();
|
||||||
|
|
||||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||||
|
|
||||||
if (nodeprecate) {
|
if (nodeprecate) {
|
||||||
@@ -743,5 +754,9 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
isc_mem_destroy(&mctx);
|
isc_mem_destroy(&mctx);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
DestroySockets();
|
||||||
|
#endif /* ifdef _WIN32 */
|
||||||
|
|
||||||
return (exit_status);
|
return (exit_status);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -35,62 +35,62 @@ Description
|
|||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
``named-checkconf`` checks the syntax, but not the semantics, of a
|
``named-checkconf`` checks the syntax, but not the semantics, of a
|
||||||
``named`` configuration file. The file, along with all files included by it, is parsed and checked for syntax
|
``named`` configuration file. The file is parsed and checked for syntax
|
||||||
errors. If no file is specified,
|
errors, along with all files included by it. If no file is specified,
|
||||||
``/etc/named.conf`` is read by default.
|
``/etc/named.conf`` is read by default.
|
||||||
|
|
||||||
Note: files that ``named`` reads in separate parser contexts, such as
|
Note: files that ``named`` reads in separate parser contexts, such as
|
||||||
``rndc.key`` and ``bind.keys``, are not automatically read by
|
``rndc.key`` and ``bind.keys``, are not automatically read by
|
||||||
``named-checkconf``. Configuration errors in these files may cause
|
``named-checkconf``. Configuration errors in these files may cause
|
||||||
``named`` to fail to run, even if ``named-checkconf`` was successful.
|
``named`` to fail to run, even if ``named-checkconf`` was successful.
|
||||||
However, ``named-checkconf`` can be run on these files explicitly.
|
``named-checkconf`` can be run on these files explicitly, however.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-h``
|
**-h**
|
||||||
This option prints the usage summary and exits.
|
Print the usage summary and exit.
|
||||||
|
|
||||||
``-j``
|
**-j**
|
||||||
When loading a zonefile, this option instructs ``named`` to read the journal if it exists.
|
When loading a zonefile read the journal if it exists.
|
||||||
|
|
||||||
``-l``
|
**-l**
|
||||||
This option lists all the configured zones. Each line of output contains the zone
|
List all the configured zones. Each line of output contains the zone
|
||||||
name, class (e.g. IN), view, and type (e.g. primary or secondary).
|
name, class (e.g. IN), view, and type (e.g. master or slave).
|
||||||
|
|
||||||
``-c``
|
**-c**
|
||||||
This option specifies that only the "core" configuration should be checked. This suppresses the loading of
|
Check "core" configuration only. This suppresses the loading of
|
||||||
plugin modules, and causes all parameters to ``plugin`` statements to
|
plugin modules, and causes all parameters to ``plugin`` statements to
|
||||||
be ignored.
|
be ignored.
|
||||||
|
|
||||||
``-i``
|
**-i**
|
||||||
This option ignores warnings on deprecated options.
|
Ignore warnings on deprecated options.
|
||||||
|
|
||||||
``-p``
|
**-p**
|
||||||
This option prints out the ``named.conf`` and included files in canonical form if
|
Print out the ``named.conf`` and included files in canonical form if
|
||||||
no errors were detected. See also the ``-x`` option.
|
no errors were detected. See also the ``-x`` option.
|
||||||
|
|
||||||
``-t directory``
|
**-t** directory
|
||||||
This option instructs ``named`` to chroot to ``directory``, so that ``include`` directives in the
|
Chroot to ``directory`` so that include directives in the
|
||||||
configuration file are processed as if run by a similarly chrooted
|
configuration file are processed as if run by a similarly chrooted
|
||||||
``named``.
|
``named``.
|
||||||
|
|
||||||
``-v``
|
**-v**
|
||||||
This option prints the version of the ``named-checkconf`` program and exits.
|
Print the version of the ``named-checkconf`` program and exit.
|
||||||
|
|
||||||
``-x``
|
**-x**
|
||||||
When printing the configuration files in canonical form, this option obscures
|
When printing the configuration files in canonical form, obscure
|
||||||
shared secrets by replacing them with strings of question marks
|
shared secrets by replacing them with strings of question marks
|
||||||
(``?``). This allows the contents of ``named.conf`` and related files
|
('?'). This allows the contents of ``named.conf`` and related files
|
||||||
to be shared - for example, when submitting bug reports -
|
to be shared MDASH for example, when submitting bug reports MDASH
|
||||||
without compromising private data. This option cannot be used without
|
without compromising private data. This option cannot be used without
|
||||||
``-p``.
|
``-p``.
|
||||||
|
|
||||||
``-z``
|
**-z**
|
||||||
This option performs a test load of all zones of type ``primary`` found in ``named.conf``.
|
Perform a test load of all master zones found in ``named.conf``.
|
||||||
|
|
||||||
``filename``
|
filename
|
||||||
This indicates the name of the configuration file to be checked. If not specified,
|
The name of the configuration file to be checked. If not specified,
|
||||||
it defaults to ``/etc/named.conf``.
|
it defaults to ``/etc/named.conf``.
|
||||||
|
|
||||||
Return Values
|
Return Values
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <isc/log.h>
|
#include <isc/log.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/result.h>
|
#include <isc/socket.h>
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/task.h>
|
#include <isc/task.h>
|
||||||
#include <isc/timer.h>
|
#include <isc/timer.h>
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
#include <dns/name.h>
|
#include <dns/name.h>
|
||||||
#include <dns/rdataclass.h>
|
#include <dns/rdataclass.h>
|
||||||
#include <dns/rdataset.h>
|
#include <dns/rdataset.h>
|
||||||
|
#include <dns/result.h>
|
||||||
#include <dns/types.h>
|
#include <dns/types.h>
|
||||||
#include <dns/zone.h>
|
#include <dns/zone.h>
|
||||||
|
|
||||||
@@ -46,7 +47,7 @@
|
|||||||
static int quiet = 0;
|
static int quiet = 0;
|
||||||
static isc_mem_t *mctx = NULL;
|
static isc_mem_t *mctx = NULL;
|
||||||
dns_zone_t *zone = NULL;
|
dns_zone_t *zone = NULL;
|
||||||
dns_zonetype_t zonetype = dns_zone_primary;
|
dns_zonetype_t zonetype = dns_zone_master;
|
||||||
static int dumpzone = 0;
|
static int dumpzone = 0;
|
||||||
static const char *output_filename;
|
static const char *output_filename;
|
||||||
static const char *prog_name = NULL;
|
static const char *prog_name = NULL;
|
||||||
@@ -58,7 +59,7 @@ static enum { progmode_check, progmode_compile } progmode;
|
|||||||
if (result != ISC_R_SUCCESS) { \
|
if (result != ISC_R_SUCCESS) { \
|
||||||
if (!quiet) \
|
if (!quiet) \
|
||||||
fprintf(stderr, "%s() returned %s\n", \
|
fprintf(stderr, "%s() returned %s\n", \
|
||||||
function, isc_result_totext(result)); \
|
function, dns_result_totext(result)); \
|
||||||
return (result); \
|
return (result); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
@@ -453,6 +454,8 @@ main(int argc, char **argv) {
|
|||||||
inputformat = dns_masterformat_raw;
|
inputformat = dns_masterformat_raw;
|
||||||
fprintf(stderr, "WARNING: input format raw, version "
|
fprintf(stderr, "WARNING: input format raw, version "
|
||||||
"ignored\n");
|
"ignored\n");
|
||||||
|
} else if (strcasecmp(inputformatstr, "map") == 0) {
|
||||||
|
inputformat = dns_masterformat_map;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "unknown file format: %s\n",
|
fprintf(stderr, "unknown file format: %s\n",
|
||||||
inputformatstr);
|
inputformatstr);
|
||||||
@@ -475,6 +478,8 @@ main(int argc, char **argv) {
|
|||||||
fprintf(stderr, "unknown raw format version\n");
|
fprintf(stderr, "unknown raw format version\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
} else if (strcasecmp(outputformatstr, "map") == 0) {
|
||||||
|
outputformat = dns_masterformat_map;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "unknown file format: %s\n",
|
fprintf(stderr, "unknown file format: %s\n",
|
||||||
outputformatstr);
|
outputformatstr);
|
||||||
@@ -514,12 +519,18 @@ main(int argc, char **argv) {
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
InitSockets();
|
||||||
|
#endif /* ifdef _WIN32 */
|
||||||
|
|
||||||
isc_mem_create(&mctx);
|
isc_mem_create(&mctx);
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx) ==
|
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx) ==
|
||||||
ISC_R_SUCCESS);
|
ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dns_result_register();
|
||||||
|
|
||||||
origin = argv[isc_commandline_index++];
|
origin = argv[isc_commandline_index++];
|
||||||
|
|
||||||
if (isc_commandline_index == argc) {
|
if (isc_commandline_index == argc) {
|
||||||
@@ -561,6 +572,9 @@ main(int argc, char **argv) {
|
|||||||
isc_log_destroy(&lctx);
|
isc_log_destroy(&lctx);
|
||||||
}
|
}
|
||||||
isc_mem_destroy(&mctx);
|
isc_mem_destroy(&mctx);
|
||||||
|
#ifdef _WIN32
|
||||||
|
DestroySockets();
|
||||||
|
#endif /* ifdef _WIN32 */
|
||||||
|
|
||||||
return ((result == ISC_R_SUCCESS) ? 0 : 1);
|
return ((result == ISC_R_SUCCESS) ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|||||||
+109
-107
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
.. highlight: console
|
.. highlight: console
|
||||||
|
|
||||||
|
.. _man_named-checkzone:
|
||||||
|
|
||||||
named-checkzone, named-compilezone - zone file validity checking or converting tool
|
named-checkzone, named-compilezone - zone file validity checking or converting tool
|
||||||
-----------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -41,163 +43,163 @@ configuring them into a name server.
|
|||||||
|
|
||||||
``named-compilezone`` is similar to ``named-checkzone``, but it always
|
``named-compilezone`` is similar to ``named-checkzone``, but it always
|
||||||
dumps the zone contents to a specified file in a specified format.
|
dumps the zone contents to a specified file in a specified format.
|
||||||
It also applies stricter check levels by default, since the
|
Additionally, it applies stricter check levels by default, since the
|
||||||
dump output is used as an actual zone file loaded by ``named``.
|
dump output will be used as an actual zone file loaded by ``named``.
|
||||||
When manually specified otherwise, the check levels must at least be as
|
When manually specified otherwise, the check levels must at least be as
|
||||||
strict as those specified in the ``named`` configuration file.
|
strict as those specified in the ``named`` configuration file.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-d``
|
**-d**
|
||||||
This option enables debugging.
|
Enable debugging.
|
||||||
|
|
||||||
``-h``
|
**-h**
|
||||||
This option prints the usage summary and exits.
|
Print the usage summary and exit.
|
||||||
|
|
||||||
``-q``
|
**-q**
|
||||||
This option sets quiet mode, which only sets an exit code to indicate
|
Quiet mode - exit code only.
|
||||||
successful or failed completion.
|
|
||||||
|
|
||||||
``-v``
|
**-v**
|
||||||
This option prints the version of the ``named-checkzone`` program and exits.
|
Print the version of the ``named-checkzone`` program and exit.
|
||||||
|
|
||||||
``-j``
|
**-j**
|
||||||
When loading a zone file, this option tells ``named`` to read the journal if it exists. The journal
|
When loading a zone file, read the journal if it exists. The journal
|
||||||
file name is assumed to be the zone file name with the
|
file name is assumed to be the zone file name appended with the
|
||||||
string ``.jnl`` appended.
|
string ``.jnl``.
|
||||||
|
|
||||||
``-J filename``
|
**-J** filename
|
||||||
When loading the zone file, this option tells ``named`` to read the journal from the given file, if
|
When loading the zone file read the journal from the given file, if
|
||||||
it exists. This implies ``-j``.
|
it exists. (Implies -j.)
|
||||||
|
|
||||||
``-c class``
|
**-c** class
|
||||||
This option specifies the class of the zone. If not specified, ``IN`` is assumed.
|
Specify the class of the zone. If not specified, "IN" is assumed.
|
||||||
|
|
||||||
``-i mode``
|
**-i** mode
|
||||||
This option performs post-load zone integrity checks. Possible modes are
|
Perform post-load zone integrity checks. Possible modes are
|
||||||
``full`` (the default), ``full-sibling``, ``local``,
|
``"full"`` (default), ``"full-sibling"``, ``"local"``,
|
||||||
``local-sibling``, and ``none``.
|
``"local-sibling"`` and ``"none"``.
|
||||||
|
|
||||||
Mode ``full`` checks that MX records refer to A or AAAA records
|
Mode ``"full"`` checks that MX records refer to A or AAAA record
|
||||||
(both in-zone and out-of-zone hostnames). Mode ``local`` only
|
(both in-zone and out-of-zone hostnames). Mode ``"local"`` only
|
||||||
checks MX records which refer to in-zone hostnames.
|
checks MX records which refer to in-zone hostnames.
|
||||||
|
|
||||||
Mode ``full`` checks that SRV records refer to A or AAAA records
|
Mode ``"full"`` checks that SRV records refer to A or AAAA record
|
||||||
(both in-zone and out-of-zone hostnames). Mode ``local`` only
|
(both in-zone and out-of-zone hostnames). Mode ``"local"`` only
|
||||||
checks SRV records which refer to in-zone hostnames.
|
checks SRV records which refer to in-zone hostnames.
|
||||||
|
|
||||||
Mode ``full`` checks that delegation NS records refer to A or AAAA
|
Mode ``"full"`` checks that delegation NS records refer to A or AAAA
|
||||||
records (both in-zone and out-of-zone hostnames). It also checks that
|
record (both in-zone and out-of-zone hostnames). It also checks that
|
||||||
glue address records in the zone match those advertised by the child.
|
glue address records in the zone match those advertised by the child.
|
||||||
Mode ``local`` only checks NS records which refer to in-zone
|
Mode ``"local"`` only checks NS records which refer to in-zone
|
||||||
hostnames or verifies that some required glue exists, i.e., when the
|
hostnames or that some required glue exists, that is when the
|
||||||
name server is in a child zone.
|
nameserver is in a child zone.
|
||||||
|
|
||||||
Modes ``full-sibling`` and ``local-sibling`` disable sibling glue
|
Mode ``"full-sibling"`` and ``"local-sibling"`` disable sibling glue
|
||||||
checks, but are otherwise the same as ``full`` and ``local``,
|
checks but are otherwise the same as ``"full"`` and ``"local"``
|
||||||
respectively.
|
respectively.
|
||||||
|
|
||||||
Mode ``none`` disables the checks.
|
Mode ``"none"`` disables the checks.
|
||||||
|
|
||||||
``-f format``
|
**-f** format
|
||||||
This option specifies the format of the zone file. Possible formats are
|
Specify the format of the zone file. Possible formats are ``"text"``
|
||||||
``text`` (the default), and ``raw``.
|
(default), ``"raw"``, and ``"map"``.
|
||||||
|
|
||||||
``-F format``
|
**-F** format
|
||||||
This option specifies the format of the output file specified. For
|
Specify the format of the output file specified. For
|
||||||
``named-checkzone``, this does not have any effect unless it dumps
|
``named-checkzone``, this does not cause any effects unless it dumps
|
||||||
the zone contents.
|
the zone contents.
|
||||||
|
|
||||||
Possible formats are ``text`` (the default), which is the standard
|
Possible formats are ``"text"`` (default), which is the standard
|
||||||
textual representation of the zone, and ``raw`` and ``raw=N``, which
|
textual representation of the zone, and ``"map"``, ``"raw"``, and
|
||||||
store the zone in a binary format for rapid loading by ``named``.
|
``"raw=N"``, which store the zone in a binary format for rapid
|
||||||
``raw=N`` specifies the format version of the raw zone file: if ``N`` is
|
loading by ``named``. ``"raw=N"`` specifies the format version of the
|
||||||
0, the raw file can be read by any version of ``named``; if N is 1, the
|
raw zone file: if N is 0, the raw file can be read by any version of
|
||||||
file can only be read by release 9.9.0 or higher. The default is 1.
|
``named``; if N is 1, the file can be read by release 9.9.0 or
|
||||||
|
higher; the default is 1.
|
||||||
|
|
||||||
``-k mode``
|
**-k** mode
|
||||||
This option performs ``check-names`` checks with the specified failure mode.
|
Perform ``"check-names"`` checks with the specified failure mode.
|
||||||
Possible modes are ``fail`` (the default for ``named-compilezone``),
|
Possible modes are ``"fail"`` (default for ``named-compilezone``),
|
||||||
``warn`` (the default for ``named-checkzone``), and ``ignore``.
|
``"warn"`` (default for ``named-checkzone``) and ``"ignore"``.
|
||||||
|
|
||||||
``-l ttl``
|
**-l** ttl
|
||||||
This option sets a maximum permissible TTL for the input file. Any record with a
|
Sets a maximum permissible TTL for the input file. Any record with a
|
||||||
TTL higher than this value causes the zone to be rejected. This
|
TTL higher than this value will cause the zone to be rejected. This
|
||||||
is similar to using the ``max-zone-ttl`` option in ``named.conf``.
|
is similar to using the ``max-zone-ttl`` option in ``named.conf``.
|
||||||
|
|
||||||
``-L serial``
|
**-L** serial
|
||||||
When compiling a zone to ``raw`` format, this option sets the "source
|
When compiling a zone to "raw" or "map" format, set the "source
|
||||||
serial" value in the header to the specified serial number. This is
|
serial" value in the header to the specified serial number. (This is
|
||||||
expected to be used primarily for testing purposes.
|
expected to be used primarily for testing purposes.)
|
||||||
|
|
||||||
``-m mode``
|
**-m** mode
|
||||||
This option specifies whether MX records should be checked to see if they are
|
Specify whether MX records should be checked to see if they are
|
||||||
addresses. Possible modes are ``fail``, ``warn`` (the default), and
|
addresses. Possible modes are ``"fail"``, ``"warn"`` (default) and
|
||||||
``ignore``.
|
``"ignore"``.
|
||||||
|
|
||||||
``-M mode``
|
**-M** mode
|
||||||
This option checks whether a MX record refers to a CNAME. Possible modes are
|
Check if a MX record refers to a CNAME. Possible modes are
|
||||||
``fail``, ``warn`` (the default), and ``ignore``.
|
``"fail"``, ``"warn"`` (default) and ``"ignore"``.
|
||||||
|
|
||||||
``-n mode``
|
**-n** mode
|
||||||
This option specifies whether NS records should be checked to see if they are
|
Specify whether NS records should be checked to see if they are
|
||||||
addresses. Possible modes are ``fail`` (the default for
|
addresses. Possible modes are ``"fail"`` (default for
|
||||||
``named-compilezone``), ``warn`` (the default for ``named-checkzone``),
|
``named-compilezone``), ``"warn"`` (default for ``named-checkzone``)
|
||||||
and ``ignore``.
|
and ``"ignore"``.
|
||||||
|
|
||||||
``-o filename``
|
**-o** filename
|
||||||
This option writes the zone output to ``filename``. If ``filename`` is ``-``, then
|
Write zone output to ``filename``. If ``filename`` is ``-`` then
|
||||||
the zone output is written to standard output. This is mandatory for ``named-compilezone``.
|
write to standard out. This is mandatory for ``named-compilezone``.
|
||||||
|
|
||||||
``-r mode``
|
**-r** mode
|
||||||
This option checks for records that are treated as different by DNSSEC but are
|
Check for records that are treated as different by DNSSEC but are
|
||||||
semantically equal in plain DNS. Possible modes are ``fail``,
|
semantically equal in plain DNS. Possible modes are ``"fail"``,
|
||||||
``warn`` (the default), and ``ignore``.
|
``"warn"`` (default) and ``"ignore"``.
|
||||||
|
|
||||||
``-s style``
|
**-s** style
|
||||||
This option specifies the style of the dumped zone file. Possible styles are
|
Specify the style of the dumped zone file. Possible styles are
|
||||||
``full`` (the default) and ``relative``. The ``full`` format is most
|
``"full"`` (default) and ``"relative"``. The full format is most
|
||||||
suitable for processing automatically by a separate script.
|
suitable for processing automatically by a separate script. On the
|
||||||
The relative format is more human-readable and is thus
|
other hand, the relative format is more human-readable and is thus
|
||||||
suitable for editing by hand. For ``named-checkzone``, this does not
|
suitable for editing by hand. For ``named-checkzone`` this does not
|
||||||
have any effect unless it dumps the zone contents. It also does not
|
cause any effects unless it dumps the zone contents. It also does not
|
||||||
have any meaning if the output format is not text.
|
have any meaning if the output format is not text.
|
||||||
|
|
||||||
``-S mode``
|
**-S** mode
|
||||||
This option checks whether an SRV record refers to a CNAME. Possible modes are
|
Check if a SRV record refers to a CNAME. Possible modes are
|
||||||
``fail``, ``warn`` (the default), and ``ignore``.
|
``"fail"``, ``"warn"`` (default) and ``"ignore"``.
|
||||||
|
|
||||||
``-t directory``
|
**-t** directory
|
||||||
This option tells ``named`` to chroot to ``directory``, so that ``include`` directives in the
|
Chroot to ``directory`` so that include directives in the
|
||||||
configuration file are processed as if run by a similarly chrooted
|
configuration file are processed as if run by a similarly chrooted
|
||||||
``named``.
|
``named``.
|
||||||
|
|
||||||
``-T mode``
|
**-T** mode
|
||||||
This option checks whether Sender Policy Framework (SPF) records exist and issues a
|
Check if Sender Policy Framework (SPF) records exist and issues a
|
||||||
warning if an SPF-formatted TXT record is not also present. Possible
|
warning if an SPF-formatted TXT record is not also present. Possible
|
||||||
modes are ``warn`` (the default) and ``ignore``.
|
modes are ``"warn"`` (default), ``"ignore"``.
|
||||||
|
|
||||||
``-w directory``
|
**-w** directory
|
||||||
This option instructs ``named`` to chdir to ``directory``, so that relative filenames in master file
|
chdir to ``directory`` so that relative filenames in master file
|
||||||
``$INCLUDE`` directives work. This is similar to the directory clause in
|
$INCLUDE directives work. This is similar to the directory clause in
|
||||||
``named.conf``.
|
``named.conf``.
|
||||||
|
|
||||||
``-D``
|
**-D**
|
||||||
This option dumps the zone file in canonical format. This is always enabled for
|
Dump zone file in canonical format. This is always enabled for
|
||||||
``named-compilezone``.
|
``named-compilezone``.
|
||||||
|
|
||||||
``-W mode``
|
**-W** mode
|
||||||
This option specifies whether to check for non-terminal wildcards. Non-terminal
|
Specify whether to check for non-terminal wildcards. Non-terminal
|
||||||
wildcards are almost always the result of a failure to understand the
|
wildcards are almost always the result of a failure to understand the
|
||||||
wildcard matching algorithm (:rfc:`1034`). Possible modes are ``warn``
|
wildcard matching algorithm (:rfc:`1034`). Possible modes are ``"warn"``
|
||||||
(the default) and ``ignore``.
|
(default) and ``"ignore"``.
|
||||||
|
|
||||||
``zonename``
|
zonename
|
||||||
This indicates the domain name of the zone being checked.
|
The domain name of the zone being checked.
|
||||||
|
|
||||||
``filename``
|
filename
|
||||||
This is the name of the zone file.
|
The name of the zone file.
|
||||||
|
|
||||||
Return Values
|
Return Values
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\check-tool.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\named-checkconf.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>checkconf</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
<TargetName>named-$(ProjectName)</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
<TargetName>named-$(ProjectName)</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\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>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\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>
|
||||||
|
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\check-tool.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\named-checkconf.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\ns\win32\libns.vcxproj">
|
||||||
|
<Project>{82ACD33C-E75F-45B8-BB6D-42643A10D7EE}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||||
|
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\bind9\win32\libbind9.vcxproj">
|
||||||
|
<Project>{E741C10B-B075-4206-9596-46765B665E03}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\bin\check\win32\checktool.vcxproj">
|
||||||
|
<Project>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\check-tool.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\check-tool.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>checktool</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<OutDir>.\$(Configuration)\</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<OutDir>.\$(Configuration)\</OutDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>.\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Lib>
|
||||||
|
<OutputFile>.\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
</Lib>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\ns\win32\libns.vcxproj">
|
||||||
|
<Project>{82ACD33C-E75F-45B8-BB6D-42643A10D7EE}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||||
|
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\check-tool.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\named-checkzone.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>checkzone</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
<TargetName>named-$(ProjectName)</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
<TargetName>named-$(ProjectName)</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>cd ..\..\..\Build\$(Configuration)
|
||||||
|
copy /Y named-checkzone.exe named-compilezone.exe
|
||||||
|
copy /Y named-checkzone.ilk named-compilezone.ilk
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>cd ..\..\..\Build\$(Configuration)
|
||||||
|
copy /Y named-checkzone.exe named-compilezone.exe
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\check-tool.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\named-checkzone.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\ns\win32\libns.vcxproj">
|
||||||
|
<Project>{82ACD33C-E75F-45B8-BB6D-42643A10D7EE}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||||
|
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\bin\check\win32\checktool.vcxproj">
|
||||||
|
<Project>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -5,7 +5,7 @@ AM_CPPFLAGS += \
|
|||||||
$(LIBDNS_CFLAGS) \
|
$(LIBDNS_CFLAGS) \
|
||||||
-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\"
|
-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\"
|
||||||
|
|
||||||
LDADD += \
|
LDADD = \
|
||||||
libconfgen.la \
|
libconfgen.la \
|
||||||
$(LIBISC_LIBS) \
|
$(LIBISC_LIBS) \
|
||||||
$(LIBDNS_LIBS)
|
$(LIBDNS_LIBS)
|
||||||
@@ -14,17 +14,17 @@ noinst_LTLIBRARIES = libconfgen.la
|
|||||||
|
|
||||||
libconfgen_la_SOURCES = \
|
libconfgen_la_SOURCES = \
|
||||||
include/confgen/os.h \
|
include/confgen/os.h \
|
||||||
keygen.c \
|
|
||||||
keygen.h \
|
keygen.h \
|
||||||
os.c \
|
keygen.c \
|
||||||
|
util.h \
|
||||||
util.c \
|
util.c \
|
||||||
util.h
|
unix/os.c
|
||||||
|
|
||||||
sbin_PROGRAMS = tsig-keygen rndc-confgen
|
sbin_PROGRAMS = ddns-confgen rndc-confgen
|
||||||
|
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
ln -f $(DESTDIR)$(sbindir)/tsig-keygen \
|
ln -f $(DESTDIR)$(sbindir)/ddns-confgen \
|
||||||
$(DESTDIR)$(sbindir)/ddns-confgen
|
$(DESTDIR)$(sbindir)/tsig-confgen
|
||||||
|
|
||||||
uninstall-hook:
|
uninstall-hook:
|
||||||
-rm -f $(DESTDIR)$(sbindir)/ddns-confgen
|
-rm -f $(DESTDIR)$(sbindir)/tsig-confgen
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -12,8 +12,9 @@
|
|||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tsig-keygen generates TSIG keys that can be used in named configuration
|
* ddns-confgen generates configuration files for dynamic DNS. It can
|
||||||
* files for dynamic DNS.
|
* be used as a convenient alternative to writing the ddns.key file
|
||||||
|
* and the corresponding key and update-policy statements in named.conf.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@@ -34,8 +35,13 @@
|
|||||||
#include <isc/time.h>
|
#include <isc/time.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
#include <pk11/result.h>
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
|
||||||
#include <dns/keyvalues.h>
|
#include <dns/keyvalues.h>
|
||||||
#include <dns/name.h>
|
#include <dns/name.h>
|
||||||
|
#include <dns/result.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
@@ -96,6 +102,11 @@ main(int argc, char **argv) {
|
|||||||
int len = 0;
|
int len = 0;
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
pk11_result_register();
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
dns_result_register();
|
||||||
|
|
||||||
result = isc_file_progname(*argv, program, sizeof(program));
|
result = isc_file_progname(*argv, program, sizeof(program));
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
memmove(program, "tsig-keygen", 11);
|
memmove(program, "tsig-keygen", 11);
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
..
|
||||||
|
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.
|
||||||
|
|
||||||
|
..
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
.. highlight: console
|
||||||
|
|
||||||
|
.. _man_ddns-confgen:
|
||||||
|
|
||||||
|
ddns-confgen - ddns key generation tool
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
~~~~~~~~
|
||||||
|
:program:`tsig-keygen` [**-a** algorithm] [**-h**] [**-r** randomfile] [**-s** name]
|
||||||
|
|
||||||
|
:program:`ddns-confgen` [**-a** algorithm] [**-h**] [**-k** keyname] [**-q**] [**-r** randomfile] [**-s** name] [**-z** zone]
|
||||||
|
|
||||||
|
Description
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
``tsig-keygen`` and ``ddns-confgen`` are invocation methods for a
|
||||||
|
utility that generates keys for use in TSIG signing. The resulting keys
|
||||||
|
can be used, for example, to secure dynamic DNS updates to a zone or for
|
||||||
|
the ``rndc`` command channel.
|
||||||
|
|
||||||
|
When run as ``tsig-keygen``, a domain name can be specified on the
|
||||||
|
command line which will be used as the name of the generated key. If no
|
||||||
|
name is specified, the default is ``tsig-key``.
|
||||||
|
|
||||||
|
When run as ``ddns-confgen``, the generated key is accompanied by
|
||||||
|
configuration text and instructions that can be used with ``nsupdate``
|
||||||
|
and ``named`` when setting up dynamic DNS, including an example
|
||||||
|
``update-policy`` statement. (This usage similar to the ``rndc-confgen``
|
||||||
|
command for setting up command channel security.)
|
||||||
|
|
||||||
|
Note that ``named`` itself can configure a local DDNS key for use with
|
||||||
|
``nsupdate -l``: it does this when a zone is configured with
|
||||||
|
``update-policy local;``. ``ddns-confgen`` is only needed when a more
|
||||||
|
elaborate configuration is required: for instance, if ``nsupdate`` is to
|
||||||
|
be used from a remote system.
|
||||||
|
|
||||||
|
Options
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
**-a** algorithm
|
||||||
|
Specifies the algorithm to use for the TSIG key. Available choices
|
||||||
|
are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384 and
|
||||||
|
hmac-sha512. The default is hmac-sha256. Options are
|
||||||
|
case-insensitive, and the "hmac-" prefix may be omitted.
|
||||||
|
|
||||||
|
**-h**
|
||||||
|
Prints a short summary of options and arguments.
|
||||||
|
|
||||||
|
**-k** keyname
|
||||||
|
Specifies the key name of the DDNS authentication key. The default is
|
||||||
|
``ddns-key`` when neither the ``-s`` nor ``-z`` option is specified;
|
||||||
|
otherwise, the default is ``ddns-key`` as a separate label followed
|
||||||
|
by the argument of the option, e.g., ``ddns-key.example.com.`` The
|
||||||
|
key name must have the format of a valid domain name, consisting of
|
||||||
|
letters, digits, hyphens and periods.
|
||||||
|
|
||||||
|
**-q**
|
||||||
|
(``ddns-confgen`` only.) Quiet mode: Print only the key, with no
|
||||||
|
explanatory text or usage examples; This is essentially identical to
|
||||||
|
``tsig-keygen``.
|
||||||
|
|
||||||
|
**-s** name
|
||||||
|
(``ddns-confgen`` only.) Generate configuration example to allow
|
||||||
|
dynamic updates of a single hostname. The example ``named.conf`` text
|
||||||
|
shows how to set an update policy for the specified name using the
|
||||||
|
"name" nametype. The default key name is ddns-key.name. Note that the
|
||||||
|
"self" nametype cannot be used, since the name to be updated may
|
||||||
|
differ from the key name. This option cannot be used with the ``-z``
|
||||||
|
option.
|
||||||
|
|
||||||
|
**-z** zone
|
||||||
|
(``ddns-confgen`` only.) Generate configuration example to allow
|
||||||
|
dynamic updates of a zone: The example ``named.conf`` text shows how
|
||||||
|
to set an update policy for the specified zone using the "zonesub"
|
||||||
|
nametype, allowing updates to all subdomain names within that zone.
|
||||||
|
This option cannot be used with the ``-s`` option.
|
||||||
|
|
||||||
|
See Also
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
:manpage:`nsupdate(1)`, :manpage:`named.conf(5)`, :manpage:`named(8)`, BIND 9 Administrator Reference Manual.
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#pragma once
|
#ifndef RNDC_OS_H
|
||||||
|
#define RNDC_OS_H 1
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@@ -29,3 +30,5 @@ set_user(FILE *fd, const char *user);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
ISC_LANG_ENDDECLS
|
ISC_LANG_ENDDECLS
|
||||||
|
|
||||||
|
#endif /* ifndef RNDC_OS_H */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -23,6 +23,8 @@
|
|||||||
#include <isc/result.h>
|
#include <isc/result.h>
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
|
|
||||||
|
#include <pk11/site.h>
|
||||||
|
|
||||||
#include <dns/keyvalues.h>
|
#include <dns/keyvalues.h>
|
||||||
#include <dns/name.h>
|
#include <dns/name.h>
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef RNDC_KEYGEN_H
|
||||||
|
#define RNDC_KEYGEN_H 1
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -37,3 +38,5 @@ int
|
|||||||
alg_bits(dns_secalg_t alg);
|
alg_bits(dns_secalg_t alg);
|
||||||
|
|
||||||
ISC_LANG_ENDDECLS
|
ISC_LANG_ENDDECLS
|
||||||
|
|
||||||
|
#endif /* RNDC_KEYGEN_H */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -38,6 +38,8 @@
|
|||||||
#include <isc/time.h>
|
#include <isc/time.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
|
#include <pk11/site.h>
|
||||||
|
|
||||||
#include <dns/keyvalues.h>
|
#include <dns/keyvalues.h>
|
||||||
#include <dns/name.h>
|
#include <dns/name.h>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -41,75 +41,79 @@ by hand. Alternatively, it can be run with the ``-a`` option to set up a
|
|||||||
``rndc.key`` file and avoid the need for a ``rndc.conf`` file and a
|
``rndc.key`` file and avoid the need for a ``rndc.conf`` file and a
|
||||||
``controls`` statement altogether.
|
``controls`` statement altogether.
|
||||||
|
|
||||||
Options
|
Arguments
|
||||||
~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
``-a``
|
**-a**
|
||||||
This option sets automatic ``rndc`` configuration, which creates a file ``rndc.key``
|
Do automatic ``rndc`` configuration. This creates a file ``rndc.key``
|
||||||
in ``/etc`` (or a different ``sysconfdir`` specified when BIND
|
in ``/etc`` (or whatever ``sysconfdir`` was specified as when BIND
|
||||||
was built) that is read by both ``rndc`` and ``named`` on startup.
|
was built) that is read by both ``rndc`` and ``named`` on startup.
|
||||||
The ``rndc.key`` file defines a default command channel and
|
The ``rndc.key`` file defines a default command channel and
|
||||||
authentication key allowing ``rndc`` to communicate with ``named`` on
|
authentication key allowing ``rndc`` to communicate with ``named`` on
|
||||||
the local host with no further configuration.
|
the local host with no further configuration.
|
||||||
|
|
||||||
|
Running ``rndc-confgen -a`` allows BIND 9 and ``rndc`` to be used as
|
||||||
|
drop-in replacements for BIND 8 and ``ndc``, with no changes to the
|
||||||
|
existing BIND 8 ``named.conf`` file.
|
||||||
|
|
||||||
If a more elaborate configuration than that generated by
|
If a more elaborate configuration than that generated by
|
||||||
``rndc-confgen -a`` is required, for example if rndc is to be used
|
``rndc-confgen -a`` is required, for example if rndc is to be used
|
||||||
remotely, run ``rndc-confgen`` without the ``-a`` option
|
remotely, you should run ``rndc-confgen`` without the ``-a`` option
|
||||||
and set up ``rndc.conf`` and ``named.conf`` as directed.
|
and set up a ``rndc.conf`` and ``named.conf`` as directed.
|
||||||
|
|
||||||
``-A algorithm``
|
**-A** algorithm
|
||||||
This option specifies the algorithm to use for the TSIG key. Available choices
|
Specifies the algorithm to use for the TSIG key. Available choices
|
||||||
are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384, and
|
are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384 and
|
||||||
hmac-sha512. The default is hmac-sha256.
|
hmac-sha512. The default is hmac-sha256.
|
||||||
|
|
||||||
``-b keysize``
|
**-b** keysize
|
||||||
This option specifies the size of the authentication key in bits. The size must be between
|
Specifies the size of the authentication key in bits. Must be between
|
||||||
1 and 512 bits; the default is the hash size.
|
1 and 512 bits; the default is the hash size.
|
||||||
|
|
||||||
``-c keyfile``
|
**-c** keyfile
|
||||||
This option is used with the ``-a`` option to specify an alternate location for
|
Used with the ``-a`` option to specify an alternate location for
|
||||||
``rndc.key``.
|
``rndc.key``.
|
||||||
|
|
||||||
``-h``
|
**-h**
|
||||||
This option prints a short summary of the options and arguments to
|
Prints a short summary of the options and arguments to
|
||||||
``rndc-confgen``.
|
``rndc-confgen``.
|
||||||
|
|
||||||
``-k keyname``
|
**-k** keyname
|
||||||
This option specifies the key name of the ``rndc`` authentication key. This must be a
|
Specifies the key name of the rndc authentication key. This must be a
|
||||||
valid domain name. The default is ``rndc-key``.
|
valid domain name. The default is ``rndc-key``.
|
||||||
|
|
||||||
``-p port``
|
**-p** port
|
||||||
This option specifies the command channel port where ``named`` listens for
|
Specifies the command channel port where ``named`` listens for
|
||||||
connections from ``rndc``. The default is 953.
|
connections from ``rndc``. The default is 953.
|
||||||
|
|
||||||
``-q``
|
**-q**
|
||||||
This option prevets printing the written path in automatic configuration mode.
|
Omits printing written path in automatic configuration mode.
|
||||||
|
|
||||||
``-s address``
|
**-s** address
|
||||||
This option specifies the IP address where ``named`` listens for command-channel
|
Specifies the IP address where ``named`` listens for command channel
|
||||||
connections from ``rndc``. The default is the loopback address
|
connections from ``rndc``. The default is the loopback address
|
||||||
127.0.0.1.
|
127.0.0.1.
|
||||||
|
|
||||||
``-t chrootdir``
|
**-t** chrootdir
|
||||||
This option is used with the ``-a`` option to specify a directory where ``named``
|
Used with the ``-a`` option to specify a directory where ``named``
|
||||||
runs chrooted. An additional copy of the ``rndc.key`` is
|
will run chrooted. An additional copy of the ``rndc.key`` will be
|
||||||
written relative to this directory, so that it is found by the
|
written relative to this directory so that it will be found by the
|
||||||
chrooted ``named``.
|
chrooted ``named``.
|
||||||
|
|
||||||
``-u user``
|
**-u** user
|
||||||
This option is used with the ``-a`` option to set the owner of the generated ``rndc.key`` file.
|
Used with the ``-a`` option to set the owner of the ``rndc.key`` file
|
||||||
If ``-t`` is also specified, only the file in the chroot
|
generated. If ``-t`` is also specified only the file in the chroot
|
||||||
area has its owner changed.
|
area has its owner changed.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
To allow ``rndc`` to be used with no manual configuration, run:
|
To allow ``rndc`` to be used with no manual configuration, run
|
||||||
|
|
||||||
``rndc-confgen -a``
|
``rndc-confgen -a``
|
||||||
|
|
||||||
To print a sample ``rndc.conf`` file and the corresponding ``controls`` and
|
To print a sample ``rndc.conf`` file and corresponding ``controls`` and
|
||||||
``key`` statements to be manually inserted into ``named.conf``, run:
|
``key`` statements to be manually inserted into ``named.conf``, run
|
||||||
|
|
||||||
``rndc-confgen``
|
``rndc-confgen``
|
||||||
|
|
||||||
|
|||||||
@@ -1,101 +0,0 @@
|
|||||||
..
|
|
||||||
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
||||||
|
|
||||||
This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
|
||||||
information regarding copyright ownership.
|
|
||||||
|
|
||||||
..
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
.. highlight: console
|
|
||||||
|
|
||||||
tsig-keygen, ddns-confgen - TSIG key generation tool
|
|
||||||
----------------------------------------------------
|
|
||||||
|
|
||||||
Synopsis
|
|
||||||
~~~~~~~~
|
|
||||||
:program:`tsig-keygen` [**-a** algorithm] [**-h**] [**-r** randomfile] [name]
|
|
||||||
|
|
||||||
:program:`ddns-confgen` [**-a** algorithm] [**-h**] [**-k** keyname] [**-q**] [**-r** randomfile] [**-s** name] [**-z** zone]
|
|
||||||
|
|
||||||
Description
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
``tsig-keygen`` and ``ddns-confgen`` are invocation methods for a
|
|
||||||
utility that generates keys for use in TSIG signing. The resulting keys
|
|
||||||
can be used, for example, to secure dynamic DNS updates to a zone, or for
|
|
||||||
the ``rndc`` command channel.
|
|
||||||
|
|
||||||
When run as ``tsig-keygen``, a domain name can be specified on the
|
|
||||||
command line to be used as the name of the generated key. If no
|
|
||||||
name is specified, the default is ``tsig-key``.
|
|
||||||
|
|
||||||
When run as ``ddns-confgen``, the key name can specified using ``-k``
|
|
||||||
parameter and defaults to ``ddns-key``. The generated key is accompanied
|
|
||||||
by configuration text and instructions that can be used with ``nsupdate``
|
|
||||||
and ``named`` when setting up dynamic DNS, including an example
|
|
||||||
``update-policy`` statement. (This usage is similar to the ``rndc-confgen``
|
|
||||||
command for setting up command-channel security.)
|
|
||||||
|
|
||||||
Note that ``named`` itself can configure a local DDNS key for use with
|
|
||||||
``nsupdate -l``; it does this when a zone is configured with
|
|
||||||
``update-policy local;``. ``ddns-confgen`` is only needed when a more
|
|
||||||
elaborate configuration is required: for instance, if ``nsupdate`` is to
|
|
||||||
be used from a remote system.
|
|
||||||
|
|
||||||
Options
|
|
||||||
~~~~~~~
|
|
||||||
|
|
||||||
``-a algorithm``
|
|
||||||
This option specifies the algorithm to use for the TSIG key. Available
|
|
||||||
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384,
|
|
||||||
and hmac-sha512. The default is hmac-sha256. Options are
|
|
||||||
case-insensitive, and the "hmac-" prefix may be omitted.
|
|
||||||
|
|
||||||
``-h``
|
|
||||||
This option prints a short summary of options and arguments.
|
|
||||||
|
|
||||||
``-k keyname``
|
|
||||||
This option specifies the key name of the DDNS authentication key. The
|
|
||||||
default is ``ddns-key`` when neither the ``-s`` nor ``-z`` option is
|
|
||||||
specified; otherwise, the default is ``ddns-key`` as a separate label
|
|
||||||
followed by the argument of the option, e.g., ``ddns-key.example.com.``
|
|
||||||
The key name must have the format of a valid domain name, consisting of
|
|
||||||
letters, digits, hyphens, and periods.
|
|
||||||
|
|
||||||
``-q`` (``ddns-confgen`` only)
|
|
||||||
This option enables quiet mode, which prints only the key, with no
|
|
||||||
explanatory text or usage examples. This is essentially identical to
|
|
||||||
``tsig-keygen``.
|
|
||||||
|
|
||||||
``-s name`` (``ddns-confgen`` only)
|
|
||||||
This option generates a configuration example to allow dynamic updates
|
|
||||||
of a single hostname. The example ``named.conf`` text shows how to set
|
|
||||||
an update policy for the specified name using the "name" nametype. The
|
|
||||||
default key name is ``ddns-key.name``. Note that the "self" nametype
|
|
||||||
cannot be used, since the name to be updated may differ from the key
|
|
||||||
name. This option cannot be used with the ``-z`` option.
|
|
||||||
|
|
||||||
``-z zone`` (``ddns-confgen`` only)
|
|
||||||
This option generates a configuration example to allow
|
|
||||||
dynamic updates of a zone. The example ``named.conf`` text shows how
|
|
||||||
to set an update policy for the specified zone using the "zonesub"
|
|
||||||
nametype, allowing updates to all subdomain names within that zone.
|
|
||||||
This option cannot be used with the ``-s`` option.
|
|
||||||
|
|
||||||
See Also
|
|
||||||
~~~~~~~~
|
|
||||||
|
|
||||||
:manpage:`nsupdate(1)`, :manpage:`named.conf(5)`, :manpage:`named(8)`, BIND 9 Administrator Reference Manual.
|
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
|
|||||||
+6
-2
@@ -3,19 +3,21 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef RNDC_UTIL_H
|
||||||
|
#define RNDC_UTIL_H 1
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#include <isc/attributes.h>
|
#include <isc/attributes.h>
|
||||||
#include <isc/formatcheck.h>
|
#include <isc/formatcheck.h>
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
|
#include <isc/platform.h>
|
||||||
|
|
||||||
#define NS_CONTROL_PORT 953
|
#define NS_CONTROL_PORT 953
|
||||||
|
|
||||||
@@ -38,3 +40,5 @@ ISC_NORETURN void
|
|||||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||||
|
|
||||||
ISC_LANG_ENDDECLS
|
ISC_LANG_ENDDECLS
|
||||||
|
|
||||||
|
#endif /* RNDC_UTIL_H */
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\keygen.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\util.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\include\confgen\os.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\keygen.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\util.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="os.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{64964B03-4815-41F0-9057-E766A94AF197}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>confgentool</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>.\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>.\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<LinkTimeCodeGeneration>false</LinkTimeCodeGeneration>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\include\confgen\os.h" />
|
||||||
|
<ClInclude Include="..\keygen.h" />
|
||||||
|
<ClInclude Include="..\util.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\keygen.c" />
|
||||||
|
<ClCompile Include="..\util.c" />
|
||||||
|
<ClCompile Include="os.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\ddns-confgen.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>ddnsconfgen</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
<TargetName>ddns-confgen</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
<TargetName>ddns-confgen</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>cd ..\..\..\Build\$(Configuration)
|
||||||
|
copy /Y ddns-confgen.exe tsig-keygen.exe
|
||||||
|
copy /Y ddns-confgen.ilk tsig-keygen.ilk
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>cd ..\..\..\Build\$(Configuration)
|
||||||
|
copy /Y ddns-confgen.exe tsig-keygen.exe
|
||||||
|
</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\ddns-confgen.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\bin\confgen\win32\confgentool.vcxproj">
|
||||||
|
<Project>{64964B03-4815-41F0-9057-E766A94AF197}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
+12
-10
@@ -9,15 +9,17 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
#include <errno.h>
|
||||||
* The dnssec-policy is not defined. Should also be caught if it is inherited.
|
#include <fcntl.h>
|
||||||
*/
|
#include <io.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
view "test" {
|
#include <confgen/os.h>
|
||||||
dnssec-policy "notdefined";
|
|
||||||
|
|
||||||
zone "example.net" {
|
int
|
||||||
type primary;
|
set_user(FILE *fd, const char *user) {
|
||||||
file "example.db";
|
return (0);
|
||||||
};
|
}
|
||||||
};
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\rndc-confgen.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{1E2C1635-3093-4D59-80E7-4743AC10F22F}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>rndcconfgen</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
<TargetName>rndc-confgen</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
<TargetName>rndc-confgen</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\rndc-confgen.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\bin\confgen\win32\confgentool.vcxproj">
|
||||||
|
<Project>{64964B03-4815-41F0-9057-E766A94AF197}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
+56
-30
@@ -3,24 +3,28 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <bind.keys.h>
|
#include <bind.keys.h>
|
||||||
#include <inttypes.h>
|
|
||||||
|
#ifndef WIN32
|
||||||
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif /* ifndef WIN32 */
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <isc/app.h>
|
#include <isc/app.h>
|
||||||
@@ -28,15 +32,17 @@
|
|||||||
#include <isc/base64.h>
|
#include <isc/base64.h>
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/hex.h>
|
#include <isc/hex.h>
|
||||||
|
#include <isc/lib.h>
|
||||||
#include <isc/log.h>
|
#include <isc/log.h>
|
||||||
#include <isc/managers.h>
|
|
||||||
#include <isc/md.h>
|
#include <isc/md.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/netmgr.h>
|
#ifdef WIN32
|
||||||
|
#include <isc/ntpaths.h>
|
||||||
|
#endif /* ifdef WIN32 */
|
||||||
#include <isc/parseint.h>
|
#include <isc/parseint.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/result.h>
|
|
||||||
#include <isc/sockaddr.h>
|
#include <isc/sockaddr.h>
|
||||||
|
#include <isc/socket.h>
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/task.h>
|
#include <isc/task.h>
|
||||||
#include <isc/timer.h>
|
#include <isc/timer.h>
|
||||||
@@ -47,6 +53,7 @@
|
|||||||
#include <dns/fixedname.h>
|
#include <dns/fixedname.h>
|
||||||
#include <dns/keytable.h>
|
#include <dns/keytable.h>
|
||||||
#include <dns/keyvalues.h>
|
#include <dns/keyvalues.h>
|
||||||
|
#include <dns/lib.h>
|
||||||
#include <dns/log.h>
|
#include <dns/log.h>
|
||||||
#include <dns/masterdump.h>
|
#include <dns/masterdump.h>
|
||||||
#include <dns/name.h>
|
#include <dns/name.h>
|
||||||
@@ -55,10 +62,12 @@
|
|||||||
#include <dns/rdataset.h>
|
#include <dns/rdataset.h>
|
||||||
#include <dns/rdatastruct.h>
|
#include <dns/rdatastruct.h>
|
||||||
#include <dns/rdatatype.h>
|
#include <dns/rdatatype.h>
|
||||||
|
#include <dns/result.h>
|
||||||
#include <dns/secalg.h>
|
#include <dns/secalg.h>
|
||||||
#include <dns/view.h>
|
#include <dns/view.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
#include <dst/result.h>
|
||||||
|
|
||||||
#include <isccfg/log.h>
|
#include <isccfg/log.h>
|
||||||
#include <isccfg/namedconf.h>
|
#include <isccfg/namedconf.h>
|
||||||
@@ -601,13 +610,11 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
|||||||
dns_name_t *keyname;
|
dns_name_t *keyname;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
bool match_root = false;
|
bool match_root = false;
|
||||||
enum {
|
enum { INITIAL_KEY,
|
||||||
INITIAL_KEY,
|
STATIC_KEY,
|
||||||
STATIC_KEY,
|
INITIAL_DS,
|
||||||
INITIAL_DS,
|
STATIC_DS,
|
||||||
STATIC_DS,
|
TRUSTED } anchortype;
|
||||||
TRUSTED
|
|
||||||
} anchortype;
|
|
||||||
const cfg_obj_t *obj;
|
const cfg_obj_t *obj;
|
||||||
|
|
||||||
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
||||||
@@ -810,7 +817,14 @@ setup_dnsseckeys(dns_client_t *client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (filename == NULL) {
|
if (filename == NULL) {
|
||||||
|
#ifndef WIN32
|
||||||
filename = SYSCONFDIR "/bind.keys";
|
filename = SYSCONFDIR "/bind.keys";
|
||||||
|
#else /* ifndef WIN32 */
|
||||||
|
static char buf[MAX_PATH];
|
||||||
|
strlcpy(buf, isc_ntpaths_get(SYS_CONF_DIR), sizeof(buf));
|
||||||
|
strlcat(buf, "\\bind.keys", sizeof(buf));
|
||||||
|
filename = buf;
|
||||||
|
#endif /* ifndef WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trust_anchor == NULL) {
|
if (trust_anchor == NULL) {
|
||||||
@@ -1720,11 +1734,13 @@ main(int argc, char *argv[]) {
|
|||||||
dns_namelist_t namelist;
|
dns_namelist_t namelist;
|
||||||
unsigned int resopt;
|
unsigned int resopt;
|
||||||
isc_appctx_t *actx = NULL;
|
isc_appctx_t *actx = NULL;
|
||||||
isc_nm_t *netmgr = NULL;
|
|
||||||
isc_taskmgr_t *taskmgr = NULL;
|
isc_taskmgr_t *taskmgr = NULL;
|
||||||
|
isc_socketmgr_t *socketmgr = NULL;
|
||||||
isc_timermgr_t *timermgr = NULL;
|
isc_timermgr_t *timermgr = NULL;
|
||||||
dns_master_style_t *style = NULL;
|
dns_master_style_t *style = NULL;
|
||||||
|
#ifndef WIN32
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
|
#endif /* ifndef WIN32 */
|
||||||
|
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
preparse_args(argc, argv);
|
preparse_args(argc, argv);
|
||||||
@@ -1732,16 +1748,18 @@ main(int argc, char *argv[]) {
|
|||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
|
|
||||||
isc_mem_create(&mctx);
|
isc_lib_register();
|
||||||
|
result = dns_lib_init();
|
||||||
result = dst_lib_init(mctx, NULL);
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
fatal("dst_lib_init failed: %d", result);
|
fatal("dns_lib_init failed: %d", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECK(isc_appctx_create(mctx, &actx));
|
isc_mem_create(&mctx);
|
||||||
|
|
||||||
isc_managers_create(mctx, 1, 0, &netmgr, &taskmgr, &timermgr);
|
CHECK(isc_appctx_create(mctx, &actx));
|
||||||
|
CHECK(isc_taskmgr_createinctx(mctx, 1, 0, &taskmgr));
|
||||||
|
CHECK(isc_socketmgr_createinctx(mctx, &socketmgr));
|
||||||
|
CHECK(isc_timermgr_createinctx(mctx, &timermgr));
|
||||||
|
|
||||||
parse_args(argc, argv);
|
parse_args(argc, argv);
|
||||||
|
|
||||||
@@ -1751,16 +1769,18 @@ main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
CHECK(isc_app_ctxstart(actx));
|
CHECK(isc_app_ctxstart(actx));
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
/* Unblock SIGINT if it's been blocked by isc_app_ctxstart() */
|
/* Unblock SIGINT if it's been blocked by isc_app_ctxstart() */
|
||||||
memset(&sa, 0, sizeof(sa));
|
memset(&sa, 0, sizeof(sa));
|
||||||
sa.sa_handler = SIG_DFL;
|
sa.sa_handler = SIG_DFL;
|
||||||
if (sigfillset(&sa.sa_mask) != 0 || sigaction(SIGINT, &sa, NULL) < 0) {
|
if (sigfillset(&sa.sa_mask) != 0 || sigaction(SIGINT, &sa, NULL) < 0) {
|
||||||
fatal("Couldn't set up signal handler");
|
fatal("Couldn't set up signal handler");
|
||||||
}
|
}
|
||||||
|
#endif /* ifndef WIN32 */
|
||||||
|
|
||||||
/* Create client */
|
/* Create client */
|
||||||
result = dns_client_create(mctx, actx, taskmgr, netmgr, timermgr, 0,
|
result = dns_client_createx(mctx, actx, taskmgr, socketmgr, timermgr, 0,
|
||||||
&client, srcaddr4, srcaddr6);
|
&client, srcaddr4, srcaddr6);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
delv_log(ISC_LOG_ERROR, "dns_client_create: %s",
|
delv_log(ISC_LOG_ERROR, "dns_client_create: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
@@ -1780,7 +1800,7 @@ main(int argc, char *argv[]) {
|
|||||||
CHECK(convert_name(&qfn, &query_name, qname));
|
CHECK(convert_name(&qfn, &query_name, qname));
|
||||||
|
|
||||||
/* Set up resolution options */
|
/* Set up resolution options */
|
||||||
resopt = DNS_CLIENTRESOPT_NOCDFLAG;
|
resopt = DNS_CLIENTRESOPT_ALLOWRUN | DNS_CLIENTRESOPT_NOCDFLAG;
|
||||||
if (no_sigs) {
|
if (no_sigs) {
|
||||||
resopt |= DNS_CLIENTRESOPT_NODNSSEC;
|
resopt |= DNS_CLIENTRESOPT_NODNSSEC;
|
||||||
}
|
}
|
||||||
@@ -1840,11 +1860,17 @@ cleanup:
|
|||||||
dns_master_styledestroy(&style, mctx);
|
dns_master_styledestroy(&style, mctx);
|
||||||
}
|
}
|
||||||
if (client != NULL) {
|
if (client != NULL) {
|
||||||
dns_client_detach(&client);
|
dns_client_destroy(&client);
|
||||||
|
}
|
||||||
|
if (taskmgr != NULL) {
|
||||||
|
isc_taskmgr_destroy(&taskmgr);
|
||||||
|
}
|
||||||
|
if (timermgr != NULL) {
|
||||||
|
isc_timermgr_destroy(&timermgr);
|
||||||
|
}
|
||||||
|
if (socketmgr != NULL) {
|
||||||
|
isc_socketmgr_destroy(&socketmgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_managers_destroy(&netmgr, &taskmgr, &timermgr);
|
|
||||||
|
|
||||||
if (actx != NULL) {
|
if (actx != NULL) {
|
||||||
isc_appctx_destroy(&actx);
|
isc_appctx_destroy(&actx);
|
||||||
}
|
}
|
||||||
@@ -1853,7 +1879,7 @@ cleanup:
|
|||||||
}
|
}
|
||||||
isc_mem_detach(&mctx);
|
isc_mem_detach(&mctx);
|
||||||
|
|
||||||
dst_lib_destroy();
|
dns_lib_shutdown();
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|||||||
+90
-90
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -43,15 +43,15 @@ Description
|
|||||||
``delv`` is a tool for sending DNS queries and validating the results,
|
``delv`` is a tool for sending DNS queries and validating the results,
|
||||||
using the same internal resolver and validator logic as ``named``.
|
using the same internal resolver and validator logic as ``named``.
|
||||||
|
|
||||||
``delv`` sends to a specified name server all queries needed to
|
``delv`` will send to a specified name server all queries needed to
|
||||||
fetch and validate the requested data; this includes the original
|
fetch and validate the requested data; this includes the original
|
||||||
requested query, subsequent queries to follow CNAME or DNAME chains,
|
requested query, subsequent queries to follow CNAME or DNAME chains, and
|
||||||
queries for DNSKEY, and DS records to establish a chain of trust for
|
queries for DNSKEY, and DS records to establish a chain of trust for
|
||||||
DNSSEC validation. It does not perform iterative resolution, but
|
DNSSEC validation. It does not perform iterative resolution, but
|
||||||
simulates the behavior of a name server configured for DNSSEC validating
|
simulates the behavior of a name server configured for DNSSEC validating
|
||||||
and forwarding.
|
and forwarding.
|
||||||
|
|
||||||
By default, responses are validated using the built-in DNSSEC trust anchor
|
By default, responses are validated using built-in DNSSEC trust anchor
|
||||||
for the root zone ("."). Records returned by ``delv`` are either fully
|
for the root zone ("."). Records returned by ``delv`` are either fully
|
||||||
validated or were not signed. If validation fails, an explanation of the
|
validated or were not signed. If validation fails, an explanation of the
|
||||||
failure is included in the output; the validation process can be traced
|
failure is included in the output; the validation process can be traced
|
||||||
@@ -59,13 +59,13 @@ in detail. Because ``delv`` does not rely on an external server to carry
|
|||||||
out validation, it can be used to check the validity of DNS responses in
|
out validation, it can be used to check the validity of DNS responses in
|
||||||
environments where local name servers may not be trustworthy.
|
environments where local name servers may not be trustworthy.
|
||||||
|
|
||||||
Unless it is told to query a specific name server, ``delv`` tries
|
Unless it is told to query a specific name server, ``delv`` will try
|
||||||
each of the servers listed in ``/etc/resolv.conf``. If no usable server
|
each of the servers listed in ``/etc/resolv.conf``. If no usable server
|
||||||
addresses are found, ``delv`` sends queries to the localhost
|
addresses are found, ``delv`` will send queries to the localhost
|
||||||
addresses (127.0.0.1 for IPv4, ::1 for IPv6).
|
addresses (127.0.0.1 for IPv4, ::1 for IPv6).
|
||||||
|
|
||||||
When no command-line arguments or options are given, ``delv``
|
When no command line arguments or options are given, ``delv`` will
|
||||||
performs an NS query for "." (the root zone).
|
perform an NS query for "." (the root zone).
|
||||||
|
|
||||||
Simple Usage
|
Simple Usage
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
@@ -89,109 +89,109 @@ where:
|
|||||||
If no ``server`` argument is provided, ``delv`` consults
|
If no ``server`` argument is provided, ``delv`` consults
|
||||||
``/etc/resolv.conf``; if an address is found there, it queries the
|
``/etc/resolv.conf``; if an address is found there, it queries the
|
||||||
name server at that address. If either of the ``-4`` or ``-6``
|
name server at that address. If either of the ``-4`` or ``-6``
|
||||||
options is in use, then only addresses for the corresponding
|
options are in use, then only addresses for the corresponding
|
||||||
transport are tried. If no usable addresses are found, ``delv``
|
transport will be tried. If no usable addresses are found, ``delv``
|
||||||
sends queries to the localhost addresses (127.0.0.1 for IPv4, ::1
|
will send queries to the localhost addresses (127.0.0.1 for IPv4, ::1
|
||||||
for IPv6).
|
for IPv6).
|
||||||
|
|
||||||
``name``
|
``name``
|
||||||
is the domain name to be looked up.
|
is the domain name to be looked up.
|
||||||
|
|
||||||
``type``
|
``type``
|
||||||
indicates what type of query is required - ANY, A, MX, etc.
|
indicates what type of query is required MDASH ANY, A, MX, etc.
|
||||||
``type`` can be any valid query type. If no ``type`` argument is
|
``type`` can be any valid query type. If no ``type`` argument is
|
||||||
supplied, ``delv`` performs a lookup for an A record.
|
supplied, ``delv`` will perform a lookup for an A record.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-a anchor-file``
|
**-a** anchor-file
|
||||||
This option specifies a file from which to read DNSSEC trust anchors. The default
|
Specifies a file from which to read DNSSEC trust anchors. The default
|
||||||
is ``/etc/bind.keys``, which is included with BIND 9 and contains one
|
is ``/etc/bind.keys``, which is included with BIND 9 and contains one
|
||||||
or more trust anchors for the root zone (".").
|
or more trust anchors for the root zone (".").
|
||||||
|
|
||||||
Keys that do not match the root zone name are ignored. An alternate
|
Keys that do not match the root zone name are ignored. An alternate
|
||||||
key name can be specified using the ``+root=NAME`` options.
|
key name can be specified using the ``+root=NAME`` options.
|
||||||
|
|
||||||
Note: When reading the trust anchor file, ``delv`` treats ``trust-anchors``,
|
Note: When reading the trust anchor file, ``delv`` treat ``trust-anchors``
|
||||||
``initial-key``, and ``static-key`` identically. That is, for a managed key,
|
``initial-key`` and ``static-key`` identically. That is, for a managed key,
|
||||||
it is the *initial* key that is trusted; :rfc:`5011` key management is not
|
it is the *initial* key that is trusted; :rfc:`5011` key management is not
|
||||||
supported. ``delv`` does not consult the managed-keys database maintained by
|
supported. ``delv`` will not consult the managed-keys database maintained by
|
||||||
``named``, which means that if either of the keys in ``/etc/bind.keys`` is
|
``named``. This means that if either of the keys in ``/etc/bind.keys`` is
|
||||||
revoked and rolled over, ``/etc/bind.keys`` must be updated to
|
revoked and rolled over, it will be necessary to update ``/etc/bind.keys`` to
|
||||||
use DNSSEC validation in ``delv``.
|
use DNSSEC validation in ``delv``.
|
||||||
|
|
||||||
``-b address``
|
**-b** address
|
||||||
This option sets the source IP address of the query to ``address``. This must be
|
Sets the source IP address of the query to ``address``. This must be
|
||||||
a valid address on one of the host's network interfaces, or ``0.0.0.0``,
|
a valid address on one of the host's network interfaces or "0.0.0.0"
|
||||||
or ``::``. An optional source port may be specified by appending
|
or "::". An optional source port may be specified by appending
|
||||||
``#<port>``
|
"#<port>"
|
||||||
|
|
||||||
``-c class``
|
**-c** class
|
||||||
This option sets the query class for the requested data. Currently, only class
|
Sets the query class for the requested data. Currently, only class
|
||||||
"IN" is supported in ``delv`` and any other value is ignored.
|
"IN" is supported in ``delv`` and any other value is ignored.
|
||||||
|
|
||||||
``-d level``
|
**-d** level
|
||||||
This option sets the systemwide debug level to ``level``. The allowed range is
|
Set the systemwide debug level to ``level``. The allowed range is
|
||||||
from 0 to 99. The default is 0 (no debugging). Debugging traces from
|
from 0 to 99. The default is 0 (no debugging). Debugging traces from
|
||||||
``delv`` become more verbose as the debug level increases. See the
|
``delv`` become more verbose as the debug level increases. See the
|
||||||
``+mtrace``, ``+rtrace``, and ``+vtrace`` options below for
|
``+mtrace``, ``+rtrace``, and ``+vtrace`` options below for
|
||||||
additional debugging details.
|
additional debugging details.
|
||||||
|
|
||||||
``-h``
|
**-h**
|
||||||
This option displays the ``delv`` help usage output and exits.
|
Display the ``delv`` help usage output and exit.
|
||||||
|
|
||||||
``-i``
|
**-i**
|
||||||
This option sets insecure mode, which disables internal DNSSEC validation. (Note,
|
Insecure mode. This disables internal DNSSEC validation. (Note,
|
||||||
however, that this does not set the CD bit on upstream queries. If the
|
however, this does not set the CD bit on upstream queries. If the
|
||||||
server being queried is performing DNSSEC validation, then it does
|
server being queried is performing DNSSEC validation, then it will
|
||||||
not return invalid data; this can cause ``delv`` to time out. When it
|
not return invalid data; this can cause ``delv`` to time out. When it
|
||||||
is necessary to examine invalid data to debug a DNSSEC problem, use
|
is necessary to examine invalid data to debug a DNSSEC problem, use
|
||||||
``dig +cd``.)
|
``dig +cd``.)
|
||||||
|
|
||||||
``-m``
|
**-m**
|
||||||
This option enables memory usage debugging.
|
Enables memory usage debugging.
|
||||||
|
|
||||||
``-p port#``
|
**-p** port#
|
||||||
This option specifies a destination port to use for queries, instead of the
|
Specifies a destination port to use for queries instead of the
|
||||||
standard DNS port number 53. This option is used with a name
|
standard DNS port number 53. This option would be used with a name
|
||||||
server that has been configured to listen for queries on a
|
server that has been configured to listen for queries on a
|
||||||
non-standard port number.
|
non-standard port number.
|
||||||
|
|
||||||
``-q name``
|
**-q** name
|
||||||
This option sets the query name to ``name``. While the query name can be
|
Sets the query name to ``name``. While the query name can be
|
||||||
specified without using the ``-q`` option, it is sometimes necessary to
|
specified without using the ``-q``, it is sometimes necessary to
|
||||||
disambiguate names from types or classes (for example, when looking
|
disambiguate names from types or classes (for example, when looking
|
||||||
up the name "ns", which could be misinterpreted as the type NS, or
|
up the name "ns", which could be misinterpreted as the type NS, or
|
||||||
"ch", which could be misinterpreted as class CH).
|
"ch", which could be misinterpreted as class CH).
|
||||||
|
|
||||||
``-t type``
|
**-t** type
|
||||||
This option sets the query type to ``type``, which can be any valid query type
|
Sets the query type to ``type``, which can be any valid query type
|
||||||
supported in BIND 9 except for zone transfer types AXFR and IXFR. As
|
supported in BIND 9 except for zone transfer types AXFR and IXFR. As
|
||||||
with ``-q``, this is useful to distinguish query-name types or classes
|
with ``-q``, this is useful to distinguish query name type or class
|
||||||
when they are ambiguous. It is sometimes necessary to disambiguate
|
when they are ambiguous. it is sometimes necessary to disambiguate
|
||||||
names from types.
|
names from types.
|
||||||
|
|
||||||
The default query type is "A", unless the ``-x`` option is supplied
|
The default query type is "A", unless the ``-x`` option is supplied
|
||||||
to indicate a reverse lookup, in which case it is "PTR".
|
to indicate a reverse lookup, in which case it is "PTR".
|
||||||
|
|
||||||
``-v``
|
**-v**
|
||||||
This option prints the ``delv`` version and exits.
|
Print the ``delv`` version and exit.
|
||||||
|
|
||||||
``-x addr``
|
**-x** addr
|
||||||
This option performs a reverse lookup, mapping an address to a name. ``addr``
|
Performs a reverse lookup, mapping an addresses to a name. ``addr``
|
||||||
is an IPv4 address in dotted-decimal notation, or a colon-delimited
|
is an IPv4 address in dotted-decimal notation, or a colon-delimited
|
||||||
IPv6 address. When ``-x`` is used, there is no need to provide the
|
IPv6 address. When ``-x`` is used, there is no need to provide the
|
||||||
``name`` or ``type`` arguments; ``delv`` automatically performs a
|
``name`` or ``type`` arguments. ``delv`` automatically performs a
|
||||||
lookup for a name like ``11.12.13.10.in-addr.arpa`` and sets the
|
lookup for a name like ``11.12.13.10.in-addr.arpa`` and sets the
|
||||||
query type to PTR. IPv6 addresses are looked up using nibble format
|
query type to PTR. IPv6 addresses are looked up using nibble format
|
||||||
under the IP6.ARPA domain.
|
under the IP6.ARPA domain.
|
||||||
|
|
||||||
``-4``
|
**-4**
|
||||||
This option forces ``delv`` to only use IPv4.
|
Forces ``delv`` to only use IPv4.
|
||||||
|
|
||||||
``-6``
|
**-6**
|
||||||
This option forces ``delv`` to only use IPv6.
|
Forces ``delv`` to only use IPv6.
|
||||||
|
|
||||||
Query Options
|
Query Options
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
@@ -206,122 +206,122 @@ assign values to options like the timeout interval. They have the form
|
|||||||
``+keyword=value``. The query options are:
|
``+keyword=value``. The query options are:
|
||||||
|
|
||||||
``+[no]cdflag``
|
``+[no]cdflag``
|
||||||
This option controls whether to set the CD (checking disabled) bit in queries
|
Controls whether to set the CD (checking disabled) bit in queries
|
||||||
sent by ``delv``. This may be useful when troubleshooting DNSSEC
|
sent by ``delv``. This may be useful when troubleshooting DNSSEC
|
||||||
problems from behind a validating resolver. A validating resolver
|
problems from behind a validating resolver. A validating resolver
|
||||||
blocks invalid responses, making it difficult to retrieve them
|
will block invalid responses, making it difficult to retrieve them
|
||||||
for analysis. Setting the CD flag on queries causes the resolver
|
for analysis. Setting the CD flag on queries will cause the resolver
|
||||||
to return invalid responses, which ``delv`` can then validate
|
to return invalid responses, which ``delv`` can then validate
|
||||||
internally and report the errors in detail.
|
internally and report the errors in detail.
|
||||||
|
|
||||||
``+[no]class``
|
``+[no]class``
|
||||||
This option controls whether to display the CLASS when printing a record. The
|
Controls whether to display the CLASS when printing a record. The
|
||||||
default is to display the CLASS.
|
default is to display the CLASS.
|
||||||
|
|
||||||
``+[no]ttl``
|
``+[no]ttl``
|
||||||
This option controls whether to display the TTL when printing a record. The
|
Controls whether to display the TTL when printing a record. The
|
||||||
default is to display the TTL.
|
default is to display the TTL.
|
||||||
|
|
||||||
``+[no]rtrace``
|
``+[no]rtrace``
|
||||||
This option toggles resolver fetch logging. This reports the name and type of each
|
Toggle resolver fetch logging. This reports the name and type of each
|
||||||
query sent by ``delv`` in the process of carrying out the resolution
|
query sent by ``delv`` in the process of carrying out the resolution
|
||||||
and validation process, including the original query
|
and validation process: this includes including the original query
|
||||||
and all subsequent queries to follow CNAMEs and to establish a chain
|
and all subsequent queries to follow CNAMEs and to establish a chain
|
||||||
of trust for DNSSEC validation.
|
of trust for DNSSEC validation.
|
||||||
|
|
||||||
This is equivalent to setting the debug level to 1 in the "resolver"
|
This is equivalent to setting the debug level to 1 in the "resolver"
|
||||||
logging category. Setting the systemwide debug level to 1 using the
|
logging category. Setting the systemwide debug level to 1 using the
|
||||||
``-d`` option produces the same output, but affects other
|
``-d`` option will product the same output (but will affect other
|
||||||
logging categories as well.
|
logging categories as well).
|
||||||
|
|
||||||
``+[no]mtrace``
|
``+[no]mtrace``
|
||||||
This option toggles message logging. This produces a detailed dump of the
|
Toggle message logging. This produces a detailed dump of the
|
||||||
responses received by ``delv`` in the process of carrying out the
|
responses received by ``delv`` in the process of carrying out the
|
||||||
resolution and validation process.
|
resolution and validation process.
|
||||||
|
|
||||||
This is equivalent to setting the debug level to 10 for the "packets"
|
This is equivalent to setting the debug level to 10 for the "packets"
|
||||||
module of the "resolver" logging category. Setting the systemwide
|
module of the "resolver" logging category. Setting the systemwide
|
||||||
debug level to 10 using the ``-d`` option produces the same
|
debug level to 10 using the ``-d`` option will produce the same
|
||||||
output, but affects other logging categories as well.
|
output (but will affect other logging categories as well).
|
||||||
|
|
||||||
``+[no]vtrace``
|
``+[no]vtrace``
|
||||||
This option toggles validation logging. This shows the internal process of the
|
Toggle validation logging. This shows the internal process of the
|
||||||
validator as it determines whether an answer is validly signed,
|
validator as it determines whether an answer is validly signed,
|
||||||
unsigned, or invalid.
|
unsigned, or invalid.
|
||||||
|
|
||||||
This is equivalent to setting the debug level to 3 for the
|
This is equivalent to setting the debug level to 3 for the
|
||||||
"validator" module of the "dnssec" logging category. Setting the
|
"validator" module of the "dnssec" logging category. Setting the
|
||||||
systemwide debug level to 3 using the ``-d`` option produces the
|
systemwide debug level to 3 using the ``-d`` option will produce the
|
||||||
same output, but affects other logging categories as well.
|
same output (but will affect other logging categories as well).
|
||||||
|
|
||||||
``+[no]short``
|
``+[no]short``
|
||||||
This option toggles between verbose and terse answers. The default is to print the answer in a
|
Provide a terse answer. The default is to print the answer in a
|
||||||
verbose form.
|
verbose form.
|
||||||
|
|
||||||
``+[no]comments``
|
``+[no]comments``
|
||||||
This option toggles the display of comment lines in the output. The default is to
|
Toggle the display of comment lines in the output. The default is to
|
||||||
print comments.
|
print comments.
|
||||||
|
|
||||||
``+[no]rrcomments``
|
``+[no]rrcomments``
|
||||||
This option toggles the display of per-record comments in the output (for example,
|
Toggle the display of per-record comments in the output (for example,
|
||||||
human-readable key information about DNSKEY records). The default is
|
human-readable key information about DNSKEY records). The default is
|
||||||
to print per-record comments.
|
to print per-record comments.
|
||||||
|
|
||||||
``+[no]crypto``
|
``+[no]crypto``
|
||||||
This option toggles the display of cryptographic fields in DNSSEC records. The
|
Toggle the display of cryptographic fields in DNSSEC records. The
|
||||||
contents of these fields are unnecessary to debug most DNSSEC
|
contents of these field are unnecessary to debug most DNSSEC
|
||||||
validation failures and removing them makes it easier to see the
|
validation failures and removing them makes it easier to see the
|
||||||
common failures. The default is to display the fields. When omitted,
|
common failures. The default is to display the fields. When omitted
|
||||||
they are replaced by the string ``[omitted]`` or, in the DNSKEY case, the
|
they are replaced by the string "[omitted]" or in the DNSKEY case the
|
||||||
key ID is displayed as the replacement, e.g. ``[ key id = value ]``.
|
key id is displayed as the replacement, e.g. "[ key id = value ]".
|
||||||
|
|
||||||
``+[no]trust``
|
``+[no]trust``
|
||||||
This option controls whether to display the trust level when printing a record.
|
Controls whether to display the trust level when printing a record.
|
||||||
The default is to display the trust level.
|
The default is to display the trust level.
|
||||||
|
|
||||||
``+[no]split[=W]``
|
``+[no]split[=W]``
|
||||||
This option splits long hex- or base64-formatted fields in resource records into
|
Split long hex- or base64-formatted fields in resource records into
|
||||||
chunks of ``W`` characters (where ``W`` is rounded up to the nearest
|
chunks of ``W`` characters (where ``W`` is rounded up to the nearest
|
||||||
multiple of 4). ``+nosplit`` or ``+split=0`` causes fields not to be
|
multiple of 4). ``+nosplit`` or ``+split=0`` causes fields not to be
|
||||||
split at all. The default is 56 characters, or 44 characters when
|
split at all. The default is 56 characters, or 44 characters when
|
||||||
multiline mode is active.
|
multiline mode is active.
|
||||||
|
|
||||||
``+[no]all``
|
``+[no]all``
|
||||||
This option sets or clears the display options ``+[no]comments``,
|
Set or clear the display options ``+[no]comments``,
|
||||||
``+[no]rrcomments``, and ``+[no]trust`` as a group.
|
``+[no]rrcomments``, and ``+[no]trust`` as a group.
|
||||||
|
|
||||||
``+[no]multiline``
|
``+[no]multiline``
|
||||||
This option prints long records (such as RRSIG, DNSKEY, and SOA records) in a
|
Print long records (such as RRSIG, DNSKEY, and SOA records) in a
|
||||||
verbose multi-line format with human-readable comments. The default
|
verbose multi-line format with human-readable comments. The default
|
||||||
is to print each record on a single line, to facilitate machine
|
is to print each record on a single line, to facilitate machine
|
||||||
parsing of the ``delv`` output.
|
parsing of the ``delv`` output.
|
||||||
|
|
||||||
``+[no]dnssec``
|
``+[no]dnssec``
|
||||||
This option indicates whether to display RRSIG records in the ``delv`` output.
|
Indicates whether to display RRSIG records in the ``delv`` output.
|
||||||
The default is to do so. Note that (unlike in ``dig``) this does
|
The default is to do so. Note that (unlike in ``dig``) this does
|
||||||
*not* control whether to request DNSSEC records or to
|
*not* control whether to request DNSSEC records or whether to
|
||||||
validate them. DNSSEC records are always requested, and validation
|
validate them. DNSSEC records are always requested, and validation
|
||||||
always occurs unless suppressed by the use of ``-i`` or
|
will always occur unless suppressed by the use of ``-i`` or
|
||||||
``+noroot``.
|
``+noroot``.
|
||||||
|
|
||||||
``+[no]root[=ROOT]``
|
``+[no]root[=ROOT]``
|
||||||
This option indicates whether to perform conventional DNSSEC validation, and if so,
|
Indicates whether to perform conventional DNSSEC validation, and if so,
|
||||||
specifies the name of a trust anchor. The default is to validate using a
|
specifies the name of a trust anchor. The default is to validate using a
|
||||||
trust anchor of "." (the root zone), for which there is a built-in key. If
|
trust anchor of "." (the root zone), for which there is a built-in key. If
|
||||||
specifying a different trust anchor, then ``-a`` must be used to specify a
|
specifying a different trust anchor, then ``-a`` must be used to specify a
|
||||||
file containing the key.
|
file containing the key.
|
||||||
|
|
||||||
``+[no]tcp``
|
``+[no]tcp``
|
||||||
This option controls whether to use TCP when sending queries. The default is to
|
Controls whether to use TCP when sending queries. The default is to
|
||||||
use UDP unless a truncated response has been received.
|
use UDP unless a truncated response has been received.
|
||||||
|
|
||||||
``+[no]unknownformat``
|
``+[no]unknownformat``
|
||||||
This option prints all RDATA in unknown RR-type presentation format (:rfc:`3597`).
|
Print all RDATA in unknown RR type presentation format (:rfc:`3597`).
|
||||||
The default is to print RDATA for known types in the type's
|
The default is to print RDATA for known types in the type's
|
||||||
presentation format.
|
presentation format.
|
||||||
|
|
||||||
``+[no]yaml``
|
``+[no]yaml``
|
||||||
This option prints response data in YAML format.
|
Print response data in YAML format.
|
||||||
|
|
||||||
Files
|
Files
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\delv.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>delv</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\delv.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||||
|
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\irs\win32\libirs.vcxproj">
|
||||||
|
<Project>{A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
+6
-15
@@ -8,7 +8,7 @@ AM_CPPFLAGS += \
|
|||||||
$(LIBBIND9_CFLAGS) \
|
$(LIBBIND9_CFLAGS) \
|
||||||
$(LIBIDN2_CFLAGS)
|
$(LIBIDN2_CFLAGS)
|
||||||
|
|
||||||
LDADD += \
|
LDADD = \
|
||||||
libdighost.la \
|
libdighost.la \
|
||||||
$(LIBISC_LIBS) \
|
$(LIBISC_LIBS) \
|
||||||
$(LIBDNS_LIBS) \
|
$(LIBDNS_LIBS) \
|
||||||
@@ -19,21 +19,12 @@ LDADD += \
|
|||||||
|
|
||||||
noinst_LTLIBRARIES = libdighost.la
|
noinst_LTLIBRARIES = libdighost.la
|
||||||
|
|
||||||
libdighost_la_SOURCES = \
|
libdighost_la_SOURCES = \
|
||||||
dighost.h \
|
dighost.h \
|
||||||
dighost.c
|
dighost.c
|
||||||
|
|
||||||
bin_PROGRAMS = dig host nslookup
|
bin_PROGRAMS = dig host nslookup
|
||||||
|
|
||||||
nslookup_CPPFLAGS = \
|
nslookup_LDADD = \
|
||||||
$(AM_CPPFLAGS)
|
$(LDADD) \
|
||||||
|
$(READLINE_LIB)
|
||||||
nslookup_LDADD = \
|
|
||||||
$(LDADD)
|
|
||||||
|
|
||||||
if HAVE_READLINE
|
|
||||||
nslookup_CPPFLAGS += \
|
|
||||||
$(READLINE_CFLAGS)
|
|
||||||
nslookup_LDADD += \
|
|
||||||
$(READLINE_LIBS)
|
|
||||||
endif HAVE_READLINE
|
|
||||||
|
|||||||
+76
-309
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -19,18 +19,17 @@
|
|||||||
|
|
||||||
#include <isc/app.h>
|
#include <isc/app.h>
|
||||||
#include <isc/attributes.h>
|
#include <isc/attributes.h>
|
||||||
#include <isc/dir.h>
|
|
||||||
#include <isc/netaddr.h>
|
#include <isc/netaddr.h>
|
||||||
#include <isc/parseint.h>
|
#include <isc/parseint.h>
|
||||||
|
#include <isc/platform.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/result.h>
|
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/task.h>
|
#include <isc/task.h>
|
||||||
#include <isc/time.h>
|
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
|
#include <pk11/site.h>
|
||||||
|
|
||||||
#include <dns/byaddr.h>
|
#include <dns/byaddr.h>
|
||||||
#include <dns/dns64.h>
|
|
||||||
#include <dns/fixedname.h>
|
#include <dns/fixedname.h>
|
||||||
#include <dns/masterdump.h>
|
#include <dns/masterdump.h>
|
||||||
#include <dns/message.h>
|
#include <dns/message.h>
|
||||||
@@ -40,6 +39,7 @@
|
|||||||
#include <dns/rdataclass.h>
|
#include <dns/rdataclass.h>
|
||||||
#include <dns/rdataset.h>
|
#include <dns/rdataset.h>
|
||||||
#include <dns/rdatatype.h>
|
#include <dns/rdatatype.h>
|
||||||
|
#include <dns/result.h>
|
||||||
#include <dns/tsig.h>
|
#include <dns/tsig.h>
|
||||||
|
|
||||||
#include "dighost.h"
|
#include "dighost.h"
|
||||||
@@ -185,7 +185,7 @@ help(void) {
|
|||||||
" +[no]besteffort (Try to parse even "
|
" +[no]besteffort (Try to parse even "
|
||||||
"illegal "
|
"illegal "
|
||||||
"messages)\n"
|
"messages)\n"
|
||||||
" +bufsize[=###] (Set EDNS0 Max UDP packet "
|
" +bufsize=### (Set EDNS0 Max UDP packet "
|
||||||
"size)\n"
|
"size)\n"
|
||||||
" +[no]cdflag (Set checking disabled "
|
" +[no]cdflag (Set checking disabled "
|
||||||
"flag in query)\n"
|
"flag in query)\n"
|
||||||
@@ -206,8 +206,6 @@ help(void) {
|
|||||||
" fields in records)\n"
|
" fields in records)\n"
|
||||||
" +[no]defname (Use search list "
|
" +[no]defname (Use search list "
|
||||||
"(+[no]search))\n"
|
"(+[no]search))\n"
|
||||||
" +[no]dns64prefix (Get the DNS64 prefixes "
|
|
||||||
"from ipv4only.arpa)\n"
|
|
||||||
" +[no]dnssec (Request DNSSEC records)\n"
|
" +[no]dnssec (Request DNSSEC records)\n"
|
||||||
" +domain=### (Set default domainname)\n"
|
" +domain=### (Set default domainname)\n"
|
||||||
" +[no]dscp[=###] (Set the DSCP value to "
|
" +[no]dscp[=###] (Set the DSCP value to "
|
||||||
@@ -227,10 +225,6 @@ help(void) {
|
|||||||
"SERVFAIL)\n"
|
"SERVFAIL)\n"
|
||||||
" +[no]header-only (Send query without a "
|
" +[no]header-only (Send query without a "
|
||||||
"question section)\n"
|
"question section)\n"
|
||||||
" +[no]https[=###] (DNS over HTTPS mode) "
|
|
||||||
"[/]\n"
|
|
||||||
" +[no]https-get (Use GET instead of "
|
|
||||||
"default POST method\n"
|
|
||||||
" +[no]identify (ID responders in short "
|
" +[no]identify (ID responders in short "
|
||||||
"answers)\n"
|
"answers)\n"
|
||||||
#ifdef HAVE_LIBIDN2
|
#ifdef HAVE_LIBIDN2
|
||||||
@@ -281,7 +275,6 @@ help(void) {
|
|||||||
"short\n"
|
"short\n"
|
||||||
" form of answers - global "
|
" form of answers - global "
|
||||||
"option)\n"
|
"option)\n"
|
||||||
" +[no]showbadcookie (Show BADCOOKIE message)\n"
|
|
||||||
" +[no]showsearch (Search with intermediate "
|
" +[no]showsearch (Search with intermediate "
|
||||||
"results)\n"
|
"results)\n"
|
||||||
" +[no]split=## (Split hex/base64 fields "
|
" +[no]split=## (Split hex/base64 fields "
|
||||||
@@ -294,7 +287,6 @@ help(void) {
|
|||||||
"(+[no]tcflag))\n"
|
"(+[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]tls (DNS over TLS mode)\n"
|
|
||||||
" +[no]trace (Trace delegation down "
|
" +[no]trace (Trace delegation down "
|
||||||
"from root "
|
"from root "
|
||||||
"[+dnssec])\n"
|
"[+dnssec])\n"
|
||||||
@@ -304,6 +296,9 @@ help(void) {
|
|||||||
"in records)\n"
|
"in records)\n"
|
||||||
" +[no]ttlunits (Display TTLs in "
|
" +[no]ttlunits (Display TTLs in "
|
||||||
"human-readable units)\n"
|
"human-readable units)\n"
|
||||||
|
" +[no]unexpected (Print replies from "
|
||||||
|
"unexpected sources\n"
|
||||||
|
" default=off)\n"
|
||||||
" +[no]unknownformat (Print RDATA in RFC 3597 "
|
" +[no]unknownformat (Print RDATA in RFC 3597 "
|
||||||
"\"unknown\" "
|
"\"unknown\" "
|
||||||
"format)\n"
|
"format)\n"
|
||||||
@@ -329,7 +324,11 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
|||||||
uint64_t diff;
|
uint64_t diff;
|
||||||
time_t tnow;
|
time_t tnow;
|
||||||
struct tm tmnow;
|
struct tm tmnow;
|
||||||
|
#ifdef WIN32
|
||||||
|
wchar_t time_str[100];
|
||||||
|
#else /* ifdef WIN32 */
|
||||||
char time_str[100];
|
char time_str[100];
|
||||||
|
#endif /* ifdef WIN32 */
|
||||||
char fromtext[ISC_SOCKADDR_FORMATSIZE];
|
char fromtext[ISC_SOCKADDR_FORMATSIZE];
|
||||||
|
|
||||||
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
|
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
|
||||||
@@ -339,36 +338,33 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (query->lookup->stats) {
|
if (query->lookup->stats) {
|
||||||
const char *proto;
|
|
||||||
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(";; Query time: %ld usec\n", (long)diff);
|
printf(";; Query time: %ld usec\n", (long)diff);
|
||||||
} else {
|
} else {
|
||||||
printf(";; Query time: %ld msec\n", (long)diff / 1000);
|
printf(";; Query time: %ld msec\n", (long)diff / 1000);
|
||||||
}
|
}
|
||||||
if (query->lookup->tls_mode) {
|
printf(";; SERVER: %s(%s)\n", fromtext, query->servname);
|
||||||
proto = "TLS";
|
|
||||||
} else if (query->lookup->https_mode) {
|
|
||||||
if (query->lookup->http_plain) {
|
|
||||||
proto = "HTTP";
|
|
||||||
} else {
|
|
||||||
proto = "HTTPS";
|
|
||||||
}
|
|
||||||
} else if (query->lookup->tcp_mode) {
|
|
||||||
proto = "TCP";
|
|
||||||
} else {
|
|
||||||
proto = "UDP";
|
|
||||||
}
|
|
||||||
printf(";; SERVER: %s(%s) (%s)\n", fromtext, query->userarg,
|
|
||||||
proto);
|
|
||||||
time(&tnow);
|
time(&tnow);
|
||||||
(void)localtime_r(&tnow, &tmnow);
|
(void)localtime_r(&tnow, &tmnow);
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
/*
|
||||||
|
* On Windows, time zone name ("%Z") may be a localized
|
||||||
|
* wide-character string, which strftime() handles incorrectly.
|
||||||
|
*/
|
||||||
|
if (wcsftime(time_str, sizeof(time_str) / sizeof(time_str[0]),
|
||||||
|
L"%a %b %d %H:%M:%S %Z %Y", &tmnow) > 0U)
|
||||||
|
{
|
||||||
|
printf(";; WHEN: %ls\n", time_str);
|
||||||
|
}
|
||||||
|
#else /* ifdef WIN32 */
|
||||||
if (strftime(time_str, sizeof(time_str),
|
if (strftime(time_str, sizeof(time_str),
|
||||||
"%a %b %d %H:%M:%S %Z %Y", &tmnow) > 0U)
|
"%a %b %d %H:%M:%S %Z %Y", &tmnow) > 0U)
|
||||||
{
|
{
|
||||||
printf(";; WHEN: %s\n", time_str);
|
printf(";; WHEN: %s\n", time_str);
|
||||||
}
|
}
|
||||||
|
#endif /* ifdef WIN32 */
|
||||||
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 %" PRIu64 ")\n",
|
||||||
@@ -470,50 +466,6 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
|||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*%
|
|
||||||
* short_form message print handler. Calls above say_message()
|
|
||||||
*/
|
|
||||||
static isc_result_t
|
|
||||||
dns64prefix_answer(dns_message_t *msg, isc_buffer_t *buf) {
|
|
||||||
dns_rdataset_t *rdataset = NULL;
|
|
||||||
dns_fixedname_t fixed;
|
|
||||||
dns_name_t *name;
|
|
||||||
isc_result_t result;
|
|
||||||
isc_netprefix_t prefix[10];
|
|
||||||
size_t i, count = 10;
|
|
||||||
|
|
||||||
name = dns_fixedname_initname(&fixed);
|
|
||||||
result = dns_name_fromstring(name, "ipv4only.arpa", 0, NULL);
|
|
||||||
check_result(result, "dns_name_fromstring");
|
|
||||||
|
|
||||||
result = dns_message_findname(msg, DNS_SECTION_ANSWER, name,
|
|
||||||
dns_rdatatype_aaaa, dns_rdatatype_none,
|
|
||||||
NULL, &rdataset);
|
|
||||||
if (result == DNS_R_NXDOMAIN || result == DNS_R_NXRRSET) {
|
|
||||||
return (ISC_R_SUCCESS);
|
|
||||||
} else if (result != ISC_R_SUCCESS) {
|
|
||||||
return (result);
|
|
||||||
}
|
|
||||||
|
|
||||||
result = dns_dns64_findprefix(rdataset, prefix, &count);
|
|
||||||
if (result == ISC_R_NOTFOUND)
|
|
||||||
return (ISC_R_SUCCESS);
|
|
||||||
if (count > 10)
|
|
||||||
count = 10;
|
|
||||||
for (i = 0; i < count; i++) {
|
|
||||||
result = isc_netaddr_totext(&prefix[i].addr, buf);
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
|
||||||
return (result);
|
|
||||||
}
|
|
||||||
result = isc_buffer_printf(buf, "/%u\n", prefix[i].prefixlen);
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
|
||||||
return (result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (ISC_R_SUCCESS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
* short_form message print handler. Calls above say_message()
|
* short_form message print handler. Calls above say_message()
|
||||||
*/
|
*/
|
||||||
@@ -600,12 +552,9 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
dns_master_style_t *style = NULL;
|
dns_master_style_t *style = NULL;
|
||||||
unsigned int styleflags = 0;
|
unsigned int styleflags = 0;
|
||||||
bool isquery = (msg == query->lookup->sendmsg);
|
bool isquery = (msg == query->lookup->sendmsg);
|
||||||
bool dns64prefix = query->lookup->dns64prefix;
|
|
||||||
|
|
||||||
UNUSED(msgbuf);
|
UNUSED(msgbuf);
|
||||||
|
|
||||||
dig_idnsetup(query->lookup, true);
|
|
||||||
|
|
||||||
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
||||||
if (yaml) {
|
if (yaml) {
|
||||||
msg->indent.string = " ";
|
msg->indent.string = " ";
|
||||||
@@ -665,16 +614,14 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
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 && !dns64prefix && printcmd) {
|
if (!short_form && printcmd) {
|
||||||
printf("%s", query->lookup->cmdline);
|
printf("%s", query->lookup->cmdline);
|
||||||
}
|
}
|
||||||
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",
|
||||||
query->lookup->comments ? "comments" : "nocomments",
|
query->lookup->comments ? "comments" : "nocomments",
|
||||||
short_form ? "short_form"
|
short_form ? "short_form" : "long_form");
|
||||||
: dns64prefix ? "dns64prefix_form"
|
|
||||||
: "long_form");
|
|
||||||
|
|
||||||
flags = 0;
|
flags = 0;
|
||||||
if (!headers) {
|
if (!headers) {
|
||||||
@@ -695,6 +642,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
if (yaml) {
|
if (yaml) {
|
||||||
enum { Q = 0x1, R = 0x2 }; /* Q:query; R:ecursive */
|
enum { Q = 0x1, R = 0x2 }; /* Q:query; R:ecursive */
|
||||||
unsigned int tflag = 0;
|
unsigned int tflag = 0;
|
||||||
|
isc_sockaddr_t saddr;
|
||||||
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
||||||
uint16_t sport;
|
uint16_t sport;
|
||||||
char *hash;
|
char *hash;
|
||||||
@@ -727,25 +675,15 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
|
|
||||||
if (!isc_time_isepoch(&query->time_sent)) {
|
if (!isc_time_isepoch(&query->time_sent)) {
|
||||||
char tbuf[100];
|
char tbuf[100];
|
||||||
if (query->lookup->use_usec) {
|
isc_time_formatISO8601ms(&query->time_sent, tbuf,
|
||||||
isc_time_formatISO8601us(&query->time_sent,
|
sizeof(tbuf));
|
||||||
tbuf, sizeof(tbuf));
|
|
||||||
} else {
|
|
||||||
isc_time_formatISO8601ms(&query->time_sent,
|
|
||||||
tbuf, sizeof(tbuf));
|
|
||||||
}
|
|
||||||
printf(" query_time: !!timestamp %s\n", tbuf);
|
printf(" query_time: !!timestamp %s\n", tbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isquery && !isc_time_isepoch(&query->time_recv)) {
|
if (!isquery && !isc_time_isepoch(&query->time_recv)) {
|
||||||
char tbuf[100];
|
char tbuf[100];
|
||||||
if (query->lookup->use_usec) {
|
isc_time_formatISO8601ms(&query->time_recv, tbuf,
|
||||||
isc_time_formatISO8601us(&query->time_recv,
|
sizeof(tbuf));
|
||||||
tbuf, sizeof(tbuf));
|
|
||||||
} else {
|
|
||||||
isc_time_formatISO8601ms(&query->time_recv,
|
|
||||||
tbuf, sizeof(tbuf));
|
|
||||||
}
|
|
||||||
printf(" response_time: !!timestamp %s\n", tbuf);
|
printf(" response_time: !!timestamp %s\n", tbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -775,9 +713,10 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
printf(" response_port: %u\n", sport);
|
printf(" response_port: %u\n", sport);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query->handle != NULL) {
|
if (query->sock != NULL &&
|
||||||
isc_sockaddr_t saddr =
|
isc_socket_getsockname(query->sock, &saddr) ==
|
||||||
isc_nmhandle_localaddr(query->handle);
|
ISC_R_SUCCESS)
|
||||||
|
{
|
||||||
sport = isc_sockaddr_getport(&saddr);
|
sport = isc_sockaddr_getport(&saddr);
|
||||||
isc_sockaddr_format(&saddr, sockstr, sizeof(sockstr));
|
isc_sockaddr_format(&saddr, sockstr, sizeof(sockstr));
|
||||||
hash = strchr(sockstr, '#');
|
hash = strchr(sockstr, '#');
|
||||||
@@ -795,7 +734,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
printf(" %s:\n", isquery ? "query_message_data"
|
printf(" %s:\n", isquery ? "query_message_data"
|
||||||
: "response_message_data");
|
: "response_message_data");
|
||||||
result = dns_message_headertotext(msg, style, flags, buf);
|
result = dns_message_headertotext(msg, style, flags, buf);
|
||||||
} else if (query->lookup->comments && !short_form && !dns64prefix) {
|
} else if (query->lookup->comments && !short_form) {
|
||||||
if (query->lookup->cmdline[0] != '\0' && printcmd) {
|
if (query->lookup->cmdline[0] != '\0' && printcmd) {
|
||||||
printf("; %s\n", query->lookup->cmdline);
|
printf("; %s\n", query->lookup->cmdline);
|
||||||
}
|
}
|
||||||
@@ -876,7 +815,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
|
|
||||||
repopulate_buffer:
|
repopulate_buffer:
|
||||||
|
|
||||||
if (query->lookup->comments && headers && !short_form && !dns64prefix) {
|
if (query->lookup->comments && headers && !short_form) {
|
||||||
result = dns_message_pseudosectiontotext(
|
result = dns_message_pseudosectiontotext(
|
||||||
msg, DNS_PSEUDOSECTION_OPT, style, flags, buf);
|
msg, DNS_PSEUDOSECTION_OPT, style, flags, buf);
|
||||||
if (result == ISC_R_NOSPACE) {
|
if (result == ISC_R_NOSPACE) {
|
||||||
@@ -890,7 +829,7 @@ repopulate_buffer:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (query->lookup->section_question && headers) {
|
if (query->lookup->section_question && headers) {
|
||||||
if (!short_form && !dns64prefix) {
|
if (!short_form) {
|
||||||
result = dns_message_sectiontotext(
|
result = dns_message_sectiontotext(
|
||||||
msg, DNS_SECTION_QUESTION, style, flags, buf);
|
msg, DNS_SECTION_QUESTION, style, flags, buf);
|
||||||
if (result == ISC_R_NOSPACE) {
|
if (result == ISC_R_NOSPACE) {
|
||||||
@@ -900,18 +839,13 @@ repopulate_buffer:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (query->lookup->section_answer) {
|
if (query->lookup->section_answer) {
|
||||||
if (!short_form && !dns64prefix) {
|
if (!short_form) {
|
||||||
result = dns_message_sectiontotext(
|
result = dns_message_sectiontotext(
|
||||||
msg, DNS_SECTION_ANSWER, style, flags, buf);
|
msg, DNS_SECTION_ANSWER, style, flags, buf);
|
||||||
if (result == ISC_R_NOSPACE) {
|
if (result == ISC_R_NOSPACE) {
|
||||||
goto buftoosmall;
|
goto buftoosmall;
|
||||||
}
|
}
|
||||||
check_result(result, "dns_message_sectiontotext");
|
check_result(result, "dns_message_sectiontotext");
|
||||||
} else if (dns64prefix) {
|
|
||||||
result = dns64prefix_answer(msg, buf);
|
|
||||||
if (result == ISC_R_NOSPACE)
|
|
||||||
goto buftoosmall;
|
|
||||||
check_result(result, "dns64prefix_answer");
|
|
||||||
} else {
|
} else {
|
||||||
result = short_answer(msg, flags, buf, query);
|
result = short_answer(msg, flags, buf, query);
|
||||||
if (result == ISC_R_NOSPACE) {
|
if (result == ISC_R_NOSPACE) {
|
||||||
@@ -921,7 +855,7 @@ repopulate_buffer:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (query->lookup->section_authority) {
|
if (query->lookup->section_authority) {
|
||||||
if (!short_form && !dns64prefix) {
|
if (!short_form) {
|
||||||
result = dns_message_sectiontotext(
|
result = dns_message_sectiontotext(
|
||||||
msg, DNS_SECTION_AUTHORITY, style, flags, buf);
|
msg, DNS_SECTION_AUTHORITY, style, flags, buf);
|
||||||
if (result == ISC_R_NOSPACE) {
|
if (result == ISC_R_NOSPACE) {
|
||||||
@@ -931,7 +865,7 @@ repopulate_buffer:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (query->lookup->section_additional) {
|
if (query->lookup->section_additional) {
|
||||||
if (!short_form && !dns64prefix) {
|
if (!short_form) {
|
||||||
result = dns_message_sectiontotext(
|
result = dns_message_sectiontotext(
|
||||||
msg, DNS_SECTION_ADDITIONAL, style, flags, buf);
|
msg, DNS_SECTION_ADDITIONAL, style, flags, buf);
|
||||||
if (result == ISC_R_NOSPACE) {
|
if (result == ISC_R_NOSPACE) {
|
||||||
@@ -973,9 +907,6 @@ repopulate_buffer:
|
|||||||
if (style != NULL) {
|
if (style != NULL) {
|
||||||
dns_master_styledestroy(&style, mctx);
|
dns_master_styledestroy(&style, mctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
dig_idnsetup(query->lookup, false);
|
|
||||||
|
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1025,9 +956,8 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
|
|||||||
* XXX doc options
|
* XXX doc options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static dig_lookup_t *
|
static void
|
||||||
plus_option(char *option, bool is_batchfile, bool *need_clone,
|
plus_option(char *option, bool 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;
|
uint32_t num;
|
||||||
@@ -1038,7 +968,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
|
|
||||||
if ((cmd = strtok_r(option, "=", &last)) == NULL) {
|
if ((cmd = strtok_r(option, "=", &last)) == NULL) {
|
||||||
printf(";; Invalid option %s\n", option);
|
printf(";; Invalid option %s\n", option);
|
||||||
return (lookup);
|
return;
|
||||||
}
|
}
|
||||||
if (strncasecmp(cmd, "no", 2) == 0) {
|
if (strncasecmp(cmd, "no", 2) == 0) {
|
||||||
cmd += 2;
|
cmd += 2;
|
||||||
@@ -1060,17 +990,6 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
(_l >= sizeof(B) || strncasecmp(cmd, B, _l) != 0)) \
|
(_l >= sizeof(B) || strncasecmp(cmd, B, _l) != 0)) \
|
||||||
goto invalid_option; \
|
goto invalid_option; \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define FULLCHECK6(A, B, C, D, E, F) \
|
|
||||||
do { \
|
|
||||||
size_t _l = strlen(cmd); \
|
|
||||||
if ((_l >= sizeof(A) || strncasecmp(cmd, A, _l) != 0) && \
|
|
||||||
(_l >= sizeof(B) || strncasecmp(cmd, B, _l) != 0) && \
|
|
||||||
(_l >= sizeof(C) || strncasecmp(cmd, C, _l) != 0) && \
|
|
||||||
(_l >= sizeof(D) || strncasecmp(cmd, D, _l) != 0) && \
|
|
||||||
(_l >= sizeof(E) || strncasecmp(cmd, E, _l) != 0) && \
|
|
||||||
(_l >= sizeof(F) || strncasecmp(cmd, F, _l) != 0)) \
|
|
||||||
goto invalid_option; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
switch (cmd[0]) {
|
switch (cmd[0]) {
|
||||||
case 'a':
|
case 'a':
|
||||||
@@ -1128,13 +1047,12 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
break;
|
break;
|
||||||
case 'u': /* bufsize */
|
case 'u': /* bufsize */
|
||||||
FULLCHECK("bufsize");
|
FULLCHECK("bufsize");
|
||||||
|
if (value == NULL) {
|
||||||
|
goto need_value;
|
||||||
|
}
|
||||||
if (!state) {
|
if (!state) {
|
||||||
goto invalid_option;
|
goto invalid_option;
|
||||||
}
|
}
|
||||||
if (value == NULL) {
|
|
||||||
lookup->udpsize = DEFAULT_EDNS_BUFSIZE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
result = parse_uint(&num, value, COMMSIZE,
|
result = parse_uint(&num, value, COMMSIZE,
|
||||||
"buffer size");
|
"buffer size");
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
@@ -1181,7 +1099,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
case 'o': /* cookie */
|
case 'o': /* cookie */
|
||||||
FULLCHECK("cookie");
|
FULLCHECK("cookie");
|
||||||
if (state && lookup->edns == -1) {
|
if (state && lookup->edns == -1) {
|
||||||
lookup->edns = DEFAULT_EDNS_VERSION;
|
lookup->edns = 0;
|
||||||
}
|
}
|
||||||
lookup->sendcookie = state;
|
lookup->sendcookie = state;
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
@@ -1216,57 +1134,13 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
usesearch = state;
|
usesearch = state;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n': /* dnssec */
|
||||||
switch (cmd[2]) {
|
FULLCHECK("dnssec");
|
||||||
case 's':
|
dnssec:
|
||||||
switch (cmd[3]) {
|
if (state && lookup->edns == -1) {
|
||||||
case '6': /* dns64prefix */
|
lookup->edns = 0;
|
||||||
FULLCHECK("dns64prefix");
|
|
||||||
if (state) {
|
|
||||||
if (*need_clone) {
|
|
||||||
lookup = clone_lookup(
|
|
||||||
default_lookup,
|
|
||||||
true);
|
|
||||||
}
|
|
||||||
*need_clone = true;
|
|
||||||
lookup->dns64prefix = state;
|
|
||||||
strlcpy(lookup->textname,
|
|
||||||
"ipv4only.arpa",
|
|
||||||
sizeof(lookup->textname));
|
|
||||||
printcmd = false;
|
|
||||||
lookup->section_additional =
|
|
||||||
false;
|
|
||||||
lookup->section_answer = true;
|
|
||||||
lookup->section_authority =
|
|
||||||
false;
|
|
||||||
lookup->section_question =
|
|
||||||
false;
|
|
||||||
lookup->comments = false;
|
|
||||||
lookup->stats = false;
|
|
||||||
lookup->rrcomments = -1;
|
|
||||||
lookup->rdtype =
|
|
||||||
dns_rdatatype_aaaa;
|
|
||||||
lookup->rdtypeset = true;
|
|
||||||
ISC_LIST_APPEND(lookup_list,
|
|
||||||
lookup, link);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 's': /* dnssec */
|
|
||||||
FULLCHECK("dnssec");
|
|
||||||
dnssec:
|
|
||||||
if (state && lookup->edns == -1) {
|
|
||||||
lookup->edns =
|
|
||||||
DEFAULT_EDNS_VERSION;
|
|
||||||
}
|
|
||||||
lookup->dnssec = state;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
goto invalid_option;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
goto invalid_option;
|
|
||||||
}
|
}
|
||||||
|
lookup->dnssec = state;
|
||||||
break;
|
break;
|
||||||
case 'o': /* domain ... but treat "do" as synonym for dnssec */
|
case 'o': /* domain ... but treat "do" as synonym for dnssec */
|
||||||
if (cmd[2] == '\0') {
|
if (cmd[2] == '\0') {
|
||||||
@@ -1316,8 +1190,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (value == NULL) {
|
if (value == NULL) {
|
||||||
lookup->edns =
|
lookup->edns = 0;
|
||||||
DEFAULT_EDNS_VERSION;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
result = parse_uint(&num, value,
|
result = parse_uint(&num, value,
|
||||||
@@ -1417,90 +1290,8 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
lookup->servfail_stops = state;
|
lookup->servfail_stops = state;
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
switch (cmd[1]) {
|
FULLCHECK("header-only");
|
||||||
case 'e': /* header-only */
|
lookup->header_only = state;
|
||||||
FULLCHECK("header-only");
|
|
||||||
lookup->header_only = state;
|
|
||||||
break;
|
|
||||||
case 't':
|
|
||||||
FULLCHECK6("https", "https-get", "https-post",
|
|
||||||
"http-plain", "http-plain-get",
|
|
||||||
"http-plain-post");
|
|
||||||
#if HAVE_LIBNGHTTP2
|
|
||||||
if (lookup->https_path != NULL) {
|
|
||||||
isc_mem_free(mctx, lookup->https_path);
|
|
||||||
lookup->https_path = NULL;
|
|
||||||
}
|
|
||||||
if (!state) {
|
|
||||||
lookup->https_mode = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
lookup->https_mode = true;
|
|
||||||
if (cmd[4] == '-') {
|
|
||||||
lookup->http_plain = true;
|
|
||||||
switch (cmd[10]) {
|
|
||||||
case '\0':
|
|
||||||
FULLCHECK("http-plain");
|
|
||||||
break;
|
|
||||||
case '-':
|
|
||||||
switch (cmd[6]) {
|
|
||||||
case 'p':
|
|
||||||
FULLCHECK("https-plain-post");
|
|
||||||
break;
|
|
||||||
case 'g':
|
|
||||||
FULLCHECK("https-plain-get");
|
|
||||||
lookup->https_get = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
goto invalid_option;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
switch (cmd[5]) {
|
|
||||||
case '\0':
|
|
||||||
FULLCHECK("https");
|
|
||||||
break;
|
|
||||||
case '-':
|
|
||||||
switch (cmd[6]) {
|
|
||||||
case 'p':
|
|
||||||
FULLCHECK("https-post");
|
|
||||||
break;
|
|
||||||
case 'g':
|
|
||||||
FULLCHECK("https-get");
|
|
||||||
lookup->https_get = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
goto invalid_option;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!lookup->tcp_mode_set) {
|
|
||||||
lookup->tcp_mode = state;
|
|
||||||
}
|
|
||||||
if (value == NULL) {
|
|
||||||
lookup->https_path = isc_mem_strdup(
|
|
||||||
mctx, ISC_NM_HTTP_DEFAULT_PATH);
|
|
||||||
} else {
|
|
||||||
if (!isc_nm_http_path_isvalid(value)) {
|
|
||||||
fprintf(stderr,
|
|
||||||
";; The given HTTP path \"%s\" "
|
|
||||||
"is not "
|
|
||||||
"a valid absolute path\n",
|
|
||||||
value);
|
|
||||||
goto invalid_option;
|
|
||||||
}
|
|
||||||
lookup->https_path = isc_mem_strdup(mctx,
|
|
||||||
value);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
fprintf(stderr, ";; DoH support not enabled\n");
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
goto invalid_option;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
switch (cmd[1]) {
|
switch (cmd[1]) {
|
||||||
@@ -1614,7 +1405,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
case 'i': /* nsid */
|
case 'i': /* nsid */
|
||||||
FULLCHECK("nsid");
|
FULLCHECK("nsid");
|
||||||
if (state && lookup->edns == -1) {
|
if (state && lookup->edns == -1) {
|
||||||
lookup->edns = DEFAULT_EDNS_VERSION;
|
lookup->edns = 0;
|
||||||
}
|
}
|
||||||
lookup->nsid = state;
|
lookup->nsid = state;
|
||||||
break;
|
break;
|
||||||
@@ -1684,7 +1475,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
case 'p':
|
case 'p':
|
||||||
FULLCHECK("padding");
|
FULLCHECK("padding");
|
||||||
if (state && lookup->edns == -1) {
|
if (state && lookup->edns == -1) {
|
||||||
lookup->edns = DEFAULT_EDNS_VERSION;
|
lookup->edns = 0;
|
||||||
}
|
}
|
||||||
if (value == NULL) {
|
if (value == NULL) {
|
||||||
goto need_value;
|
goto need_value;
|
||||||
@@ -1803,20 +1594,10 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'w': /* showsearch */
|
case 'w': /* showsearch */
|
||||||
switch (cmd[4]) {
|
FULLCHECK("showsearch");
|
||||||
case 'b':
|
if (!lookup->trace) {
|
||||||
FULLCHECK("showbadcookie");
|
showsearch = state;
|
||||||
lookup->showbadcookie = state;
|
usesearch = state;
|
||||||
break;
|
|
||||||
case 's':
|
|
||||||
FULLCHECK("showsearch");
|
|
||||||
if (!lookup->trace) {
|
|
||||||
showsearch = state;
|
|
||||||
usesearch = state;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
goto invalid_option;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1880,7 +1661,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (lookup->edns == -1) {
|
if (lookup->edns == -1) {
|
||||||
lookup->edns = DEFAULT_EDNS_VERSION;
|
lookup->edns = 0;
|
||||||
}
|
}
|
||||||
if (lookup->ecs_addr != NULL) {
|
if (lookup->ecs_addr != NULL) {
|
||||||
isc_mem_free(mctx, lookup->ecs_addr);
|
isc_mem_free(mctx, lookup->ecs_addr);
|
||||||
@@ -1933,13 +1714,6 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
timeout = 1;
|
timeout = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'l':
|
|
||||||
FULLCHECK("tls");
|
|
||||||
lookup->tls_mode = state;
|
|
||||||
if (!lookup->tcp_mode_set) {
|
|
||||||
lookup->tcp_mode = state;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'o':
|
case 'o':
|
||||||
FULLCHECK("topdown");
|
FULLCHECK("topdown");
|
||||||
fprintf(stderr, ";; +topdown option is deprecated");
|
fprintf(stderr, ";; +topdown option is deprecated");
|
||||||
@@ -2023,8 +1797,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
switch (cmd[2]) {
|
switch (cmd[2]) {
|
||||||
case 'e':
|
case 'e':
|
||||||
FULLCHECK("unexpected");
|
FULLCHECK("unexpected");
|
||||||
fprintf(stderr, ";; +unexpected option "
|
lookup->accept_reply_unexpected_src = state;
|
||||||
"is deprecated");
|
|
||||||
break;
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
FULLCHECK("unknownformat");
|
FULLCHECK("unknownformat");
|
||||||
@@ -2068,7 +1841,7 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
|
|||||||
fprintf(stderr, "Invalid option: +%s\n", option);
|
fprintf(stderr, "Invalid option: +%s\n", option);
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
return (lookup);
|
return;
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
#if !TARGET_OS_IPHONE
|
||||||
exit_or_usage:
|
exit_or_usage:
|
||||||
@@ -2194,10 +1967,10 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
srcport = 0;
|
srcport = 0;
|
||||||
}
|
}
|
||||||
if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1) {
|
if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1) {
|
||||||
isc_sockaddr_fromin6(&localaddr, &in6, srcport);
|
isc_sockaddr_fromin6(&bind_address, &in6, srcport);
|
||||||
isc_net_disableipv4();
|
isc_net_disableipv4();
|
||||||
} else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1) {
|
} else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1) {
|
||||||
isc_sockaddr_fromin(&localaddr, &in4, srcport);
|
isc_sockaddr_fromin(&bind_address, &in4, srcport);
|
||||||
isc_net_disableipv6();
|
isc_net_disableipv6();
|
||||||
} else {
|
} else {
|
||||||
if (hash != NULL) {
|
if (hash != NULL) {
|
||||||
@@ -2241,7 +2014,6 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
fatal("Couldn't parse port number");
|
fatal("Couldn't parse port number");
|
||||||
}
|
}
|
||||||
port = num;
|
port = num;
|
||||||
port_set = true;
|
|
||||||
return (value_from_next);
|
return (value_from_next);
|
||||||
case 'q':
|
case 'q':
|
||||||
if (!config_only) {
|
if (!config_only) {
|
||||||
@@ -2438,20 +2210,16 @@ preparse_args(int argc, char **argv) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Look for dash value option. */
|
/* Look for dash value option. */
|
||||||
if (strpbrk(option, dash_opts) != &option[0]) {
|
if (strpbrk(option, dash_opts) != &option[0] ||
|
||||||
goto invalid_option;
|
strlen(option) > 1U) {
|
||||||
}
|
/* Error or value in option. */
|
||||||
if (strlen(option) > 1U) {
|
|
||||||
/* value in option. */
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* Dash value is next argument so we need to skip it. */
|
/* Dash value is next argument so we need to skip it. */
|
||||||
rc--, rv++;
|
rc--, rv++;
|
||||||
/* Handle missing argument */
|
/* Handle missing argument */
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
invalid_option:
|
break;
|
||||||
fprintf(stderr, "Invalid option: -%s\n", option);
|
|
||||||
usage();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2508,7 +2276,7 @@ parse_args(bool is_batchfile, bool config_only, int argc, char **argv) {
|
|||||||
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 = true;
|
||||||
default_lookup->edns = DEFAULT_EDNS_VERSION;
|
default_lookup->edns = 0;
|
||||||
default_lookup->sendcookie = true;
|
default_lookup->sendcookie = true;
|
||||||
|
|
||||||
#ifndef NOPOSIX
|
#ifndef NOPOSIX
|
||||||
@@ -2583,8 +2351,7 @@ parse_args(bool is_batchfile, bool config_only, int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (rv[0][0] == '+') {
|
} else if (rv[0][0] == '+') {
|
||||||
lookup = plus_option(&rv[0][1], is_batchfile,
|
plus_option(&rv[0][1], is_batchfile, lookup);
|
||||||
&need_clone, lookup);
|
|
||||||
} else if (rv[0][0] == '-') {
|
} else if (rv[0][0] == '-') {
|
||||||
if (rc <= 1) {
|
if (rc <= 1) {
|
||||||
if (dash_option(&rv[0][1], NULL, &lookup,
|
if (dash_option(&rv[0][1], NULL, &lookup,
|
||||||
|
|||||||
+213
-265
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
.. _man_dig:
|
.. _man_dig:
|
||||||
|
|
||||||
dig - DNS lookup utility
|
dig - DNS lookup utility
|
||||||
------------------------
|
----------------------------------
|
||||||
|
|
||||||
Synopsis
|
Synopsis
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
@@ -40,33 +40,33 @@ Description
|
|||||||
``dig`` is a flexible tool for interrogating DNS name servers. It
|
``dig`` is a flexible tool for interrogating DNS name servers. It
|
||||||
performs DNS lookups and displays the answers that are returned from the
|
performs DNS lookups and displays the answers that are returned from the
|
||||||
name server(s) that were queried. Most DNS administrators use ``dig`` to
|
name server(s) that were queried. Most DNS administrators use ``dig`` to
|
||||||
troubleshoot DNS problems because of its flexibility, ease of use, and
|
troubleshoot DNS problems because of its flexibility, ease of use and
|
||||||
clarity of output. Other lookup tools tend to have less functionality
|
clarity of output. Other lookup tools tend to have less functionality
|
||||||
than ``dig``.
|
than ``dig``.
|
||||||
|
|
||||||
Although ``dig`` is normally used with command-line arguments, it also
|
Although ``dig`` is normally used with command-line arguments, it also
|
||||||
has a batch mode of operation for reading lookup requests from a file. A
|
has a batch mode of operation for reading lookup requests from a file. A
|
||||||
brief summary of its command-line arguments and options is printed when
|
brief summary of its command-line arguments and options is printed when
|
||||||
the ``-h`` option is given. The BIND 9
|
the ``-h`` option is given. Unlike earlier versions, the BIND 9
|
||||||
implementation of ``dig`` allows multiple lookups to be issued from the
|
implementation of ``dig`` allows multiple lookups to be issued from the
|
||||||
command line.
|
command line.
|
||||||
|
|
||||||
Unless it is told to query a specific name server, ``dig`` tries each
|
Unless it is told to query a specific name server, ``dig`` will try each
|
||||||
of the servers listed in ``/etc/resolv.conf``. If no usable server
|
of the servers listed in ``/etc/resolv.conf``. If no usable server
|
||||||
addresses are found, ``dig`` sends the query to the local host.
|
addresses are found, ``dig`` will send the query to the local host.
|
||||||
|
|
||||||
When no command-line arguments or options are given, ``dig``
|
When no command line arguments or options are given, ``dig`` will
|
||||||
performs an NS query for "." (the root).
|
perform an NS query for "." (the root).
|
||||||
|
|
||||||
It is possible to set per-user defaults for ``dig`` via
|
It is possible to set per-user defaults for ``dig`` via
|
||||||
``${HOME}/.digrc``. This file is read and any options in it are applied
|
``${HOME}/.digrc``. This file is read and any options in it are applied
|
||||||
before the command-line arguments. The ``-r`` option disables this
|
before the command line arguments. The ``-r`` option disables this
|
||||||
feature, for scripts that need predictable behavior.
|
feature, for scripts that need predictable behaviour.
|
||||||
|
|
||||||
The IN and CH class names overlap with the IN and CH top-level domain
|
The IN and CH class names overlap with the IN and CH top level domain
|
||||||
names. Either use the ``-t`` and ``-c`` options to specify the type and
|
names. Either use the ``-t`` and ``-c`` options to specify the type and
|
||||||
class, use the ``-q`` to specify the domain name, or use "IN." and
|
class, use the ``-q`` the specify the domain name, or use "IN." and
|
||||||
"CH." when looking up these top-level domains.
|
"CH." when looking up these top level domains.
|
||||||
|
|
||||||
Simple Usage
|
Simple Usage
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
@@ -90,110 +90,110 @@ where:
|
|||||||
``/etc/resolv.conf``; if an address is found there, it queries the
|
``/etc/resolv.conf``; if an address is found there, it queries the
|
||||||
name server at that address. If either of the ``-4`` or ``-6``
|
name server at that address. If either of the ``-4`` or ``-6``
|
||||||
options are in use, then only addresses for the corresponding
|
options are in use, then only addresses for the corresponding
|
||||||
transport are tried. If no usable addresses are found, ``dig``
|
transport will be tried. If no usable addresses are found, ``dig``
|
||||||
sends the query to the local host. The reply from the name server
|
will send the query to the local host. The reply from the name server
|
||||||
that responds is displayed.
|
that responds is displayed.
|
||||||
|
|
||||||
``name``
|
``name``
|
||||||
is the name of the resource record that is to be looked up.
|
is the name of the resource record that is to be looked up.
|
||||||
|
|
||||||
``type``
|
``type``
|
||||||
indicates what type of query is required - ANY, A, MX, SIG, etc.
|
indicates what type of query is required MDASH ANY, A, MX, SIG, etc.
|
||||||
``type`` can be any valid query type. If no ``type`` argument is
|
``type`` can be any valid query type. If no ``type`` argument is
|
||||||
supplied, ``dig`` performs a lookup for an A record.
|
supplied, ``dig`` will perform a lookup for an A record.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-4``
|
**-4**
|
||||||
This option indicates that only IPv4 should be used.
|
Use IPv4 only.
|
||||||
|
|
||||||
``-6``
|
**-6**
|
||||||
This option indicates that only IPv6 should be used.
|
Use IPv6 only.
|
||||||
|
|
||||||
``-b address[#port]``
|
**-b** address[#port]
|
||||||
This option sets the source IP address of the query. The ``address`` must be a
|
Set the source IP address of the query. The ``address`` must be a
|
||||||
valid address on one of the host's network interfaces, or "0.0.0.0"
|
valid address on one of the host's network interfaces, or "0.0.0.0"
|
||||||
or "::". An optional port may be specified by appending ``#port``.
|
or "::". An optional port may be specified by appending "#<port>"
|
||||||
|
|
||||||
``-c class``
|
**-c** class
|
||||||
This option sets the query class. The default ``class`` is IN; other classes are
|
Set the query class. The default ``class`` is IN; other classes are
|
||||||
HS for Hesiod records or CH for Chaosnet records.
|
HS for Hesiod records or CH for Chaosnet records.
|
||||||
|
|
||||||
``-f file``
|
**-f** file
|
||||||
This option sets batch mode, in which ``dig`` reads a list of lookup requests to process from
|
Batch mode: ``dig`` reads a list of lookup requests to process from
|
||||||
the given ``file``. Each line in the file should be organized in the
|
the given ``file``. Each line in the file should be organized in the
|
||||||
same way it would be presented as a query to ``dig`` using the
|
same way they would be presented as queries to ``dig`` using the
|
||||||
command-line interface.
|
command-line interface.
|
||||||
|
|
||||||
``-k keyfile``
|
**-k** keyfile
|
||||||
This option tells ``named`` to sign queries using TSIG using a key read from the given file. Key
|
Sign queries using TSIG using a key read from the given file. Key
|
||||||
files can be generated using ``tsig-keygen``. When using TSIG
|
files can be generated using tsig-keygen8. When using TSIG
|
||||||
authentication with ``dig``, the name server that is queried needs to
|
authentication with ``dig``, the name server that is queried needs to
|
||||||
know the key and algorithm that is being used. In BIND, this is done
|
know the key and algorithm that is being used. In BIND, this is done
|
||||||
by providing appropriate ``key`` and ``server`` statements in
|
by providing appropriate ``key`` and ``server`` statements in
|
||||||
``named.conf``.
|
``named.conf``.
|
||||||
|
|
||||||
``-m``
|
**-m**
|
||||||
This option enables memory usage debugging.
|
Enable memory usage debugging.
|
||||||
|
|
||||||
``-p port``
|
**-p** port
|
||||||
This option sends the query to a non-standard port on the server, instead of the
|
Send the query to a non-standard port on the server, instead of the
|
||||||
default port 53. This option is used to test a name server that
|
default port 53. This option would be used to test a name server that
|
||||||
has been configured to listen for queries on a non-standard port
|
has been configured to listen for queries on a non-standard port
|
||||||
number.
|
number.
|
||||||
|
|
||||||
``-q name``
|
**-q** name
|
||||||
This option specifies the domain name to query. This is useful to distinguish the ``name``
|
The domain name to query. This is useful to distinguish the ``name``
|
||||||
from other arguments.
|
from other arguments.
|
||||||
|
|
||||||
``-r``
|
**-r**
|
||||||
This option indicates that options from ``${HOME}/.digrc`` should not be read. This is useful for
|
Do not read options from ``${HOME}/.digrc``. This is useful for
|
||||||
scripts that need predictable behavior.
|
scripts that need predictable behaviour.
|
||||||
|
|
||||||
``-t type``
|
**-t** type
|
||||||
This option indicates the resource record type to query, which can be any valid query type. If
|
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
|
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
|
the type mnemonic (such as "NS" or "AAAA"). The default query type is
|
||||||
``A``, unless the ``-x`` option is supplied to indicate a reverse
|
"A", unless the ``-x`` option is supplied to indicate a reverse
|
||||||
lookup. A zone transfer can be requested by specifying a type of
|
lookup. A zone transfer can be requested by specifying a type of
|
||||||
AXFR. When an incremental zone transfer (IXFR) is required, set the
|
AXFR. When an incremental zone transfer (IXFR) is required, set the
|
||||||
``type`` to ``ixfr=N``. The incremental zone transfer contains
|
``type`` to ``ixfr=N``. The incremental zone transfer will contain
|
||||||
all changes made to the zone since the serial number in the zone's
|
the changes made to the zone since the serial number in the zone's
|
||||||
SOA record was ``N``.
|
SOA record was ``N``.
|
||||||
|
|
||||||
All resource record types can be expressed as ``TYPEnn``, where ``nn`` is
|
All resource record types can be expressed as "TYPEnn", where "nn" is
|
||||||
the number of the type. If the resource record type is not supported
|
the number of the type. If the resource record type is not supported
|
||||||
in BIND 9, the result is displayed as described in :rfc:`3597`.
|
in BIND 9, the result will be displayed as described in :rfc:`3597`.
|
||||||
|
|
||||||
``-u``
|
**-u**
|
||||||
This option indicates that print query times should be provided in microseconds instead of milliseconds.
|
Print query times in microseconds instead of milliseconds.
|
||||||
|
|
||||||
``-v``
|
**-v**
|
||||||
This option prints the version number and exits.
|
Print the version number and exit.
|
||||||
|
|
||||||
``-x addr``
|
**-x** addr
|
||||||
This option sets simplified reverse lookups, for mapping addresses to names. The
|
Simplified reverse lookups, for mapping addresses to names. The
|
||||||
``addr`` is an IPv4 address in dotted-decimal notation, or a
|
``addr`` is an IPv4 address in dotted-decimal notation, or a
|
||||||
colon-delimited IPv6 address. When the ``-x`` option is used, there is no
|
colon-delimited IPv6 address. When the ``-x`` is used, there is no
|
||||||
need to provide the ``name``, ``class``, and ``type`` arguments.
|
need to provide the ``name``, ``class`` and ``type`` arguments.
|
||||||
``dig`` automatically performs a lookup for a name like
|
``dig`` automatically performs a lookup for a name like
|
||||||
``94.2.0.192.in-addr.arpa`` and sets the query type and class to PTR
|
``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
|
and IN respectively. IPv6 addresses are looked up using nibble format
|
||||||
under the IP6.ARPA domain.
|
under the IP6.ARPA domain.
|
||||||
|
|
||||||
``-y [hmac:]keyname:secret``
|
**-y** [hmac:]keyname:secret
|
||||||
This option signs queries using TSIG with the given authentication key.
|
Sign queries using TSIG with the given authentication key.
|
||||||
``keyname`` is the name of the key, and ``secret`` is the
|
``keyname`` is the name of the key, and ``secret`` is the base64
|
||||||
base64-encoded shared secret. ``hmac`` is the name of the key algorithm;
|
encoded shared secret. ``hmac`` is the name of the key algorithm;
|
||||||
valid choices are ``hmac-md5``, ``hmac-sha1``, ``hmac-sha224``,
|
valid choices are ``hmac-md5``, ``hmac-sha1``, ``hmac-sha224``,
|
||||||
``hmac-sha256``, ``hmac-sha384``, or ``hmac-sha512``. If ``hmac`` is
|
``hmac-sha256``, ``hmac-sha384``, or ``hmac-sha512``. If ``hmac`` is
|
||||||
not specified, the default is ``hmac-md5``; if MD5 was disabled, the default is
|
not specified, the default is ``hmac-md5`` or if MD5 was disabled
|
||||||
``hmac-sha256``.
|
``hmac-sha256``.
|
||||||
|
|
||||||
.. note:: Only the ``-k`` option should be used, rather than the ``-y`` option,
|
.. note:: You should use the ``-k`` option and avoid the ``-y`` option,
|
||||||
because with ``-y`` the shared secret is supplied as a command-line
|
because with ``-y`` the shared secret is supplied as a command line
|
||||||
argument in clear text. This may be visible in the output from ``ps1`` or
|
argument in clear text. This may be visible in the output from ps1 or
|
||||||
in a history file maintained by the user's shell.
|
in a history file maintained by the user's shell.
|
||||||
|
|
||||||
Query Options
|
Query Options
|
||||||
@@ -206,329 +206,297 @@ answer get printed, and others determine the timeout and retry
|
|||||||
strategies.
|
strategies.
|
||||||
|
|
||||||
Each query option is identified by a keyword preceded by a plus sign
|
Each query option is identified by a keyword preceded by a plus sign
|
||||||
(``+``). Some keywords set or reset an option; these may be preceded by
|
(``+``). Some keywords set or reset an option. These may be preceded by
|
||||||
the string ``no`` to negate the meaning of that keyword. Other keywords
|
the string ``no`` to negate the meaning of that keyword. Other keywords
|
||||||
assign values to options, like the timeout interval. They have the form
|
assign values to options like the timeout interval. They have the form
|
||||||
``+keyword=value``. Keywords may be abbreviated, provided the
|
``+keyword=value``. Keywords may be abbreviated, provided the
|
||||||
abbreviation is unambiguous; for example, ``+cd`` is equivalent to
|
abbreviation is unambiguous; for example, ``+cd`` is equivalent to
|
||||||
``+cdflag``. The query options are:
|
``+cdflag``. The query options are:
|
||||||
|
|
||||||
``+[no]aaflag``
|
``+[no]aaflag``
|
||||||
This option is a synonym for ``+[no]aaonly``.
|
A synonym for ``+[no]aaonly``.
|
||||||
|
|
||||||
``+[no]aaonly``
|
``+[no]aaonly``
|
||||||
This option sets the ``aa`` flag in the query.
|
Sets the "aa" flag in the query.
|
||||||
|
|
||||||
``+[no]additional``
|
``+[no]additional``
|
||||||
This option displays [or does not display] the additional section of a reply. The
|
Display [do not display] the additional section of a reply. The
|
||||||
default is to display it.
|
default is to display it.
|
||||||
|
|
||||||
``+[no]adflag``
|
``+[no]adflag``
|
||||||
This option sets [or does not set] the AD (authentic data) bit in the query. This
|
Set [do not set] the AD (authentic data) bit in the query. This
|
||||||
requests the server to return whether all of the answer and authority
|
requests the server to return whether all of the answer and authority
|
||||||
sections have been validated as secure, according to the security
|
sections have all been validated as secure according to the security
|
||||||
policy of the server. ``AD=1`` indicates that all records have been
|
policy of the server. AD=1 indicates that all records have been
|
||||||
validated as secure and the answer is not from a OPT-OUT range. ``AD=0``
|
validated as secure and the answer is not from a OPT-OUT range. AD=0
|
||||||
indicates that some part of the answer was insecure or not validated.
|
indicate that some part of the answer was insecure or not validated.
|
||||||
This bit is set by default.
|
This bit is set by default.
|
||||||
|
|
||||||
``+[no]all``
|
``+[no]all``
|
||||||
This option sets or clears all display flags.
|
Set or clear all display flags.
|
||||||
|
|
||||||
``+[no]answer``
|
``+[no]answer``
|
||||||
This option displays [or does not display] the answer section of a reply. The default
|
Display [do not display] the answer section of a reply. The default
|
||||||
is to display it.
|
is to display it.
|
||||||
|
|
||||||
``+[no]authority``
|
``+[no]authority``
|
||||||
This option displays [or does not display] the authority section of a reply. The
|
Display [do not display] the authority section of a reply. The
|
||||||
default is to display it.
|
default is to display it.
|
||||||
|
|
||||||
``+[no]badcookie``
|
``+[no]badcookie``
|
||||||
This option retries the lookup with a new server cookie if a BADCOOKIE response is
|
Retry lookup with the new server cookie if a BADCOOKIE response is
|
||||||
received.
|
received.
|
||||||
|
|
||||||
``+[no]besteffort``
|
``+[no]besteffort``
|
||||||
This option attempts to display the contents of messages which are malformed. The
|
Attempt to display the contents of messages which are malformed. The
|
||||||
default is to not display malformed answers.
|
default is to not display malformed answers.
|
||||||
|
|
||||||
``+bufsize[=B]``
|
``+bufsize=B``
|
||||||
This option sets the UDP message buffer size advertised using EDNS0 to
|
Set the UDP message buffer size advertised using EDNS0 to ``B``
|
||||||
``B`` bytes. The maximum and minimum sizes of this buffer are 65535 and
|
bytes. The maximum and minimum sizes of this buffer are 65535 and 0
|
||||||
0, respectively. ``+bufsize`` restores the default buffer size.
|
respectively. Values outside this range are rounded up or down
|
||||||
|
appropriately. Values other than zero will cause a EDNS query to be
|
||||||
|
sent.
|
||||||
|
|
||||||
``+[no]cdflag``
|
``+[no]cdflag``
|
||||||
This option sets [or does not set] the CD (checking disabled) bit in the query. This
|
Set [do not set] the CD (checking disabled) bit in the query. This
|
||||||
requests the server to not perform DNSSEC validation of responses.
|
requests the server to not perform DNSSEC validation of responses.
|
||||||
|
|
||||||
``+[no]class``
|
``+[no]class``
|
||||||
This option displays [or does not display] the CLASS when printing the record.
|
Display [do not display] the CLASS when printing the record.
|
||||||
|
|
||||||
``+[no]cmd``
|
``+[no]cmd``
|
||||||
This option toggles the printing of the initial comment in the output, identifying the
|
Toggles the printing of the initial comment in the output, identifying the
|
||||||
version of ``dig`` and the query options that have been applied. This option
|
version of ``dig`` and the query options that have been applied. This option
|
||||||
always has a global effect; it cannot be set globally and then overridden on a
|
always has global effect; it cannot be set globally and then overridden on a
|
||||||
per-lookup basis. The default is to print this comment.
|
per-lookup basis. The default is to print this comment.
|
||||||
|
|
||||||
``+[no]comments``
|
``+[no]comments``
|
||||||
This option toggles the display of some comment lines in the output, with
|
Toggles the display of some comment lines in the output, containing
|
||||||
information about the packet header and OPT pseudosection, and the names of
|
information about the packet header and OPT pseudosection, and the names of
|
||||||
the response section. The default is to print these comments.
|
the response section. The default is to print these comments.
|
||||||
|
|
||||||
Other types of comments in the output are not affected by this option, but
|
Other types of comments in the output are not affected by this option, but
|
||||||
can be controlled using other command-line switches. These include
|
can be controlled using other command line switches. These include
|
||||||
``+[no]cmd``, ``+[no]question``, ``+[no]stats``, and ``+[no]rrcomments``.
|
``+[no]cmd``, ``+[no]question``, ``+[no]stats``, and ``+[no]rrcomments``.
|
||||||
|
|
||||||
``+[no]cookie=####``
|
``+[no]cookie=####``
|
||||||
This option sends [or does not send] a COOKIE EDNS option, with an optional value. Replaying a COOKIE
|
Send a COOKIE EDNS option, with optional value. Replaying a COOKIE
|
||||||
from a previous response allows the server to identify a previous
|
from a previous response will allow the server to identify a previous
|
||||||
client. The default is ``+cookie``.
|
client. The default is ``+cookie``.
|
||||||
|
|
||||||
``+cookie`` is also set when ``+trace`` is set to better emulate the
|
``+cookie`` is also set when +trace is set to better emulate the
|
||||||
default queries from a nameserver.
|
default queries from a nameserver.
|
||||||
|
|
||||||
``+[no]crypto``
|
``+[no]crypto``
|
||||||
This option toggles the display of cryptographic fields in DNSSEC records. The
|
Toggle the display of cryptographic fields in DNSSEC records. The
|
||||||
contents of these fields are unnecessary for debugging most DNSSEC
|
contents of these field are unnecessary to debug most DNSSEC
|
||||||
validation failures and removing them makes it easier to see the
|
validation failures and removing them makes it easier to see the
|
||||||
common failures. The default is to display the fields. When omitted,
|
common failures. The default is to display the fields. When omitted
|
||||||
they are replaced by the string ``[omitted]`` or, in the DNSKEY case, the
|
they are replaced by the string "[omitted]" or in the DNSKEY case the
|
||||||
key ID is displayed as the replacement, e.g. ``[ key id = value ]``.
|
key id is displayed as the replacement, e.g. "[ key id = value ]".
|
||||||
|
|
||||||
``+[no]defname``
|
``+[no]defname``
|
||||||
This option, which is deprecated, is treated as a synonym for ``+[no]search``.
|
Deprecated, treated as a synonym for ``+[no]search``
|
||||||
|
|
||||||
``+[no]dns64prefix``
|
|
||||||
Lookup IPV4ONLY.ARPA AAAA and print any DNS64 prefixes found.
|
|
||||||
|
|
||||||
``+[no]dnssec``
|
``+[no]dnssec``
|
||||||
This option requests that DNSSEC records be sent by setting the DNSSEC OK (DO) bit in
|
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in
|
||||||
the OPT record in the additional section of the query.
|
the OPT record in the additional section of the query.
|
||||||
|
|
||||||
``+domain=somename``
|
``+domain=somename``
|
||||||
This option sets the search list to contain the single domain ``somename``, as if
|
Set the search list to contain the single domain ``somename``, as if
|
||||||
specified in a ``domain`` directive in ``/etc/resolv.conf``, and
|
specified in a ``domain`` directive in ``/etc/resolv.conf``, and
|
||||||
enables search list processing as if the ``+search`` option were
|
enable search list processing as if the ``+search`` option were
|
||||||
given.
|
given.
|
||||||
|
|
||||||
``+dscp=value``
|
``+dscp=value``
|
||||||
This option sets the DSCP code point to be used when sending the query. Valid DSCP
|
Set the DSCP code point to be used when sending the query. Valid DSCP
|
||||||
code points are in the range [0...63]. By default no code point is
|
code points are in the range [0..63]. By default no code point is
|
||||||
explicitly set.
|
explicitly set.
|
||||||
|
|
||||||
``+[no]edns[=#]``
|
``+[no]edns[=#]``
|
||||||
This option specifies the EDNS version to query with. Valid values are 0 to 255.
|
Specify the EDNS version to query with. Valid values are 0 to 255.
|
||||||
Setting the EDNS version causes an EDNS query to be sent.
|
Setting the EDNS version will cause a EDNS query to be sent.
|
||||||
``+noedns`` clears the remembered EDNS version. EDNS is set to 0 by
|
``+noedns`` clears the remembered EDNS version. EDNS is set to 0 by
|
||||||
default.
|
default.
|
||||||
|
|
||||||
``+[no]ednsflags[=#]``
|
``+[no]ednsflags[=#]``
|
||||||
This option sets the must-be-zero EDNS flags bits (Z bits) to the specified value.
|
Set the must-be-zero EDNS flags bits (Z bits) to the specified value.
|
||||||
Decimal, hex, and octal encodings are accepted. Setting a named flag
|
Decimal, hex and octal encodings are accepted. Setting a named flag
|
||||||
(e.g., DO) is silently ignored. By default, no Z bits are set.
|
(e.g. DO) will silently be ignored. By default, no Z bits are set.
|
||||||
|
|
||||||
``+[no]ednsnegotiation``
|
``+[no]ednsnegotiation``
|
||||||
This option enables/disables EDNS version negotiation. By default, EDNS version
|
Enable / disable EDNS version negotiation. By default EDNS version
|
||||||
negotiation is enabled.
|
negotiation is enabled.
|
||||||
|
|
||||||
``+[no]ednsopt[=code[:value]]``
|
``+[no]ednsopt[=code[:value]]``
|
||||||
This option specifies the EDNS option with code point ``code`` and an optional payload
|
Specify EDNS option with code point ``code`` and optionally payload
|
||||||
of ``value`` as a hexadecimal string. ``code`` can be either an EDNS
|
of ``value`` as a hexadecimal string. ``code`` can be either an EDNS
|
||||||
option name (for example, ``NSID`` or ``ECS``) or an arbitrary
|
option name (for example, ``NSID`` or ``ECS``), or an arbitrary
|
||||||
numeric value. ``+noednsopt`` clears the EDNS options to be sent.
|
numeric value. ``+noednsopt`` clears the EDNS options to be sent.
|
||||||
|
|
||||||
``+[no]expire``
|
``+[no]expire``
|
||||||
This option sends an EDNS Expire option.
|
Send an EDNS Expire option.
|
||||||
|
|
||||||
``+[no]fail``
|
``+[no]fail``
|
||||||
This option indicates that ``named`` should try [or not try] the next server if a SERVFAIL is received. The default is
|
Do not try the next server if you receive a SERVFAIL. The default is
|
||||||
to not try the next server, which is the reverse of normal stub
|
to not try the next server which is the reverse of normal stub
|
||||||
resolver behavior.
|
resolver behavior.
|
||||||
|
|
||||||
``+[no]header-only``
|
``+[no]header-only``
|
||||||
This option sends a query with a DNS header without a question section. The
|
Send a query with a DNS header without a question section. The
|
||||||
default is to add a question section. The query type and query name
|
default is to add a question section. The query type and query name
|
||||||
are ignored when this is set.
|
are ignored when this is set.
|
||||||
|
|
||||||
``+[no]https[=value]``
|
|
||||||
This option indicates whether to use DNS-over-HTTPS (DoH) when querying
|
|
||||||
name servers. When this option is in use, the port number defaults to 443.
|
|
||||||
The HTTP POST request mode is used when sending the query.
|
|
||||||
|
|
||||||
If ``value`` is specified, it will be used as the HTTP endpoint in the
|
|
||||||
query URI; the default is ``/dns-query``. So, for example, ``dig
|
|
||||||
@example.com +https`` will use the URI ``https://example.com/dns-query``.
|
|
||||||
|
|
||||||
``+[no]https-get[=value]``
|
|
||||||
Similar to ``+https``, except that the HTTP GET request mode is used
|
|
||||||
when sending the query.
|
|
||||||
|
|
||||||
``+[no]https-post[=value]``
|
|
||||||
Same as ``+https``.
|
|
||||||
|
|
||||||
``+[no]http-plain[=value]``
|
|
||||||
Similar to ``+https``, except that HTTP queries will be sent over a
|
|
||||||
non-encrypted channel. When this option is in use, the port number
|
|
||||||
defaults to 80 and the HTTP request mode is POST.
|
|
||||||
|
|
||||||
``+[no]http-plain-get[=value]``
|
|
||||||
Similar to ``+http-plain``, except that the HTTP request mode is GET.
|
|
||||||
|
|
||||||
``+[no]http-plain-post[=value]``
|
|
||||||
Same as ``+http-plain``.
|
|
||||||
|
|
||||||
``+[no]identify``
|
``+[no]identify``
|
||||||
This option shows [or does not show] the IP address and port number that
|
Show [or do not show] the IP address and port number that supplied
|
||||||
supplied the answer, when the ``+short`` option is enabled. If short
|
the answer when the ``+short`` option is enabled. If short form
|
||||||
form answers are requested, the default is not to show the source
|
answers are requested, the default is not to show the source address
|
||||||
address and port number of the server that provided the answer.
|
and port number of the server that provided the answer.
|
||||||
|
|
||||||
``+[no]idnin``
|
``+[no]idnin``
|
||||||
This option processes [or does not process] IDN domain names on input. This requires
|
Process [do not process] IDN domain names on input. This requires IDN
|
||||||
``IDN SUPPORT`` to have been enabled at compile time.
|
SUPPORT to have been enabled at compile time.
|
||||||
|
|
||||||
The default is to process IDN input when standard output is a tty.
|
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
|
The IDN processing on input is disabled when dig output is redirected
|
||||||
to files, pipes, and other non-tty file descriptors.
|
to files, pipes, and other non-tty file descriptors.
|
||||||
|
|
||||||
``+[no]idnout``
|
``+[no]idnout``
|
||||||
This option converts [or does not convert] puny code on output. This requires
|
Convert [do not convert] puny code on output. This requires IDN
|
||||||
``IDN SUPPORT`` to have been enabled at compile time.
|
SUPPORT to have been enabled at compile time.
|
||||||
|
|
||||||
The default is to process puny code on output when standard output is
|
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
|
a tty. The puny code processing on output is disabled when dig output
|
||||||
is redirected to files, pipes, and other non-tty file descriptors.
|
is redirected to files, pipes, and other non-tty file descriptors.
|
||||||
|
|
||||||
``+[no]ignore``
|
``+[no]ignore``
|
||||||
This option ignores [or does not ignore] truncation in UDP responses instead of retrying with TCP. By
|
Ignore truncation in UDP responses instead of retrying with TCP. By
|
||||||
default, TCP retries are performed.
|
default, TCP retries are performed.
|
||||||
|
|
||||||
``+[no]keepalive``
|
``+[no]keepalive``
|
||||||
This option sends [or does not send] an EDNS Keepalive option.
|
Send [or do not send] an EDNS Keepalive option.
|
||||||
|
|
||||||
``+[no]keepopen``
|
``+[no]keepopen``
|
||||||
This option keeps [or does not keep] the TCP socket open between queries, and reuses it rather than
|
Keep the TCP socket open between queries and reuse it rather than
|
||||||
creating a new TCP socket for each lookup. The default is
|
creating a new TCP socket for each lookup. The default is
|
||||||
``+nokeepopen``.
|
``+nokeepopen``.
|
||||||
|
|
||||||
``+[no]mapped``
|
``+[no]mapped``
|
||||||
This option allows [or does not allow] mapped IPv4-over-IPv6 addresses to be used. The default is
|
Allow mapped IPv4 over IPv6 addresses to be used. The default is
|
||||||
``+mapped``.
|
``+mapped``.
|
||||||
|
|
||||||
``+[no]multiline``
|
``+[no]multiline``
|
||||||
This option prints [or does not print] records, like the SOA records, in a verbose multi-line format
|
Print records like the SOA records in a verbose multi-line format
|
||||||
with human-readable comments. The default is to print each record on
|
with human-readable comments. The default is to print each record on
|
||||||
a single line to facilitate machine parsing of the ``dig`` output.
|
a single line, to facilitate machine parsing of the ``dig`` output.
|
||||||
|
|
||||||
``+ndots=D``
|
``+ndots=D``
|
||||||
This option sets the number of dots (``D``) that must appear in ``name`` for
|
Set the number of dots that have to appear in ``name`` to ``D`` for
|
||||||
it to be considered absolute. The default value is that defined using
|
it to be considered absolute. The default value is that defined using
|
||||||
the ``ndots`` statement in ``/etc/resolv.conf``, or 1 if no ``ndots``
|
the ndots statement in ``/etc/resolv.conf``, or 1 if no ndots
|
||||||
statement is present. Names with fewer dots are interpreted as
|
statement is present. Names with fewer dots are interpreted as
|
||||||
relative names, and are searched for in the domains listed in the
|
relative names and will be searched for in the domains listed in the
|
||||||
``search`` or ``domain`` directive in ``/etc/resolv.conf`` if
|
``search`` or ``domain`` directive in ``/etc/resolv.conf`` if
|
||||||
``+search`` is set.
|
``+search`` is set.
|
||||||
|
|
||||||
``+[no]nsid``
|
``+[no]nsid``
|
||||||
When enabled, this option includes an EDNS name server ID request when sending a query.
|
Include an EDNS name server ID request when sending a query.
|
||||||
|
|
||||||
``+[no]nssearch``
|
``+[no]nssearch``
|
||||||
When this option is set, ``dig`` attempts to find the authoritative
|
When this option is set, ``dig`` attempts to find the authoritative
|
||||||
name servers for the zone containing the name being looked up, and
|
name servers for the zone containing the name being looked up and
|
||||||
display the SOA record that each name server has for the zone.
|
display the SOA record that each name server has for the zone.
|
||||||
Addresses of servers that did not respond are also printed.
|
Addresses of servers that that did not respond are also printed.
|
||||||
|
|
||||||
``+[no]onesoa``
|
``+[no]onesoa``
|
||||||
When enabled, this option prints only one (starting) SOA record when performing an AXFR. The
|
Print only one (starting) SOA record when performing an AXFR. The
|
||||||
default is to print both the starting and ending SOA records.
|
default is to print both the starting and ending SOA records.
|
||||||
|
|
||||||
``+[no]opcode=value``
|
``+[no]opcode=value``
|
||||||
When enabled, this option sets (restores) the DNS message opcode to the specified value. The
|
Set [restore] the DNS message opcode to the specified value. The
|
||||||
default value is QUERY (0).
|
default value is QUERY (0).
|
||||||
|
|
||||||
``+padding=value``
|
``+padding=value``
|
||||||
This option pads the size of the query packet using the EDNS Padding option to
|
Pad the size of the query packet using the EDNS Padding option to
|
||||||
blocks of ``value`` bytes. For example, ``+padding=32`` causes a
|
blocks of ``value`` bytes. For example, ``+padding=32`` would cause a
|
||||||
48-byte query to be padded to 64 bytes. The default block size is 0,
|
48-byte query to be padded to 64 bytes. The default block size is 0,
|
||||||
which disables padding; the maximum is 512. Values are ordinarily
|
which disables padding. The maximum is 512. Values are ordinarily
|
||||||
expected to be powers of two, such as 128; however, this is not
|
expected to be powers of two, such as 128; however, this is not
|
||||||
mandatory. Responses to padded queries may also be padded, but only
|
mandatory. Responses to padded queries may also be padded, but only
|
||||||
if the query uses TCP or DNS COOKIE.
|
if the query uses TCP or DNS COOKIE.
|
||||||
|
|
||||||
``+qid=value``
|
``+qid=value``
|
||||||
This option specifies the query ID to use when sending queries.
|
|
||||||
|
Specify the query ID to use when sending queries.
|
||||||
|
|
||||||
``+[no]qr``
|
``+[no]qr``
|
||||||
This option toggles the display of the query message as it is sent. By default, the query
|
Toggles the display of the query message as it is sent. By default, the query
|
||||||
is not printed.
|
is not printed.
|
||||||
|
|
||||||
``+[no]question``
|
``+[no]question``
|
||||||
This option toggles the display of the question section of a query when an answer is
|
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.
|
returned. The default is to print the question section as a comment.
|
||||||
|
|
||||||
``+[no]raflag``
|
``+[no]raflag``
|
||||||
This option sets [or does not set] the RA (Recursion Available) bit in the query. The
|
Set [do not set] the RA (Recursion Available) bit in the query. The
|
||||||
default is ``+noraflag``. This bit is ignored by the server for
|
default is +noraflag. This bit should be ignored by the server for
|
||||||
QUERY.
|
QUERY.
|
||||||
|
|
||||||
``+[no]rdflag``
|
``+[no]rdflag``
|
||||||
This option is a synonym for ``+[no]recurse``.
|
A synonym for ``+[no]recurse``.
|
||||||
|
|
||||||
``+[no]recurse``
|
``+[no]recurse``
|
||||||
This option toggles the setting of the RD (recursion desired) bit in the query.
|
Toggle the setting of the RD (recursion desired) bit in the query.
|
||||||
This bit is set by default, which means ``dig`` normally sends
|
This bit is set by default, which means ``dig`` normally sends
|
||||||
recursive queries. Recursion is automatically disabled when the
|
recursive queries. Recursion is automatically disabled when the
|
||||||
``+nssearch`` or ``+trace`` query option is used.
|
``+nssearch`` or ``+trace`` query options are used.
|
||||||
|
|
||||||
``+retry=T``
|
``+retry=T``
|
||||||
This option sets the number of times to retry UDP and TCP queries to server to ``T``
|
Sets the number of times to retry UDP queries to server to ``T``
|
||||||
instead of the default, 2. Unlike ``+tries``, this does not include
|
instead of the default, 2. Unlike ``+tries``, this does not include
|
||||||
the initial query.
|
the initial query.
|
||||||
|
|
||||||
``+[no]rrcomments``
|
``+[no]rrcomments``
|
||||||
This option toggles the display of per-record comments in the output (for example,
|
Toggle the display of per-record comments in the output (for example,
|
||||||
human-readable key information about DNSKEY records). The default is
|
human-readable key information about DNSKEY records). The default is
|
||||||
not to print record comments unless multiline mode is active.
|
not to print record comments unless multiline mode is active.
|
||||||
|
|
||||||
``+[no]search``
|
``+[no]search``
|
||||||
This option uses [or does not use] the search list defined by the searchlist or domain
|
Use [do not use] the search list defined by the searchlist or domain
|
||||||
directive in ``resolv.conf``, if any. The search list is not used by
|
directive in ``resolv.conf`` (if any). The search list is not used by
|
||||||
default.
|
default.
|
||||||
|
|
||||||
``ndots`` from ``resolv.conf`` (default 1), which may be overridden by
|
'ndots' from ``resolv.conf`` (default 1) which may be overridden by
|
||||||
``+ndots``, determines whether the name is treated as relative
|
``+ndots`` determines if the name will be treated as relative or not
|
||||||
and hence whether a search is eventually performed.
|
and hence whether a search is eventually performed or not.
|
||||||
|
|
||||||
``+[no]short``
|
``+[no]short``
|
||||||
This option toggles whether a terse answer is provided. The default is to print the answer in a verbose
|
Provide a terse answer. The default is to print the answer in a verbose
|
||||||
form. This option always has a global effect; it cannot be set globally and
|
form. This option always has global effect; it cannot be set globally and
|
||||||
then overridden on a per-lookup basis.
|
then overridden on a per-lookup basis.
|
||||||
|
|
||||||
``+[no]showbadcookie``
|
|
||||||
This option toggles whether to show the message containing the
|
|
||||||
BADCOOKIE rcode before retrying the request or not. The default
|
|
||||||
is to not show the messages.
|
|
||||||
|
|
||||||
``+[no]showsearch``
|
``+[no]showsearch``
|
||||||
This option performs [or does not perform] a search showing intermediate results.
|
Perform [do not perform] a search showing intermediate results.
|
||||||
|
|
||||||
``+[no]sigchase``
|
``+[no]sigchase``
|
||||||
This feature is now obsolete and has been removed; use ``delv``
|
This feature is now obsolete and has been removed; use ``delv``
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
``+split=W``
|
``+split=W``
|
||||||
This option splits long hex- or base64-formatted fields in resource records into
|
Split long hex- or base64-formatted fields in resource records into
|
||||||
chunks of ``W`` characters (where ``W`` is rounded up to the nearest
|
chunks of ``W`` characters (where ``W`` is rounded up to the nearest
|
||||||
multiple of 4). ``+nosplit`` or ``+split=0`` causes fields not to be
|
multiple of 4). ``+nosplit`` or ``+split=0`` causes fields not to be
|
||||||
split at all. The default is 56 characters, or 44 characters when
|
split at all. The default is 56 characters, or 44 characters when
|
||||||
multiline mode is active.
|
multiline mode is active.
|
||||||
|
|
||||||
``+[no]stats``
|
``+[no]stats``
|
||||||
This option toggles the printing of statistics: when the query was made, the size of the
|
Toggles the printing of statistics: when the query was made, the size of the
|
||||||
reply, etc. The default behavior is to print the query statistics as a
|
reply and so on. The default behavior is to print the query statistics as a
|
||||||
comment after each lookup.
|
comment after each lookup.
|
||||||
|
|
||||||
``+[no]subnet=addr[/prefix-length]``
|
``+[no]subnet=addr[/prefix-length]``
|
||||||
This option sends [or does not send] an EDNS CLIENT-SUBNET option with the specified IP
|
Send (don't send) an EDNS Client Subnet option with the specified IP
|
||||||
address or network prefix.
|
address or network prefix.
|
||||||
|
|
||||||
``dig +subnet=0.0.0.0/0``, or simply ``dig +subnet=0`` for short,
|
``dig +subnet=0.0.0.0/0``, or simply ``dig +subnet=0`` for short,
|
||||||
@@ -537,75 +505,75 @@ abbreviation is unambiguous; for example, ``+cd`` is equivalent to
|
|||||||
address information must *not* be used when resolving this query.
|
address information must *not* be used when resolving this query.
|
||||||
|
|
||||||
``+[no]tcflag``
|
``+[no]tcflag``
|
||||||
This option sets [or does not set] the TC (TrunCation) bit in the query. The default is
|
Set [do not set] the TC (TrunCation) bit in the query. The default is
|
||||||
``+notcflag``. This bit is ignored by the server for QUERY.
|
+notcflag. This bit should be ignored by the server for QUERY.
|
||||||
|
|
||||||
``+[no]tcp``
|
``+[no]tcp``
|
||||||
This option indicates whether to use TCP when querying name servers.
|
Use [do not use] TCP when querying name servers. The default behavior
|
||||||
The default behavior is to use UDP unless a type ``any`` or ``ixfr=N``
|
is to use UDP unless a type ``any`` or ``ixfr=N`` query is requested,
|
||||||
query is requested, in which case the default is TCP. AXFR queries
|
in which case the default is TCP. AXFR queries always use TCP.
|
||||||
always use TCP.
|
|
||||||
|
|
||||||
``+timeout=T``
|
``+timeout=T``
|
||||||
This option sets the timeout for a query to ``T`` seconds. The default timeout is
|
Sets the timeout for a query to ``T`` seconds. The default timeout is
|
||||||
5 seconds. An attempt to set ``T`` to less than 1 is silently set to 1.
|
5 seconds. An attempt to set ``T`` to less than 1 will result in a
|
||||||
|
query timeout of 1 second being applied.
|
||||||
``+[no]tls``
|
|
||||||
This option indicates whether to use DNS-over-TLS (DoT) when querying
|
|
||||||
name servers. When this option is in use, the port number defaults
|
|
||||||
to 853.
|
|
||||||
|
|
||||||
``+[no]topdown``
|
``+[no]topdown``
|
||||||
This feature is related to ``dig +sigchase``, which is obsolete and
|
This feature is related to ``dig +sigchase``, which is obsolete and
|
||||||
has been removed. Use ``delv`` instead.
|
has been removed. Use ``delv`` instead.
|
||||||
|
|
||||||
``+[no]trace``
|
``+[no]trace``
|
||||||
This option toggles tracing of the delegation path from the root name servers for
|
Toggle tracing of the delegation path from the root name servers for
|
||||||
the name being looked up. Tracing is disabled by default. When
|
the name being looked up. Tracing is disabled by default. When
|
||||||
tracing is enabled, ``dig`` makes iterative queries to resolve the
|
tracing is enabled, ``dig`` makes iterative queries to resolve the
|
||||||
name being looked up. It follows referrals from the root servers,
|
name being looked up. It will follow referrals from the root servers,
|
||||||
showing the answer from each server that was used to resolve the
|
showing the answer from each server that was used to resolve the
|
||||||
lookup.
|
lookup.
|
||||||
|
|
||||||
If ``@server`` is also specified, it affects only the initial query for
|
If @server is also specified, it affects only the initial query for
|
||||||
the root zone name servers.
|
the root zone name servers.
|
||||||
|
|
||||||
``+dnssec`` is also set when ``+trace`` is set, to better emulate the
|
``+dnssec`` is also set when +trace is set to better emulate the
|
||||||
default queries from a name server.
|
default queries from a nameserver.
|
||||||
|
|
||||||
``+tries=T``
|
``+tries=T``
|
||||||
This option sets the number of times to try UDP and TCP queries to server to ``T``
|
Sets the number of times to try UDP queries to server to ``T``
|
||||||
instead of the default, 3. If ``T`` is less than or equal to zero,
|
instead of the default, 3. If ``T`` is less than or equal to zero,
|
||||||
the number of tries is silently rounded up to 1.
|
the number of tries is silently rounded up to 1.
|
||||||
|
|
||||||
``+trusted-key=####``
|
``+trusted-key=####``
|
||||||
This option formerly specified trusted keys for use with ``dig +sigchase``. This
|
Formerly specified trusted keys for use with ``dig +sigchase``. This
|
||||||
feature is now obsolete and has been removed; use ``delv`` instead.
|
feature is now obsolete and has been removed; use ``delv`` instead.
|
||||||
|
|
||||||
``+[no]ttlid``
|
``+[no]ttlid``
|
||||||
This option displays [or does not display] the TTL when printing the record.
|
Display [do not display] the TTL when printing the record.
|
||||||
|
|
||||||
``+[no]ttlunits``
|
``+[no]ttlunits``
|
||||||
This option displays [or does not display] the TTL in friendly human-readable time
|
Display [do not display] the TTL in friendly human-readable time
|
||||||
units of ``s``, ``m``, ``h``, ``d``, and ``w``, representing seconds, minutes,
|
units of "s", "m", "h", "d", and "w", representing seconds, minutes,
|
||||||
hours, days, and weeks. This implies ``+ttlid``.
|
hours, days and weeks. Implies +ttlid.
|
||||||
|
|
||||||
|
``+[no]unexpected``
|
||||||
|
Accept [do not accept] answers from unexpected sources. By default, ``dig``
|
||||||
|
won't accept a reply from a source other than the one to which it sent the
|
||||||
|
query.
|
||||||
|
|
||||||
``+[no]unknownformat``
|
``+[no]unknownformat``
|
||||||
This option prints all RDATA in unknown RR type presentation format (:rfc:`3597`).
|
Print all RDATA in unknown RR type presentation format (:rfc:`3597`).
|
||||||
The default is to print RDATA for known types in the type's
|
The default is to print RDATA for known types in the type's
|
||||||
presentation format.
|
presentation format.
|
||||||
|
|
||||||
``+[no]vc``
|
``+[no]vc``
|
||||||
This option uses [or does not use] TCP when querying name servers. This alternate
|
Use [do not use] TCP when querying name servers. This alternate
|
||||||
syntax to ``+[no]tcp`` is provided for backwards compatibility. The
|
syntax to ``+[no]tcp`` is provided for backwards compatibility. The
|
||||||
``vc`` stands for "virtual circuit."
|
"vc" stands for "virtual circuit".
|
||||||
|
|
||||||
``+[no]yaml``
|
``+[no]yaml``
|
||||||
When enabled, this option prints the responses (and, if ``+qr`` is in use, also the
|
Print the responses (and, if <option>+qr</option> is in use, also the
|
||||||
outgoing queries) in a detailed YAML format.
|
outgoing queries) in a detailed YAML format.
|
||||||
|
|
||||||
``+[no]zflag``
|
``+[no]zflag``
|
||||||
This option sets [or does not set] the last unassigned DNS header flag in a DNS query.
|
Set [do not set] the last unassigned DNS header flag in a DNS query.
|
||||||
This flag is off by default.
|
This flag is off by default.
|
||||||
|
|
||||||
Multiple Queries
|
Multiple Queries
|
||||||
@@ -614,12 +582,12 @@ Multiple Queries
|
|||||||
The BIND 9 implementation of ``dig`` supports specifying multiple
|
The BIND 9 implementation of ``dig`` supports specifying multiple
|
||||||
queries on the command line (in addition to supporting the ``-f`` batch
|
queries on the command line (in addition to supporting the ``-f`` batch
|
||||||
file option). Each of those queries can be supplied with its own set of
|
file option). Each of those queries can be supplied with its own set of
|
||||||
flags, options, and query options.
|
flags, options and query options.
|
||||||
|
|
||||||
In this case, each ``query`` argument represents an individual query in
|
In this case, each ``query`` argument represent an individual query in
|
||||||
the command-line syntax described above. Each consists of any of the
|
the command-line syntax described above. Each consists of any of the
|
||||||
standard options and flags, the name to be looked up, an optional query
|
standard options and flags, the name to be looked up, an optional query
|
||||||
type and class, and any query options that should be applied to that
|
type and class and any query options that should be applied to that
|
||||||
query.
|
query.
|
||||||
|
|
||||||
A global set of query options, which should be applied to all queries,
|
A global set of query options, which should be applied to all queries,
|
||||||
@@ -633,12 +601,12 @@ query options. For example:
|
|||||||
|
|
||||||
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||||
|
|
||||||
shows how ``dig`` can be used from the command line to make three
|
shows how ``dig`` could be used from the command line to make three
|
||||||
lookups: an ANY query for ``www.isc.org``, a reverse lookup of 127.0.0.1,
|
lookups: an ANY query for ``www.isc.org``, a reverse lookup of 127.0.0.1
|
||||||
and a query for the NS records of ``isc.org``. A global query option of
|
and a query for the NS records of ``isc.org``. A global query option of
|
||||||
``+qr`` is applied, so that ``dig`` shows the initial query it made for
|
``+qr`` is applied, so that ``dig`` shows the initial query it made for
|
||||||
each lookup. The final query has a local query option of ``+noqr`` which
|
each lookup. The final query has a local query option of ``+noqr`` which
|
||||||
means that ``dig`` does not print the initial query when it looks up the
|
means that ``dig`` will not print the initial query when it looks up the
|
||||||
NS records for ``isc.org``.
|
NS records for ``isc.org``.
|
||||||
|
|
||||||
IDN Support
|
IDN Support
|
||||||
@@ -646,32 +614,12 @@ IDN Support
|
|||||||
|
|
||||||
If ``dig`` has been built with IDN (internationalized domain name)
|
If ``dig`` has been built with IDN (internationalized domain name)
|
||||||
support, it can accept and display non-ASCII domain names. ``dig``
|
support, it can accept and display non-ASCII domain names. ``dig``
|
||||||
appropriately converts character encoding of a domain name before sending
|
appropriately converts character encoding of domain name before sending
|
||||||
a request to a DNS server or displaying a reply from the server.
|
a request to DNS server or displaying a reply from the server. If you'd
|
||||||
To turn off IDN support, use the parameters
|
like to turn off the IDN support for some reason, use parameters
|
||||||
``+noidnin`` and ``+noidnout``, or define the ``IDN_DISABLE`` environment
|
``+noidnin`` and ``+noidnout`` or define the IDN_DISABLE environment
|
||||||
variable.
|
variable.
|
||||||
|
|
||||||
Return Codes
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
|
|
||||||
``dig`` return codes are:
|
|
||||||
|
|
||||||
``0``
|
|
||||||
DNS response received, including NXDOMAIN status
|
|
||||||
|
|
||||||
``1``
|
|
||||||
Usage error
|
|
||||||
|
|
||||||
``8``
|
|
||||||
Couldn't open batch file
|
|
||||||
|
|
||||||
``9``
|
|
||||||
No reply from server
|
|
||||||
|
|
||||||
``10``
|
|
||||||
Internal error
|
|
||||||
|
|
||||||
Files
|
Files
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
|
|||||||
+1095
-1004
File diff suppressed because it is too large
Load Diff
+45
-70
@@ -3,13 +3,14 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#ifndef DIG_H
|
||||||
|
#define DIG_H
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -18,16 +19,15 @@
|
|||||||
|
|
||||||
#include <isc/attributes.h>
|
#include <isc/attributes.h>
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.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/magic.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/netmgr.h>
|
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/refcount.h>
|
|
||||||
#include <isc/sockaddr.h>
|
#include <isc/sockaddr.h>
|
||||||
#include <isc/time.h>
|
#include <isc/socket.h>
|
||||||
|
|
||||||
#include <dns/rdatalist.h>
|
#include <dns/rdatalist.h>
|
||||||
|
|
||||||
@@ -71,12 +71,6 @@
|
|||||||
#define SERVER_TIMEOUT 1
|
#define SERVER_TIMEOUT 1
|
||||||
|
|
||||||
#define LOOKUP_LIMIT 64
|
#define LOOKUP_LIMIT 64
|
||||||
|
|
||||||
#define DEFAULT_EDNS_VERSION 0
|
|
||||||
#define DEFAULT_EDNS_BUFSIZE 1232
|
|
||||||
|
|
||||||
#define DEFAULT_HTTPS_QUERY "?dns="
|
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
* Lookup_limit is just a limiter, keeping too many lookups from being
|
* Lookup_limit is just a limiter, keeping too many lookups from being
|
||||||
* created. It's job is mainly to prevent the program from running away
|
* created. It's job is mainly to prevent the program from running away
|
||||||
@@ -91,39 +85,37 @@ 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_LOOKUP_MAGIC ISC_MAGIC('D', 'i', 'g', 'l')
|
|
||||||
|
|
||||||
#define DIG_VALID_LOOKUP(x) ISC_MAGIC_VALID((x), DIG_LOOKUP_MAGIC)
|
|
||||||
|
|
||||||
#define DIG_QUERY_MAGIC ISC_MAGIC('D', 'i', 'g', 'q')
|
#define DIG_QUERY_MAGIC ISC_MAGIC('D', 'i', 'g', 'q')
|
||||||
|
|
||||||
#define DIG_VALID_QUERY(x) ISC_MAGIC_VALID((x), DIG_QUERY_MAGIC)
|
#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 {
|
||||||
unsigned int magic;
|
bool pending, /*%< Pending a successful answer */
|
||||||
isc_refcount_t references;
|
waiting_connect, doing_xfr, ns_search_only, /*%< dig
|
||||||
bool aaonly, adflag, badcookie, besteffort, cdflag, comments,
|
* +nssearch,
|
||||||
dns64prefix, dnssec, doing_xfr, done_as_is, ednsneg, expandaaaa,
|
* host -C */
|
||||||
expire, header_only, identify, /*%< Append an "on server <foo>"
|
identify, /*%< Append an "on server <foo>" message */
|
||||||
message */
|
identify_previous_line, /*% Prepend a "Nameserver <foo>:"
|
||||||
identify_previous_line, /*% Prepend a "Nameserver <foo>:"
|
* message, with newline and tab */
|
||||||
message, with newline and tab */
|
ignore, recurse, aaonly, adflag, cdflag, raflag, tcflag, zflag,
|
||||||
idnin, idnout, ignore, mapped, multiline, need_search,
|
trace, /*% dig +trace */
|
||||||
new_search, noclass, nocrypto, nottl,
|
trace_root, /*% initial query for either +trace or +nssearch
|
||||||
ns_search_only, /*%< dig +nssearch, host -C */
|
* */
|
||||||
nsid, /*% Name Server ID (RFC 5001) */
|
tcp_mode, tcp_mode_set, comments, stats, section_question,
|
||||||
onesoa, pending, /*%< Pending a successful answer */
|
section_answer, section_authority, section_additional,
|
||||||
print_unknown_format, qr, raflag, recurse, section_additional,
|
servfail_stops, new_search, need_search, done_as_is, besteffort,
|
||||||
section_answer, section_authority, section_question,
|
dnssec, expire, sendcookie, seenbadcookie, badcookie,
|
||||||
seenbadcookie, sendcookie, servfail_stops,
|
nsid, /*% Name Server ID (RFC 5001) */
|
||||||
setqid, /*% use a speciied query ID */
|
tcp_keepalive, header_only, ednsneg, mapped,
|
||||||
showbadcookie, stats, tcflag, tcp_keepalive, tcp_mode,
|
print_unknown_format, multiline, nottl, noclass, onesoa,
|
||||||
tcp_mode_set, tls_mode, /*% connect using TLS */
|
use_usec, nocrypto, ttlunits, idnin, idnout, expandaaaa, qr,
|
||||||
trace, /*% dig +trace */
|
accept_reply_unexpected_src, /*% print replies from
|
||||||
trace_root, /*% initial query for either +trace or +nssearch */
|
* unexpected
|
||||||
ttlunits, use_usec, waiting_connect, zflag;
|
* sources. */
|
||||||
char textname[MXNAME]; /*% Name we're going to be looking up */
|
setqid; /*% use a speciied query ID */
|
||||||
|
char textname[MXNAME]; /*% Name we're going to be
|
||||||
|
* looking up */
|
||||||
char cmdline[MXNAME];
|
char cmdline[MXNAME];
|
||||||
dns_rdatatype_t rdtype;
|
dns_rdatatype_t rdtype;
|
||||||
dns_rdatatype_t qrdtype;
|
dns_rdatatype_t qrdtype;
|
||||||
@@ -149,7 +141,7 @@ struct dig_lookup {
|
|||||||
dig_query_t *xfr_q;
|
dig_query_t *xfr_q;
|
||||||
uint32_t retries;
|
uint32_t retries;
|
||||||
int nsfound;
|
int nsfound;
|
||||||
int16_t udpsize;
|
uint16_t udpsize;
|
||||||
int16_t edns;
|
int16_t edns;
|
||||||
int16_t padding;
|
int16_t padding;
|
||||||
uint32_t ixfr_serial;
|
uint32_t ixfr_serial;
|
||||||
@@ -169,23 +161,15 @@ struct dig_lookup {
|
|||||||
int rrcomments;
|
int rrcomments;
|
||||||
unsigned int eoferr;
|
unsigned int eoferr;
|
||||||
uint16_t qid;
|
uint16_t qid;
|
||||||
struct {
|
|
||||||
bool http_plain;
|
|
||||||
bool https_mode;
|
|
||||||
bool https_get;
|
|
||||||
char *https_path;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*% The dig_query structure */
|
/*% The dig_query structure */
|
||||||
struct dig_query {
|
struct dig_query {
|
||||||
unsigned int magic;
|
unsigned int magic;
|
||||||
dig_lookup_t *lookup;
|
dig_lookup_t *lookup;
|
||||||
bool first_pass;
|
bool waiting_connect, pending_free, waiting_senddone, first_pass,
|
||||||
bool first_soa_rcvd;
|
first_soa_rcvd, second_rr_rcvd, first_repeat_rcvd, recv_made,
|
||||||
bool second_rr_rcvd;
|
warn_id, timedout;
|
||||||
bool first_repeat_rcvd;
|
|
||||||
bool warn_id;
|
|
||||||
uint32_t first_rr_serial;
|
uint32_t first_rr_serial;
|
||||||
uint32_t second_rr_serial;
|
uint32_t second_rr_serial;
|
||||||
uint32_t msg_count;
|
uint32_t msg_count;
|
||||||
@@ -193,12 +177,9 @@ struct dig_query {
|
|||||||
bool ixfr_axfr;
|
bool ixfr_axfr;
|
||||||
char *servname;
|
char *servname;
|
||||||
char *userarg;
|
char *userarg;
|
||||||
isc_buffer_t sendbuf;
|
isc_buffer_t recvbuf, lengthbuf, tmpsendbuf, sendbuf;
|
||||||
char *recvspace, *tmpsendspace, lengthspace[4];
|
char *recvspace, *tmpsendspace, lengthspace[4];
|
||||||
isc_refcount_t references;
|
isc_socket_t *sock;
|
||||||
isc_nmhandle_t *handle;
|
|
||||||
isc_nmhandle_t *readhandle;
|
|
||||||
isc_nmhandle_t *sendhandle;
|
|
||||||
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;
|
||||||
@@ -206,7 +187,6 @@ struct dig_query {
|
|||||||
isc_time_t time_recv;
|
isc_time_t time_recv;
|
||||||
uint64_t byte_count;
|
uint64_t byte_count;
|
||||||
isc_timer_t *timer;
|
isc_timer_t *timer;
|
||||||
isc_tlsctx_t *tlsctx;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dig_server {
|
struct dig_server {
|
||||||
@@ -235,14 +215,13 @@ extern unsigned int extrabytes;
|
|||||||
extern bool check_ra, have_ipv4, have_ipv6, specified_source, usesearch,
|
extern bool check_ra, have_ipv4, have_ipv6, specified_source, usesearch,
|
||||||
showsearch, yaml;
|
showsearch, yaml;
|
||||||
extern in_port_t port;
|
extern in_port_t port;
|
||||||
extern bool port_set;
|
|
||||||
extern unsigned int timeout;
|
extern unsigned int timeout;
|
||||||
extern isc_mem_t *mctx;
|
extern isc_mem_t *mctx;
|
||||||
extern isc_refcount_t sendcount;
|
extern int sendcount;
|
||||||
extern int ndots;
|
extern int ndots;
|
||||||
extern int lookup_counter;
|
extern int lookup_counter;
|
||||||
extern int exitcode;
|
extern int exitcode;
|
||||||
extern isc_sockaddr_t localaddr;
|
extern isc_sockaddr_t bind_address;
|
||||||
extern char keynametext[MXNAME];
|
extern char keynametext[MXNAME];
|
||||||
extern char keyfile[MXNAME];
|
extern char keyfile[MXNAME];
|
||||||
extern char keysecret[MXNAME];
|
extern char keysecret[MXNAME];
|
||||||
@@ -407,41 +386,37 @@ setup_text_key(void);
|
|||||||
* Routines exported from dig.c for use by dig for iOS
|
* Routines exported from dig.c for use by dig for iOS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*%
|
/*%<
|
||||||
* Call once only to set up libraries, parse global
|
* Call once only to set up libraries, parse global
|
||||||
* parameters and initial command line query parameters
|
* parameters and initial command line query parameters
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dig_setup(int argc, char **argv);
|
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(bool, bool, int argc, char **argv);
|
||||||
|
|
||||||
/*%
|
/*%<
|
||||||
* set the main application event cycle running
|
* set the main application event cycle running
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dig_startup(void);
|
dig_startup(void);
|
||||||
|
|
||||||
/*%
|
/*%<
|
||||||
* Initiates the next lookup cycle
|
* Initiates the next lookup cycle
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dig_query_start(void);
|
dig_query_start(void);
|
||||||
|
|
||||||
/*%
|
/*%<
|
||||||
* Activate/deactivate IDN filtering of output.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
dig_idnsetup(dig_lookup_t *lookup, bool active);
|
|
||||||
|
|
||||||
/*%
|
|
||||||
* Cleans up the application
|
* Cleans up the application
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dig_shutdown(void);
|
dig_shutdown(void);
|
||||||
|
|
||||||
ISC_LANG_ENDDECLS
|
ISC_LANG_ENDDECLS
|
||||||
|
|
||||||
|
#endif /* ifndef DIG_H */
|
||||||
|
|||||||
+8
-9
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -13,10 +13,13 @@
|
|||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <locale.h>
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LOCALE_H
|
||||||
|
#include <locale.h>
|
||||||
|
#endif /* ifdef HAVE_LOCALE_H */
|
||||||
|
|
||||||
#include <isc/app.h>
|
#include <isc/app.h>
|
||||||
#include <isc/attributes.h>
|
#include <isc/attributes.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
@@ -148,11 +151,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
|||||||
if (!short_form) {
|
if (!short_form) {
|
||||||
char fromtext[ISC_SOCKADDR_FORMATSIZE];
|
char fromtext[ISC_SOCKADDR_FORMATSIZE];
|
||||||
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
|
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
|
||||||
if (query->lookup->use_usec) {
|
TIME_NOW(&now);
|
||||||
TIME_NOW_HIRES(&now);
|
|
||||||
} else {
|
|
||||||
TIME_NOW(&now);
|
|
||||||
}
|
|
||||||
diff = (int)isc_time_microdiff(&now, &query->time_sent);
|
diff = (int)isc_time_microdiff(&now, &query->time_sent);
|
||||||
printf("Received %u bytes from %s in %d ms\n", bytes, fromtext,
|
printf("Received %u bytes from %s in %d ms\n", bytes, fromtext,
|
||||||
diff / 1000);
|
diff / 1000);
|
||||||
@@ -376,7 +375,7 @@ 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_copy(&cname.cname, qname);
|
dns_name_copynf(&cname.cname, qname);
|
||||||
dns_rdata_freestruct(&cname);
|
dns_rdata_freestruct(&cname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -439,7 +438,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
|
|
||||||
/* Add AAAA and MX lookups. */
|
/* Add AAAA and MX lookups. */
|
||||||
name = dns_fixedname_initname(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
dns_name_copy(query->lookup->name, name);
|
dns_name_copynf(query->lookup->name, name);
|
||||||
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, false);
|
||||||
|
|||||||
+68
-68
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -36,12 +36,12 @@ Description
|
|||||||
|
|
||||||
``host`` is a simple utility for performing DNS lookups. It is normally
|
``host`` is a simple utility for performing DNS lookups. It is normally
|
||||||
used to convert names to IP addresses and vice versa. When no arguments
|
used to convert names to IP addresses and vice versa. When no arguments
|
||||||
or options are given, ``host`` prints a short summary of its
|
or options are given, ``host`` prints a short summary of its command
|
||||||
command-line arguments and options.
|
line arguments and options.
|
||||||
|
|
||||||
``name`` is the domain name that is to be looked up. It can also be a
|
``name`` is the domain name that is to be looked up. It can also be a
|
||||||
dotted-decimal IPv4 address or a colon-delimited IPv6 address, in which
|
dotted-decimal IPv4 address or a colon-delimited IPv6 address, in which
|
||||||
case ``host`` by default performs a reverse lookup for that address.
|
case ``host`` will by default perform a reverse lookup for that address.
|
||||||
``server`` is an optional argument which is either the name or IP
|
``server`` is an optional argument which is either the name or IP
|
||||||
address of the name server that ``host`` should query instead of the
|
address of the name server that ``host`` should query instead of the
|
||||||
server or servers listed in ``/etc/resolv.conf``.
|
server or servers listed in ``/etc/resolv.conf``.
|
||||||
@@ -49,111 +49,111 @@ server or servers listed in ``/etc/resolv.conf``.
|
|||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-4``
|
**-4**
|
||||||
This option specifies that only IPv4 should be used for query transport. See also the ``-6`` option.
|
Use IPv4 only for query transport. See also the ``-6`` option.
|
||||||
|
|
||||||
``-6``
|
**-6**
|
||||||
This option specifies that only IPv6 should be used for query transport. See also the ``-4`` option.
|
Use IPv6 only for query transport. See also the ``-4`` option.
|
||||||
|
|
||||||
``-a``
|
**-a**
|
||||||
The ``-a`` ("all") option is normally equivalent to ``-v -t ANY``. It
|
"All". The ``-a`` option is normally equivalent to ``-v -t ANY``. It
|
||||||
also affects the behavior of the ``-l`` list zone option.
|
also affects the behaviour of the ``-l`` list zone option.
|
||||||
|
|
||||||
``-A``
|
**-A**
|
||||||
The ``-A`` ("almost all") option is equivalent to ``-a``, except that RRSIG,
|
"Almost all". The ``-A`` option is equivalent to ``-a`` except RRSIG,
|
||||||
NSEC, and NSEC3 records are omitted from the output.
|
NSEC, and NSEC3 records are omitted from the output.
|
||||||
|
|
||||||
``-c class``
|
**-c** class
|
||||||
This option specifies the query class, which can be used to lookup HS (Hesiod) or CH (Chaosnet)
|
Query class: This can be used to lookup HS (Hesiod) or CH (Chaosnet)
|
||||||
class resource records. The default class is IN (Internet).
|
class resource records. The default class is IN (Internet).
|
||||||
|
|
||||||
``-C``
|
**-C**
|
||||||
This option indicates that ``named`` should check consistency, meaning that ``host`` queries the SOA records for zone
|
Check consistency: ``host`` will query the SOA records for zone
|
||||||
``name`` from all the listed authoritative name servers for that
|
``name`` from all the listed authoritative name servers for that
|
||||||
zone. The list of name servers is defined by the NS records that are
|
zone. The list of name servers is defined by the NS records that are
|
||||||
found for the zone.
|
found for the zone.
|
||||||
|
|
||||||
``-d``
|
**-d**
|
||||||
This option prints debugging traces, and is equivalent to the ``-v`` verbose option.
|
Print debugging traces. Equivalent to the ``-v`` verbose option.
|
||||||
|
|
||||||
``-l``
|
**-l**
|
||||||
This option tells ``named` to list the zone, meaning the ``host`` command performs a zone transfer of zone
|
List zone: The ``host`` command performs a zone transfer of zone
|
||||||
``name`` and prints out the NS, PTR, and address records (A/AAAA).
|
``name`` and prints out the NS, PTR and address records (A/AAAA).
|
||||||
|
|
||||||
Together, the ``-l -a`` options print all records in the zone.
|
Together, the ``-l -a`` options print all records in the zone.
|
||||||
|
|
||||||
``-N ndots``
|
**-N** ndots
|
||||||
This option specifies the number of dots (``ndots``) that have to be in ``name`` for it to be
|
The number of dots that have to be in ``name`` for it to be
|
||||||
considered absolute. The default value is that defined using the
|
considered absolute. The default value is that defined using the
|
||||||
``ndots`` statement in ``/etc/resolv.conf``, or 1 if no ``ndots`` statement
|
ndots statement in ``/etc/resolv.conf``, or 1 if no ndots statement
|
||||||
is present. Names with fewer dots are interpreted as relative names,
|
is present. Names with fewer dots are interpreted as relative names
|
||||||
and are searched for in the domains listed in the ``search`` or
|
and will be searched for in the domains listed in the ``search`` or
|
||||||
``domain`` directive in ``/etc/resolv.conf``.
|
``domain`` directive in ``/etc/resolv.conf``.
|
||||||
|
|
||||||
``-p port``
|
**-p** port
|
||||||
This option specifies the port to query on the server. The default is 53.
|
Specify the port on the server to query. The default is 53.
|
||||||
|
|
||||||
``-r``
|
**-r**
|
||||||
This option specifies a non-recursive query; setting this option clears the RD (recursion
|
Non-recursive query: Setting this option clears the RD (recursion
|
||||||
desired) bit in the query. This means that the name server
|
desired) bit in the query. This should mean that the name server
|
||||||
receiving the query does not attempt to resolve ``name``. The ``-r``
|
receiving the query will not attempt to resolve ``name``. The ``-r``
|
||||||
option enables ``host`` to mimic the behavior of a name server by
|
option enables ``host`` to mimic the behavior of a name server by
|
||||||
making non-recursive queries, and expecting to receive answers to
|
making non-recursive queries and expecting to receive answers to
|
||||||
those queries that can be referrals to other name servers.
|
those queries that can be referrals to other name servers.
|
||||||
|
|
||||||
``-R number``
|
**-R** number
|
||||||
This option specifies the number of retries for UDP queries. If ``number`` is negative or zero,
|
Number of retries for UDP queries: If ``number`` is negative or zero,
|
||||||
the number of retries is silently set to 1. The default value is 1, or
|
the number of retries will default to 1. The default value is 1, or
|
||||||
the value of the ``attempts`` option in ``/etc/resolv.conf``, if set.
|
the value of the ``attempts`` option in ``/etc/resolv.conf``, if set.
|
||||||
|
|
||||||
``-s``
|
**-s**
|
||||||
This option tells ``named`` *not* to send the query to the next nameserver if any server responds
|
Do *not* send the query to the next nameserver if any server responds
|
||||||
with a SERVFAIL response, which is the reverse of normal stub
|
with a SERVFAIL response, which is the reverse of normal stub
|
||||||
resolver behavior.
|
resolver behavior.
|
||||||
|
|
||||||
``-t type``
|
**-t** type
|
||||||
This option specifies the query type. The ``type`` argument can be any recognized query type:
|
Query type: The ``type`` argument can be any recognized query type:
|
||||||
CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
|
CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
|
||||||
|
|
||||||
When no query type is specified, ``host`` automatically selects an
|
When no query type is specified, ``host`` automatically selects an
|
||||||
appropriate query type. By default, it looks for A, AAAA, and MX
|
appropriate query type. By default, it looks for A, AAAA, and MX
|
||||||
records. If the ``-C`` option is given, queries are made for SOA
|
records. If the ``-C`` option is given, queries will be made for SOA
|
||||||
records. If ``name`` is a dotted-decimal IPv4 address or
|
records. If ``name`` is a dotted-decimal IPv4 address or
|
||||||
colon-delimited IPv6 address, ``host`` queries for PTR records.
|
colon-delimited IPv6 address, ``host`` will query for PTR records.
|
||||||
|
|
||||||
If a query type of IXFR is chosen, the starting serial number can be
|
If a query type of IXFR is chosen the starting serial number can be
|
||||||
specified by appending an equals sign (=), followed by the starting serial
|
specified by appending an equal followed by the starting serial
|
||||||
number, e.g., ``-t IXFR=12345678``.
|
number (like ``-t IXFR=12345678``).
|
||||||
|
|
||||||
``-T``; ``-U``
|
**-T**; **-U**
|
||||||
This option specifies TCP or UDP. By default, ``host`` uses UDP when making queries; the
|
TCP/UDP: By default, ``host`` uses UDP when making queries. The
|
||||||
``-T`` option makes it use a TCP connection when querying the name
|
``-T`` option makes it use a TCP connection when querying the name
|
||||||
server. TCP is automatically selected for queries that require
|
server. TCP will be automatically selected for queries that require
|
||||||
it, such as zone transfer (AXFR) requests. Type ``ANY`` queries default
|
it, such as zone transfer (AXFR) requests. Type ANY queries default
|
||||||
to TCP, but can be forced to use UDP initially via ``-U``.
|
to TCP but can be forced to UDP initially using ``-U``.
|
||||||
|
|
||||||
``-m flag``
|
**-m** flag
|
||||||
This option sets memory usage debugging: the flag can be ``record``, ``usage``, or
|
Memory usage debugging: the flag can be ``record``, ``usage``, or
|
||||||
``trace``. The ``-m`` option can be specified more than once to set
|
``trace``. You can specify the ``-m`` option more than once to set
|
||||||
multiple flags.
|
multiple flags.
|
||||||
|
|
||||||
``-v``
|
**-v**
|
||||||
This option sets verbose output, and is equivalent to the ``-d`` debug option. Verbose output
|
Verbose output. Equivalent to the ``-d`` debug option. Verbose output
|
||||||
can also be enabled by setting the ``debug`` option in
|
can also be enabled by setting the ``debug`` option in
|
||||||
``/etc/resolv.conf``.
|
``/etc/resolv.conf``.
|
||||||
|
|
||||||
``-V``
|
**-V**
|
||||||
This option prints the version number and exits.
|
Print the version number and exit.
|
||||||
|
|
||||||
``-w``
|
**-w**
|
||||||
This option sets "wait forever": the query timeout is set to the maximum possible. See
|
Wait forever: The query timeout is set to the maximum possible. See
|
||||||
also the ``-W`` option.
|
also the ``-W`` option.
|
||||||
|
|
||||||
``-W wait``
|
**-W** wait
|
||||||
This options sets the length of the wait timeout, indicating that ``named`` should wait for up to ``wait`` seconds for a reply. If ``wait`` is
|
Timeout: Wait for up to ``wait`` seconds for a reply. If ``wait`` is
|
||||||
less than 1, the wait interval is set to 1 second.
|
less than one, the wait interval is set to one second.
|
||||||
|
|
||||||
By default, ``host`` waits for 5 seconds for UDP responses and 10
|
By default, ``host`` will wait for 5 seconds for UDP responses and 10
|
||||||
seconds for TCP connections. These defaults can be overridden by the
|
seconds for TCP connections. These defaults can be overridden by the
|
||||||
``timeout`` option in ``/etc/resolv.conf``.
|
``timeout`` option in ``/etc/resolv.conf``.
|
||||||
|
|
||||||
@@ -164,10 +164,10 @@ IDN Support
|
|||||||
|
|
||||||
If ``host`` has been built with IDN (internationalized domain name)
|
If ``host`` has been built with IDN (internationalized domain name)
|
||||||
support, it can accept and display non-ASCII domain names. ``host``
|
support, it can accept and display non-ASCII domain names. ``host``
|
||||||
appropriately converts character encoding of a domain name before sending
|
appropriately converts character encoding of domain name before sending
|
||||||
a request to a DNS server or displaying a reply from the server.
|
a request to DNS server or displaying a reply from the server. If you'd
|
||||||
To turn off IDN support, define the ``IDN_DISABLE``
|
like to turn off the IDN support for some reason, define the IDN_DISABLE
|
||||||
environment variable. IDN support is disabled if the variable is set
|
environment variable. The IDN support is disabled if the variable is set
|
||||||
when ``host`` runs.
|
when ``host`` runs.
|
||||||
|
|
||||||
Files
|
Files
|
||||||
|
|||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
../../../.clang-format.headers
|
||||||
+82
-14
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -37,7 +37,22 @@
|
|||||||
#include <dns/rdatatype.h>
|
#include <dns/rdatatype.h>
|
||||||
|
|
||||||
#include "dighost.h"
|
#include "dighost.h"
|
||||||
#include "readline.h"
|
|
||||||
|
#if defined(HAVE_READLINE)
|
||||||
|
#if defined(HAVE_EDIT_READLINE_READLINE_H)
|
||||||
|
#include <edit/readline/readline.h>
|
||||||
|
#if defined(HAVE_EDIT_READLINE_HISTORY_H)
|
||||||
|
#include <edit/readline/history.h>
|
||||||
|
#endif /* if defined(HAVE_EDIT_READLINE_HISTORY_H) */
|
||||||
|
#elif defined(HAVE_EDITLINE_READLINE_H)
|
||||||
|
#include <editline/readline.h>
|
||||||
|
#elif defined(HAVE_READLINE_READLINE_H)
|
||||||
|
#include <readline/readline.h>
|
||||||
|
#if defined(HAVE_READLINE_HISTORY_H)
|
||||||
|
#include <readline/history.h>
|
||||||
|
#endif /* if defined(HAVE_READLINE_HISTORY_H) */
|
||||||
|
#endif /* if defined(HAVE_EDIT_READLINE_READLINE_H) */
|
||||||
|
#endif /* if defined(HAVE_READLINE) */
|
||||||
|
|
||||||
static bool short_form = true, tcpmode = false, tcpmode_set = false,
|
static bool short_form = true, tcpmode = false, tcpmode_set = false,
|
||||||
identify = false, stats = true, comments = true,
|
identify = false, stats = true, comments = true,
|
||||||
@@ -110,6 +125,8 @@ static const char *rtypetext[] = {
|
|||||||
|
|
||||||
#define N_KNOWN_RRTYPES (sizeof(rtypetext) / sizeof(rtypetext[0]))
|
#define N_KNOWN_RRTYPES (sizeof(rtypetext) / sizeof(rtypetext[0]))
|
||||||
|
|
||||||
|
static void
|
||||||
|
flush_lookup_list(void);
|
||||||
static void
|
static void
|
||||||
getinput(isc_task_t *task, isc_event_t *event);
|
getinput(isc_task_t *task, isc_event_t *event);
|
||||||
|
|
||||||
@@ -134,6 +151,7 @@ static void
|
|||||||
query_finished(void) {
|
query_finished(void) {
|
||||||
isc_event_t *event = global_event;
|
isc_event_t *event = global_event;
|
||||||
|
|
||||||
|
flush_lookup_list();
|
||||||
debug("dighost_shutdown()");
|
debug("dighost_shutdown()");
|
||||||
|
|
||||||
if (!in_use) {
|
if (!in_use) {
|
||||||
@@ -391,7 +409,7 @@ 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_copy(&cname.cname, qname);
|
dns_name_copynf(&cname.cname, qname);
|
||||||
dns_rdata_freestruct(&cname);
|
dns_rdata_freestruct(&cname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -448,7 +466,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf, dns_message_t *msg,
|
|||||||
|
|
||||||
/* Add AAAA lookup. */
|
/* Add AAAA lookup. */
|
||||||
name = dns_fixedname_initname(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
dns_name_copy(query->lookup->name, name);
|
dns_name_copynf(query->lookup->name, name);
|
||||||
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, false);
|
||||||
@@ -619,8 +637,6 @@ static void
|
|||||||
setoption(char *opt) {
|
setoption(char *opt) {
|
||||||
size_t l = strlen(opt);
|
size_t l = strlen(opt);
|
||||||
|
|
||||||
debugging = true;
|
|
||||||
|
|
||||||
#define CHECKOPT(A, N) \
|
#define CHECKOPT(A, N) \
|
||||||
((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0))
|
((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0))
|
||||||
|
|
||||||
@@ -771,6 +787,7 @@ addlookup(char *opt) {
|
|||||||
lookup->recurse = recurse;
|
lookup->recurse = recurse;
|
||||||
lookup->aaonly = aaonly;
|
lookup->aaonly = aaonly;
|
||||||
lookup->retries = tries;
|
lookup->retries = tries;
|
||||||
|
lookup->udpsize = 0;
|
||||||
lookup->setqid = false;
|
lookup->setqid = false;
|
||||||
lookup->qid = 0;
|
lookup->qid = 0;
|
||||||
lookup->comments = comments;
|
lookup->comments = comments;
|
||||||
@@ -831,27 +848,38 @@ do_next_command(char *input) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
get_next_command(void) {
|
get_next_command(void) {
|
||||||
char cmdlinebuf[COMMSIZE];
|
char *buf;
|
||||||
char *cmdline, *ptr = NULL;
|
char *ptr;
|
||||||
|
|
||||||
|
fflush(stdout);
|
||||||
|
buf = isc_mem_allocate(mctx, COMMSIZE);
|
||||||
isc_app_block();
|
isc_app_block();
|
||||||
if (interactive) {
|
if (interactive) {
|
||||||
cmdline = ptr = readline("> ");
|
#ifdef HAVE_READLINE
|
||||||
if (ptr != NULL && *ptr != 0) {
|
ptr = readline("> ");
|
||||||
|
if (ptr != NULL) {
|
||||||
add_history(ptr);
|
add_history(ptr);
|
||||||
}
|
}
|
||||||
|
#else /* ifdef HAVE_READLINE */
|
||||||
|
fprintf(stderr, "> ");
|
||||||
|
fflush(stderr);
|
||||||
|
ptr = fgets(buf, COMMSIZE, stdin);
|
||||||
|
#endif /* ifdef HAVE_READLINE */
|
||||||
} else {
|
} else {
|
||||||
cmdline = fgets(cmdlinebuf, COMMSIZE, stdin);
|
ptr = fgets(buf, COMMSIZE, stdin);
|
||||||
}
|
}
|
||||||
isc_app_unblock();
|
isc_app_unblock();
|
||||||
if (cmdline == NULL) {
|
if (ptr == NULL) {
|
||||||
in_use = false;
|
in_use = false;
|
||||||
} else {
|
} else {
|
||||||
do_next_command(cmdline);
|
do_next_command(ptr);
|
||||||
}
|
}
|
||||||
if (ptr != NULL) {
|
#ifdef HAVE_READLINE
|
||||||
|
if (interactive) {
|
||||||
free(ptr);
|
free(ptr);
|
||||||
}
|
}
|
||||||
|
#endif /* ifdef HAVE_READLINE */
|
||||||
|
isc_mem_free(mctx, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
ISC_NORETURN static void
|
ISC_NORETURN static void
|
||||||
@@ -903,6 +931,46 @@ parse_args(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
flush_lookup_list(void) {
|
||||||
|
dig_lookup_t *l, *lp;
|
||||||
|
dig_query_t *q, *qp;
|
||||||
|
dig_server_t *s, *sp;
|
||||||
|
|
||||||
|
lookup_counter = 0;
|
||||||
|
l = ISC_LIST_HEAD(lookup_list);
|
||||||
|
while (l != NULL) {
|
||||||
|
q = ISC_LIST_HEAD(l->q);
|
||||||
|
while (q != NULL) {
|
||||||
|
if (q->sock != NULL) {
|
||||||
|
isc_socket_cancel(q->sock, NULL,
|
||||||
|
ISC_SOCKCANCEL_ALL);
|
||||||
|
isc_socket_detach(&q->sock);
|
||||||
|
}
|
||||||
|
isc_buffer_invalidate(&q->recvbuf);
|
||||||
|
isc_buffer_invalidate(&q->lengthbuf);
|
||||||
|
qp = q;
|
||||||
|
q = ISC_LIST_NEXT(q, link);
|
||||||
|
ISC_LIST_DEQUEUE(l->q, qp, link);
|
||||||
|
isc_mem_free(mctx, qp);
|
||||||
|
}
|
||||||
|
s = ISC_LIST_HEAD(l->my_server_list);
|
||||||
|
while (s != NULL) {
|
||||||
|
sp = s;
|
||||||
|
s = ISC_LIST_NEXT(s, link);
|
||||||
|
ISC_LIST_DEQUEUE(l->my_server_list, sp, link);
|
||||||
|
isc_mem_free(mctx, sp);
|
||||||
|
}
|
||||||
|
if (l->sendmsg != NULL) {
|
||||||
|
dns_message_destroy(&l->sendmsg);
|
||||||
|
}
|
||||||
|
lp = l;
|
||||||
|
l = ISC_LIST_NEXT(l, link);
|
||||||
|
ISC_LIST_DEQUEUE(lookup_list, lp, link);
|
||||||
|
isc_mem_free(mctx, lp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
getinput(isc_task_t *task, isc_event_t *event) {
|
getinput(isc_task_t *task, isc_event_t *event) {
|
||||||
UNUSED(task);
|
UNUSED(task);
|
||||||
|
|||||||
+79
-69
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -34,11 +34,11 @@ Synopsis
|
|||||||
Description
|
Description
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
``nslookup`` is a program to query Internet domain name servers.
|
``Nslookup`` is a program to query Internet domain name servers.
|
||||||
``nslookup`` has two modes: interactive and non-interactive. Interactive
|
``Nslookup`` has two modes: interactive and non-interactive. Interactive
|
||||||
mode allows the user to query name servers for information about various
|
mode allows the user to query name servers for information about various
|
||||||
hosts and domains or to print a list of hosts in a domain.
|
hosts and domains or to print a list of hosts in a domain.
|
||||||
Non-interactive mode prints just the name and requested
|
Non-interactive mode is used to print just the name and requested
|
||||||
information for a host or domain.
|
information for a host or domain.
|
||||||
|
|
||||||
Arguments
|
Arguments
|
||||||
@@ -46,7 +46,7 @@ Arguments
|
|||||||
|
|
||||||
Interactive mode is entered in the following cases:
|
Interactive mode is entered in the following cases:
|
||||||
|
|
||||||
a. when no arguments are given (the default name server is used);
|
a. when no arguments are given (the default name server will be used)
|
||||||
|
|
||||||
b. when the first argument is a hyphen (-) and the second argument is
|
b. when the first argument is a hyphen (-) and the second argument is
|
||||||
the host name or Internet address of a name server.
|
the host name or Internet address of a name server.
|
||||||
@@ -57,7 +57,7 @@ argument specifies the host name or address of a name server.
|
|||||||
|
|
||||||
Options can also be specified on the command line if they precede the
|
Options can also be specified on the command line if they precede the
|
||||||
arguments and are prefixed with a hyphen. For example, to change the
|
arguments and are prefixed with a hyphen. For example, to change the
|
||||||
default query type to host information, with an initial timeout of 10
|
default query type to host information, and the initial timeout to 10
|
||||||
seconds, type:
|
seconds, type:
|
||||||
|
|
||||||
::
|
::
|
||||||
@@ -65,59 +65,59 @@ seconds, type:
|
|||||||
nslookup -query=hinfo -timeout=10
|
nslookup -query=hinfo -timeout=10
|
||||||
|
|
||||||
The ``-version`` option causes ``nslookup`` to print the version number
|
The ``-version`` option causes ``nslookup`` to print the version number
|
||||||
and immediately exit.
|
and immediately exits.
|
||||||
|
|
||||||
Interactive Commands
|
Interactive Commands
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
``host [server]``
|
``host`` [server]
|
||||||
This command looks up information for ``host`` using the current default server or
|
Look up information for host using the current default server or
|
||||||
using ``server``, if specified. If ``host`` is an Internet address and the
|
using server, if specified. If host is an Internet address and the
|
||||||
query type is A or PTR, the name of the host is returned. If ``host`` is
|
query type is A or PTR, the name of the host is returned. If host is
|
||||||
a name and does not have a trailing period (``.``), the search list is used
|
a name and does not have a trailing period, the search list is used
|
||||||
to qualify the name.
|
to qualify the name.
|
||||||
|
|
||||||
To look up a host not in the current domain, append a period to the
|
To look up a host not in the current domain, append a period to the
|
||||||
name.
|
name.
|
||||||
|
|
||||||
``server domain`` | ``lserver domain``
|
``server`` domain | ``lserver`` domain
|
||||||
These commands change the default server to ``domain``; ``lserver`` uses the initial
|
Change the default server to domain; ``lserver`` uses the initial
|
||||||
server to look up information about ``domain``, while ``server`` uses the
|
server to look up information about domain, while ``server`` uses the
|
||||||
current default server. If an authoritative answer cannot be found,
|
current default server. If an authoritative answer can't be found,
|
||||||
the names of servers that might have the answer are returned.
|
the names of servers that might have the answer are returned.
|
||||||
|
|
||||||
``root``
|
``root``
|
||||||
This command is not implemented.
|
not implemented
|
||||||
|
|
||||||
``finger``
|
``finger``
|
||||||
This command is not implemented.
|
not implemented
|
||||||
|
|
||||||
``ls``
|
``ls``
|
||||||
This command is not implemented.
|
not implemented
|
||||||
|
|
||||||
``view``
|
``view``
|
||||||
This command is not implemented.
|
not implemented
|
||||||
|
|
||||||
``help``
|
``help``
|
||||||
This command is not implemented.
|
not implemented
|
||||||
|
|
||||||
``?``
|
``?``
|
||||||
This command is not implemented.
|
not implemented
|
||||||
|
|
||||||
``exit``
|
``exit``
|
||||||
This command exits the program.
|
Exits the program.
|
||||||
|
|
||||||
``set keyword[=value]``
|
``set`` keyword[=value]
|
||||||
This command is used to change state information that affects the
|
This command is used to change state information that affects the
|
||||||
lookups. Valid keywords are:
|
lookups. Valid keywords are:
|
||||||
|
|
||||||
``all``
|
``all``
|
||||||
This keyword prints the current values of the frequently used options to
|
Prints the current values of the frequently used options to
|
||||||
``set``. Information about the current default server and host is
|
``set``. Information about the current default server and host is
|
||||||
also printed.
|
also printed.
|
||||||
|
|
||||||
``class=value``
|
``class=``\ value
|
||||||
This keyword changes the query class to one of:
|
Change the query class to one of:
|
||||||
|
|
||||||
``IN``
|
``IN``
|
||||||
the Internet class
|
the Internet class
|
||||||
@@ -131,62 +131,72 @@ Interactive Commands
|
|||||||
``ANY``
|
``ANY``
|
||||||
wildcard
|
wildcard
|
||||||
|
|
||||||
The class specifies the protocol group of the information. The default
|
The class specifies the protocol group of the information.
|
||||||
is ``IN``; the abbreviation for this keyword is ``cl``.
|
|
||||||
|
(Default = IN; abbreviation = cl)
|
||||||
|
|
||||||
``nodebug``
|
``nodebug``
|
||||||
This keyword turns on or off the display of the full response packet, and any
|
Turn on or off the display of the full response packet and any
|
||||||
intermediate response packets, when searching. The default for this keyword is
|
intermediate response packets when searching.
|
||||||
``nodebug``; the abbreviation for this keyword is ``[no]deb``.
|
|
||||||
|
(Default = nodebug; abbreviation = [no]deb)
|
||||||
|
|
||||||
``nod2``
|
``nod2``
|
||||||
This keyword turns debugging mode on or off. This displays more about what
|
Turn debugging mode on or off. This displays more about what
|
||||||
nslookup is doing. The default is ``nod2``.
|
nslookup is doing.
|
||||||
|
|
||||||
``domain=name``
|
(Default = nod2)
|
||||||
This keyword sets the search list to ``name``.
|
|
||||||
|
``domain=``\ name
|
||||||
|
Sets the search list to name.
|
||||||
|
|
||||||
``nosearch``
|
``nosearch``
|
||||||
If the lookup request contains at least one period, but does not end
|
If the lookup request contains at least one period but doesn't end
|
||||||
with a trailing period, this keyword appends the domain names in the domain
|
with a trailing period, append the domain names in the domain
|
||||||
search list to the request until an answer is received. The default is ``search``.
|
search list to the request until an answer is received.
|
||||||
|
|
||||||
``port=value``
|
(Default = search)
|
||||||
This keyword changes the default TCP/UDP name server port to ``value`` from
|
|
||||||
its default, port 53. The abbreviation for this keyword is ``po``.
|
|
||||||
|
|
||||||
``querytype=value`` | ``type=value``
|
``port=``\ value
|
||||||
This keyword changes the type of the information query to ``value``. The
|
Change the default TCP/UDP name server port to value.
|
||||||
defaults are A and then AAAA; the abbreviations for these keywords are
|
|
||||||
``q`` and ``ty``.
|
|
||||||
|
|
||||||
Please note that it is only possible to specify one query type. Only the default
|
(Default = 53; abbreviation = po)
|
||||||
behavior looks up both when an alternative is not specified.
|
|
||||||
|
``querytype=``\ value | ``type=``\ value
|
||||||
|
Change the type of the information query.
|
||||||
|
|
||||||
|
(Default = A and then AAAA; abbreviations = q, ty)
|
||||||
|
|
||||||
|
**Note:** It is only possible to specify one query type, only the default
|
||||||
|
behavior looks up both when an alternative is not specified.
|
||||||
|
|
||||||
``norecurse``
|
``norecurse``
|
||||||
This keyword tells the name server to query other servers if it does not have
|
Tell the name server to query other servers if it does not have
|
||||||
the information. The default is ``recurse``; the abbreviation for this
|
the information.
|
||||||
keyword is ``[no]rec``.
|
|
||||||
|
|
||||||
``ndots=number``
|
(Default = recurse; abbreviation = [no]rec)
|
||||||
This keyword sets the number of dots (label separators) in a domain that
|
|
||||||
disables searching. Absolute names always stop searching.
|
|
||||||
|
|
||||||
``retry=number``
|
``ndots=``\ number
|
||||||
This keyword sets the number of retries to ``number``.
|
Set the number of dots (label separators) in a domain that will
|
||||||
|
disable searching. Absolute names always stop searching.
|
||||||
|
|
||||||
``timeout=number``
|
``retry=``\ number
|
||||||
This keyword changes the initial timeout interval to wait for a reply to
|
Set the number of retries to number.
|
||||||
``number``, in seconds.
|
|
||||||
|
``timeout=``\ number
|
||||||
|
Change the initial timeout interval for waiting for a reply to
|
||||||
|
number seconds.
|
||||||
|
|
||||||
``novc``
|
``novc``
|
||||||
This keyword indicates that a virtual circuit should always be used when sending requests to the server.
|
Always use a virtual circuit when sending requests to the server.
|
||||||
``novc`` is the default.
|
|
||||||
|
(Default = novc)
|
||||||
|
|
||||||
``nofail``
|
``nofail``
|
||||||
This keyword tries the next nameserver if a nameserver responds with SERVFAIL or
|
Try the next nameserver if a nameserver responds with SERVFAIL or
|
||||||
a referral (nofail), or terminates the query (fail) on such a response. The
|
a referral (nofail) or terminate query (fail) on such a response.
|
||||||
default is ``nofail``.
|
|
||||||
|
(Default = nofail)
|
||||||
|
|
||||||
Return Values
|
Return Values
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
@@ -199,11 +209,11 @@ IDN Support
|
|||||||
|
|
||||||
If ``nslookup`` has been built with IDN (internationalized domain name)
|
If ``nslookup`` has been built with IDN (internationalized domain name)
|
||||||
support, it can accept and display non-ASCII domain names. ``nslookup``
|
support, it can accept and display non-ASCII domain names. ``nslookup``
|
||||||
appropriately converts character encoding of a domain name before sending
|
appropriately converts character encoding of domain name before sending
|
||||||
a request to a DNS server or displaying a reply from the server.
|
a request to DNS server or displaying a reply from the server. If you'd
|
||||||
To turn off IDN support, define the ``IDN_DISABLE``
|
like to turn off the IDN support for some reason, define the IDN_DISABLE
|
||||||
environment variable. IDN support is disabled if the variable is set
|
environment variable. The IDN support is disabled if the variable is set
|
||||||
when ``nslookup`` runs, or when the standard output is not a tty.
|
when ``nslookup`` runs or when the standard output is not a tty.
|
||||||
|
|
||||||
Files
|
Files
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*
|
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
|
||||||
* information regarding copyright ownership.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/*
|
|
||||||
* A little wrapper around readline(), add_history() and free() to make using
|
|
||||||
* the readline code simpler.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(HAVE_READLINE_LIBEDIT)
|
|
||||||
#include <editline/readline.h>
|
|
||||||
#elif defined(HAVE_READLINE_EDITLINE)
|
|
||||||
#include <editline.h>
|
|
||||||
#elif defined(HAVE_READLINE_READLINE)
|
|
||||||
/* Prevent deprecated functions being declared. */
|
|
||||||
#define _FUNCTION_DEF 1
|
|
||||||
/* Ensure rl_message() gets prototype. */
|
|
||||||
#define USE_VARARGS 1
|
|
||||||
#define PREFER_STDARG 1
|
|
||||||
#include <readline/history.h>
|
|
||||||
#include <readline/readline.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(HAVE_READLINE_LIBEDIT) && !defined(HAVE_READLINE_EDITLINE) && \
|
|
||||||
!defined(HAVE_READLINE_READLINE)
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#define RL_MAXCMD (128 * 1024)
|
|
||||||
|
|
||||||
static inline char *
|
|
||||||
readline(const char *prompt) {
|
|
||||||
char *line, *buf = malloc(RL_MAXCMD);
|
|
||||||
fprintf(stdout, "%s", prompt);
|
|
||||||
fflush(stdout);
|
|
||||||
line = fgets(buf, RL_MAXCMD, stdin);
|
|
||||||
if (line == NULL) {
|
|
||||||
free(buf);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
return (buf);
|
|
||||||
};
|
|
||||||
|
|
||||||
#define add_history(line)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\include\dig\dig.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\dig.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{F938F9B8-D395-4A40-BEC7-0122D289C692}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>dig</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\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>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\include\dig\dig.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\dig.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||||
|
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\irs\win32\libirs.vcxproj">
|
||||||
|
<Project>{A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\bind9\win32\libbind9.vcxproj">
|
||||||
|
<Project>{E741C10B-B075-4206-9596-46765B665E03}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\bin\dig\win32\dighost.vcxproj">
|
||||||
|
<Project>{140DE800-E552-43CC-B0C7-A33A92E368CA}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\dighost.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{140DE800-E552-43CC-B0C7-A33A92E368CA}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>dighost</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>.\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>.\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<LinkTimeCodeGeneration>false</LinkTimeCodeGeneration>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\dighost.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||||
|
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\irs\win32\libirs.vcxproj">
|
||||||
|
<Project>{A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\bind9\win32\libbind9.vcxproj">
|
||||||
|
<Project>{E741C10B-B075-4206-9596-46765B665E03}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\host.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{BA1048A8-6961-4A20-BE12-08BE20611C9D}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>host</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\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>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||||
|
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\host.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||||
|
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\irs\win32\libirs.vcxproj">
|
||||||
|
<Project>{A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\bind9\win32\libbind9.vcxproj">
|
||||||
|
<Project>{E741C10B-B075-4206-9596-46765B665E03}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\bin\dig\win32\dighost.vcxproj">
|
||||||
|
<Project>{140DE800-E552-43CC-B0C7-A33A92E368CA}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\dighost.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\nslookup.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|@PLATFORM@">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>@PLATFORM@</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>nslookup</RootNamespace>
|
||||||
|
@WINDOWS_TARGET_PLATFORM_VERSION@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
@PLATFORM_TOOLSET@
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>.\$(Configuration)\</IntDir>
|
||||||
|
<IntDirSharingDetected>None</IntDirSharingDetected>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level4</WarningLevel>
|
||||||
|
<TreatWarningAsError>false</TreatWarningAsError>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<BrowseInformation>true</BrowseInformation>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level1</WarningLevel>
|
||||||
|
<TreatWarningAsError>true</TreatWarningAsError>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
|
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
|
||||||
|
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||||
|
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
|
||||||
|
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<CompileAs>CompileAsC</CompileAs>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||||
|
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||||
|
<AdditionalLibraryDirectories>..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>@OPENSSL_LIB@@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="..\dighost.c" />
|
||||||
|
<ClCompile Include="..\nslookup.c" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isc\win32\libisc.vcxproj">
|
||||||
|
<Project>{3840E563-D180-4761-AA9C-E6155F02EAFF}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\dns\win32\libdns.vcxproj">
|
||||||
|
<Project>{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\isccfg\win32\libisccfg.vcxproj">
|
||||||
|
<Project>{B2DFA58C-6347-478E-81E8-01E06999D4F1}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\irs\win32\libirs.vcxproj">
|
||||||
|
<Project>{A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\lib\bind9\win32\libbind9.vcxproj">
|
||||||
|
<Project>{E741C10B-B075-4206-9596-46765B665E03}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\bin\dig\win32\dighost.vcxproj">
|
||||||
|
<Project>{140DE800-E552-43CC-B0C7-A33A92E368CA}</Project>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
</Project>
|
||||||
@@ -4,12 +4,12 @@ AM_CPPFLAGS += \
|
|||||||
$(LIBISC_CFLAGS) \
|
$(LIBISC_CFLAGS) \
|
||||||
$(LIBDNS_CFLAGS)
|
$(LIBDNS_CFLAGS)
|
||||||
|
|
||||||
AM_CPPFLAGS += \
|
AM_CPPFLAGS += \
|
||||||
-DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
-DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libdnssectool.la
|
noinst_LTLIBRARIES = libdnssectool.la
|
||||||
|
|
||||||
LDADD += \
|
LDADD = \
|
||||||
libdnssectool.la \
|
libdnssectool.la \
|
||||||
$(LIBISC_LIBS) \
|
$(LIBISC_LIBS) \
|
||||||
$(LIBDNS_LIBS)
|
$(LIBDNS_LIBS)
|
||||||
|
|||||||
+103
-109
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -24,12 +24,10 @@
|
|||||||
#include <isc/attributes.h>
|
#include <isc/attributes.h>
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/dir.h>
|
|
||||||
#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/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/result.h>
|
|
||||||
#include <isc/serial.h>
|
#include <isc/serial.h>
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/time.h>
|
#include <isc/time.h>
|
||||||
@@ -51,10 +49,15 @@
|
|||||||
#include <dns/rdataset.h>
|
#include <dns/rdataset.h>
|
||||||
#include <dns/rdatasetiter.h>
|
#include <dns/rdatasetiter.h>
|
||||||
#include <dns/rdatatype.h>
|
#include <dns/rdatatype.h>
|
||||||
|
#include <dns/result.h>
|
||||||
#include <dns/time.h>
|
#include <dns/time.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
#include <pk11/result.h>
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
const char *program = "dnssec-cds";
|
const char *program = "dnssec-cds";
|
||||||
@@ -120,8 +123,7 @@ typedef struct keyinfo {
|
|||||||
|
|
||||||
/* A replaceable function that can generate a DS RRset from some input */
|
/* A replaceable function that can generate a DS RRset from some input */
|
||||||
typedef isc_result_t
|
typedef isc_result_t
|
||||||
ds_maker_func_t(isc_buffer_t *buf, dns_rdata_t *ds, dns_dsdigest_t dt,
|
ds_maker_func_t(dns_rdatalist_t *dslist, isc_buffer_t *buf, dns_rdata_t *rdata);
|
||||||
dns_rdata_t *crdata);
|
|
||||||
|
|
||||||
static dns_rdataset_t cdnskey_set, cdnskey_sig;
|
static dns_rdataset_t cdnskey_set, cdnskey_sig;
|
||||||
static dns_rdataset_t cds_set, cds_sig;
|
static dns_rdataset_t cds_set, cds_sig;
|
||||||
@@ -475,7 +477,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness) {
|
|||||||
"dns_ds_buildrdata("
|
"dns_ds_buildrdata("
|
||||||
"keytag=%d, algo=%d, digest=%d): %s\n",
|
"keytag=%d, algo=%d, digest=%d): %s\n",
|
||||||
ds.key_tag, ds.algorithm, ds.digest_type,
|
ds.key_tag, ds.algorithm, ds.digest_type,
|
||||||
isc_result_totext(result));
|
dns_result_totext(result));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/* allow for both DS and CDS */
|
/* allow for both DS and CDS */
|
||||||
@@ -552,7 +554,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
|
|||||||
vbprintf(3,
|
vbprintf(3,
|
||||||
"dns_dnssec_keyfromrdata("
|
"dns_dnssec_keyfromrdata("
|
||||||
"keytag=%d, algo=%d): %s\n",
|
"keytag=%d, algo=%d): %s\n",
|
||||||
ki->tag, ki->algo, isc_result_totext(result));
|
ki->tag, ki->algo, dns_result_totext(result));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -721,82 +723,82 @@ signed_strict(dns_rdataset_t *dsset, dns_secalg_t *algo) {
|
|||||||
return (all_ok);
|
return (all_ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
static dns_rdata_t *
|
||||||
* This basically copies the rdata into the buffer, but going via the
|
rdata_get(void) {
|
||||||
* unpacked struct lets us change the rdatatype. (The dns_rdata_cds_t
|
dns_rdata_t *rdata;
|
||||||
* and dns_rdata_ds_t types are aliases.)
|
|
||||||
*/
|
|
||||||
static isc_result_t
|
|
||||||
ds_from_cds(isc_buffer_t *buf, dns_rdata_t *rds, dns_dsdigest_t dt,
|
|
||||||
dns_rdata_t *cds) {
|
|
||||||
isc_result_t result;
|
|
||||||
dns_rdata_ds_t ds;
|
|
||||||
|
|
||||||
REQUIRE(buf != NULL);
|
rdata = isc_mem_get(mctx, sizeof(*rdata));
|
||||||
|
dns_rdata_init(rdata);
|
||||||
|
|
||||||
result = dns_rdata_tostruct(cds, &ds, NULL);
|
return (rdata);
|
||||||
check_result(result, "dns_rdata_tostruct(CDS)");
|
|
||||||
ds.common.rdtype = dns_rdatatype_ds;
|
|
||||||
|
|
||||||
if (ds.digest_type != dt) {
|
|
||||||
return (ISC_R_IGNORE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (dns_rdata_fromstruct(rds, rdclass, dns_rdatatype_ds, &ds, buf));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
ds_from_cdnskey(isc_buffer_t *buf, dns_rdata_t *ds, dns_dsdigest_t dt,
|
rdata_put(isc_result_t result, dns_rdatalist_t *rdlist, dns_rdata_t *rdata) {
|
||||||
dns_rdata_t *cdnskey) {
|
|
||||||
isc_result_t result;
|
|
||||||
isc_region_t r;
|
|
||||||
|
|
||||||
REQUIRE(buf != NULL);
|
|
||||||
|
|
||||||
isc_buffer_availableregion(buf, &r);
|
|
||||||
if (r.length < DNS_DS_BUFFERSIZE) {
|
|
||||||
return (ISC_R_NOSPACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
result = dns_ds_buildrdata(name, cdnskey, dt, r.base, ds);
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS) {
|
||||||
isc_buffer_add(buf, DNS_DS_BUFFERSIZE);
|
ISC_LIST_APPEND(rdlist->rdata, rdata, link);
|
||||||
|
} else {
|
||||||
|
isc_mem_put(mctx, rdata, sizeof(*rdata));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This basically copies the rdata into the buffer, but going via the
|
||||||
|
* unpacked struct has the side-effect of changing the rdatatype. The
|
||||||
|
* dns_rdata_cds_t and dns_rdata_ds_t types are aliases.
|
||||||
|
*/
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
append_new_ds_set(ds_maker_func_t *ds_from_rdata, isc_buffer_t *buf,
|
ds_from_cds(dns_rdatalist_t *dslist, isc_buffer_t *buf, dns_rdata_t *cds) {
|
||||||
dns_rdatalist_t *dslist, dns_dsdigest_t dt,
|
|
||||||
dns_rdataset_t *crdset) {
|
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
dns_rdata_ds_t ds;
|
||||||
|
dns_rdata_t *rdata;
|
||||||
|
|
||||||
for (result = dns_rdataset_first(crdset); result == ISC_R_SUCCESS;
|
REQUIRE(buf != NULL);
|
||||||
result = dns_rdataset_next(crdset))
|
|
||||||
{
|
|
||||||
dns_rdata_t crdata = DNS_RDATA_INIT;
|
|
||||||
dns_rdata_t *ds = NULL;
|
|
||||||
|
|
||||||
dns_rdataset_current(crdset, &crdata);
|
rdata = rdata_get();
|
||||||
|
|
||||||
ds = isc_mem_get(mctx, sizeof(*ds));
|
result = dns_rdata_tostruct(cds, &ds, NULL);
|
||||||
dns_rdata_init(ds);
|
check_result(result, "dns_rdata_tostruct(CDS)");
|
||||||
|
ds.common.rdtype = dns_rdatatype_ds;
|
||||||
|
|
||||||
result = ds_from_rdata(buf, ds, dt, &crdata);
|
result = dns_rdata_fromstruct(rdata, rdclass, dns_rdatatype_ds, &ds,
|
||||||
|
buf);
|
||||||
|
|
||||||
switch (result) {
|
return (rdata_put(result, dslist, rdata));
|
||||||
case ISC_R_SUCCESS:
|
}
|
||||||
ISC_LIST_APPEND(dslist->rdata, ds, link);
|
|
||||||
break;
|
static isc_result_t
|
||||||
case ISC_R_IGNORE:
|
ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
|
||||||
isc_mem_put(mctx, ds, sizeof(*ds));
|
dns_rdata_t *cdnskey) {
|
||||||
continue;
|
isc_result_t result;
|
||||||
case ISC_R_NOSPACE:
|
unsigned i, n;
|
||||||
isc_mem_put(mctx, ds, sizeof(*ds));
|
|
||||||
return (result);
|
REQUIRE(buf != NULL);
|
||||||
default:
|
|
||||||
check_result(result, "ds_from_rdata()");
|
n = sizeof(dtype) / sizeof(dtype[0]);
|
||||||
|
for (i = 0; i < n; i++) {
|
||||||
|
if (dtype[i] != 0) {
|
||||||
|
dns_rdata_t *rdata;
|
||||||
|
isc_region_t r;
|
||||||
|
|
||||||
|
isc_buffer_availableregion(buf, &r);
|
||||||
|
if (r.length < DNS_DS_BUFFERSIZE) {
|
||||||
|
return (ISC_R_NOSPACE);
|
||||||
|
}
|
||||||
|
|
||||||
|
rdata = rdata_get();
|
||||||
|
result = dns_ds_buildrdata(name, cdnskey, dtype[i],
|
||||||
|
r.base, rdata);
|
||||||
|
if (result == ISC_R_SUCCESS) {
|
||||||
|
isc_buffer_add(buf, DNS_DS_BUFFERSIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
result = rdata_put(result, dslist, rdata);
|
||||||
|
if (result != ISC_R_SUCCESS) {
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -805,14 +807,14 @@ append_new_ds_set(ds_maker_func_t *ds_from_rdata, isc_buffer_t *buf,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
make_new_ds_set(ds_maker_func_t *ds_from_rdata, uint32_t ttl,
|
make_new_ds_set(ds_maker_func_t *ds_from_rdata, uint32_t ttl,
|
||||||
dns_rdataset_t *crdset) {
|
dns_rdataset_t *rdset) {
|
||||||
isc_result_t result;
|
|
||||||
dns_rdatalist_t *dslist;
|
|
||||||
unsigned int size = 16;
|
unsigned int size = 16;
|
||||||
unsigned i, n;
|
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
isc_result_t result;
|
||||||
|
dns_rdatalist_t *dslist;
|
||||||
|
|
||||||
dslist = isc_mem_get(mctx, sizeof(*dslist));
|
dslist = isc_mem_get(mctx, sizeof(*dslist));
|
||||||
|
|
||||||
dns_rdatalist_init(dslist);
|
dns_rdatalist_init(dslist);
|
||||||
dslist->rdclass = rdclass;
|
dslist->rdclass = rdclass;
|
||||||
dslist->type = dns_rdatatype_ds;
|
dslist->type = dns_rdatatype_ds;
|
||||||
@@ -824,22 +826,29 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata, uint32_t ttl,
|
|||||||
|
|
||||||
isc_buffer_allocate(mctx, &new_ds_buf, size);
|
isc_buffer_allocate(mctx, &new_ds_buf, size);
|
||||||
|
|
||||||
n = sizeof(dtype) / sizeof(dtype[0]);
|
for (result = dns_rdataset_first(rdset);
|
||||||
for (i = 0; i < n && dtype[i] != 0; i++) {
|
result == ISC_R_SUCCESS; result = dns_rdataset_next(rdset))
|
||||||
result = append_new_ds_set(ds_from_rdata, new_ds_buf,
|
{
|
||||||
dslist, dtype[i], crdset);
|
isc_result_t tresult;
|
||||||
if (result != ISC_R_SUCCESS) {
|
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||||
|
|
||||||
|
dns_rdataset_current(rdset, &rdata);
|
||||||
|
|
||||||
|
tresult = ds_from_rdata(dslist, new_ds_buf, &rdata);
|
||||||
|
if (tresult == ISC_R_NOSPACE) {
|
||||||
|
vbprintf(20, "DS list buffer size %u\n", size);
|
||||||
|
freelist(&new_ds_set);
|
||||||
|
isc_buffer_free(&new_ds_buf);
|
||||||
|
size *= 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (result == ISC_R_SUCCESS) {
|
check_result(tresult, "ds_from_rdata()");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vbprintf(2, "doubling DS list buffer size from %u\n", size);
|
if (result == ISC_R_NOMORE) {
|
||||||
freelist(&new_ds_set);
|
break;
|
||||||
isc_buffer_free(&new_ds_buf);
|
}
|
||||||
size *= 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -864,9 +873,8 @@ consistent_digests(dns_rdataset_t *dsset) {
|
|||||||
int i, j, n, d;
|
int i, j, n, d;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First sort the dsset. DS rdata fields are tag, algorithm,
|
* First sort the dsset. DS rdata fields are tag, algorithm, digest,
|
||||||
* digest, so sorting them brings together all the records for
|
* so sorting them brings together all the records for each key.
|
||||||
* each key.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
n = dns_rdataset_count(dsset);
|
n = dns_rdataset_count(dsset);
|
||||||
@@ -1057,6 +1065,11 @@ main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
isc_mem_create(&mctx);
|
isc_mem_create(&mctx);
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
pk11_result_register();
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = false;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
#define OPTIONS "a:c:Dd:f:i:ms:T:uv:V"
|
#define OPTIONS "a:c:Dd:f:i:ms:T:uv:V"
|
||||||
@@ -1079,8 +1092,8 @@ main(int argc, char *argv[]) {
|
|||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
/*
|
/*
|
||||||
* This is a bodge to make the argument
|
* This is a bodge to make the argument optional,
|
||||||
* optional, so that it works just like sed(1).
|
* so that it works just like sed(1).
|
||||||
*/
|
*/
|
||||||
if (isc_commandline_argument ==
|
if (isc_commandline_argument ==
|
||||||
argv[isc_commandline_index - 1]) {
|
argv[isc_commandline_index - 1]) {
|
||||||
@@ -1183,10 +1196,9 @@ main(int argc, char *argv[]) {
|
|||||||
old_key_tbl = match_keyset_dsset(&dnskey_set, &old_ds_set, LOOSE);
|
old_key_tbl = match_keyset_dsset(&dnskey_set, &old_ds_set, LOOSE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We have now identified the keys that are allowed to
|
* We have now identified the keys that are allowed to authenticate
|
||||||
* authenticate the DNSKEY RRset (RFC 4035 section 5.2 bullet
|
* the DNSKEY RRset (RFC 4035 section 5.2 bullet 2), and CDNSKEY and
|
||||||
* 2), and CDNSKEY and CDS RRsets (RFC 7344 section 4.1 bullet
|
* CDS RRsets (RFC 7344 section 4.1 bullet 2).
|
||||||
* 2).
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
vbprintf(1, "verify DNSKEY signature(s)\n");
|
vbprintf(1, "verify DNSKEY signature(s)\n");
|
||||||
@@ -1251,24 +1263,6 @@ main(int argc, char *argv[]) {
|
|||||||
make_new_ds_set(ds_from_cdnskey, ttl, &cdnskey_set);
|
make_new_ds_set(ds_from_cdnskey, ttl, &cdnskey_set);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Try to use CDNSKEY records if the CDS records are missing
|
|
||||||
* or did not match.
|
|
||||||
*/
|
|
||||||
if (dns_rdataset_count(&new_ds_set) == 0 &&
|
|
||||||
dns_rdataset_isassociated(&cdnskey_set))
|
|
||||||
{
|
|
||||||
vbprintf(1, "CDS records have no allowed digest types; "
|
|
||||||
"using CDNSKEY instead\n");
|
|
||||||
freelist(&new_ds_set);
|
|
||||||
isc_buffer_free(&new_ds_buf);
|
|
||||||
make_new_ds_set(ds_from_cdnskey, ttl, &cdnskey_set);
|
|
||||||
}
|
|
||||||
if (dns_rdataset_count(&new_ds_set) == 0) {
|
|
||||||
fatal("CDS records at %s do not match any -a digest types",
|
|
||||||
namestr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now we have a candidate DS RRset, we need to check it
|
* Now we have a candidate DS RRset, we need to check it
|
||||||
* won't break the delegation.
|
* won't break the delegation.
|
||||||
|
|||||||
+63
-69
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -29,7 +29,7 @@ dnssec-cds - change DS records for a child zone based on CDS/CDNSKEY
|
|||||||
Synopsis
|
Synopsis
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
:program:`dnssec-cds` [**-a** alg...] [**-c** class] [**-D**] {**-d** dsset-file} {**-f** child-file} [**-i**[extension]] [**-s** start-time] [**-T** ttl] [**-u**] [**-v** level] [**-V**] {domain}
|
:program:`dnssec-cds` [**-a** alg...] [**-c** class] [**-D**] {**-d** dsset-file} {**-f** child-file} [**-i** [extension]] [**-s** start-time] [**-T** ttl] [**-u**] [**-v** level] [**-V**] {domain}
|
||||||
|
|
||||||
Description
|
Description
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@@ -38,8 +38,8 @@ The ``dnssec-cds`` command changes DS records at a delegation point
|
|||||||
based on CDS or CDNSKEY records published in the child zone. If both CDS
|
based on CDS or CDNSKEY records published in the child zone. If both CDS
|
||||||
and CDNSKEY records are present in the child zone, the CDS is preferred.
|
and CDNSKEY records are present in the child zone, the CDS is preferred.
|
||||||
This enables a child zone to inform its parent of upcoming changes to
|
This enables a child zone to inform its parent of upcoming changes to
|
||||||
its key-signing keys (KSKs); by polling periodically with ``dnssec-cds``, the
|
its key-signing keys; by polling periodically with ``dnssec-cds``, the
|
||||||
parent can keep the DS records up-to-date and enable automatic rolling
|
parent can keep the DS records up to date and enable automatic rolling
|
||||||
of KSKs.
|
of KSKs.
|
||||||
|
|
||||||
Two input files are required. The ``-f child-file`` option specifies a
|
Two input files are required. The ``-f child-file`` option specifies a
|
||||||
@@ -52,12 +52,12 @@ output of a previous run of ``dnssec-cds``.
|
|||||||
|
|
||||||
The ``dnssec-cds`` command uses special DNSSEC validation logic
|
The ``dnssec-cds`` command uses special DNSSEC validation logic
|
||||||
specified by :rfc:`7344`. It requires that the CDS and/or CDNSKEY records
|
specified by :rfc:`7344`. It requires that the CDS and/or CDNSKEY records
|
||||||
be validly signed by a key represented in the existing DS records. This
|
are validly signed by a key represented in the existing DS records. This
|
||||||
is typically the pre-existing KSK.
|
will typically be the pre-existing key-signing key (KSK).
|
||||||
|
|
||||||
For protection against replay attacks, the signatures on the child
|
For protection against replay attacks, the signatures on the child
|
||||||
records must not be older than they were on a previous run of
|
records must not be older than they were on a previous run of
|
||||||
``dnssec-cds``. Their age is obtained from the modification time of the
|
``dnssec-cds``. This time is obtained from the modification time of the
|
||||||
``dsset-`` file, or from the ``-s`` option.
|
``dsset-`` file, or from the ``-s`` option.
|
||||||
|
|
||||||
To protect against breaking the delegation, ``dnssec-cds`` ensures that
|
To protect against breaking the delegation, ``dnssec-cds`` ensures that
|
||||||
@@ -67,109 +67,103 @@ type.
|
|||||||
|
|
||||||
By default, replacement DS records are written to the standard output;
|
By default, replacement DS records are written to the standard output;
|
||||||
with the ``-i`` option the input file is overwritten in place. The
|
with the ``-i`` option the input file is overwritten in place. The
|
||||||
replacement DS records are the same as the existing records, when no
|
replacement DS records will be the same as the existing records when no
|
||||||
change is required. The output can be empty if the CDS/CDNSKEY records
|
change is required. The output can be empty if the CDS / CDNSKEY records
|
||||||
specify that the child zone wants to be insecure.
|
specify that the child zone wants to go insecure.
|
||||||
|
|
||||||
.. warning::
|
Warning: Be careful not to delete the DS records when ``dnssec-cds``
|
||||||
|
fails!
|
||||||
Be careful not to delete the DS records when ``dnssec-cds`` fails!
|
|
||||||
|
|
||||||
Alternatively, ``dnssec-cds -u`` writes an ``nsupdate`` script to the
|
Alternatively, ``dnssec-cds -u`` writes an ``nsupdate`` script to the
|
||||||
standard output. The ``-u`` and ``-i`` options can be used together to
|
standard output. You can use the ``-u`` and ``-i`` options together to
|
||||||
maintain a ``dsset-`` file as well as emit an ``nsupdate`` script.
|
maintain a ``dsset-`` file as well as emit an ``nsupdate`` script.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-a algorithm``
|
**-a** algorithm
|
||||||
When converting CDS records to DS records, this option specifies
|
Specify a digest algorithm to use when converting CDNSKEY records to
|
||||||
the acceptable digest algorithms. This option can be repeated, so
|
DS records. This option can be repeated, so that multiple DS records
|
||||||
that multiple digest types are allowed. If none of the CDS records
|
are created for each CDNSKEY record. This option has no effect when
|
||||||
use an acceptable digest type, ``dnssec-cds`` will try to use CDNSKEY
|
using CDS records.
|
||||||
records instead; if there are no CDNSKEY records, it reports an error.
|
|
||||||
|
|
||||||
When converting CDNSKEY records to DS records, this option specifies the
|
|
||||||
digest algorithm to use. It can be repeated, so that multiple DS records
|
|
||||||
are created for each CDNSKEY records.
|
|
||||||
|
|
||||||
The algorithm must be one of SHA-1, SHA-256, or SHA-384. These values
|
The algorithm 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
|
are case insensitive, and the hyphen may be omitted. If no algorithm
|
||||||
is specified, the default is SHA-256 only.
|
is specified, the default is SHA-256.
|
||||||
|
|
||||||
``-c class``
|
**-c** class
|
||||||
This option specifies the DNS class of the zones.
|
Specifies the DNS class of the zones.
|
||||||
|
|
||||||
``-D``
|
**-D**
|
||||||
This option generates DS records from CDNSKEY records if both CDS and CDNSKEY
|
Generate DS records from CDNSKEY records if both CDS and CDNSKEY
|
||||||
records are present in the child zone. By default CDS records are
|
records are present in the child zone. By default CDS records are
|
||||||
preferred.
|
preferred.
|
||||||
|
|
||||||
``-d path``
|
**-d** path
|
||||||
This specifies the location of the parent DS records. The path can be the name of a file
|
Location of the parent DS records. The path can be the name of a file
|
||||||
containing the DS records; if it is a directory, ``dnssec-cds``
|
containing the DS records, or if it is a directory, ``dnssec-cds``
|
||||||
looks for a ``dsset-`` file for the domain inside the directory.
|
looks for a ``dsset-`` file for the domain inside the directory.
|
||||||
|
|
||||||
To protect against replay attacks, child records are rejected if they
|
To protect against replay attacks, child records are rejected if they
|
||||||
were signed earlier than the modification time of the ``dsset-``
|
were signed earlier than the modification time of the ``dsset-``
|
||||||
file. This can be adjusted with the ``-s`` option.
|
file. This can be adjusted with the ``-s`` option.
|
||||||
|
|
||||||
``-f child-file``
|
**-f** child-file
|
||||||
This option specifies the file containing the child's CDS and/or CDNSKEY records, plus its
|
File containing the child's CDS and/or CDNSKEY records, plus its
|
||||||
DNSKEY records and the covering RRSIG records, so that they can be
|
DNSKEY records and the covering RRSIG records so that they can be
|
||||||
authenticated.
|
authenticated.
|
||||||
|
|
||||||
The examples below describe how to generate this file.
|
The EXAMPLES below describe how to generate this file.
|
||||||
|
|
||||||
``-iextension``
|
**-iextension**
|
||||||
This option updates the ``dsset-`` file in place, instead of writing DS records to
|
Update the ``dsset-`` file in place, instead of writing DS records to
|
||||||
the standard output.
|
the standard output.
|
||||||
|
|
||||||
There must be no space between the ``-i`` and the extension. If
|
There must be no space between the ``-i`` and the extension. If you
|
||||||
no extension is provided, the old ``dsset-`` is discarded. If an
|
provide no extension then the old ``dsset-`` is discarded. If an
|
||||||
extension is present, a backup of the old ``dsset-`` file is kept
|
extension is present, a backup of the old ``dsset-`` file is kept
|
||||||
with the extension appended to its filename.
|
with the extension appended to its filename.
|
||||||
|
|
||||||
To protect against replay attacks, the modification time of the
|
To protect against replay attacks, the modification time of the
|
||||||
``dsset-`` file is set to match the signature inception time of the
|
``dsset-`` file is set to match the signature inception time of the
|
||||||
child records, provided that it is later than the file's current
|
child records, provided that is later than the file's current
|
||||||
modification time.
|
modification time.
|
||||||
|
|
||||||
``-s start-time``
|
**-s** start-time
|
||||||
This option specifies the date and time after which RRSIG records become
|
Specify the date and time after which RRSIG records become
|
||||||
acceptable. This can be either an absolute or a relative time. An
|
acceptable. This can be either an absolute or relative time. An
|
||||||
absolute start time is indicated by a number in YYYYMMDDHHMMSS
|
absolute start time is indicated by a number in YYYYMMDDHHMMSS
|
||||||
notation; 20170827133700 denotes 13:37:00 UTC on August 27th, 2017. A
|
notation; 20170827133700 denotes 13:37:00 UTC on August 27th, 2017. A
|
||||||
time relative to the ``dsset-`` file is indicated with ``-N``, which is N
|
time relative to the ``dsset-`` file is indicated with -N, which is N
|
||||||
seconds before the file modification time. A time relative to the
|
seconds before the file modification time. A time relative to the
|
||||||
current time is indicated with ``now+N``.
|
current time is indicated with now+N.
|
||||||
|
|
||||||
If no start-time is specified, the modification time of the
|
If no start-time is specified, the modification time of the
|
||||||
``dsset-`` file is used.
|
``dsset-`` file is used.
|
||||||
|
|
||||||
``-T ttl``
|
**-T** ttl
|
||||||
This option specifies a TTL to be used for new DS records. If not specified, the
|
Specifies a TTL to be used for new DS records. If not specified, the
|
||||||
default is the TTL of the old DS records. If they had no explicit TTL,
|
default is the TTL of the old DS records. If they had no explicit TTL
|
||||||
the new DS records also have no explicit TTL.
|
then the new DS records also have no explicit TTL.
|
||||||
|
|
||||||
``-u``
|
**-u**
|
||||||
This option writes an ``nsupdate`` script to the standard output, instead of
|
Write an ``nsupdate`` script to the standard output, instead of
|
||||||
printing the new DS reords. The output is empty if no change is
|
printing the new DS reords. The output will be empty if no change is
|
||||||
needed.
|
needed.
|
||||||
|
|
||||||
Note: The TTL of new records needs to be specified: it can be done in the
|
Note: The TTL of new records needs to be specified, either in the
|
||||||
original ``dsset-`` file, with the ``-T`` option, or using the
|
original ``dsset-`` file, or with the ``-T`` option, or using the
|
||||||
``nsupdate`` ``ttl`` command.
|
``nsupdate`` ``ttl`` command.
|
||||||
|
|
||||||
``-V``
|
**-V**
|
||||||
This option prints version information.
|
Print version information.
|
||||||
|
|
||||||
``-v level``
|
**-v** level
|
||||||
This option sets the debugging level. Level 1 is intended to be usefully verbose
|
Sets the debugging level. Level 1 is intended to be usefully verbose
|
||||||
for general users; higher levels are intended for developers.
|
for general users; higher levels are intended for developers.
|
||||||
|
|
||||||
``domain``
|
domain
|
||||||
This indicates the name of the delegation point/child zone apex.
|
The name of the delegation point / child zone apex.
|
||||||
|
|
||||||
Exit Status
|
Exit Status
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
@@ -177,17 +171,17 @@ Exit Status
|
|||||||
The ``dnssec-cds`` command exits 0 on success, or non-zero if an error
|
The ``dnssec-cds`` command exits 0 on success, or non-zero if an error
|
||||||
occurred.
|
occurred.
|
||||||
|
|
||||||
If successful, the DS records may or may not need to be
|
In the success case, the DS records might or might not need to be
|
||||||
changed.
|
changed.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
Before running ``dnssec-signzone``, ensure that the delegations
|
Before running ``dnssec-signzone``, you can ensure that the delegations
|
||||||
are up-to-date by running ``dnssec-cds`` on every ``dsset-`` file.
|
are up-to-date by running ``dnssec-cds`` on every ``dsset-`` file.
|
||||||
|
|
||||||
To fetch the child records required by ``dnssec-cds``, invoke
|
To fetch the child records required by ``dnssec-cds`` you can invoke
|
||||||
``dig`` as in the script below. It is acceptable if the ``dig`` fails, since
|
``dig`` as in the script below. It's okay if the ``dig`` fails since
|
||||||
``dnssec-cds`` performs all the necessary checking.
|
``dnssec-cds`` performs all the necessary checking.
|
||||||
|
|
||||||
::
|
::
|
||||||
@@ -199,10 +193,10 @@ To fetch the child records required by ``dnssec-cds``, invoke
|
|||||||
dnssec-cds -i -f /dev/stdin -d $f $d
|
dnssec-cds -i -f /dev/stdin -d $f $d
|
||||||
done
|
done
|
||||||
|
|
||||||
When the parent zone is automatically signed by ``named``,
|
When the parent zone is automatically signed by ``named``, you can use
|
||||||
``dnssec-cds`` can be used with ``nsupdate`` to maintain a delegation as follows.
|
``dnssec-cds`` with ``nsupdate`` to maintain a delegation as follows.
|
||||||
The ``dsset-`` file allows the script to avoid having to fetch and
|
The ``dsset-`` file allows the script to avoid having to fetch and
|
||||||
validate the parent DS records, and it maintains the replay attack
|
validate the parent DS records, and it keeps the replay attack
|
||||||
protection time.
|
protection time.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -18,11 +18,9 @@
|
|||||||
#include <isc/attributes.h>
|
#include <isc/attributes.h>
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/dir.h>
|
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/result.h>
|
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
@@ -40,9 +38,14 @@
|
|||||||
#include <dns/rdataset.h>
|
#include <dns/rdataset.h>
|
||||||
#include <dns/rdatasetiter.h>
|
#include <dns/rdatasetiter.h>
|
||||||
#include <dns/rdatatype.h>
|
#include <dns/rdatatype.h>
|
||||||
|
#include <dns/result.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
#include <pk11/result.h>
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
const char *program = "dnssec-dsfromkey";
|
const char *program = "dnssec-dsfromkey";
|
||||||
@@ -212,7 +215,7 @@ 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_copy(dst_key_name(key), name);
|
dns_name_copynf(dst_key_name(key), name);
|
||||||
|
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
}
|
}
|
||||||
@@ -373,6 +376,11 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
isc_mem_create(&mctx);
|
isc_mem_create(&mctx);
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
pk11_result_register();
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = false;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
#define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
|
#define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -45,7 +45,7 @@ The ``dnssec-dsfromkey`` command outputs DS (Delegation Signer) resource records
|
|||||||
|
|
||||||
The input keys can be specified in a number of ways:
|
The input keys can be specified in a number of ways:
|
||||||
|
|
||||||
By default, ``dnssec-dsfromkey`` reads a key file named in the format
|
By default, ``dnssec-dsfromkey`` reads a key file named like
|
||||||
``Knnnn.+aaa+iiiii.key``, as generated by ``dnssec-keygen``.
|
``Knnnn.+aaa+iiiii.key``, as generated by ``dnssec-keygen``.
|
||||||
|
|
||||||
With the ``-f file`` option, ``dnssec-dsfromkey`` reads keys from a zone
|
With the ``-f file`` option, ``dnssec-dsfromkey`` reads keys from a zone
|
||||||
@@ -57,73 +57,73 @@ as generated by ``dnssec-keygen`` ``-C``.
|
|||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-1``
|
**-1**
|
||||||
This option is an abbreviation for ``-a SHA1``.
|
An abbreviation for ``-a SHA1``
|
||||||
|
|
||||||
``-2``
|
**-2**
|
||||||
This option is an abbreviation for ``-a SHA-256``.
|
An abbreviation for ``-a SHA-256``
|
||||||
|
|
||||||
``-a algorithm``
|
**-a** algorithm
|
||||||
This option specifies a digest algorithm to use when converting DNSKEY records to
|
Specify a digest algorithm to use when converting DNSKEY records to
|
||||||
DS records. This option can be repeated, so that multiple DS records
|
DS records. This option can be repeated, so that multiple DS records
|
||||||
are created for each DNSKEY record.
|
are created for each DNSKEY record.
|
||||||
|
|
||||||
The algorithm must be one of SHA-1, SHA-256, or SHA-384. These values
|
The algorithm 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
|
are case insensitive, and the hyphen may be omitted. If no algorithm
|
||||||
is specified, the default is SHA-256.
|
is specified, the default is SHA-256.
|
||||||
|
|
||||||
``-A``
|
**-A**
|
||||||
This option indicates that ZSKs are to be included when generating DS records. Without this option, only
|
Include ZSKs when generating DS records. Without this option, only
|
||||||
keys which have the KSK flag set are converted to DS records and
|
keys which have the KSK flag set will be converted to DS records and
|
||||||
printed. This option is only useful in ``-f`` zone file mode.
|
printed. Useful only in ``-f`` zone file mode.
|
||||||
|
|
||||||
``-c class``
|
**-c** class
|
||||||
This option specifies the DNS class; the default is IN. This option is only useful in ``-s`` keyset
|
Specifies the DNS class (default is IN). Useful only in ``-s`` keyset
|
||||||
or ``-f`` zone file mode.
|
or ``-f`` zone file mode.
|
||||||
|
|
||||||
``-C``
|
**-C**
|
||||||
This option generates CDS records rather than DS records.
|
Generate CDS records rather than DS records.
|
||||||
|
|
||||||
``-f file``
|
**-f** file
|
||||||
This option sets zone file mode, in which the final dnsname argument of ``dnssec-dsfromkey`` is the
|
Zone file mode: ``dnssec-dsfromkey``'s final dnsname argument is the
|
||||||
DNS domain name of a zone whose master file can be read from
|
DNS domain name of a zone whose master file can be read from
|
||||||
``file``. If the zone name is the same as ``file``, then it may be
|
``file``. If the zone name is the same as ``file``, then it may be
|
||||||
omitted.
|
omitted.
|
||||||
|
|
||||||
If ``file`` is ``-``, then the zone data is read from the standard
|
If file is ``"-"``, then the zone data is read from the standard
|
||||||
input. This makes it possible to use the output of the ``dig``
|
input. This makes it possible to use the output of the ``dig``
|
||||||
command as input, as in:
|
command as input, as in:
|
||||||
|
|
||||||
``dig dnskey example.com | dnssec-dsfromkey -f - example.com``
|
``dig dnskey example.com | dnssec-dsfromkey -f - example.com``
|
||||||
|
|
||||||
``-h``
|
**-h**
|
||||||
This option prints usage information.
|
Prints usage information.
|
||||||
|
|
||||||
``-K directory``
|
**-K** directory
|
||||||
This option tells BIND 9 to look for key files or ``keyset-`` files in ``directory``.
|
Look for key files or ``keyset-`` files in ``directory``.
|
||||||
|
|
||||||
``-s``
|
**-s**
|
||||||
This option enables keyset mode, in which the final dnsname argument from ``dnssec-dsfromkey`` is the DNS
|
Keyset mode: ``dnssec-dsfromkey``'s final dnsname argument is the DNS
|
||||||
domain name used to locate a ``keyset-`` file.
|
domain name used to locate a ``keyset-`` file.
|
||||||
|
|
||||||
``-T TTL``
|
**-T** TTL
|
||||||
This option specifies the TTL of the DS records. By default the TTL is omitted.
|
Specifies the TTL of the DS records. By default the TTL is omitted.
|
||||||
|
|
||||||
``-v level``
|
**-v** level
|
||||||
This option sets the debugging level.
|
Sets the debugging level.
|
||||||
|
|
||||||
``-V``
|
**-V**
|
||||||
This option prints version information.
|
Prints version information.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
To build the SHA-256 DS RR from the ``Kexample.com.+003+26160`` keyfile,
|
To build the SHA-256 DS RR from the ``Kexample.com.+003+26160`` keyfile
|
||||||
issue the following command:
|
name, you can issue the following command:
|
||||||
|
|
||||||
``dnssec-dsfromkey -2 Kexample.com.+003+26160``
|
``dnssec-dsfromkey -2 Kexample.com.+003+26160``
|
||||||
|
|
||||||
The command returns something similar to:
|
The command would print something like:
|
||||||
|
|
||||||
``example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94``
|
``example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94``
|
||||||
|
|
||||||
@@ -131,16 +131,16 @@ Files
|
|||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
The keyfile can be designated by the key identification
|
The keyfile can be designated by the key identification
|
||||||
``Knnnn.+aaa+iiiii`` or the full file name ``Knnnn.+aaa+iiiii.key``, as
|
``Knnnn.+aaa+iiiii`` or the full file name ``Knnnn.+aaa+iiiii.key`` as
|
||||||
generated by ``dnssec-keygen``.
|
generated by dnssec-keygen8.
|
||||||
|
|
||||||
The keyset file name is built from the ``directory``, the string
|
The keyset file name is built from the ``directory``, the string
|
||||||
``keyset-``, and the ``dnsname``.
|
``keyset-`` and the ``dnsname``.
|
||||||
|
|
||||||
Caveat
|
Caveat
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
A keyfile error may return "file not found," even if the file exists.
|
A keyfile error can give a "file not found" even if the file exists.
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/result.h>
|
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
@@ -38,9 +37,14 @@
|
|||||||
#include <dns/rdataset.h>
|
#include <dns/rdataset.h>
|
||||||
#include <dns/rdatasetiter.h>
|
#include <dns/rdatasetiter.h>
|
||||||
#include <dns/rdatatype.h>
|
#include <dns/rdatatype.h>
|
||||||
|
#include <dns/result.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
#include <pk11/result.h>
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
const char *program = "dnssec-importkey";
|
const char *program = "dnssec-importkey";
|
||||||
@@ -181,7 +185,7 @@ 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_copy(dst_key_name(key), name);
|
dns_name_copynf(dst_key_name(key), name);
|
||||||
|
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
}
|
}
|
||||||
@@ -312,6 +316,11 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
isc_mem_create(&mctx);
|
isc_mem_create(&mctx);
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
pk11_result_register();
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = false;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
|
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -37,12 +37,12 @@ Description
|
|||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
``dnssec-importkey`` reads a public DNSKEY record and generates a pair
|
``dnssec-importkey`` reads a public DNSKEY record and generates a pair
|
||||||
of .key/.private files. The DNSKEY record may be read from an
|
of .key/.private files. The DNSKEY record may be read from an existing
|
||||||
existing .key file, in which case a corresponding .private file is
|
.key file, in which case a corresponding .private file will be
|
||||||
generated, or it may be read from any other file or from the standard
|
generated, or it may be read from any other file or from the standard
|
||||||
input, in which case both .key and .private files are generated.
|
input, in which case both .key and .private files will be generated.
|
||||||
|
|
||||||
The newly created .private file does *not* contain private key data, and
|
The newly-created .private file does *not* contain private key data, and
|
||||||
cannot be used for signing. However, having a .private file makes it
|
cannot be used for signing. However, having a .private file makes it
|
||||||
possible to set publication (``-P``) and deletion (``-D``) times for the
|
possible to set publication (``-P``) and deletion (``-D``) times for the
|
||||||
key, which means the public key can be added to and removed from the
|
key, which means the public key can be added to and removed from the
|
||||||
@@ -51,73 +51,73 @@ DNSKEY RRset on schedule even if the true private key is stored offline.
|
|||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-f filename``
|
**-f** filename
|
||||||
This option indicates the zone file mode. Instead of a public keyfile name, the argument is the
|
Zone file mode: instead of a public keyfile name, the argument is the
|
||||||
DNS domain name of a zone master file, which can be read from
|
DNS domain name of a zone master file, which can be read from
|
||||||
``filename``. If the domain name is the same as ``filename``, then it may be
|
``file``. If the domain name is the same as ``file``, then it may be
|
||||||
omitted.
|
omitted.
|
||||||
|
|
||||||
If ``filename`` is set to ``"-"``, then the zone data is read from the
|
If ``file`` is set to ``"-"``, then the zone data is read from the
|
||||||
standard input.
|
standard input.
|
||||||
|
|
||||||
``-K directory``
|
**-K** directory
|
||||||
This option sets the directory in which the key files are to reside.
|
Sets the directory in which the key files are to reside.
|
||||||
|
|
||||||
``-L ttl``
|
**-L** ttl
|
||||||
This option sets the default TTL to use for this key when it is converted into a
|
Sets the default TTL to use for this key when it is converted into a
|
||||||
DNSKEY RR. This is the TTL used when the key is imported into a zone,
|
DNSKEY RR. If the key is imported into a zone, this is the TTL that
|
||||||
unless there was already a DNSKEY RRset in
|
will be used for it, unless there was already a DNSKEY RRset in
|
||||||
place, in which case the existing TTL takes precedence. Setting the default TTL to ``0`` or ``none``
|
place, in which case the existing TTL would take precedence. Setting
|
||||||
removes it from the key.
|
the default TTL to ``0`` or ``none`` removes it.
|
||||||
|
|
||||||
``-h``
|
**-h**
|
||||||
This option emits a usage message and exits.
|
Emit usage message and exit.
|
||||||
|
|
||||||
``-v level``
|
**-v** level
|
||||||
This option sets the debugging level.
|
Sets the debugging level.
|
||||||
|
|
||||||
``-V``
|
**-V**
|
||||||
This option prints version information.
|
Prints version information.
|
||||||
|
|
||||||
Timing Options
|
Timing Options
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the
|
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the
|
||||||
argument begins with a ``+`` or ``-``, it is interpreted as an offset from
|
argument begins with a '+' or '-', it is interpreted as an offset from
|
||||||
the present time. For convenience, if such an offset is followed by one
|
the present time. For convenience, if such an offset is followed by one
|
||||||
of the suffixes ``y``, ``mo``, ``w``, ``d``, ``h``, or ``mi``, then the offset is
|
of the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi', then the offset is
|
||||||
computed in years (defined as 365 24-hour days, ignoring leap years),
|
computed in years (defined as 365 24-hour days, ignoring leap years),
|
||||||
months (defined as 30 24-hour days), weeks, days, hours, or minutes,
|
months (defined as 30 24-hour days), weeks, days, hours, or minutes,
|
||||||
respectively. Without a suffix, the offset is computed in seconds. To
|
respectively. Without a suffix, the offset is computed in seconds. To
|
||||||
explicitly prevent a date from being set, use ``none`` or ``never``.
|
explicitly prevent a date from being set, use 'none' or 'never'.
|
||||||
|
|
||||||
``-P date/offset``
|
**-P** date/offset
|
||||||
This option sets the date on which a key is to be published to the zone. After
|
Sets the date on which a key is to be published to the zone. After
|
||||||
that date, the key is included in the zone but is not used
|
that date, the key will be included in the zone but will not be used
|
||||||
to sign it.
|
to sign it.
|
||||||
|
|
||||||
``-P sync date/offset``
|
**-P** sync date/offset
|
||||||
This option sets the date on which CDS and CDNSKEY records that match this key
|
Sets the date on which CDS and CDNSKEY records that match this key
|
||||||
are to be published to the zone.
|
are to be published to the zone.
|
||||||
|
|
||||||
``-D date/offset``
|
**-D** date/offset
|
||||||
This option sets the date on which the key is to be deleted. After that date, the
|
Sets the date on which the key is to be deleted. After that date, the
|
||||||
key is no longer included in the zone. (However, it may remain in the key
|
key will no longer be included in the zone. (It may remain in the key
|
||||||
repository.)
|
repository, however.)
|
||||||
|
|
||||||
``-D sync date/offset``
|
**-D** sync date/offset
|
||||||
This option sets the date on which the CDS and CDNSKEY records that match this
|
Sets the date on which the CDS and CDNSKEY records that match this
|
||||||
key are to be deleted.
|
key are to be deleted.
|
||||||
|
|
||||||
Files
|
Files
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
A keyfile can be designed by the key identification ``Knnnn.+aaa+iiiii``
|
A keyfile can be designed by the key identification ``Knnnn.+aaa+iiiii``
|
||||||
or the full file name ``Knnnn.+aaa+iiiii.key``, as generated by
|
or the full file name ``Knnnn.+aaa+iiiii.key`` as generated by
|
||||||
``dnssec-keygen``.
|
dnssec-keygen8.
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
~~~~~~~~
|
--------
|
||||||
|
|
||||||
:manpage:`dnssec-keygen(8)`, :manpage:`dnssec-signzone(8)`, BIND 9 Administrator Reference Manual,
|
:manpage:`dnssec-keygen(8)`, :manpage:`dnssec-signzone(8)`, BIND 9 Administrator Reference Manual,
|
||||||
:rfc:`5011`.
|
:rfc:`5011`.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -22,20 +22,26 @@
|
|||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/region.h>
|
#include <isc/region.h>
|
||||||
#include <isc/result.h>
|
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
|
#include <pk11/site.h>
|
||||||
|
|
||||||
#include <dns/dnssec.h>
|
#include <dns/dnssec.h>
|
||||||
#include <dns/fixedname.h>
|
#include <dns/fixedname.h>
|
||||||
#include <dns/keyvalues.h>
|
#include <dns/keyvalues.h>
|
||||||
#include <dns/log.h>
|
#include <dns/log.h>
|
||||||
#include <dns/name.h>
|
#include <dns/name.h>
|
||||||
#include <dns/rdataclass.h>
|
#include <dns/rdataclass.h>
|
||||||
|
#include <dns/result.h>
|
||||||
#include <dns/secalg.h>
|
#include <dns/secalg.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
#include <pk11/result.h>
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
#define MAX_RSA 4096 /* should be long enough... */
|
#define MAX_RSA 4096 /* should be long enough... */
|
||||||
@@ -63,7 +69,14 @@ usage(void) {
|
|||||||
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
||||||
fprintf(stderr, " -c class (default: IN)\n");
|
fprintf(stderr, " -c class (default: IN)\n");
|
||||||
fprintf(stderr, " -E <engine>:\n");
|
fprintf(stderr, " -E <engine>:\n");
|
||||||
|
#if USE_PKCS11
|
||||||
|
fprintf(stderr,
|
||||||
|
" path to PKCS#11 provider library "
|
||||||
|
"(default is %s)\n",
|
||||||
|
PK11_LIB_LOCATION);
|
||||||
|
#else /* if USE_PKCS11 */
|
||||||
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
fprintf(stderr, " -f keyflag: KSK | REVOKE\n");
|
fprintf(stderr, " -f keyflag: KSK | REVOKE\n");
|
||||||
fprintf(stderr, " -K directory: directory in which to place "
|
fprintf(stderr, " -K directory: directory in which to place "
|
||||||
"key files\n");
|
"key files\n");
|
||||||
@@ -157,6 +170,11 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
isc_mem_create(&mctx);
|
isc_mem_create(&mctx);
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
pk11_result_register();
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = false;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
isc_stdtime_get(&now);
|
isc_stdtime_get(&now);
|
||||||
@@ -344,6 +362,7 @@ main(int argc, char **argv) {
|
|||||||
setup_logging(mctx, &log);
|
setup_logging(mctx, &log);
|
||||||
|
|
||||||
if (predecessor == NULL) {
|
if (predecessor == NULL) {
|
||||||
|
/* cppcheck-suppress nullPointerRedundantCheck */
|
||||||
if (label == NULL) {
|
if (label == NULL) {
|
||||||
fatal("the key label was not specified");
|
fatal("the key label was not specified");
|
||||||
}
|
}
|
||||||
@@ -365,6 +384,7 @@ main(int argc, char **argv) {
|
|||||||
isc_result_totext(ret));
|
isc_result_totext(ret));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* cppcheck-suppress nullPointerRedundantCheck */
|
||||||
if (strchr(label, ':') == NULL) {
|
if (strchr(label, ':') == NULL) {
|
||||||
char *l;
|
char *l;
|
||||||
int len;
|
int len;
|
||||||
@@ -376,11 +396,13 @@ main(int argc, char **argv) {
|
|||||||
label = l;
|
label = l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* cppcheck-suppress nullPointerRedundantCheck */
|
||||||
if (algname == NULL) {
|
if (algname == NULL) {
|
||||||
fatal("no algorithm specified");
|
fatal("no algorithm specified");
|
||||||
}
|
}
|
||||||
|
|
||||||
r.base = algname;
|
r.base = algname;
|
||||||
|
/* cppcheck-suppress nullPointerRedundantCheck */
|
||||||
r.length = strlen(algname);
|
r.length = strlen(algname);
|
||||||
ret = dns_secalg_fromtext(&alg, &r);
|
ret = dns_secalg_fromtext(&alg, &r);
|
||||||
if (ret != ISC_R_SUCCESS) {
|
if (ret != ISC_R_SUCCESS) {
|
||||||
@@ -604,7 +626,12 @@ main(int argc, char **argv) {
|
|||||||
isc_buffer_init(&buf, filename, sizeof(filename) - 1);
|
isc_buffer_init(&buf, filename, sizeof(filename) - 1);
|
||||||
|
|
||||||
/* associate the key */
|
/* associate the key */
|
||||||
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass, engine,
|
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
|
||||||
|
#if USE_PKCS11
|
||||||
|
"pkcs11",
|
||||||
|
#else /* if USE_PKCS11 */
|
||||||
|
engine,
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
label, NULL, mctx, &key);
|
label, NULL, mctx, &key);
|
||||||
|
|
||||||
if (ret != ISC_R_SUCCESS) {
|
if (ret != ISC_R_SUCCESS) {
|
||||||
|
|||||||
+122
-104
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
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
|
||||||
file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
See the COPYRIGHT file distributed with this work for additional
|
See the COPYRIGHT file distributed with this work for additional
|
||||||
information regarding copyright ownership.
|
information regarding copyright ownership.
|
||||||
@@ -34,11 +34,11 @@ Synopsis
|
|||||||
Description
|
Description
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
``dnssec-keyfromlabel`` generates a pair of key files that reference a
|
``dnssec-keyfromlabel`` generates a key pair of files that referencing a
|
||||||
key object stored in a cryptographic hardware service module (HSM). The
|
key object stored in a cryptographic hardware service module (HSM). The
|
||||||
private key file can be used for DNSSEC signing of zone data as if it
|
private key file can be used for DNSSEC signing of zone data as if it
|
||||||
were a conventional signing key created by ``dnssec-keygen``, but the
|
were a conventional signing key created by ``dnssec-keygen``, but the
|
||||||
key material is stored within the HSM and the actual signing takes
|
key material is stored within the HSM, and the actual signing takes
|
||||||
place there.
|
place there.
|
||||||
|
|
||||||
The ``name`` of the key is specified on the command line. This must
|
The ``name`` of the key is specified on the command line. This must
|
||||||
@@ -47,176 +47,194 @@ match the name of the zone for which the key is being generated.
|
|||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
``-a algorithm``
|
**-a** algorithm
|
||||||
This option selects the cryptographic algorithm. The value of ``algorithm`` must
|
Selects the cryptographic algorithm. The value of ``algorithm`` must
|
||||||
be one of RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512,
|
be one of RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512,
|
||||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519, or ED448.
|
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
||||||
|
|
||||||
If no algorithm is specified, RSASHA1 is used by default
|
If no algorithm is specified, then RSASHA1 will be used by default,
|
||||||
unless the ``-3`` option is specified, in which case NSEC3RSASHA1
|
unless the ``-3`` option is specified, in which case NSEC3RSASHA1
|
||||||
is used instead. (If ``-3`` is used and an algorithm is
|
will be used instead. (If ``-3`` is used and an algorithm is
|
||||||
specified, that algorithm is checked for compatibility with
|
specified, that algorithm will be checked for compatibility with
|
||||||
NSEC3.)
|
NSEC3.)
|
||||||
|
|
||||||
These values are case-insensitive. In some cases, abbreviations are
|
These values are case insensitive. In some cases, abbreviations are
|
||||||
supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for
|
supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for
|
||||||
ECDSAP384SHA384. If RSASHA1 is specified along with the ``-3``
|
ECDSAP384SHA384. If RSASHA1 is specified along with the ``-3``
|
||||||
option, then NSEC3RSASHA1 is used instead.
|
option, then NSEC3RSASHA1 will be used instead.
|
||||||
|
|
||||||
Since 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
|
||||||
``-S`` option, which copies the algorithm from the predecessory key.
|
``-S`` option (which copies the algorithm from the predecessory key).
|
||||||
Previously, the default for newly generated keys was RSASHA1.
|
Previously, the default for newly generated keys was RSASHA1.
|
||||||
|
|
||||||
``-3``
|
**-3**
|
||||||
This option uses an NSEC3-capable algorithm to generate a DNSSEC key. If this
|
Use an NSEC3-capable algorithm to generate a DNSSEC key. If this
|
||||||
option is used with an algorithm that has both NSEC and NSEC3
|
option is used with an algorithm that has both NSEC and NSEC3
|
||||||
versions, then the NSEC3 version is used; for example,
|
versions, then the NSEC3 version will be used; for example,
|
||||||
``dnssec-keygen -3a RSASHA1`` specifies the NSEC3RSASHA1 algorithm.
|
``dnssec-keygen -3a RSASHA1`` specifies the NSEC3RSASHA1 algorithm.
|
||||||
|
|
||||||
``-E engine``
|
**-E** engine
|
||||||
This option specifies the cryptographic hardware to use.
|
Specifies the cryptographic hardware to use.
|
||||||
|
|
||||||
When BIND 9 is built with OpenSSL, this needs to be set to the OpenSSL
|
When BIND is built with OpenSSL PKCS#11 support, this defaults to the
|
||||||
engine identifier that drives the cryptographic accelerator or
|
string "pkcs11", which identifies an OpenSSL engine that can drive a
|
||||||
hardware service module (usually ``pkcs11``).
|
cryptographic accelerator or hardware service module. When BIND is
|
||||||
|
built with native PKCS#11 cryptography (--enable-native-pkcs11), it
|
||||||
|
defaults to the path of the PKCS#11 provider library specified via
|
||||||
|
"--with-pkcs11".
|
||||||
|
|
||||||
``-l label``
|
**-l** label
|
||||||
This option specifies the label for a key pair in the crypto hardware.
|
Specifies the label for a key pair in the crypto hardware.
|
||||||
|
|
||||||
When BIND 9 is built with OpenSSL-based PKCS#11 support, the label is
|
When BIND 9 is built with OpenSSL-based PKCS#11 support, the label is
|
||||||
an arbitrary string that identifies a particular key. It may be
|
an arbitrary string that identifies a particular key. It may be
|
||||||
preceded by an optional OpenSSL engine name, followed by a colon, as
|
preceded by an optional OpenSSL engine name, followed by a colon, as
|
||||||
in ``pkcs11:keylabel``.
|
in "pkcs11:keylabel".
|
||||||
|
|
||||||
``-n nametype``
|
When BIND 9 is built with native PKCS#11 support, the label is a
|
||||||
This option specifies the owner type of the key. The value of ``nametype`` must
|
PKCS#11 URI string in the format
|
||||||
|
"pkcs11:``keyword``\ =value[;\ ``keyword``\ =value;...]" Keywords
|
||||||
|
include "token", which identifies the HSM; "object", which identifies
|
||||||
|
the key; and "pin-source", which identifies a file from which the
|
||||||
|
HSM's PIN code can be obtained. The label will be stored in the
|
||||||
|
on-disk "private" file.
|
||||||
|
|
||||||
|
If the label contains a ``pin-source`` field, tools using the
|
||||||
|
generated key files will be able to use the HSM for signing and other
|
||||||
|
operations without any need for an operator to manually enter a PIN.
|
||||||
|
Note: Making the HSM's PIN accessible in this manner may reduce the
|
||||||
|
security advantage of using an HSM; be sure this is what you want to
|
||||||
|
do before making use of this feature.
|
||||||
|
|
||||||
|
**-n** nametype
|
||||||
|
Specifies the owner type of the key. The value of ``nametype`` must
|
||||||
either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY
|
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
|
(for a key associated with a host (KEY)), USER (for a key associated
|
||||||
with a user (KEY)), or OTHER (DNSKEY). These values are
|
with a user(KEY)) or OTHER (DNSKEY). These values are case
|
||||||
case-insensitive.
|
insensitive.
|
||||||
|
|
||||||
``-C``
|
**-C**
|
||||||
This option enables compatibility mode, which generates an old-style key, without any metadata.
|
Compatibility mode: generates an old-style key, without any metadata.
|
||||||
By default, ``dnssec-keyfromlabel`` includes the key's creation
|
By default, ``dnssec-keyfromlabel`` will include the key's creation
|
||||||
date in the metadata stored with the private key; other dates may
|
date in the metadata stored with the private key, and other dates may
|
||||||
be set there as well, including publication date, activation date, etc. Keys
|
be set there as well (publication date, activation date, etc). Keys
|
||||||
that include this data may be incompatible with older versions of
|
that include this data may be incompatible with older versions of
|
||||||
BIND; the ``-C`` option suppresses them.
|
BIND; the ``-C`` option suppresses them.
|
||||||
|
|
||||||
``-c class``
|
**-c** class
|
||||||
This option indicates that the DNS record containing the key should have the
|
Indicates that the DNS record containing the key should have the
|
||||||
specified class. If not specified, class IN is used.
|
specified class. If not specified, class IN is used.
|
||||||
|
|
||||||
``-f flag``
|
**-f** flag
|
||||||
This option sets the specified flag in the ``flag`` field of the KEY/DNSKEY record.
|
Set the specified flag in the flag field of the KEY/DNSKEY record.
|
||||||
The only recognized flags are KSK (Key-Signing Key) and REVOKE.
|
The only recognized flags are KSK (Key Signing Key) and REVOKE.
|
||||||
|
|
||||||
``-G``
|
**-G**
|
||||||
This option generates a key, but does not publish it or sign with it. This option is
|
Generate a key, but do not publish it or sign with it. This option is
|
||||||
incompatible with ``-P`` and ``-A``.
|
incompatible with -P and -A.
|
||||||
|
|
||||||
``-h``
|
**-h**
|
||||||
This option prints a short summary of the options and arguments to
|
Prints a short summary of the options and arguments to
|
||||||
``dnssec-keyfromlabel``.
|
``dnssec-keyfromlabel``.
|
||||||
|
|
||||||
``-K directory``
|
**-K** directory
|
||||||
This option sets the directory in which the key files are to be written.
|
Sets the directory in which the key files are to be written.
|
||||||
|
|
||||||
``-k``
|
**-k**
|
||||||
This option generates KEY records rather than DNSKEY records.
|
Generate KEY records rather than DNSKEY records.
|
||||||
|
|
||||||
``-L`` ttl
|
**-L** ttl
|
||||||
This option sets the default TTL to use for this key when it is converted into a
|
Sets the default TTL to use for this key when it is converted into a
|
||||||
DNSKEY RR. This is the TTL used when the key is imported into a zone,
|
DNSKEY RR. If the key is imported into a zone, this is the TTL that
|
||||||
unless there was already a DNSKEY RRset in
|
will be used for it, unless there was already a DNSKEY RRset in
|
||||||
place, in which case the existing TTL would take precedence. Setting
|
place, in which case the existing TTL would take precedence. Setting
|
||||||
the default TTL to ``0`` or ``none`` removes it.
|
the default TTL to ``0`` or ``none`` removes it.
|
||||||
|
|
||||||
``-p protocol``
|
**-p** protocol
|
||||||
This option sets the protocol value for the key. The protocol is a number between
|
Sets the protocol value for the key. The protocol is a number between
|
||||||
0 and 255. The default is 3 (DNSSEC). Other possible values for this
|
0 and 255. The default is 3 (DNSSEC). Other possible values for this
|
||||||
argument are listed in :rfc:`2535` and its successors.
|
argument are listed in :rfc:`2535` and its successors.
|
||||||
|
|
||||||
``-S key``
|
**-S** key
|
||||||
This option generates a key as an explicit successor to an existing key. The name,
|
Generate a key as an explicit successor to an existing key. The name,
|
||||||
algorithm, size, and type of the key are set to match the
|
algorithm, size, and type of the key will be set to match the
|
||||||
predecessor. The activation date of the new key is set to the
|
predecessor. The activation date of the new key will be set to the
|
||||||
inactivation date of the existing one. The publication date is
|
inactivation date of the existing one. The publication date will be
|
||||||
set to the activation date minus the prepublication interval, which
|
set to the activation date minus the prepublication interval, which
|
||||||
defaults to 30 days.
|
defaults to 30 days.
|
||||||
|
|
||||||
``-t type``
|
**-t** type
|
||||||
This option indicates the type of the key. ``type`` must be one of AUTHCONF,
|
Indicates the use of the key. ``type`` must be one of AUTHCONF,
|
||||||
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH refers
|
NOAUTHCONF, NOAUTH, or NOCONF. The default is AUTHCONF. AUTH refers
|
||||||
to the ability to authenticate data, and CONF to the ability to encrypt
|
to the ability to authenticate data, and CONF the ability to encrypt
|
||||||
data.
|
data.
|
||||||
|
|
||||||
``-v level``
|
**-v** level
|
||||||
This option sets the debugging level.
|
Sets the debugging level.
|
||||||
|
|
||||||
``-V``
|
**-V**
|
||||||
This option prints version information.
|
Prints version information.
|
||||||
|
|
||||||
``-y``
|
**-y**
|
||||||
This option allows DNSSEC key files to be generated even if the key ID would
|
Allows DNSSEC key files to be generated even if the key ID would
|
||||||
collide with that of an existing key, in the event of either key
|
collide with that of an existing key, in the event of either key
|
||||||
being revoked. (This is only safe to enable if
|
being revoked. (This is only safe to use if you are sure you won't be
|
||||||
:rfc:`5011` trust anchor maintenance is not used with either of the keys
|
using :rfc:`5011` trust anchor maintenance with either of the keys
|
||||||
involved.)
|
involved.)
|
||||||
|
|
||||||
Timing Options
|
Timing Options
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the
|
Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the
|
||||||
argument begins with a ``+`` or ``-``, it is interpreted as an offset from
|
argument begins with a '+' or '-', it is interpreted as an offset from
|
||||||
the present time. For convenience, if such an offset is followed by one
|
the present time. For convenience, if such an offset is followed by one
|
||||||
of the suffixes ``y``, ``mo``, ``w``, ``d``, ``h``, or ``mi``, then the offset is
|
of the suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi', then the offset is
|
||||||
computed in years (defined as 365 24-hour days, ignoring leap years),
|
computed in years (defined as 365 24-hour days, ignoring leap years),
|
||||||
months (defined as 30 24-hour days), weeks, days, hours, or minutes,
|
months (defined as 30 24-hour days), weeks, days, hours, or minutes,
|
||||||
respectively. Without a suffix, the offset is computed in seconds. To
|
respectively. Without a suffix, the offset is computed in seconds. To
|
||||||
explicitly prevent a date from being set, use ``none`` or ``never``.
|
explicitly prevent a date from being set, use 'none' or 'never'.
|
||||||
|
|
||||||
``-P date/offset``
|
**-P** date/offset
|
||||||
This option sets the date on which a key is to be published to the zone. After
|
Sets the date on which a key is to be published to the zone. After
|
||||||
that date, the key is included in the zone but is not used
|
that date, the key will be included in the zone but will not be used
|
||||||
to sign it. If not set, and if the ``-G`` option has not been used, the
|
to sign it. If not set, and if the -G option has not been used, the
|
||||||
default is the current date.
|
default is "now".
|
||||||
|
|
||||||
``-P sync date/offset``
|
**-P** sync date/offset
|
||||||
This option sets the date on which CDS and CDNSKEY records that match this key
|
Sets the date on which the CDS and CDNSKEY records which match this
|
||||||
are to be published to the zone.
|
key are to be published to the zone.
|
||||||
|
|
||||||
``-A date/offset``
|
**-A** date/offset
|
||||||
This option sets the date on which the key is to be activated. After that date,
|
Sets the date on which the key is to be activated. After that date,
|
||||||
the key is included in the zone and used to sign it. If not set,
|
the key will be included in the zone and used to sign it. If not set,
|
||||||
and if the ``-G`` option has not been used, the default is the current date.
|
and if the -G option has not been used, the default is "now".
|
||||||
|
|
||||||
``-R date/offset``
|
**-R** date/offset
|
||||||
This option sets the date on which the key is to be revoked. After that date, the
|
Sets the date on which the key is to be revoked. After that date, the
|
||||||
key is flagged as revoked. It is included in the zone and
|
key will be flagged as revoked. It will be included in the zone and
|
||||||
is used to sign it.
|
will be used to sign it.
|
||||||
|
|
||||||
``-I date/offset``
|
**-I** date/offset
|
||||||
This option sets the date on which the key is to be retired. After that date, the
|
Sets the date on which the key is to be retired. After that date, the
|
||||||
key is still included in the zone, but it is not used to
|
key will still be included in the zone, but it will not be used to
|
||||||
sign it.
|
sign it.
|
||||||
|
|
||||||
``-D date/offset``
|
**-D** date/offset
|
||||||
This option sets the date on which the key is to be deleted. After that date, the
|
Sets the date on which the key is to be deleted. After that date, the
|
||||||
key is no longer included in the zone. (However, it may remain in the key
|
key will no longer be included in the zone. (It may remain in the key
|
||||||
repository.)
|
repository, however.)
|
||||||
|
|
||||||
``-D sync date/offset``
|
**-D** sync date/offset
|
||||||
This option sets the date on which the CDS and CDNSKEY records that match this
|
Sets the date on which the CDS and CDNSKEY records which match this
|
||||||
key are to be deleted.
|
key are to be deleted.
|
||||||
|
|
||||||
``-i interval``
|
**-i** interval
|
||||||
This option sets the prepublication interval for a key. If set, then the
|
Sets the prepublication interval for a key. If set, then the
|
||||||
publication and activation dates must be separated by at least this
|
publication and activation dates must be separated by at least this
|
||||||
much time. If the activation date is specified but the publication
|
much time. If the activation date is specified but the publication
|
||||||
date is not, the publication date defaults to this much time
|
date isn't, then the publication date will default to this much time
|
||||||
before the activation date; conversely, if the publication date is
|
before the activation date; conversely, if the publication date is
|
||||||
specified but not the activation date, activation is set to
|
specified but activation date isn't, then activation will be set to
|
||||||
this much time after publication.
|
this much time after publication.
|
||||||
|
|
||||||
If the key is being created as an explicit successor to another key,
|
If the key is being created as an explicit successor to another key,
|
||||||
@@ -224,7 +242,7 @@ explicitly prevent a date from being set, use ``none`` or ``never``.
|
|||||||
zero.
|
zero.
|
||||||
|
|
||||||
As with date offsets, if the argument is followed by one of the
|
As with date offsets, if the argument is followed by one of the
|
||||||
suffixes ``y``, ``mo``, ``w``, ``d``, ``h``, or ``mi``, the interval is
|
suffixes 'y', 'mo', 'w', 'd', 'h', or 'mi', then the interval is
|
||||||
measured in years, months, weeks, days, hours, or minutes,
|
measured in years, months, weeks, days, hours, or minutes,
|
||||||
respectively. Without a suffix, the interval is measured in seconds.
|
respectively. Without a suffix, the interval is measured in seconds.
|
||||||
|
|
||||||
@@ -246,7 +264,7 @@ printed string. ``Knnnn.+aaa+iiiii.key`` contains the public key, and
|
|||||||
``Knnnn.+aaa+iiiii.private`` contains the private key.
|
``Knnnn.+aaa+iiiii.private`` contains the private key.
|
||||||
|
|
||||||
The ``.key`` file contains a DNS KEY record that can be inserted into a
|
The ``.key`` file contains a DNS KEY record that can be inserted into a
|
||||||
zone file (directly or with an $INCLUDE statement).
|
zone file (directly or with a $INCLUDE statement).
|
||||||
|
|
||||||
The ``.private`` file contains algorithm-specific fields. For obvious
|
The ``.private`` file contains algorithm-specific fields. For obvious
|
||||||
security reasons, this file does not have general read permission.
|
security reasons, this file does not have general read permission.
|
||||||
@@ -255,4 +273,4 @@ See Also
|
|||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
:manpage:`dnssec-keygen(8)`, :manpage:`dnssec-signzone(8)`, BIND 9 Administrator Reference Manual,
|
:manpage:`dnssec-keygen(8)`, :manpage:`dnssec-signzone(8)`, BIND 9 Administrator Reference Manual,
|
||||||
:rfc:`4034`, :rfc:`7512`.
|
:rfc:`4034`, The PKCS#11 URI Scheme (draft-pechanec-pkcs11uri-13).
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* 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
|
||||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*
|
*
|
||||||
* See the COPYRIGHT file distributed with this work for additional
|
* See the COPYRIGHT file distributed with this work for additional
|
||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
@@ -37,10 +37,11 @@
|
|||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/region.h>
|
#include <isc/region.h>
|
||||||
#include <isc/result.h>
|
|
||||||
#include <isc/string.h>
|
#include <isc/string.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
|
#include <pk11/site.h>
|
||||||
|
|
||||||
#include <dns/dnssec.h>
|
#include <dns/dnssec.h>
|
||||||
#include <dns/fixedname.h>
|
#include <dns/fixedname.h>
|
||||||
#include <dns/kasp.h>
|
#include <dns/kasp.h>
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
#include <dns/log.h>
|
#include <dns/log.h>
|
||||||
#include <dns/name.h>
|
#include <dns/name.h>
|
||||||
#include <dns/rdataclass.h>
|
#include <dns/rdataclass.h>
|
||||||
|
#include <dns/result.h>
|
||||||
#include <dns/secalg.h>
|
#include <dns/secalg.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
@@ -57,6 +59,10 @@
|
|||||||
#include <isccfg/kaspconf.h>
|
#include <isccfg/kaspconf.h>
|
||||||
#include <isccfg/namedconf.h>
|
#include <isccfg/namedconf.h>
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
#include <pk11/result.h>
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
|
||||||
#include "dnssectool.h"
|
#include "dnssectool.h"
|
||||||
|
|
||||||
#define MAX_RSA 4096 /* should be long enough... */
|
#define MAX_RSA 4096 /* should be long enough... */
|
||||||
@@ -162,7 +168,14 @@ usage(void) {
|
|||||||
fprintf(stderr, " -c <class>: (default: IN)\n");
|
fprintf(stderr, " -c <class>: (default: IN)\n");
|
||||||
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
|
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
|
||||||
fprintf(stderr, " -E <engine>:\n");
|
fprintf(stderr, " -E <engine>:\n");
|
||||||
|
#if USE_PKCS11
|
||||||
|
fprintf(stderr,
|
||||||
|
" path to PKCS#11 provider library "
|
||||||
|
"(default is %s)\n",
|
||||||
|
PK11_LIB_LOCATION);
|
||||||
|
#else /* if USE_PKCS11 */
|
||||||
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
fprintf(stderr, " -f <keyflag>: KSK | REVOKE\n");
|
fprintf(stderr, " -f <keyflag>: KSK | REVOKE\n");
|
||||||
fprintf(stderr, " -g <generator>: use specified generator "
|
fprintf(stderr, " -g <generator>: use specified generator "
|
||||||
"(DH only)\n");
|
"(DH only)\n");
|
||||||
@@ -256,8 +269,8 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = cfg_kasp_fromconfig(kconfig, NULL, mctx, lctx,
|
result = cfg_kasp_fromconfig(kconfig, mctx, lctx, &kasplist,
|
||||||
&kasplist, &kasp);
|
&kasp);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
fatal("failed to configure dnssec-policy '%s': %s",
|
fatal("failed to configure dnssec-policy '%s': %s",
|
||||||
cfg_obj_asstring(cfg_tuple_get(kconfig, "name")),
|
cfg_obj_asstring(cfg_tuple_get(kconfig, "name")),
|
||||||
@@ -271,7 +284,7 @@ kasp_from_conf(cfg_obj_t *config, isc_mem_t *mctx, const char *name,
|
|||||||
*kaspp = kasp;
|
*kaspp = kasp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cleanup kasp list.
|
* Same cleanup for kasp list.
|
||||||
*/
|
*/
|
||||||
for (kasp = ISC_LIST_HEAD(kasplist); kasp != NULL; kasp = kasp_next) {
|
for (kasp = ISC_LIST_HEAD(kasplist); kasp != NULL; kasp = kasp_next) {
|
||||||
kasp_next = ISC_LIST_NEXT(kasp, link);
|
kasp_next = ISC_LIST_NEXT(kasp, link);
|
||||||
@@ -769,7 +782,7 @@ keygen(keygen_ctx_t *ctx, isc_mem_t *mctx, int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Set dnssec-policy related metadata */
|
/* Set dnssec-policy related metadata */
|
||||||
if (ctx->policy != NULL) {
|
if (ctx->policy) {
|
||||||
dst_key_setnum(key, DST_NUM_LIFETIME, ctx->lifetime);
|
dst_key_setnum(key, DST_NUM_LIFETIME, ctx->lifetime);
|
||||||
dst_key_setbool(key, DST_BOOL_KSK, ctx->ksk);
|
dst_key_setbool(key, DST_BOOL_KSK, ctx->ksk);
|
||||||
dst_key_setbool(key, DST_BOOL_ZSK, ctx->zsk);
|
dst_key_setbool(key, DST_BOOL_ZSK, ctx->zsk);
|
||||||
@@ -868,6 +881,11 @@ main(int argc, char **argv) {
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USE_PKCS11
|
||||||
|
pk11_result_register();
|
||||||
|
#endif /* if USE_PKCS11 */
|
||||||
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = false;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -891,6 +909,12 @@ main(int argc, char **argv) {
|
|||||||
{
|
{
|
||||||
isc_mem_debugging |= ISC_MEM_DEBUGUSAGE;
|
isc_mem_debugging |= ISC_MEM_DEBUGUSAGE;
|
||||||
}
|
}
|
||||||
|
if (strcasecmp(isc_commandline_argument, "size") == 0) {
|
||||||
|
isc_mem_debugging |= ISC_MEM_DEBUGSIZE;
|
||||||
|
}
|
||||||
|
if (strcasecmp(isc_commandline_argument, "mctx") == 0) {
|
||||||
|
isc_mem_debugging |= ISC_MEM_DEBUGCTX;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -1156,10 +1180,12 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.predecessor == NULL && ctx.policy == NULL) {
|
if (ctx.predecessor == NULL && ctx.policy == NULL) {
|
||||||
|
/* cppcheck-suppress nullPointerRedundantCheck */
|
||||||
if (algname == NULL) {
|
if (algname == NULL) {
|
||||||
fatal("no algorithm specified");
|
fatal("no algorithm specified");
|
||||||
}
|
}
|
||||||
r.base = algname;
|
r.base = algname;
|
||||||
|
/* cppcheck-suppress nullPointerRedundantCheck */
|
||||||
r.length = strlen(algname);
|
r.length = strlen(algname);
|
||||||
ret = dns_secalg_fromtext(&ctx.alg, &r);
|
ret = dns_secalg_fromtext(&ctx.alg, &r);
|
||||||
if (ret != ISC_R_SUCCESS) {
|
if (ret != ISC_R_SUCCESS) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user