Compare commits
7 Commits
include-mu
...
wpk-taskmg
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8766616259 | ||
|
|
b217c649f7 | ||
|
|
965ef669bc | ||
|
|
c42f920449 | ||
|
|
95037b96a3 | ||
|
|
09d0f57296 | ||
|
|
5098bd7776 |
114
.dir-locals.el
114
.dir-locals.el
@@ -1,114 +0,0 @@
|
||||
;;; Directory Local Variables
|
||||
;;; For more information see (info "(emacs) Directory Variables")
|
||||
|
||||
((c-mode .
|
||||
((eval .
|
||||
(set (make-local-variable 'directory-of-current-dir-locals-file)
|
||||
(file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
|
||||
)
|
||||
)
|
||||
(eval .
|
||||
(set (make-local-variable 'include-directories)
|
||||
(list
|
||||
|
||||
;; top directory
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "./"))
|
||||
|
||||
;; libisc
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isc/netmgr"))
|
||||
|
||||
;; libdns
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/dns/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/dns"))
|
||||
|
||||
;; libisccc
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isccc/include"))
|
||||
|
||||
;; libisccfg
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/isccfg/include"))
|
||||
|
||||
;; libns
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/ns/include"))
|
||||
|
||||
;; libirs
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/irs/include"))
|
||||
|
||||
;; libbind9
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
|
||||
|
||||
;; bin
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/check"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/confgen"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/confgen/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/dig/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/named/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/named/unix/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/dnssec/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/named/include"))
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
|
||||
|
||||
(expand-file-name "/usr/local/opt/openssl@1.1/include")
|
||||
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
|
||||
(expand-file-name "/usr/local/opt/json-c/include/json-c/")
|
||||
(expand-file-name "/usr/local/include")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(eval setq flycheck-clang-include-path include-directories)
|
||||
(eval setq flycheck-cppcheck-include-path include-directories)
|
||||
(eval setq flycheck-gcc-include-path include-directories)
|
||||
(eval setq flycheck-clang-args
|
||||
(list
|
||||
"-include"
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "config.h"))
|
||||
)
|
||||
)
|
||||
(eval setq flycheck-gcc-args
|
||||
(list
|
||||
"-include"
|
||||
(expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "config.h"))
|
||||
)
|
||||
)
|
||||
(eval setq flycheck-cppcheck-args
|
||||
(list
|
||||
"--enable=all"
|
||||
"--suppress=missingIncludeSystem"
|
||||
(concat "-include=" (expand-file-name
|
||||
(concat directory-of-current-dir-locals-file "config.h")))
|
||||
)
|
||||
)
|
||||
)
|
||||
))
|
||||
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,2 +1,3 @@
|
||||
*.sln.in eol=crlf
|
||||
*.vcxproj.* eol=crlf
|
||||
*.vcxproj.in eol=crlf
|
||||
*.vcxproj.filters.in eol=crlf
|
||||
|
||||
79
.gitignore
vendored
79
.gitignore
vendored
@@ -1,61 +1,36 @@
|
||||
*-symtbl.c
|
||||
*.a
|
||||
*.gcda
|
||||
*.gcno
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.orig
|
||||
*.plist/ # ccc-analyzer store its results in .plist directories
|
||||
Makefile
|
||||
config.log
|
||||
config.h
|
||||
config.cache
|
||||
config.status
|
||||
libtool
|
||||
/isc-config.sh
|
||||
/configure.lineno
|
||||
autom4te.cache/
|
||||
*.rej
|
||||
*.orig
|
||||
*.o
|
||||
*.lo
|
||||
*.so
|
||||
*.a
|
||||
*.la
|
||||
*.gcno
|
||||
*.gcda
|
||||
*_test
|
||||
*~
|
||||
*-symtbl.c
|
||||
timestamp
|
||||
ans.run
|
||||
named.run
|
||||
named.memstats
|
||||
gen.dSYM/
|
||||
.ccache/
|
||||
.cproject
|
||||
.deps/
|
||||
.dirstamp
|
||||
.libs/
|
||||
# ccc-analyzer store its results in .plist directories
|
||||
*.plist/
|
||||
*~
|
||||
.project
|
||||
.cproject
|
||||
.settings
|
||||
/aclocal.m4
|
||||
/ar-lib
|
||||
/autom4te.cache/
|
||||
/bind.keys.h
|
||||
/compile
|
||||
/config.cache
|
||||
/config.guess
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/configure.lineno
|
||||
/depcomp
|
||||
/install-sh
|
||||
/isc-config.sh
|
||||
/libltdl/*
|
||||
/libtool
|
||||
/ltmain.sh
|
||||
/m4/libtool.m4
|
||||
/m4/ltargz.m4
|
||||
/m4/ltdl.m4
|
||||
/m4/ltoptions.m4
|
||||
/m4/ltsugar.m4
|
||||
/m4/ltversion.m4
|
||||
/m4/lt~obsolete.m4
|
||||
/missing
|
||||
/py-compile
|
||||
/stamp-h1
|
||||
/test-driver
|
||||
Makefile
|
||||
ans.run
|
||||
gen.dSYM/
|
||||
kyua.log
|
||||
named.memstats
|
||||
named.run
|
||||
timestamp
|
||||
/compile_commands.json
|
||||
/cppcheck_html/
|
||||
/cppcheck.results
|
||||
kyua.log
|
||||
973
.gitlab-ci.yml
973
.gitlab-ci.yml
File diff suppressed because it is too large
Load Diff
@@ -28,9 +28,9 @@
|
||||
- [ ] (QA) Tell Support to handle notification of release.
|
||||
- [ ] (Manager) Inform Marketing of the release
|
||||
- [ ] (Manager) Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
|
||||
- [ ] (SwEng) Push tags for the published releases to the public repository.
|
||||
- [ ] (SwEng) Update DEB and RPM packages.
|
||||
- [ ] (SwEng) Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`).
|
||||
|
||||
- [ ] (SwEng) Update DEB and RPM packages
|
||||
- [ ] (SwEng) Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`)
|
||||
|
||||
## Support
|
||||
- [ ] Make tarballs and signatures available to download.
|
||||
|
||||
717
CHANGES
717
CHANGES
@@ -1,710 +1,3 @@
|
||||
5302. [bug] Fix checking that "dnstap-output" is defined when
|
||||
"dnstap" is specified" in a view. [GL #1281]
|
||||
|
||||
5301. [bug] Detect partial prefixes / incomplete IPv4 address in
|
||||
acls. [GL #1143]
|
||||
|
||||
5300. [bug] dig/mdig/delv: Add a colon after EDNS option names,
|
||||
even when the option is empty, to improve
|
||||
readability and allow correct parsing of YAML
|
||||
output. [GL #1226]
|
||||
|
||||
--- 9.15.5 released ---
|
||||
|
||||
5299. [security] A flaw in DNSSEC verification when transferring
|
||||
mirror zones could allow data to be incorrectly
|
||||
marked valid. (CVE-2019-6475) [GL #1252]
|
||||
|
||||
5298. [security] Named could assert if a forwarder returned a
|
||||
referral, rather than resolving the query, when QNAME
|
||||
minimization was enabled. (CVE-2019-6476) [GL #1051]
|
||||
|
||||
5297. [bug] Check whether a previous QNAME minimization fetch
|
||||
is still running before starting a new one; return
|
||||
SERVFAIL and log an error if so. [GL #1191]
|
||||
|
||||
5296. [placeholder]
|
||||
|
||||
5295. [cleanup] Split dns_name_copy() calls into dns_name_copy() and
|
||||
dns_name_copynf() for those calls that can potentially
|
||||
fail and those that should not fail respectively.
|
||||
[GL !2265]
|
||||
|
||||
5294. [func] Fallback to ACE name on output in locale, which does not
|
||||
support converting it to unicode. [GL #846]
|
||||
|
||||
5293. [bug] On Windows, named crashed upon any attempt to fetch XML
|
||||
statistics from it. [GL #1245]
|
||||
|
||||
5292. [bug] Queue 'rndc nsec3param' requests while signing inline
|
||||
zone changes. [GL #1205]
|
||||
|
||||
--- 9.15.4 released ---
|
||||
|
||||
5291. [placeholder]
|
||||
|
||||
5290. [placeholder]
|
||||
|
||||
5289. [bug] Address NULL pointer dereference in rpz.c:rpz_detach.
|
||||
[GL #1210]
|
||||
|
||||
5288. [bug] dnssec-must-be-secure was not always honored.
|
||||
[GL #1209]
|
||||
|
||||
5287. [placeholder]
|
||||
|
||||
5286. [contrib] Address potential NULL pointer dereferences in
|
||||
dlz_mysqldyn_mod.c. [GL #1207]
|
||||
|
||||
5285. [port] win32: implement "-T maxudpXXX". [GL #837]
|
||||
|
||||
5284. [func] Added +unexpected command line option to dig.
|
||||
By default, dig won't accept a reply from a source
|
||||
other than the one to which it sent the query.
|
||||
Invoking dig with +unexpected argument will allow it
|
||||
to process replies from unexpected sources.
|
||||
|
||||
5283. [bug] When a response-policy zone expires, ensure that
|
||||
its policies are removed from the RPZ summary
|
||||
database. [GL #1146]
|
||||
|
||||
5282. [bug] Fixed a bug in searching for possible wildcard matches
|
||||
for query names in the RPZ summary database. [GL #1146]
|
||||
|
||||
5281. [cleanup] Don't escape commas when reporting named's command
|
||||
line. [GL #1189]
|
||||
|
||||
5280. [protocol] Add support for displaying EDNS option LLQ. [GL #1201]
|
||||
|
||||
5279. [bug] When loading, reject zones containing CDS or CDNSKEY
|
||||
RRsets at the zone apex if they would cause DNSSEC
|
||||
validation failures if published in the parent zone
|
||||
as the DS RRset. [GL #1187]
|
||||
|
||||
5278. [func] Add YAML output formats for dig, mdig and delv;
|
||||
use the "+yaml" option to enable. [GL #1145]
|
||||
|
||||
--- 9.15.3 released ---
|
||||
|
||||
5277. [bug] Cache DB statistics could underflow when serve-stale
|
||||
was in use, because of a bug in counter maintenance
|
||||
when RRsets become stale.
|
||||
|
||||
Functions for dumping statistics have been updated
|
||||
to dump active, stale, and ancient statistic
|
||||
counters. Ancient RRset counters are prefixed
|
||||
with '~'; stale RRset counters are still prefixed
|
||||
with '#'. [GL #602]
|
||||
|
||||
5276. [func] DNSSEC Lookaside Validation (DLV) is now obsolete;
|
||||
all code enabling its use has been removed from the
|
||||
validator, "delv", and the DNSSEC tools. [GL #7]
|
||||
|
||||
5275. [bug] Mark DS records included in referral messages
|
||||
with trust level "pending" so that they can be
|
||||
validated and cached immediately, with no need to
|
||||
re-query. [GL #964]
|
||||
|
||||
5274. [bug] Address potential use after free race when shutting
|
||||
down rpz. [GL #1175]
|
||||
|
||||
5273. [bug] Check that bits [64..71] of a dns64 prefix are zero.
|
||||
[GL #1159]
|
||||
|
||||
5272. [cleanup] Remove isc-config.sh script as the BIND 9 libraries
|
||||
are now purely internal. [GL #1123]
|
||||
|
||||
5271. [func] The normal (non-debugging) output of dnssec-signzone
|
||||
and dnssec-verify tools now goes to stdout, instead of
|
||||
the combination of stderr and stdout.
|
||||
|
||||
5270. [bug] 'dig +expandaaaa +short' did not work. [GL #1152]
|
||||
|
||||
5269. [port] cygwin: can return ETIMEDOUT on connect() with a
|
||||
non-blocking socket. [GL #1133]
|
||||
|
||||
5268. [placeholder]
|
||||
|
||||
5267. [func] Allow statistics groups display to be toggle-able.
|
||||
[GL #1030]
|
||||
|
||||
5266. [bug] named-checkconf failed to report dnstap-output
|
||||
missing from named.conf when dnstap was specified.
|
||||
[GL #1136]
|
||||
|
||||
5265. [bug] DNS64 and RPZ nodata (CNAME *.) rules interacted badly
|
||||
[GL #1106]
|
||||
|
||||
5264. [func] New DNS Cookie algorithm - siphash24 - has been added
|
||||
to BIND 9, and the old HMAC-SHA DNS Cookie algorithms
|
||||
have been removed. [GL #605]
|
||||
|
||||
--- 9.15.2 released ---
|
||||
|
||||
5263. [cleanup] Use atomics and isc_refcount_t wherever possible.
|
||||
[GL #1038]
|
||||
|
||||
5262. [func] Removed support for the legacy GeoIP API. [GL #1112]
|
||||
|
||||
5261. [cleanup] Remove SO_BSDCOMPAT socket option usage.
|
||||
|
||||
5260. [bug] dnstap-read was producing malformed output for large
|
||||
packets. [GL #1093]
|
||||
|
||||
5259. [func] New option '-i' for 'named-checkconf' to ignore
|
||||
warnings about deprecated options. [GL #1101]
|
||||
|
||||
5258. [func] Added support for the GeoIP2 API from MaxMind. This
|
||||
will be compiled in by default if the "libmaxminddb"
|
||||
library is found at compile time, but can be
|
||||
suppressed using "configure --disable-geoip".
|
||||
|
||||
Certain geoip ACL settings that were available with
|
||||
legacy GeoIP are not available when using GeoIP2.
|
||||
[GL #182]
|
||||
|
||||
5257. [bug] Some statistics data was not being displayed.
|
||||
Add shading to the zone tables. [GL #1030]
|
||||
|
||||
5256. [bug] Ensure that glue records are included in root
|
||||
priming responses if "minimal-responses" is not
|
||||
set to "yes". [GL #1092]
|
||||
|
||||
5255. [bug] Errors encountered while reloading inline-signing
|
||||
zones could be ignored, causing the zone content to
|
||||
be left in an incompletely updated state rather than
|
||||
reverted. [GL #1109]
|
||||
|
||||
5254. [func] Collect metrics to report to the statistics-channel
|
||||
DNSSEC signing operations (dnssec-sign) and refresh
|
||||
operations (dnssec-refresh) per zone and per keytag.
|
||||
[GL #513]
|
||||
|
||||
5253. [port] Support platforms that don't define ULLONG_MAX.
|
||||
[GL #1098]
|
||||
|
||||
5252. [func] Report if the last 'rndc reload/reconfig' failed in
|
||||
rndc status. [GL !2040]
|
||||
|
||||
5251. [bug] Statistics were broken in x86 Windows builds.
|
||||
[GL #1081]
|
||||
|
||||
5250. [func] The default size for RSA keys is now 2048 bits,
|
||||
for both ZSKs and KSKs. [GL #1097]
|
||||
|
||||
5249. [bug] Fix a possible underflow in recursion clients
|
||||
statistics when hitting recursive clients
|
||||
soft quota. [GL #1067]
|
||||
|
||||
--- 9.15.1 released ---
|
||||
|
||||
5248. [func] To clarify the configuration of DNSSEC keys,
|
||||
the "managed-keys" and "trusted-keys" options
|
||||
have both been deprecated. The new "dnssec-keys"
|
||||
statement can now be used for all trust anchors,
|
||||
with the keywords "iniital-key" or "static-key"
|
||||
to indicate whether the configured trust anchor
|
||||
should be used for initialization of RFC 5011 key
|
||||
management, or as a permanent trust anchor.
|
||||
|
||||
The "static-key" keyword will generate a warning if
|
||||
used for the root zone.
|
||||
|
||||
Configurations using "trusted-keys" or "managed-keys"
|
||||
will continue to work with no changes, but will
|
||||
generate warnings in the log. In a future release,
|
||||
these options will be marked obsolete. [GL #6]
|
||||
|
||||
5247. [cleanup] The 'cleaning-interval' option has been removed.
|
||||
[GL !1731]
|
||||
|
||||
5246. [func] Log TSIG if appropriate in 'sending notify to' message.
|
||||
[GL #1058]
|
||||
|
||||
5245. [cleanup] Reduce logging level for IXFR up-to-date poll
|
||||
responses. [GL #1009]
|
||||
|
||||
5244. [security] Fixed a race condition in dns_dispatch_getnext()
|
||||
that could cause an assertion failure if a
|
||||
significant number of incoming packets were
|
||||
rejected. (CVE-2019-6471) [GL #942]
|
||||
|
||||
5243. [bug] Fix a possible race between dispatcher and socket
|
||||
code in a high-load cold-cache resolver scenario.
|
||||
[GL #943]
|
||||
|
||||
5242. [bug] In relaxed qname minimization mode, fall back to
|
||||
normal resolution when encountering a lame
|
||||
delegation, and use _.domain/A queries rather
|
||||
than domain/NS. [GL #1055]
|
||||
|
||||
5241. [bug] Fix Ed448 private and public key ASN.1 prefix blobs.
|
||||
[GL #225]
|
||||
|
||||
5240. [bug] Remove key id calculation for RSAMD5. [GL #996]
|
||||
|
||||
5239. [func] Change the json-c detection to pkg-config. [GL #855]
|
||||
|
||||
5238. [bug] Fix a possible deadlock in TCP code. [GL #1046]
|
||||
|
||||
5237. [bug] Recurse to find the root server list with 'dig +trace'.
|
||||
[GL #1028]
|
||||
|
||||
5236. [func] Add SipHash 2-4 implementation in lib/isc/siphash.c
|
||||
and switch isc_hash_function() to use SipHash 2-4.
|
||||
[GL #605]
|
||||
|
||||
5235. [cleanup] Refactor lib/isc/app.c to be thread-safe, unused
|
||||
parts of the API has been removed and the
|
||||
isc_appctx_t data type has been changed to be
|
||||
fully opaque. [GL #1023]
|
||||
|
||||
5234. [port] arm: just use the compiler's default support for
|
||||
yield. [GL #981]
|
||||
|
||||
--- 9.15.0 released ---
|
||||
|
||||
5233. [bug] Negative trust anchors did not work with "forward only;"
|
||||
to validating resolvers. [GL #997]
|
||||
|
||||
5232. [placeholder]
|
||||
|
||||
5231. [protocol] Add support for displaying CLIENT-TAG and SERVER-TAG.
|
||||
[GL #960]
|
||||
|
||||
5230. [protocol] The SHA-1 hash algorithm is no longer used when
|
||||
generating DS and CDS records. [GL #1015]
|
||||
|
||||
5229. [protocol] Enforce known SSHFP fingerprint lengths. [GL #852]
|
||||
|
||||
5228. [func] If trusted-keys and managed-keys were configured
|
||||
simultaneously for the same name, the key could
|
||||
not be be rolled automatically. This is now
|
||||
a fatal configuration error. [GL #868]
|
||||
|
||||
5227. [placeholder]
|
||||
|
||||
5226. [placeholder]
|
||||
|
||||
5225. [func] Allow dig to print out AAAA record fully expanded.
|
||||
with +[no]expandaaaa. [GL #765]
|
||||
|
||||
5224. [bug] Only test provide-ixfr on TCP streams. [GL #991]
|
||||
|
||||
5223. [bug] Fixed a race in the filter-aaaa plugin accessing
|
||||
the hash table. [GL #1005]
|
||||
|
||||
5222. [bug] 'delv -t ANY' could leak memory. [GL #983]
|
||||
|
||||
5221. [test] Enable parallel execution of system tests on
|
||||
Windows. [GL !4101]
|
||||
|
||||
5220. [cleanup] Refactor the isc_stat structure to take advantage
|
||||
of stdatomic. [GL !1493]
|
||||
|
||||
5219. [bug] Fixed a race in the filter-aaaa plugin that could
|
||||
trigger a crash when returning an instance object
|
||||
to the memory pool. [GL #982]
|
||||
|
||||
5218. [bug] Conditionally include <dlfcn.h>. [GL #995]
|
||||
|
||||
5217. [bug] Restore key id calculation for RSAMD5. [GL #996]
|
||||
|
||||
5216. [bug] Fetches-per-zone counter wasn't updated correctly
|
||||
when doing qname minimization. [GL #992]
|
||||
|
||||
5215. [bug] Change #5124 was incomplete; named could still
|
||||
return FORMERR instead of SERVFAIL in some cases.
|
||||
[GL #990]
|
||||
|
||||
5214. [bug] win32: named now removes its lock file upon shutdown.
|
||||
[GL #979]
|
||||
|
||||
5213. [bug] win32: Eliminated a race which allowed named.exe running
|
||||
as a service to be killed prematurely during shutdown.
|
||||
[GL #978]
|
||||
|
||||
5212. [placeholder]
|
||||
|
||||
5211. [bug] Allow out-of-zone additional data to be included
|
||||
in authoritative responses if recursion is allowed
|
||||
and "minimal-responses" is disabled. This behavior
|
||||
was inadvertently removed in change #4605. [GL #817]
|
||||
|
||||
5210. [bug] When dnstap is enabled and recursion is not
|
||||
available, incoming queries are now logged
|
||||
as "auth". Previously, this depended on whether
|
||||
recursion was requested by the client, not on
|
||||
whether recursion was available. [GL #963]
|
||||
|
||||
5209. [bug] When update-check-ksk is true, add_sigs was not
|
||||
considering offline keys, leaving record sets signed
|
||||
with the incorrect type key. [GL #763]
|
||||
|
||||
5208. [test] Run valid rdata wire encodings through totext+fromtext
|
||||
and tofmttext+fromtext methods to check these methods.
|
||||
[GL #899]
|
||||
|
||||
5207. [test] Check delv and dig TTL values. [GL #965]
|
||||
|
||||
5206. [bug] Delv could print out bad TTLs. [GL #965]
|
||||
|
||||
5205. [bug] Enforce that a DS hash exists. [GL #899]
|
||||
|
||||
5204. [test] Check that dns_rdata_fromtext() produces a record that
|
||||
will be accepted by dns_rdata_fromwire(). [GL #852]
|
||||
|
||||
5203. [bug] Enforce whether key rdata exists or not in KEY,
|
||||
DNSKEY, CDNSKEY and RKEY. [GL #899]
|
||||
|
||||
5202. [bug] <dns/ecs.h> was missing ISC_LANG_ENDDECLS. [GL #976]
|
||||
|
||||
5201. [bug] Fix a possible deadlock in RPZ update code. [GL #973]
|
||||
|
||||
5200. [security] tcp-clients settings could be exceeded in some cases,
|
||||
which could lead to exhaustion of file descriptors.
|
||||
(CVE-2018-5743) [GL #615]
|
||||
|
||||
5199. [security] In certain configurations, named could crash
|
||||
if nxdomain-redirect was in use and a redirected
|
||||
query resulted in an NXDOMAIN from the cache.
|
||||
(CVE-2019-6467) [GL #880]
|
||||
|
||||
5198. [bug] If a fetch context was being shut down and, at the same
|
||||
time, we returned from qname minimization, an INSIST
|
||||
could be hit. [GL #966]
|
||||
|
||||
5197. [bug] dig could die in best effort mode on multiple SIG(0)
|
||||
records. Similarly on multiple OPT and multiple TSIG
|
||||
records. [GL #920]
|
||||
|
||||
5196. [bug] make install failed with --with-dlopen=no. [GL #955]
|
||||
|
||||
5195. [bug] "allow-update" and "allow-update-forwarding" were
|
||||
treated as configuration errors if used at the
|
||||
options or view level. [GL #913]
|
||||
|
||||
5194. [bug] Enforce non empty ZOMEMD hash. [GL #899]
|
||||
|
||||
5193. [bug] EID and NIMLOC failed to do multi-line output
|
||||
correctly. [GL #899]
|
||||
|
||||
5192. [placeholder]
|
||||
|
||||
5191. [placeholder]
|
||||
|
||||
5190. [bug] Ignore trust anchors using disabled algorithms.
|
||||
[GL #806]
|
||||
|
||||
5189. [cleanup] Remove revoked root DNSKEY from bind.keys. [GL #945]
|
||||
|
||||
5188. [func] The "dnssec-enable" option is deprecated and no
|
||||
longer has any effect; DNSSEC responses are
|
||||
always enabled. [GL #866]
|
||||
|
||||
5187. [test] Set time zone before running any tests in dnstap_test.
|
||||
[GL #940]
|
||||
|
||||
5186. [cleanup] More dnssec-keygen manual tidying. [GL !1678]
|
||||
|
||||
5185. [placeholder]
|
||||
|
||||
5184. [bug] Missing unlocks in sdlz.c. [GL #936]
|
||||
|
||||
5183. [bug] Reinitialize ECS data before reusing client
|
||||
structures. [GL #881]
|
||||
|
||||
5182. [bug] Fix a high-load race/crash in handling of
|
||||
isc_socket_close() in resolver. [GL #834]
|
||||
|
||||
5181. [func] Add a mechanism for a DLZ module to signal that
|
||||
the view's allow-transfer ACL should be used to
|
||||
determine whether transfers are allowed. [GL #803]
|
||||
|
||||
5180. [bug] delv now honors the operating system's preferred
|
||||
ephemeral port range. [GL #925]
|
||||
|
||||
5179. [cleanup] Replace some vague type declarations with the more
|
||||
specific dns_secalg_t and dns_dsdigest_t.
|
||||
Thanks to Tony Finch. [GL !1498]
|
||||
|
||||
5178. [bug] Handle EDQUOT (disk quota) and ENOSPC (disk full)
|
||||
errors when writing files. [GL #902]
|
||||
|
||||
5177. [func] Add the ability to specify in named.conf whether a
|
||||
response-policy zone's SOA record should be added
|
||||
to the additional section (add-soa yes/no). [GL #865]
|
||||
|
||||
5176. [tests] Remove a dependency on libxml in statschannel system
|
||||
test. [GL #926]
|
||||
|
||||
5175. [bug] Fixed a problem with file input in dnssec-keymgr,
|
||||
dnssec-coverage and dnssec-checkds when using
|
||||
python3. [GL #882]
|
||||
|
||||
5174. [doc] Tidy dnssec-keygen manual. [GL !1557]
|
||||
|
||||
5173. [bug] Fixed a race in socket code that could occur when
|
||||
accept, send, or recv were called from an event
|
||||
loop but the socket had been closed by another
|
||||
thread. [RT #874]
|
||||
|
||||
5172. [bug] nsupdate now honors the operating system's preferred
|
||||
ephemeral port range. [GL #905]
|
||||
|
||||
5171. [func] named plugins are now installed into a separate
|
||||
directory. Supplying a filename (a string without path
|
||||
separators) in a "plugin" configuration stanza now
|
||||
causes named to look for that plugin in that directory.
|
||||
[GL #878]
|
||||
|
||||
5170. [test] Added --with-dlz-filesystem to feature-test. [GL !1587]
|
||||
|
||||
5169. [bug] The presence of certain types in an otherwise
|
||||
empty node could cause a crash while processing a
|
||||
type ANY query. [GL #901]
|
||||
|
||||
5168. [bug] Do not crash on shutdown when RPZ fails to load. Also,
|
||||
keep previous version of the database if RPZ fails to
|
||||
load. [GL #813]
|
||||
|
||||
5167. [bug] nxdomain-redirect could sometimes lookup the wrong
|
||||
redirect name. [GL #892]
|
||||
|
||||
5166. [placeholder]
|
||||
|
||||
5165. [contrib] Removed SDB drivers from contrib; they're obsolete.
|
||||
[GL #428]
|
||||
|
||||
5164. [bug] Correct errno to result translation in dlz filesystem
|
||||
modules. [GL #884]
|
||||
|
||||
5163. [cleanup] Out-of-tree builds failed --enable-dnstap. [GL #836]
|
||||
|
||||
5162. [cleanup] Improve dnssec-keymgr manual. Thanks to Tony Finch.
|
||||
[GL !1518]
|
||||
|
||||
5161. [bug] Do not require the SEP bit to be set for mirror zone
|
||||
trust anchors. [GL #873]
|
||||
|
||||
5160. [contrib] Added DNAME support to the DLZ LDAP schema. Also
|
||||
fixed a compilation bug affecting several DLZ
|
||||
modules. [GL #872]
|
||||
|
||||
5159. [bug] dnssec-coverage was incorrectly ignoring
|
||||
names specified on the command line without
|
||||
trailing dots. [GL !1478]
|
||||
|
||||
5158. [protocol] Add support for AMTRELAY and ZONEMD. [GL #867]
|
||||
|
||||
5157. [bug] Nslookup now errors out if there are extra command
|
||||
line arguments. [GL #207]
|
||||
|
||||
5156. [doc] Extended and refined the section of the ARM describing
|
||||
mirror zones. [GL #774]
|
||||
|
||||
5155. [func] "named -V" now outputs the default paths to
|
||||
named.conf, rndc.conf, bind.keys, and other
|
||||
files used or created by named and other tools, so
|
||||
that the correct paths to these files can quickly be
|
||||
determined regardless of the configure settings
|
||||
used when BIND was built. [GL #859]
|
||||
|
||||
5154. [bug] dig: process_opt could be called twice on the same
|
||||
message leading to a assertion failure. [GL #860]
|
||||
|
||||
5153. [func] Zone transfer statistics (size, number of records, and
|
||||
number of messages) are now logged for outgoing
|
||||
transfers as well as incoming ones. [GL #513]
|
||||
|
||||
5152. [func] Improved logging of DNSSEC key events:
|
||||
- Zone signing and DNSKEY maintenance events are
|
||||
now logged to the "dnssec" category
|
||||
- Messages are now logged when DNSSEC keys are
|
||||
published, activated, inactivated, deleted,
|
||||
or revoked.
|
||||
[GL #714]
|
||||
|
||||
5151. [func] Options that have been been marked as obsolete in
|
||||
named.conf for a very long time are now fatal
|
||||
configuration errors. [GL #358]
|
||||
|
||||
5150. [cleanup] Remove the ability to compile BIND with assertions
|
||||
disabled. [GL #735]
|
||||
|
||||
5149. [func] "rndc dumpdb" now prints a line above a stale RRset
|
||||
indicating how long the data will be retained in the
|
||||
cache for emergency use. [GL #101]
|
||||
|
||||
5148. [bug] named did not sign the TKEY response. [GL #821]
|
||||
|
||||
5147. [bug] dnssec-keymgr: Add a five-minute margin to better
|
||||
handle key events close to 'now'. [GL #848]
|
||||
|
||||
5146. [placeholder]
|
||||
|
||||
5145. [func] Use atomics instead of locked variables for isc_quota
|
||||
and isc_counter. [GL !1389]
|
||||
|
||||
5144. [bug] dig now returns a non-zero exit code when a TCP
|
||||
connection is prematurely closed by a peer more than
|
||||
once for the same lookup. [GL #820]
|
||||
|
||||
5143. [bug] dnssec-keymgr and dnssec-coverage failed to find
|
||||
key files for zone names ending in ".". [GL #560]
|
||||
|
||||
5142. [cleanup] Removed "configure --disable-rpz-nsip" and
|
||||
"--disable-rpz-nsdname" options. "nsip-enable"
|
||||
and "nsdname-enable" both now default to yes,
|
||||
regardless of compile-time settings. [GL #824]
|
||||
|
||||
5141. [security] Zone transfer controls for writable DLZ zones were
|
||||
not effective as the allowzonexfr method was not being
|
||||
called for such zones. (CVE-2019-6465) [GL #790]
|
||||
|
||||
5140. [bug] Don't immediately mark existing keys as inactive and
|
||||
deleted when running dnssec-keymgr for the first
|
||||
time. [GL #117]
|
||||
|
||||
5139. [bug] If possible, don't use forwarders when priming.
|
||||
This ensures we can get root server IP addresses
|
||||
from priming query response glue, which may not
|
||||
be present if the forwarding server is returning
|
||||
minimal responses. [GL #752]
|
||||
|
||||
5138. [bug] Under some circumstances named could hit an assertion
|
||||
failure when doing qname minimization when using
|
||||
forwarders. [GL #797]
|
||||
|
||||
5137. [func] named now logs messages whenever a mirror zone becomes
|
||||
usable or unusable for resolution purposes. [GL #818]
|
||||
|
||||
5136. [cleanup] Check in named-checkconf that allow-update and
|
||||
allow-update-forwarding are not set at the
|
||||
view/options level; fix documentation. [GL #512]
|
||||
|
||||
5135. [port] sparc: Use smt_pause() instead of pause. [GL #816]
|
||||
|
||||
5134. [bug] win32: WSAStartup was not called before getservbyname
|
||||
was called. [GL #590]
|
||||
|
||||
5133. [bug] 'rndc managed-keys' didn't handle class and view
|
||||
correctly and failed to add new lines between each
|
||||
view. [GL !1327]
|
||||
|
||||
5132. [bug] Fix race condition in cleanup part of dns_dt_create().
|
||||
[GL !1323]
|
||||
|
||||
5131. [cleanup] Address Coverity warnings. [GL #801]
|
||||
|
||||
5130. [cleanup] Remove support for l10n message catalogs. [GL #709]
|
||||
|
||||
5129. [contrib] sdlz_helper.c:build_querylist was not properly
|
||||
splitting the query string. [GL #798]
|
||||
|
||||
5128. [bug] Refreshkeytime was not being updated for managed
|
||||
keys zones. [GL #784]
|
||||
|
||||
5127. [bug] rcode.c:maybe_numeric failed to handle NUL in text
|
||||
regions. [GL #807]
|
||||
|
||||
5126. [bug] Named incorrectly accepted empty base64 and hex encoded
|
||||
fields when reading master files. [GL #807]
|
||||
|
||||
5125. [bug] Allow for up to 100 records or 64k of data when caching
|
||||
a negative response. [GL #804]
|
||||
|
||||
5124. [bug] Named could incorrectly return FORMERR rather than
|
||||
SERVFAIL. [GL #804]
|
||||
|
||||
5123. [bug] dig could hang indefinitely after encountering an error
|
||||
before creating a TCP socket. [GL #692]
|
||||
|
||||
5122. [bug] In a "forward first;" configuration, a forwarder
|
||||
timeout did not prevent that forwarder from being
|
||||
queried again after falling back to full recursive
|
||||
resolution. [GL #315]
|
||||
|
||||
5121. [contrib] dlz_stub_driver.c fails to return ISC_R_NOTFOUND on none
|
||||
matching zone names. [GL !1299]
|
||||
|
||||
5120. [placeholder]
|
||||
|
||||
5119. [placeholder]
|
||||
|
||||
5118. [security] Named could crash if it is managing a key with
|
||||
`managed-keys` and the authoritative zone is rolling
|
||||
the key to an unsupported algorithm. (CVE-2018-5745)
|
||||
[GL #780]
|
||||
|
||||
5117. [placeholder]
|
||||
|
||||
5116. [bug] Named/named-checkconf triggered a assertion when
|
||||
a mirror zone's name is bad. [GL #778]
|
||||
|
||||
5115. [bug] Allow unsupported algorithms in zone when not used for
|
||||
signing with dnssec-signzone. [GL #783]
|
||||
|
||||
5114. [func] Include a 'reconfig/reload in progress' status line
|
||||
in rndc status, use it in tests.
|
||||
|
||||
5113. [port] Fixed a Windows build error.
|
||||
|
||||
5112. [bug] Named/named-checkconf could dump core if there was
|
||||
a missing masters clause and a bad notify clause.
|
||||
[GL #779]
|
||||
|
||||
5111. [bug] Occluded DNSKEY records could make it into the
|
||||
delegating NSEC/NSEC3 bitmap. [GL #742]
|
||||
|
||||
5110. [security] Named leaked memory if there were multiple Key Tag
|
||||
EDNS options present. (CVE-2018-5744) [GL #772]
|
||||
|
||||
5109. [cleanup] Remove support for RSAMD5 algorithm. [GL #628]
|
||||
|
||||
--- 9.13.5 released ---
|
||||
|
||||
5108. [bug] Named could fail to determine bottom of zone when
|
||||
removing out of date keys leading to invalid NSEC
|
||||
and NSEC3 records being added to the zone. [GL #771]
|
||||
|
||||
5107. [bug] 'host -U' did not work. [GL #769]
|
||||
|
||||
5106. [experimental] A new "plugin" mechanism has been added to allow
|
||||
extension of query processing functionality through
|
||||
the use of dynamically loadable libraries. A
|
||||
"filter-aaaa.so" plugin has been implemented,
|
||||
replacing the filter-aaaa feature that was formerly
|
||||
implemented as a native part of BIND.
|
||||
|
||||
The "filter-aaaa", "filter-aaaa-on-v4" and
|
||||
"filter-aaaa-on-v6" options can no longer be
|
||||
configured using native named.conf syntax. However,
|
||||
loading the filter-aaaa.so plugin and setting its
|
||||
parameters provides identical functionality.
|
||||
|
||||
Note that the plugin API is a work in progress and
|
||||
is likely to evolve as further plugins are
|
||||
implemented. [GL #15]
|
||||
|
||||
5105. [bug] Fix a race between process_fd and socketclose in
|
||||
unix socket code. [GL #744]
|
||||
|
||||
5104. [cleanup] Log clearer informational message when a catz zone
|
||||
is overridden by a zone in named.conf.
|
||||
Thanks to Tony Finch. [GL !1157]
|
||||
|
||||
5103. [bug] Add missing design by contract tests to dns_catz*.
|
||||
[GL #748]
|
||||
|
||||
5102. [bug] dnssec-coverage failed to use the default TTL when
|
||||
checking KSK deletion times leading to a exception.
|
||||
[GL #585]
|
||||
|
||||
5101. [bug] Fix default installation path for Python modules and
|
||||
remove the dnspython dependency accidentally introduced
|
||||
by change 4970. [GL #730]
|
||||
|
||||
5100. [func] Pin resolver tasks to specific task queues. [GL !1117]
|
||||
|
||||
5099. [func] Failed mutex and conditional creations are always
|
||||
@@ -738,8 +31,8 @@
|
||||
5091. [func] Two new global and per-view options min-cache-ttl
|
||||
and min-ncache-ttl [GL #613]
|
||||
|
||||
5090. [bug] dig and mdig failed to properly pre-parse dash value
|
||||
pairs when value was a separate argument and started
|
||||
5090. [bug] dig and mdig failed to properly preparse dash value
|
||||
pairs when value was a seperate argument and started
|
||||
with a dash. [GL #584]
|
||||
|
||||
5089. [bug] Restore localhost fallback in dig and host which is
|
||||
@@ -805,7 +98,7 @@
|
||||
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
|
||||
behavior for auto-reallocated buffers. [GL #644]
|
||||
|
||||
5071. [bug] Comparison of NXT records was broken. [GL #631]
|
||||
5071. [bug] Comparision of NXT records was broken. [GL #631]
|
||||
|
||||
5070. [bug] Record types which support a empty rdata field were
|
||||
not handling the empty rdata field case. [GL #638]
|
||||
@@ -824,7 +117,7 @@
|
||||
|
||||
5065. [bug] Only set IPV6_USE_MIN_MTU on IPv6. [GL #553]
|
||||
|
||||
5064. [test] Initialize TZ environment variable before calling
|
||||
5064. [test] Initalize TZ environment variable before calling
|
||||
dns_test_begin in dnstap_test. [GL #624]
|
||||
|
||||
5063. [test] In statschannel test try a few times before failing
|
||||
@@ -1050,7 +343,7 @@
|
||||
5001. [bug] Fix refcount errors on error paths. [GL !563]
|
||||
|
||||
5000. [bug] named_server_servestale() could leave the server in
|
||||
exclusive mode if an error occurred. [GL #441]
|
||||
exclusive mode if an error occured. [GL #441]
|
||||
|
||||
4999. [cleanup] Remove custom printf implementation in lib/isc/print.c.
|
||||
[GL #261]
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
CODE OF CONDUCT
|
||||
|
||||
BIND 9 Code of Conduct
|
||||
|
||||
Like the technical community as a whole, the BIND 9 team and community is
|
||||
made up of a mixture of professionals and volunteers from all over the
|
||||
world, working on every aspect of the mission - including mentorship,
|
||||
teaching, and connecting people.
|
||||
|
||||
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 people to adhere to. This code applies equally to the
|
||||
core development team, open source contributors and those seeking help and
|
||||
guidance.
|
||||
|
||||
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 us and the technical communities in which we participate.
|
||||
|
||||
This code of conduct applies to all spaces managed by the BIND 9 project
|
||||
or Internet Systems Consortium. This includes chat, the mailing lists, the
|
||||
issue tracker, and any other fora created by the project team which the
|
||||
community uses for communication. In addition, violations of this code
|
||||
outside these spaces may affect a person's ability to participate within
|
||||
them.
|
||||
|
||||
If you believe someone is violating the code of conduct, we ask that you
|
||||
report it by emailing conduct@isc.org. For more details please see our
|
||||
Reporting Guidelines.
|
||||
|
||||
* Be friendly and patient.
|
||||
* Be welcoming. We strive to be a community that welcomes and supports
|
||||
people of all backgrounds and identities. This includes, but is not
|
||||
limited to members of any race, ethnicity, culture, national origin,
|
||||
colour, immigration status, social and economic class, educational
|
||||
level, sex, sexual orientation, gender identity and expression, age,
|
||||
size, family status, political belief, religion, and mental and
|
||||
physical ability.
|
||||
* Be considerate. Your work will be used by other people, and you in
|
||||
turn will depend on the work of others. Any decision you take will
|
||||
affect users and colleagues, and you should take those consequences
|
||||
into account when making decisions. Remember that we're a world-wide
|
||||
community, so you might not be communicating in someone else's primary
|
||||
language.
|
||||
* Be respectful. Not all of us will agree all the time, but disagreement
|
||||
is no excuse for poor behavior and poor manners. We might all
|
||||
experience some frustration now and then, but we cannot allow that
|
||||
frustration to turn into a personal attack. It's important to remember
|
||||
that a community where people feel uncomfortable or threatened is not
|
||||
a productive one. Members of the BIND 9 community should be respectful
|
||||
when dealing with other members as well as with people outside the
|
||||
BIND 9 community.
|
||||
* Be careful in the words that you choose. We are a community of
|
||||
professionals, and we conduct ourselves professionally. Be kind to
|
||||
others. Do not insult or put down other participants. Harassment and
|
||||
other exclusionary behavior aren't acceptable. This includes, but is
|
||||
not limited to:
|
||||
+ Violent threats or language directed against another person.
|
||||
+ Discriminatory jokes and language.
|
||||
+ Posting sexually explicit or violent material.
|
||||
+ Posting (or threatening to post) other people's personally
|
||||
identifying information ("doxing").
|
||||
+ Personal insults, especially those using racist or sexist terms.
|
||||
+ Unwelcome sexual attention.
|
||||
+ Advocating for, or encouraging, any of the above behavior.
|
||||
+ Repeated harassment of others. In general, if someone asks you to
|
||||
stop, then stop.
|
||||
* When we disagree, try to understand why. Disagreements, both social
|
||||
and technical, happen all the time and BIND 9 is no exception. It is
|
||||
important that we resolve disagreements and differing views
|
||||
constructively. Remember that we're different. The strength of BIND 9
|
||||
comes from its varied community, people from a wide range of
|
||||
backgrounds. Different people have different perspectives on issues.
|
||||
Being unable to understand why someone holds a viewpoint doesn't mean
|
||||
that they're wrong. Don't forget that it is human to err and blaming
|
||||
each other doesn't get us anywhere. Instead, focus on helping to
|
||||
resolve issues and learning from mistakes.
|
||||
|
||||
Original text courtesy of the Django Code of Conduct project.
|
||||
@@ -1,71 +0,0 @@
|
||||
# BIND 9 Code of Conduct
|
||||
|
||||
Like the technical community as a whole, the BIND 9 team and community is made
|
||||
up of a mixture of professionals and volunteers from all over the world, working
|
||||
on every aspect of the mission - including mentorship, teaching, and connecting
|
||||
people.
|
||||
|
||||
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
|
||||
people to adhere to. This code applies equally to the core development team, open source contributors and those
|
||||
seeking help and guidance.
|
||||
|
||||
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
|
||||
us and the technical communities in which we participate.
|
||||
|
||||
This code of conduct applies to all spaces managed by the BIND 9 project or
|
||||
Internet Systems Consortium. This includes chat, the mailing lists, the issue
|
||||
tracker, and any other fora created by the project team which the
|
||||
community uses for communication. In addition, violations of this code outside
|
||||
these spaces may affect a person's ability to participate within them.
|
||||
|
||||
If you believe someone is violating the code of conduct, we ask that you report
|
||||
it by emailing [conduct@isc.org](conduct@isc.org). For more details please see
|
||||
our [Reporting Guidelines](https://www.isc.org/conductreporting/).
|
||||
|
||||
* **Be friendly and patient.**
|
||||
* **Be welcoming.** We strive to be a community that welcomes and supports
|
||||
people of all backgrounds and identities. This includes, but is not limited to
|
||||
members of any race, ethnicity, culture, national origin, colour, immigration
|
||||
status, social and economic class, educational level, sex, sexual orientation,
|
||||
gender identity and expression, age, size, family status, political belief,
|
||||
religion, and mental and physical ability.
|
||||
* **Be considerate.** Your work will be used by other people, and you in turn
|
||||
will depend on the work of others. Any decision you take will affect users and
|
||||
colleagues, and you should take those consequences into account when making
|
||||
decisions. Remember that we're a world-wide community, so you might not be
|
||||
communicating in someone else's primary language.
|
||||
* **Be respectful.** Not all of us will agree all the time, but disagreement is
|
||||
no excuse for poor behavior and poor manners. We might all experience some
|
||||
frustration now and then, but we cannot allow that frustration to turn into a
|
||||
personal attack. It's important to remember that a community where people feel
|
||||
uncomfortable or threatened is not a productive one. Members of the BIND 9
|
||||
community should be respectful when dealing with other members as well as with
|
||||
people outside the BIND 9 community.
|
||||
* **Be careful in the words that you choose.** We are a community of
|
||||
professionals, and we conduct ourselves professionally. Be kind to others. Do
|
||||
not insult or put down other participants. Harassment and other exclusionary
|
||||
behavior aren't acceptable. This includes, but is not limited to:
|
||||
* Violent threats or language directed against another person.
|
||||
* Discriminatory jokes and language.
|
||||
* Posting sexually explicit or violent material.
|
||||
* Posting (or threatening to post) other people's personally identifying
|
||||
information ("doxing").
|
||||
* Personal insults, especially those using racist or sexist terms.
|
||||
* Unwelcome sexual attention.
|
||||
* Advocating for, or encouraging, any of the above behavior.
|
||||
* Repeated harassment of others. In general, if someone asks you to stop, then
|
||||
stop.
|
||||
* **When we disagree, try to understand why.** Disagreements, both social and
|
||||
technical, happen all the time and BIND 9 is no exception. It is important
|
||||
that we resolve disagreements and differing views constructively. Remember
|
||||
that we're different. The strength of BIND 9 comes from its varied community,
|
||||
people from a wide range of backgrounds. Different people have different
|
||||
perspectives on issues. Being unable to understand why someone holds a
|
||||
viewpoint doesn't mean that they're wrong. Don't forget that it is human to
|
||||
err and blaming each other doesn't get us anywhere. Instead, focus on helping
|
||||
to resolve issues and learning from mistakes.
|
||||
|
||||
Original text courtesy of the [Django Code of Conduct](https://www.djangoproject.com/conduct/)
|
||||
project.
|
||||
10
CONTRIBUTING
10
CONTRIBUTING
@@ -1,5 +1,3 @@
|
||||
CONTRIBUTING
|
||||
|
||||
BIND Source Access and Contributor Guidelines
|
||||
|
||||
Feb 22, 2018
|
||||
@@ -34,14 +32,6 @@ access to the source repository was restricted just as commit access was.
|
||||
That's now changing, with the opening of a public git mirror to the BIND
|
||||
source tree (see below).
|
||||
|
||||
At Internet Systems Consortium, we're committed to building communities
|
||||
that are welcoming and inclusive; environments where people are encouraged
|
||||
to share ideas, treat each other with respect, and collaborate towards the
|
||||
best solutions. To reinforce our commitment, the Internet Systems
|
||||
Consortium has adopted the Contributor Covenant version 1.4 as our Code of
|
||||
Conduct for BIND 9 project, as well as for the conduct of our developers
|
||||
throughout the industry.
|
||||
|
||||
Access to source code
|
||||
|
||||
Public BIND releases are always available from the ISC FTP site.
|
||||
|
||||
@@ -41,14 +41,6 @@ a release: read access to the source repository was restricted just
|
||||
as commit access was. That's now changing, with the opening of a
|
||||
public git mirror to the BIND source tree (see below).
|
||||
|
||||
At [Internet Systems Consortium](https://www.isc.org), we're committed to
|
||||
building communities that are welcoming and inclusive; environments where people
|
||||
are encouraged to share ideas, treat each other with respect, and collaborate
|
||||
towards the best solutions. To reinforce our commitment, the [Internet Systems
|
||||
Consortium](https://www.isc.org) has adopted the Contributor Covenant version
|
||||
1.4 as our Code of Conduct for BIND 9 project, as well as for the conduct of our
|
||||
developers throughout the industry.
|
||||
|
||||
### <a name="access"></a>Access to source code
|
||||
|
||||
Public BIND releases are always available from the
|
||||
@@ -116,7 +108,7 @@ ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.
|
||||
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/article/AA-00340/89/What-to-do-if-your-BIND-or-DHCP-server-has-crashed.html)
|
||||
|
||||
### <a name="contrib"></a>Contributing code
|
||||
### <a name="bugs"></a>Contributing code
|
||||
|
||||
BIND is licensed under the
|
||||
[Mozilla Public License 2.0](http://www.isc.org/downloads/software-support-policy/isc-license/).
|
||||
|
||||
227
COPYRIGHT
227
COPYRIGHT
@@ -1,4 +1,4 @@
|
||||
Copyright (C) 1996-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 1996-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -181,6 +181,67 @@ SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998 Doug Rabson
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright ((c)) 2002, Rice University
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
* Neither the name of Rice University (RICE) nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
|
||||
This software is provided by RICE and the contributors on an "as is"
|
||||
basis, without any representations or warranties of any kind, express
|
||||
or implied including, but not limited to, representations or
|
||||
warranties of non-infringement, merchantability or fitness for a
|
||||
particular purpose. In no event shall RICE or contributors be liable
|
||||
for any direct, indirect, incidental, special, exemplary, or
|
||||
consequential damages (including, but not limited to, procurement of
|
||||
substitute goods or services; loss of use, data, or profits; or
|
||||
business interruption) however caused and on any theory of liability,
|
||||
whether in contract, strict liability, or tort (including negligence
|
||||
or otherwise) arising in any way out of the use of this software, even
|
||||
if advised of the possibility of such damage.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -201,6 +262,61 @@ SOFTWARE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright 2000 Aaron D. Gifford. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998 Doug Rabson.
|
||||
Copyright (c) 2001 Jake Burkholder.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
All rights reserved.
|
||||
|
||||
@@ -247,6 +363,49 @@ SOFTWARE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved.
|
||||
|
||||
By using this file, you agree to the terms and conditions set forth bellow.
|
||||
|
||||
LICENSE TERMS AND CONDITIONS
|
||||
|
||||
The following License Terms and Conditions apply, unless a different
|
||||
license is obtained from Japan Network Information Center ("JPNIC"),
|
||||
a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
|
||||
Chiyoda-ku, Tokyo 101-0047, Japan.
|
||||
|
||||
1. Use, Modification and Redistribution (including distribution of any
|
||||
modified or derived work) in source and/or binary forms is permitted
|
||||
under this License Terms and Conditions.
|
||||
|
||||
2. Redistribution of source code must retain the copyright notices as they
|
||||
appear in each source code file, this License Terms and Conditions.
|
||||
|
||||
3. Redistribution in binary form must reproduce the Copyright Notice,
|
||||
this License Terms and Conditions, in the documentation and/or other
|
||||
materials provided with the distribution. For the purposes of binary
|
||||
distribution the "Copyright Notice" refers to the following language:
|
||||
"Copyright (c) 2000-2002 Japan Network Information Center. All rights
|
||||
reserved."
|
||||
|
||||
4. The name of JPNIC may not be used to endorse or promote products
|
||||
derived from this Software without specific prior written approval of
|
||||
JPNIC.
|
||||
|
||||
5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2004 Nominet, Ltd.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any
|
||||
@@ -263,6 +422,24 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Portions Copyright RSA Security Inc.
|
||||
|
||||
License to copy and use this software is granted provided that it is
|
||||
identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
|
||||
(Cryptoki)" in all material mentioning or referencing this software.
|
||||
|
||||
License is also granted to make and use derivative works provided that
|
||||
such works are identified as "derived from the RSA Security Inc. PKCS #11
|
||||
Cryptographic Token Interface (Cryptoki)" in all material mentioning or
|
||||
referencing the derived work.
|
||||
|
||||
RSA Security Inc. makes no representations concerning either the
|
||||
merchantability of this software or the suitability of this software for
|
||||
any particular purpose. It is provided "as is" without express or implied
|
||||
warranty of any kind.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1996, David Mazieres <dm@uun.org>
|
||||
Copyright (c) 2008, Damien Miller <djm@openbsd.org>
|
||||
|
||||
@@ -280,6 +457,54 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. All advertising materials mentioning features or use of this
|
||||
software must display the following acknowledgment:
|
||||
"This product includes software developed by the OpenSSL Project
|
||||
for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
|
||||
|
||||
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
||||
endorse or promote products derived from this software without
|
||||
prior written permission. For written permission, please contact
|
||||
licensing@OpenSSL.org.
|
||||
|
||||
5. Products derived from this software may not be called "OpenSSL"
|
||||
nor may "OpenSSL" appear in their names without prior written
|
||||
permission of the OpenSSL Project.
|
||||
|
||||
6. Redistributions of any form whatsoever must retain the following
|
||||
acknowledgment:
|
||||
"This product includes software developed by the OpenSSL Project
|
||||
for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
||||
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
||||
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1995, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
All rights reserved.
|
||||
|
||||
|
||||
84
HISTORY
84
HISTORY
@@ -1,81 +1,5 @@
|
||||
HISTORY
|
||||
|
||||
Functional enhancements from prior major releases of BIND 9
|
||||
|
||||
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 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 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
|
||||
@@ -507,11 +431,11 @@ BIND 9.4.0
|
||||
* 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.
|
||||
* The lame cache is now done on a 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.
|
||||
query () 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.
|
||||
|
||||
75
HISTORY.md
75
HISTORY.md
@@ -10,81 +10,6 @@
|
||||
-->
|
||||
### Functional enhancements from prior major releases of BIND 9
|
||||
|
||||
#### 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
|
||||
|
||||
39
Makefile.in
39
Makefile.in
@@ -18,7 +18,11 @@ SUBDIRS = make lib fuzz bin doc
|
||||
TARGETS =
|
||||
PREREQS = bind.keys.h
|
||||
|
||||
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS CODE_OF_CONDUCT \
|
||||
MANPAGES = isc-config.sh.1
|
||||
|
||||
HTMLPAGES = isc-config.sh.html
|
||||
|
||||
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS \
|
||||
${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
@@ -31,7 +35,7 @@ bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/util/bindkeys.pl
|
||||
|
||||
distclean::
|
||||
rm -f config.cache config.h config.log config.status TAGS
|
||||
rm -f libtool configure.lineno
|
||||
rm -f libtool isc-config.sh configure.lineno
|
||||
rm -f util/conf.sh docutil/docbook2man-wrapper.sh
|
||||
|
||||
# XXX we should clean libtool stuff too. Only do this after we add rules
|
||||
@@ -50,11 +54,25 @@ installdirs:
|
||||
${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
|
||||
|
||||
install:: installdirs
|
||||
install:: isc-config.sh installdirs
|
||||
${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir}
|
||||
rm -f ${DESTDIR}${bindir}/bind9-config
|
||||
@LN@ ${DESTDIR}${bindir}/isc-config.sh ${DESTDIR}${bindir}/bind9-config
|
||||
${INSTALL_DATA} ${top_srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1
|
||||
rm -f ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
@LN@ ${DESTDIR}${mandir}/man1/isc-config.sh.1 ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir}
|
||||
|
||||
uninstall::
|
||||
rm -f ${DESTDIR}${sysconfdir}/bind.keys
|
||||
rm -f ${DESTDIR}${mandir}/man1/bind9-config.1
|
||||
rm -f ${DESTDIR}${mandir}/man1/isc-config.sh.1
|
||||
rm -f ${DESTDIR}${bindir}/bind9-config
|
||||
rm -f ${DESTDIR}${bindir}/isc-config.sh
|
||||
|
||||
tags:
|
||||
rm -f TAGS
|
||||
find lib bin -name "*.[ch]" -print | @ETAGS@ -
|
||||
|
||||
test check:
|
||||
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \
|
||||
@@ -79,32 +97,27 @@ test-force:
|
||||
exit $$status
|
||||
|
||||
README: README.md
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \
|
||||
${PANDOC} --email-obfuscation=none -s -t html README.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
HISTORY: HISTORY.md
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \
|
||||
${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
OPTIONS: OPTIONS.md
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \
|
||||
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
CONTRIBUTING: CONTRIBUTING.md
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
|
||||
${PANDOC} --email-obfuscation=none -s -t html CONTRIBUTING.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
PLATFORMS: PLATFORMS.md
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html PLATFORMS.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
CODE_OF_CONDUCT: CODE_OF_CONDUCT.md
|
||||
${PANDOC} --email-obfuscation=none -s --metadata title="CODE OF CONDUCT" -f markdown-smart -t html CODE_OF_CONDUCT.md | \
|
||||
${PANDOC} --email-obfuscation=none -s -t html PLATFORMS.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
|
||||
4
OPTIONS
4
OPTIONS
@@ -1,12 +1,10 @@
|
||||
OPTIONS
|
||||
|
||||
Setting the STD_CDEFINES environment variable before running configure can
|
||||
be used to enable certain compile-time options that are not explicitly
|
||||
defined in configure.
|
||||
|
||||
Some of these settings are:
|
||||
|
||||
Setting Description
|
||||
Setting Description
|
||||
Overwrite memory with tag values when allocating
|
||||
-DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but
|
||||
makes debugging of memory problems easier.
|
||||
|
||||
70
PLATFORMS
70
PLATFORMS
@@ -1,5 +1,3 @@
|
||||
PLATFORMS
|
||||
|
||||
Supported platforms
|
||||
|
||||
In general, this version of BIND will build and run on any POSIX-compliant
|
||||
@@ -15,50 +13,49 @@ offer support on a "best effort" basis for some.
|
||||
|
||||
Regularly tested platforms
|
||||
|
||||
As of Feb 2019, BIND 9.15 is fully supported and regularly tested on the
|
||||
following systems:
|
||||
As of May 2018, BIND 9.13 is tested on the following systems:
|
||||
|
||||
* Debian 8, 9, 10
|
||||
* Debian 8, 9
|
||||
* Ubuntu 16.04, 18.04
|
||||
* Fedora 28, 29
|
||||
* Red Hat Enterprise Linux / CentOS 6, 7
|
||||
* FreeBSD 11.x
|
||||
* OpenBSD 6.2, 6.3
|
||||
* Fedora 27, 28
|
||||
* Red Hat/CentOS 6, 7
|
||||
* FreeBSD 10.x, 11.x
|
||||
* OpenBSD 6.3
|
||||
|
||||
The amd64, i386, armhf and arm64 CPU architectures are all fully
|
||||
supported.
|
||||
|
||||
Best effort
|
||||
|
||||
The following are platforms on which BIND is known to build and run. ISC
|
||||
makes every effort to fix bugs on these platforms, but may be unable to do
|
||||
so quickly due to lack of hardware, less familiarity on the part of
|
||||
engineering staff, and other constraints. With the exception of Windows
|
||||
Server 2012 R2, none of these are tested regularly by ISC.
|
||||
The following are platforms on which BIND is known to build and run, but
|
||||
on which it is not routinely tested. ISC makes every effort to fix bugs on
|
||||
these platforms, but may be unable to do so quickly due to lack of
|
||||
hardware, less familiarity on the part of engineering staff, and other
|
||||
constraints.
|
||||
|
||||
* Windows Server 2012 R2, 2016 / x64
|
||||
* Windows 10 / x64
|
||||
* Windows Server 2012 R2, 2016 / x64
|
||||
* macOS 10.12+
|
||||
* Solaris 11
|
||||
* FreeBSD 10.x, 12.0+
|
||||
* OpenBSD 6.4+
|
||||
* Solaris 10
|
||||
* FreeBSD 12+
|
||||
* OpenBSD 6.2
|
||||
* NetBSD
|
||||
* Other Linux distributions still supported by their vendors, such as:
|
||||
* Older or less popular Linux distributions still supported by their
|
||||
vendors, such as:
|
||||
+ Ubuntu 14.04, 18.10+
|
||||
+ Gentoo
|
||||
+ Arch Linux
|
||||
+ ArchLinux
|
||||
+ Alpine Linux
|
||||
* OpenWRT/LEDE 17.01+
|
||||
* OpenWRT/LEDE 17.0
|
||||
* Other CPU architectures (mips, mipsel, sparc, ...)
|
||||
|
||||
Unsupported platforms
|
||||
|
||||
These are platforms on which BIND 9.15 is known not to build or run:
|
||||
These are platforms on which BIND is known not to build or run:
|
||||
|
||||
* Platforms without at least OpenSSL 1.0.2
|
||||
* Windows 10 / x86
|
||||
* Windows Server 2012 and older
|
||||
* Solaris 10 and older
|
||||
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
|
||||
* Platforms that don't support atomic operations (via compiler or
|
||||
library)
|
||||
@@ -66,10 +63,27 @@ These are platforms on which BIND 9.15 is known not to build or run:
|
||||
|
||||
Platform quirks
|
||||
|
||||
NetBSD 6 i386
|
||||
ARM
|
||||
|
||||
The i386 build of NetBSD requires the libatomic library, available from
|
||||
the gcc5-libs package. Because this library is in a non-standard path, its
|
||||
location must be specified in the configure command line:
|
||||
If the compilation ends with following error:
|
||||
|
||||
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
|
||||
Error: selected processor does not support `yield' in ARM mode
|
||||
|
||||
You will need to set -march compiler option to native, so the compiler
|
||||
recognizes yield assembler instruction. The proper way to set -march=
|
||||
native would be to put it into CFLAGS, e.g. run ./configure like this:
|
||||
CFLAGS="-march=native -Os -g" ./configure plus your usual options.
|
||||
|
||||
If that doesn't work, you can enforce the minimum CPU and FPU (taken from
|
||||
Debian armhf documentation):
|
||||
|
||||
* The lowest worthwhile CPU implementation is Armv7-A, therefore the
|
||||
recommended build option is -march=armv7-a.
|
||||
|
||||
* FPU should be set at VFPv3-D16 as they represent the miminum
|
||||
specification of the processors to support here, therefore the
|
||||
recommended build option is -mfpu=vfpv3-d16.
|
||||
|
||||
The configure command should look like this:
|
||||
|
||||
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
|
||||
|
||||
69
PLATFORMS.md
69
PLATFORMS.md
@@ -23,61 +23,78 @@ offer support on a "best effort" basis for some.
|
||||
|
||||
### Regularly tested platforms
|
||||
|
||||
As of Feb 2019, BIND 9.15 is fully supported and regularly tested on the
|
||||
following systems:
|
||||
As of May 2018, BIND 9.13 is tested on the following systems:
|
||||
|
||||
* Debian 8, 9, 10
|
||||
* Debian 8, 9
|
||||
* Ubuntu 16.04, 18.04
|
||||
* Fedora 28, 29
|
||||
* Red Hat Enterprise Linux / CentOS 6, 7
|
||||
* FreeBSD 11.x
|
||||
* OpenBSD 6.2, 6.3
|
||||
* Fedora 27, 28
|
||||
* Red Hat/CentOS 6, 7
|
||||
* FreeBSD 10.x, 11.x
|
||||
* OpenBSD 6.3
|
||||
|
||||
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
|
||||
|
||||
### Best effort
|
||||
|
||||
The following are platforms on which BIND is known to build and run.
|
||||
ISC makes every effort to fix bugs on these platforms, but may be unable to
|
||||
do so quickly due to lack of hardware, less familiarity on the part of
|
||||
engineering staff, and other constraints. With the exception of Windows
|
||||
Server 2012 R2, none of these are tested regularly by ISC.
|
||||
The following are platforms on which BIND is known to build and run,
|
||||
but on which it is not routinely tested. ISC makes every effort to fix bugs
|
||||
on these platforms, but may be unable to do so quickly due to lack of
|
||||
hardware, less familiarity on the part of engineering staff, and other
|
||||
constraints.
|
||||
|
||||
* Windows Server 2012 R2, 2016 / x64
|
||||
* Windows 10 / x64
|
||||
* Windows Server 2012 R2, 2016 / x64
|
||||
* macOS 10.12+
|
||||
* Solaris 11
|
||||
* FreeBSD 10.x, 12.0+
|
||||
* OpenBSD 6.4+
|
||||
* Solaris 10
|
||||
* FreeBSD 12+
|
||||
* OpenBSD 6.2
|
||||
* NetBSD
|
||||
* Other Linux distributions still supported by their vendors, such as:
|
||||
* Older or less popular Linux distributions still supported by their vendors, such as:
|
||||
* Ubuntu 14.04, 18.10+
|
||||
* Gentoo
|
||||
* Arch Linux
|
||||
* ArchLinux
|
||||
* Alpine Linux
|
||||
* OpenWRT/LEDE 17.01+
|
||||
* OpenWRT/LEDE 17.0
|
||||
* Other CPU architectures (mips, mipsel, sparc, ...)
|
||||
|
||||
## Unsupported platforms
|
||||
|
||||
These are platforms on which BIND 9.15 is known *not* to build or run:
|
||||
These are platforms on which BIND is known *not* to build or run:
|
||||
|
||||
* Platforms without at least OpenSSL 1.0.2
|
||||
* Windows 10 / x86
|
||||
* Windows Server 2012 and older
|
||||
* Solaris 10 and older
|
||||
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
|
||||
* Platforms that don't support atomic operations (via compiler or library)
|
||||
* Linux without NPTL (Native POSIX Thread Library)
|
||||
|
||||
## Platform quirks
|
||||
|
||||
### NetBSD 6 i386
|
||||
### ARM
|
||||
|
||||
The i386 build of NetBSD requires the `libatomic` library, available from
|
||||
the `gcc5-libs` package. Because this library is in a non-standard path,
|
||||
its location must be specified in the `configure` command line:
|
||||
If the compilation ends with following error:
|
||||
|
||||
```
|
||||
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
|
||||
Error: selected processor does not support `yield' in ARM mode
|
||||
```
|
||||
|
||||
You will need to set `-march` compiler option to `native`, so the compiler
|
||||
recognizes `yield` assembler instruction. The proper way to set `-march=native`
|
||||
would be to put it into `CFLAGS`, e.g. run `./configure` like this:
|
||||
`CFLAGS="-march=native -Os -g" ./configure` plus your usual options.
|
||||
|
||||
If that doesn't work, you can enforce the minimum CPU and FPU (taken from Debian
|
||||
armhf documentation):
|
||||
|
||||
* The lowest worthwhile CPU implementation is Armv7-A, therefore the recommended
|
||||
build option is `-march=armv7-a`.
|
||||
|
||||
* FPU should be set at VFPv3-D16 as they represent the miminum specification of
|
||||
the processors to support here, therefore the recommended build option is
|
||||
`-mfpu=vfpv3-d16`.
|
||||
|
||||
The configure command should look like this:
|
||||
|
||||
```
|
||||
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
|
||||
```
|
||||
|
||||
208
README
208
README
@@ -1,5 +1,3 @@
|
||||
README
|
||||
|
||||
BIND 9
|
||||
|
||||
Contents
|
||||
@@ -7,15 +5,14 @@ Contents
|
||||
1. Introduction
|
||||
2. Reporting bugs and getting help
|
||||
3. Contributing to BIND
|
||||
4. BIND 9.15 features
|
||||
4. BIND 9.13 features
|
||||
5. Building BIND
|
||||
6. macOS
|
||||
7. Dependencies
|
||||
8. Compile-time options
|
||||
9. Automated testing
|
||||
10. Documentation
|
||||
11. Change log
|
||||
12. Acknowledgments
|
||||
7. Compile-time options
|
||||
8. Automated testing
|
||||
9. Documentation
|
||||
10. Change log
|
||||
11. Acknowledgments
|
||||
|
||||
Introduction
|
||||
|
||||
@@ -39,7 +36,7 @@ in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a
|
||||
501(c)(3) public benefit corporation dedicated to providing software and
|
||||
services in support of the Internet infrastructure, developed BIND 9 and
|
||||
is responsible for its ongoing maintenance and improvement. BIND is open
|
||||
source software licensed under the terms of the Mozilla Public License,
|
||||
source software licenced under the terms of the Mozilla Public License,
|
||||
version 2.0.
|
||||
|
||||
For a summary of features introduced in past major releases of BIND, see
|
||||
@@ -71,9 +68,6 @@ If the bug you are reporting is a potential security issue, such as an
|
||||
assertion failure or other crash in named, please do NOT use GitLab to
|
||||
report it. Instead, please send mail to security-officer@isc.org.
|
||||
|
||||
For a general overview of ISC security policies, read the Knowledge Base
|
||||
article at https://kb.isc.org/docs/aa-00861.
|
||||
|
||||
Professional support and training for BIND are available from ISC at
|
||||
https://www.isc.org/support.
|
||||
|
||||
@@ -90,11 +84,10 @@ ISC maintains a public git repository for BIND; details can be found at
|
||||
http://www.isc.org/git/.
|
||||
|
||||
Information for BIND contributors can be found in the following files: -
|
||||
General information: CONTRIBUTING.md - Code of Conduct: CODE_OF_CONDUCT.md
|
||||
- BIND 9 code style: doc/dev/style.md - BIND architecture and developer
|
||||
guide: doc/dev/dev.md
|
||||
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
|
||||
- BIND architecture and developer guide: doc/dev/dev.md
|
||||
|
||||
Patches for BIND may be submitted as merge requests in the ISC GitLab
|
||||
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
|
||||
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
|
||||
|
||||
By default, external contributors don't have ability to fork BIND in the
|
||||
@@ -106,23 +99,47 @@ If you prefer, you may also submit code by opening a GitLab Issue and
|
||||
including your patch as an attachment, preferably generated by git
|
||||
format-patch.
|
||||
|
||||
BIND 9.15 features
|
||||
BIND 9.13 features
|
||||
|
||||
BIND 9.15 is the newest development branch of BIND 9. It includes a number
|
||||
of changes from BIND 9.14 and earlier releases. New features include:
|
||||
BIND 9.13 is the newest development branch of BIND 9. It includes a number
|
||||
of changes from BIND 9.12 and earlier releases. New features include:
|
||||
|
||||
* Support for the new GeoIP2 geolocation API
|
||||
* Improved DNSSEC key configuration using dnssec-keys
|
||||
* YAML output for dig, mdig, and delv.
|
||||
* 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.
|
||||
|
||||
In addition, workarounds that were formerly in place to enable resolution
|
||||
of domains whose authoritative servers did not respond to EDNS queries
|
||||
have been removed. See https://dnsflagday.net for more details.
|
||||
|
||||
Cryptographic support has been modernized. BIND now uses the best
|
||||
available pseudo-random number generator for the platform on which it's
|
||||
built. Very old versions of OpenSSL are no longer supported. Cryptography
|
||||
is now mandatory: building BIND without DNSSEC is now longer supported.
|
||||
|
||||
Special code to support certain legacy operating systems has also been
|
||||
removed; see the file PLATFORMS.md for details of supported platforms. In
|
||||
addition to OpenSSL, BIND now requires support for IPv6, threads, and
|
||||
standard atomic operations provided by the C compiler.
|
||||
|
||||
Building BIND
|
||||
|
||||
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
|
||||
basic POSIX support, and a 64-bit integer type. Successful builds have
|
||||
been observed on many versions of Linux and UNIX, including RHEL/CentOS,
|
||||
Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD,
|
||||
NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and
|
||||
OpenWRT.
|
||||
been observed on many versions of Linux and UNIX, including RedHat,
|
||||
Fedora, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS
|
||||
X, Solaris, HP-UX, and OpenWRT.
|
||||
|
||||
BIND requires a cryptography provider library such as OpenSSL or a
|
||||
hardware service module supporting PKCS#11. On Linux, BIND requires the
|
||||
@@ -131,8 +148,8 @@ overridden by disabling capability support at compile time. See
|
||||
Compile-time options below for details on other libraries that may be
|
||||
required to support optional features.
|
||||
|
||||
BIND is also available for Windows Server 2008 and higher. See win32utils/
|
||||
build.txt for details on building for Windows systems.
|
||||
BIND is also available for Windows 2008 and higher. See win32utils/
|
||||
readme1st.txt for details on building for Windows systems.
|
||||
|
||||
To build on a UNIX or Linux system, use:
|
||||
|
||||
@@ -145,7 +162,7 @@ make depend. If you're using Emacs, you might find make tags helpful.
|
||||
Several environment variables that can be set before running configure
|
||||
will affect compilation:
|
||||
|
||||
Variable Description
|
||||
Variable Description
|
||||
CC The C compiler to use. configure tries to figure out the
|
||||
right one for supported systems.
|
||||
C compiler flags. Defaults to include -g and/or -O2 as
|
||||
@@ -160,32 +177,43 @@ STD_CDEFINES Defaults to empty string. For a list of possible settings,
|
||||
LDFLAGS Linker flags. Defaults to empty string.
|
||||
BUILD_CC Needed when cross-compiling: the native C compiler to use
|
||||
when building for the target system.
|
||||
BUILD_CFLAGS CFLAGS for the target system during cross-compiling.
|
||||
BUILD_CPPFLAGS CPPFLAGS for the target system during cross-compiling.
|
||||
BUILD_LDFLAGS LDFLAGS for the target system during cross-compiling.
|
||||
BUILD_LIBS LIBS for the target system during cross-compiling.
|
||||
BUILD_CFLAGS Optional, used for cross-compiling
|
||||
BUILD_CPPFLAGS
|
||||
BUILD_LDFLAGS
|
||||
BUILD_LIBS
|
||||
|
||||
macOS
|
||||
|
||||
Building on macOS assumes that the "Command Tools for Xcode" is installed.
|
||||
This can be downloaded from https://developer.apple.com/download/more/ or
|
||||
if you have Xcode already installed you can run xcode-select --install.
|
||||
|
||||
Dependencies
|
||||
|
||||
Portions of BIND that are written in Python, including dnssec-keymgr,
|
||||
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
||||
argparse and ply modules to be available. argparse is a standard module as
|
||||
of Python 2.7 and Python 3.2. ply is available from https://
|
||||
pypi.python.org/pypi/ply.
|
||||
if you have Xcode already installed you can run "xcode-select --install".
|
||||
This will add /usr/include to the system and install the compiler and
|
||||
other tools so that they can be easily found.
|
||||
|
||||
Compile-time options
|
||||
|
||||
To see a full list of configuration options, run configure --help.
|
||||
|
||||
On most platforms, BIND 9 is built with multithreading support, allowing
|
||||
it to take advantage of multiple CPUs. You can configure this by
|
||||
specifying --enable-threads or --disable-threads on the configure command
|
||||
line. The default is to enable threads, except on some older operating
|
||||
systems on which threads are known to have had problems in the past.
|
||||
(Note: Prior to BIND 9.10, the default was to disable threads on Linux
|
||||
systems; this has now been reversed. On Linux systems, the threaded build
|
||||
is known to change BIND's behavior with respect to file permissions; it
|
||||
may be necessary to specify a user with the -u option when running named.)
|
||||
|
||||
To build shared libraries, specify --with-libtool on the configure command
|
||||
line.
|
||||
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying --with-tuning=
|
||||
large on the configure command line. This can improve performance on big
|
||||
servers, but will consume more memory and may degrade performance on
|
||||
smaller systems.
|
||||
|
||||
For the server to support DNSSEC, you need to build it with crypto
|
||||
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
|
||||
installed. If the OpenSSL library is installed in a nonstandard location,
|
||||
@@ -195,12 +223,9 @@ operations, specify the path to the PKCS#11 provider library using
|
||||
--with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11.
|
||||
|
||||
To support the HTTP statistics channel, the server must be linked with at
|
||||
least one of the following libraries: libxml2 http://xmlsoft.org or json-c
|
||||
https://github.com/json-c/json-c. If these are installed at a nonstandard
|
||||
location, then:
|
||||
|
||||
* for libxml2, specify the prefix using --with-libxml2=/prefix,
|
||||
* for json-c, adjust PKG_CONFIG_PATH.
|
||||
least one of the following: libxml2 http://xmlsoft.org or json-c https://
|
||||
github.com/json-c. If these are installed at a nonstandard location,
|
||||
specify the prefix using --with-libxml2=/prefix or --with-libjson=/prefix.
|
||||
|
||||
To support compression on the HTTP statistics channel, the server must be
|
||||
linked against libzlib. If this is installed in a nonstandard location,
|
||||
@@ -210,28 +235,26 @@ To support storing configuration data for runtime-added zones in an LMDB
|
||||
database, the server must be linked with liblmdb. If this is installed in
|
||||
a nonstandard location, specify the prefix using with-lmdb=/prefix.
|
||||
|
||||
To support MaxMind GeoIP2 location-based ACLs, the server must be linked
|
||||
with libmaxminddb. This is turned on by default if the library is found;
|
||||
if the library is installed in a nonstandard location, specify the prefix
|
||||
using --with-maxminddb=/prefix. GeoIP2 support can be switched off with
|
||||
--disable-geoip.
|
||||
To support GeoIP location-based ACLs, the server must be linked with
|
||||
libGeoIP. This is not turned on by default; BIND must be configured with
|
||||
--with-geoip. If the library is installed in a nonstandard location,
|
||||
specify the prefix using --with-geoip=/prefix.
|
||||
|
||||
For DNSTAP packet logging, you must have installed libfstrm https://
|
||||
github.com/farsightsec/fstrm and libprotobuf-c https://
|
||||
developers.google.com/protocol-buffers, and BIND must be configured with
|
||||
--enable-dnstap.
|
||||
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying --with-tuning=
|
||||
large on the configure command line. This can improve performance on big
|
||||
servers, but will consume more memory and may degrade performance on
|
||||
smaller systems.
|
||||
|
||||
On Linux, process capabilities are managed in user space using the libcap
|
||||
library, which can be installed on most Linux systems via the libcap-dev
|
||||
or libcap-devel package. Process capability support can also be disabled
|
||||
by configuring with --disable-linux-caps.
|
||||
or libcap-devel module. Process capability support can also be disabled by
|
||||
configuring with --disable-linux-caps.
|
||||
|
||||
Portions of BIND that are written in Python, including dnssec-keymgr,
|
||||
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
||||
'argparse' and 'ply' modules to be available. 'argparse' is a standard
|
||||
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
|
||||
pypi.python.org/pypi/ply.
|
||||
|
||||
On some platforms it is necessary to explicitly request large file support
|
||||
to handle files bigger than 2GB. This can be done by using
|
||||
@@ -242,18 +265,17 @@ specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
|
||||
command line. By default, fixed rrset-order is disabled to reduce memory
|
||||
footprint.
|
||||
|
||||
The --enable-querytrace option causes named to log every step of
|
||||
processing every query. This should only be enabled when debugging,
|
||||
because it has a significant negative impact on query performance.
|
||||
|
||||
make install will install named and the various BIND 9 libraries. By
|
||||
default, installation is into /usr/local, but this can be changed with the
|
||||
--prefix option when running configure.
|
||||
|
||||
You may specify the option --sysconfdir to set the directory where
|
||||
configuration files like named.conf go by default, and --localstatedir to
|
||||
set the default parent directory of run/named.pid. --sysconfdir defaults
|
||||
to $prefix/etc and --localstatedir defaults to $prefix/var.
|
||||
set the default parent directory of run/named.pid. For backwards
|
||||
compatibility with BIND 8, --sysconfdir defaults to /etc and
|
||||
--localstatedir defaults to /var if no --prefix option is given. If there
|
||||
is a --prefix option, sysconfdir defaults to $prefix/etc and localstatedir
|
||||
defaults to $prefix/var.
|
||||
|
||||
Automated testing
|
||||
|
||||
@@ -265,7 +287,7 @@ ifconfig.sh up as root.
|
||||
|
||||
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
|
||||
and will be skipped if these are not available. Some tests require Python
|
||||
and the dnspython module and will be skipped if these are not available.
|
||||
and the 'dnspython' module and will be skipped if these are not available.
|
||||
See bin/tests/system/README for further details.
|
||||
|
||||
Unit tests are implemented using the CMocka unit testing framework. To
|
||||
@@ -276,7 +298,7 @@ tests can be run via make test or make unit.
|
||||
Documentation
|
||||
|
||||
The BIND 9 Administrator Reference Manual is included with the source
|
||||
distribution, in DocBook XML, HTML, and PDF format, in the doc/arm
|
||||
distribution, in DocBook XML, HTML and PDF format, in the doc/arm
|
||||
directory.
|
||||
|
||||
Some of the programs in the BIND 9 distribution have man pages in their
|
||||
@@ -296,7 +318,7 @@ development BIND 9 is included in the file CHANGES, with the most recent
|
||||
changes listed first. Change notes include tags indicating the category of
|
||||
the change that was made; these categories are:
|
||||
|
||||
Category Description
|
||||
Category Description
|
||||
[func] New feature
|
||||
[bug] General bug fix
|
||||
[security] Fix for a significant security flaw
|
||||
@@ -324,46 +346,26 @@ releases (i.e., those with version numbers ending in zero). Some new
|
||||
functionality may be backported to older releases on a case-by-case basis.
|
||||
All other change types may be applied to all currently-supported releases.
|
||||
|
||||
Bug report identifiers
|
||||
|
||||
Most notes in the CHANGES file include a reference to a bug report or
|
||||
issue number. Prior to 2018, these were usually of the form [RT #NNN] and
|
||||
referred to entries in the "bind9-bugs" RT database, which was not open to
|
||||
the public. More recent entries use the form [GL #NNN] or, less often, [GL
|
||||
!NNN], which, respectively, refer to issues or merge requests in the
|
||||
GitLab database. Most of these are publicly readable, unless they include
|
||||
information which is confidential or security sensitive.
|
||||
|
||||
To look up a GitLab issue by its number, use the URL https://
|
||||
gitlab.isc.org/isc-projects/bind9/issues/NNN. To look up a merge request,
|
||||
use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN.
|
||||
|
||||
In rare cases, an issue or merge request number may be followed with the
|
||||
letter "P". This indicates that the information is in the private ISC
|
||||
GitLab instance, which is not visible to the public.
|
||||
|
||||
Acknowledgments
|
||||
|
||||
* The original development of BIND 9 was underwritten by the following
|
||||
organizations:
|
||||
|
||||
Sun Microsystems, Inc.
|
||||
Hewlett Packard
|
||||
Compaq Computer Corporation
|
||||
IBM
|
||||
Process Software Corporation
|
||||
Silicon Graphics, Inc.
|
||||
Network Associates, Inc.
|
||||
U.S. Defense Information Systems Agency
|
||||
USENIX Association
|
||||
Stichting NLnet - NLnet Foundation
|
||||
Nominum, Inc.
|
||||
Sun Microsystems, Inc.
|
||||
Hewlett Packard
|
||||
Compaq Computer Corporation
|
||||
IBM
|
||||
Process Software Corporation
|
||||
Silicon Graphics, Inc.
|
||||
Network Associates, Inc.
|
||||
U.S. Defense Information Systems Agency
|
||||
USENIX Association
|
||||
Stichting NLnet - NLnet Foundation
|
||||
Nominum, Inc.
|
||||
|
||||
* This product includes software developed by the OpenSSL Project for
|
||||
use in the OpenSSL Toolkit. http://www.OpenSSL.org/
|
||||
|
||||
* This product includes cryptographic software written by Eric Young
|
||||
(eay@cryptsoft.com)
|
||||
|
||||
* This product includes software written by Tim Hudson
|
||||
(tjh@cryptsoft.com)
|
||||
|
||||
185
README.md
185
README.md
@@ -15,10 +15,9 @@
|
||||
1. [Introduction](#intro)
|
||||
1. [Reporting bugs and getting help](#help)
|
||||
1. [Contributing to BIND](#contrib)
|
||||
1. [BIND 9.15 features](#features)
|
||||
1. [BIND 9.13 features](#features)
|
||||
1. [Building BIND](#build)
|
||||
1. [macOS](#macos)
|
||||
1. [Dependencies](#dependencies)
|
||||
1. [Compile-time options](#opts)
|
||||
1. [Automated testing](#testing)
|
||||
1. [Documentation](#doc)
|
||||
@@ -48,7 +47,7 @@ used in versions 4 and 8. Internet Systems Consortium
|
||||
corporation dedicated to providing software and services in support of the
|
||||
Internet infrastructure, developed BIND 9 and is responsible for its
|
||||
ongoing maintenance and improvement. BIND is open source software
|
||||
licensed under the terms of the Mozilla Public License, version 2.0.
|
||||
licenced under the terms of the Mozilla Public License, version 2.0.
|
||||
|
||||
For a summary of features introduced in past major releases of BIND,
|
||||
see the file [HISTORY](HISTORY.md).
|
||||
@@ -82,9 +81,6 @@ assertion failure or other crash in `named`, please do *NOT* use GitLab to
|
||||
report it. Instead, please send mail to
|
||||
[security-officer@isc.org](mailto:security-officer@isc.org).
|
||||
|
||||
For a general overview of ISC security policies, read the Knowledge Base
|
||||
article at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
|
||||
|
||||
Professional support and training for BIND are available from
|
||||
ISC at [https://www.isc.org/support](https://www.isc.org/support).
|
||||
|
||||
@@ -101,13 +97,12 @@ ISC maintains a public git repository for BIND; details can be found
|
||||
at [http://www.isc.org/git/](http://www.isc.org/git/).
|
||||
|
||||
Information for BIND contributors can be found in the following files:
|
||||
- General information: [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
- Code of Conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
|
||||
- General information: [CONTRIBUTING.md](CONTRIBUTING)
|
||||
- BIND 9 code style: [doc/dev/style.md](doc/dev/style.md)
|
||||
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
|
||||
|
||||
Patches for BIND may be submitted as
|
||||
[merge requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
|
||||
[Merge Requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
|
||||
in the [ISC GitLab server](https://gitlab.isc.org) at
|
||||
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
||||
|
||||
@@ -121,23 +116,50 @@ If you prefer, you may also submit code by opening a
|
||||
including your patch as an attachment, preferably generated by
|
||||
`git format-patch`.
|
||||
|
||||
### <a name="features"/> BIND 9.15 features
|
||||
### <a name="features"/> BIND 9.13 features
|
||||
|
||||
BIND 9.15 is the newest development branch of BIND 9. It includes a
|
||||
number of changes from BIND 9.14 and earlier releases. New features
|
||||
BIND 9.13 is the newest development branch of BIND 9. It includes a
|
||||
number of changes from BIND 9.12 and earlier releases. New features
|
||||
include:
|
||||
|
||||
* Support for the new GeoIP2 geolocation API
|
||||
* Improved DNSSEC key configuration using `dnssec-keys`
|
||||
* YAML output for `dig`, `mdig`, and `delv`.
|
||||
* 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`.
|
||||
|
||||
In addition, workarounds that were formerly in place to enable resolution
|
||||
of domains whose authoritative servers did not respond to EDNS queries
|
||||
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
|
||||
for more details.
|
||||
|
||||
Cryptographic support has been modernized. BIND now uses the
|
||||
best available pseudo-random number generator for the platform on which
|
||||
it's built. Very old versions of OpenSSL are no longer supported.
|
||||
Cryptography is now mandatory: building BIND without DNSSEC is now
|
||||
longer supported.
|
||||
|
||||
Special code to support certain legacy operating systems has also
|
||||
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
|
||||
of supported platforms. In addition to OpenSSL, BIND now requires
|
||||
support for IPv6, threads, and standard atomic operations provided
|
||||
by the C compiler.
|
||||
|
||||
### <a name="build"/> Building BIND
|
||||
|
||||
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
|
||||
basic POSIX support, and a 64-bit integer type. Successful builds have been
|
||||
observed on many versions of Linux and UNIX, including RHEL/CentOS, Fedora,
|
||||
Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD, NetBSD,
|
||||
OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
|
||||
observed on many versions of Linux and UNIX, including RedHat, Fedora,
|
||||
Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X,
|
||||
Solaris, HP-UX, and OpenWRT.
|
||||
|
||||
BIND requires a cryptography provider library such as OpenSSL or a
|
||||
hardware service module supporting PKCS#11. On Linux, BIND requires
|
||||
@@ -146,8 +168,8 @@ can be overridden by disabling capability support at compile time.
|
||||
See [Compile-time options](#opts) below for details on other libraries
|
||||
that may be required to support optional features.
|
||||
|
||||
BIND is also available for Windows Server 2008 and higher. See
|
||||
`win32utils/build.txt` for details on building for Windows
|
||||
BIND is also available for Windows 2008 and higher. See
|
||||
`win32utils/readme1st.txt` for details on building for Windows
|
||||
systems.
|
||||
|
||||
To build on a UNIX or Linux system, use:
|
||||
@@ -169,32 +191,44 @@ affect compilation:
|
||||
|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).|
|
||||
|`LDFLAGS`|Linker flags. Defaults to empty string.|
|
||||
|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|
||||
|`BUILD_CFLAGS`|`CFLAGS` for the target system during cross-compiling.|
|
||||
|`BUILD_CPPFLAGS`|`CPPFLAGS` for the target system during cross-compiling.|
|
||||
|`BUILD_LDFLAGS`|`LDFLAGS` for the target system during cross-compiling.|
|
||||
|`BUILD_LIBS`|`LIBS` for the target system during cross-compiling.|
|
||||
|`BUILD_CFLAGS`|Optional, used for cross-compiling|
|
||||
|`BUILD_CPPFLAGS`||
|
||||
|`BUILD_LDFLAGS`||
|
||||
|`BUILD_LIBS`||
|
||||
|
||||
#### <a name="macos"> macOS
|
||||
|
||||
Building on macOS assumes that the "Command Tools for Xcode" is installed.
|
||||
This can be downloaded from [https://developer.apple.com/download/more/](https://developer.apple.com/download/more/)
|
||||
or if you have Xcode already installed you can run `xcode-select --install`.
|
||||
This can be downloaded from https://developer.apple.com/download/more/
|
||||
or if you have Xcode already installed you can run "xcode-select --install".
|
||||
This will add /usr/include to the system and install the compiler and other
|
||||
tools so that they can be easily found.
|
||||
|
||||
### <a name="dependencies"/> Dependencies
|
||||
|
||||
Portions of BIND that are written in Python, including
|
||||
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
||||
system tests, require the `argparse` and `ply` modules to be available.
|
||||
`argparse` is a standard module as of Python 2.7 and Python 3.2.
|
||||
`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
|
||||
|
||||
#### <a name="opts"/> Compile-time options
|
||||
|
||||
To see a full list of configuration options, run `configure --help`.
|
||||
|
||||
On most platforms, BIND 9 is built with multithreading support, allowing it
|
||||
to take advantage of multiple CPUs. You can configure this by specifying
|
||||
`--enable-threads` or `--disable-threads` on the `configure` command line.
|
||||
The default is to enable threads, except on some older operating systems on
|
||||
which threads are known to have had problems in the past. (Note: Prior to
|
||||
BIND 9.10, the default was to disable threads on Linux systems; this has
|
||||
now been reversed. On Linux systems, the threaded build is known to change
|
||||
BIND's behavior with respect to file permissions; it may be necessary to
|
||||
specify a user with the -u option when running `named`.)
|
||||
|
||||
To build shared libraries, specify `--with-libtool` on the `configure`
|
||||
command line.
|
||||
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying
|
||||
`--with-tuning=large` on the `configure` command line. This can improve
|
||||
performance on big servers, but will consume more memory and may degrade
|
||||
performance on smaller systems.
|
||||
|
||||
For the server to support DNSSEC, you need to build it with crypto support.
|
||||
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
|
||||
@@ -204,46 +238,42 @@ path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
|
||||
configure BIND with `--enable-native-pkcs11`.
|
||||
|
||||
To support the HTTP statistics channel, the server must be linked with at
|
||||
least one of the following libraries: `libxml2`
|
||||
[http://xmlsoft.org](http://xmlsoft.org) or `json-c`
|
||||
[https://github.com/json-c/json-c](https://github.com/json-c/json-c).
|
||||
If these are installed at a nonstandard location, then:
|
||||
|
||||
* for `libxml2`, specify the prefix using `--with-libxml2=/prefix`,
|
||||
* for `json-c`, adjust `PKG_CONFIG_PATH`.
|
||||
least one of the following: libxml2
|
||||
[http://xmlsoft.org](http://xmlsoft.org) or json-c
|
||||
[https://github.com/json-c](https://github.com/json-c). If these are
|
||||
installed at a nonstandard location, specify the prefix using
|
||||
`--with-libxml2=/prefix` or `--with-libjson=/prefix`.
|
||||
|
||||
To support compression on the HTTP statistics channel, the server must be
|
||||
linked against `libzlib`. If this is installed in a nonstandard location,
|
||||
linked against libzlib. If this is installed in a nonstandard location,
|
||||
specify the prefix using `--with-zlib=/prefix`.
|
||||
|
||||
To support storing configuration data for runtime-added zones in an LMDB
|
||||
database, the server must be linked with liblmdb. If this is installed in a
|
||||
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
|
||||
|
||||
To support MaxMind GeoIP2 location-based ACLs, the server must be linked
|
||||
with `libmaxminddb`. This is turned on by default if the library is
|
||||
found; if the library is installed in a nonstandard location,
|
||||
specify the prefix using `--with-maxminddb=/prefix`. GeoIP2 support
|
||||
can be switched off with `--disable-geoip`.
|
||||
To support GeoIP location-based ACLs, the server must be linked with
|
||||
libGeoIP. This is not turned on by default; BIND must be configured with
|
||||
`--with-geoip`. If the library is installed in a nonstandard location,
|
||||
specify the prefix using `--with-geoip=/prefix`.
|
||||
|
||||
For DNSTAP packet logging, you must have installed `libfstrm`
|
||||
For DNSTAP packet logging, you must have installed libfstrm
|
||||
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
|
||||
and `libprotobuf-c`
|
||||
and libprotobuf-c
|
||||
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
|
||||
and BIND must be configured with `--enable-dnstap`.
|
||||
|
||||
Certain compiled-in constants and default settings can be increased to
|
||||
values better suited to large servers with abundant memory resources (e.g,
|
||||
64-bit servers with 12G or more of memory) by specifying
|
||||
`--with-tuning=large` on the `configure` command line. This can improve
|
||||
performance on big servers, but will consume more memory and may degrade
|
||||
performance on smaller systems.
|
||||
|
||||
On Linux, process capabilities are managed in user space using
|
||||
the `libcap` library, which can be installed on most Linux systems via
|
||||
the `libcap-dev` or `libcap-devel` package. Process capability support can
|
||||
the `libcap-dev` or `libcap-devel` module. Process capability support can
|
||||
also be disabled by configuring with `--disable-linux-caps`.
|
||||
|
||||
Portions of BIND that are written in Python, including
|
||||
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
||||
system tests, require the 'argparse' and 'ply' modules to be available.
|
||||
'argparse' is a standard module as of Python 2.7 and Python 3.2.
|
||||
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
|
||||
|
||||
On some platforms it is necessary to explicitly request large file support
|
||||
to handle files bigger than 2GB. This can be done by using
|
||||
`--enable-largefile` on the `configure` command line.
|
||||
@@ -253,18 +283,17 @@ specifying `--enable-fixed-rrset` or `--disable-fixed-rrset` on the
|
||||
configure command line. By default, fixed rrset-order is disabled to
|
||||
reduce memory footprint.
|
||||
|
||||
The `--enable-querytrace` option causes `named` to log every step of
|
||||
processing every query. This should only be enabled when debugging, because
|
||||
it has a significant negative impact on query performance.
|
||||
|
||||
`make install` will install `named` and the various BIND 9 libraries. By
|
||||
default, installation is into /usr/local, but this can be changed with the
|
||||
`--prefix` option when running `configure`.
|
||||
|
||||
You may specify the option `--sysconfdir` to set the directory where
|
||||
configuration files like `named.conf` go by default, and `--localstatedir`
|
||||
to set the default parent directory of `run/named.pid`. `--sysconfdir`
|
||||
defaults to `$prefix/etc` and `--localstatedir` defaults to `$prefix/var`.
|
||||
to set the default parent directory of `run/named.pid`. For backwards
|
||||
compatibility with BIND 8, `--sysconfdir` defaults to `/etc` and
|
||||
`--localstatedir` defaults to `/var` if no `--prefix` option is given. If
|
||||
there is a `--prefix` option, sysconfdir defaults to `$prefix/etc` and
|
||||
localstatedir defaults to `$prefix/var`.
|
||||
|
||||
### <a name="testing"/> Automated testing
|
||||
|
||||
@@ -274,21 +303,20 @@ multiple servers to run locally and communicate with one another). These
|
||||
IP addresses can be configured by running the command
|
||||
`bin/tests/system/ifconfig.sh up` as root.
|
||||
|
||||
Some tests require Perl and the `Net::DNS` and/or `IO::Socket::INET6` modules,
|
||||
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
|
||||
and will be skipped if these are not available. Some tests require Python
|
||||
and the `dnspython` module and will be skipped if these are not available.
|
||||
and the 'dnspython' module and will be skipped if these are not available.
|
||||
See bin/tests/system/README for further details.
|
||||
|
||||
Unit tests are implemented using the [CMocka unit testing framework](https://cmocka.org/).
|
||||
Unit tests are implemented using the CMocka unit testing framework.
|
||||
To build them, use `configure --with-cmocka`. Execution of tests is done
|
||||
by the [Kyua test execution engine](https://github.com/jmmv/kyua); if the
|
||||
`kyua` command is available, then unit tests can be run via `make test`
|
||||
or `make unit`.
|
||||
by the Kyua test execution engine; if the `kyua` command is available,
|
||||
then unit tests can be run via `make test` or `make unit`.
|
||||
|
||||
### <a name="doc"/> Documentation
|
||||
|
||||
The *BIND 9 Administrator Reference Manual* is included with the source
|
||||
distribution, in DocBook XML, HTML, and PDF format, in the `doc/arm`
|
||||
distribution, in DocBook XML, HTML and PDF format, in the `doc/arm`
|
||||
directory.
|
||||
|
||||
Some of the programs in the BIND 9 distribution have man pages in their
|
||||
@@ -331,25 +359,6 @@ releases (i.e., those with version numbers ending in zero). Some new
|
||||
functionality may be backported to older releases on a case-by-case basis.
|
||||
All other change types may be applied to all currently-supported releases.
|
||||
|
||||
#### Bug report identifiers
|
||||
|
||||
Most notes in the CHANGES file include a reference to a bug report or
|
||||
issue number. Prior to 2018, these were usually of the form `[RT #NNN]`
|
||||
and referred to entries in the "bind9-bugs" RT database, which was not open
|
||||
to the public. More recent entries use the form `[GL #NNN]` or, less often,
|
||||
`[GL !NNN]`, which, respectively, refer to issues or merge requests in the
|
||||
GitLab database. Most of these are publicly readable, unless they include
|
||||
information which is confidential or security sensitive.
|
||||
|
||||
To look up a GitLab issue by its number, use the URL
|
||||
[https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
|
||||
To look up a merge request, use
|
||||
[https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
||||
|
||||
In rare cases, an issue or merge request number may be followed with the
|
||||
letter "P". This indicates that the information is in the private ISC
|
||||
GitLab instance, which is not visible to the public.
|
||||
|
||||
### <a name="ack"/> Acknowledgments
|
||||
|
||||
* The original development of BIND 9 was underwritten by the
|
||||
|
||||
89
aclocal.m4
vendored
89
aclocal.m4
vendored
@@ -288,98 +288,9 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||
])dnl PKG_CHECK_VAR
|
||||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_PREREQ([2.52])dnl
|
||||
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
else
|
||||
$1_TRUE='#'
|
||||
$1_FALSE=
|
||||
fi
|
||||
AC_CONFIG_COMMANDS_PRE(
|
||||
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
||||
AC_MSG_ERROR([[conditional "$1" was never defined.
|
||||
Usually this means the macro was only invoked conditionally.]])
|
||||
fi])])
|
||||
|
||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||
# From Jim Meyering
|
||||
|
||||
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
||||
# ----------------------------------
|
||||
# Control maintainer-specific portions of Makefiles.
|
||||
# Default is to disable them, unless 'enable' is passed literally.
|
||||
# For symmetry, 'disable' may be passed as well. Anyway, the user
|
||||
# can override the default with the --enable/--disable switch.
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[m4_case(m4_default([$1], [disable]),
|
||||
[enable], [m4_define([am_maintainer_other], [disable])],
|
||||
[disable], [m4_define([am_maintainer_other], [enable])],
|
||||
[m4_define([am_maintainer_other], [enable])
|
||||
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
||||
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
||||
AC_ARG_ENABLE([maintainer-mode],
|
||||
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
|
||||
am_maintainer_other[ make rules and dependencies not useful
|
||||
(and sometimes confusing) to the casual installer])],
|
||||
[USE_MAINTAINER_MODE=$enableval],
|
||||
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
||||
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
||||
MAINT=$MAINTAINER_MODE_TRUE
|
||||
AC_SUBST([MAINT])dnl
|
||||
]
|
||||
)
|
||||
|
||||
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# --------------------------
|
||||
# Public sister of _AM_SUBST_NOTMAKE.
|
||||
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||
|
||||
m4_include([m4/ax_check_compile_flag.m4])
|
||||
m4_include([m4/ax_check_openssl.m4])
|
||||
m4_include([m4/ax_posix_shell.m4])
|
||||
m4_include([m4/ax_pthread.m4])
|
||||
m4_include([m4/ax_restore_flags.m4])
|
||||
m4_include([m4/ax_save_flags.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
|
||||
@@ -12,7 +12,7 @@ VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
|
||||
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
|
||||
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
|
||||
TARGETS =
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
@@ -16,16 +16,15 @@ VERSION=@BIND9_VERSION@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
${ISC_INCLUDES} \
|
||||
${OPENSSL_CFLAGS}
|
||||
${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
NSLIBS = ../../lib/ns/libns.@A@
|
||||
|
||||
@@ -67,7 +66,7 @@ named-checkzone.@O@: named-checkzone.c
|
||||
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
|
||||
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
|
||||
export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
||||
export LIBS0="${NSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
|
||||
${FINALBUILDCMD}
|
||||
|
||||
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
@@ -127,7 +129,9 @@ add(char *key, int value) {
|
||||
isc_symvalue_t symvalue;
|
||||
|
||||
if (sym_mctx == NULL) {
|
||||
isc_mem_create(&sym_mctx);
|
||||
result = isc_mem_create(0, 0, &sym_mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
}
|
||||
|
||||
if (symtab == NULL) {
|
||||
@@ -138,6 +142,8 @@ add(char *key, int value) {
|
||||
}
|
||||
|
||||
key = isc_mem_strdup(sym_mctx, key);
|
||||
if (key == NULL)
|
||||
return;
|
||||
|
||||
symvalue.as_pointer = NULL;
|
||||
result = isc_symtab_define(symtab, key, value, symvalue,
|
||||
@@ -662,7 +668,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
origin = dns_fixedname_initname(&fixorigin);
|
||||
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
dns_zone_setdbtype(zone, 1, (const char * const *) dbtype);
|
||||
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
|
||||
CHECK(dns_zone_setfile(zone, filename, fileformat,
|
||||
&dns_master_style_default));
|
||||
if (journal != NULL)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -39,7 +39,7 @@
|
||||
named-checkconf \- named configuration file syntax checking tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBnamed\-checkconf\fR\ 'u
|
||||
\fBnamed\-checkconf\fR [\fB\-chjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
|
||||
\fBnamed\-checkconf\fR [\fB\-hjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed\-checkconf\fR
|
||||
@@ -79,18 +79,6 @@ When loading a zonefile read the journal if it exists\&.
|
||||
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
|
||||
.RE
|
||||
.PP
|
||||
\-c
|
||||
.RS 4
|
||||
Check "core" configuration only\&. This suppresses the loading of plugin modules, and causes all parameters to
|
||||
\fBplugin\fR
|
||||
statements to be ignored\&.
|
||||
.RE
|
||||
.PP
|
||||
\-i
|
||||
.RS 4
|
||||
Ignore warnings on deprecated options\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p
|
||||
.RS 4
|
||||
Print out the
|
||||
@@ -148,5 +136,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -28,7 +30,6 @@
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isccfg/namedconf.h>
|
||||
#include <isccfg/grammar.h>
|
||||
|
||||
#include <bind9/check.h>
|
||||
|
||||
@@ -45,8 +46,6 @@
|
||||
|
||||
static const char *program = "named-checkconf";
|
||||
|
||||
static bool loadplugins = true;
|
||||
|
||||
isc_log_t *logc = NULL;
|
||||
|
||||
#define CHECK(r)\
|
||||
@@ -62,7 +61,7 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "usage: %s [-chijlvz] [-p [-x]] [-t directory] "
|
||||
fprintf(stderr, "usage: %s [-hjlvz] [-p [-x]] [-t directory] "
|
||||
"[named.conf]\n", program);
|
||||
exit(1);
|
||||
}
|
||||
@@ -556,7 +555,6 @@ main(int argc, char **argv) {
|
||||
bool load_zones = false;
|
||||
bool list_zones = false;
|
||||
bool print = false;
|
||||
bool nodeprecate = false;
|
||||
unsigned int flags = 0;
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
@@ -564,7 +562,7 @@ main(int argc, char **argv) {
|
||||
/*
|
||||
* Process memory debugging argument first.
|
||||
*/
|
||||
#define CMDLINE_FLAGS "cdhijlm:t:pvxz"
|
||||
#define CMDLINE_FLAGS "dhjlm:t:pvxz"
|
||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
switch (c) {
|
||||
case 'm':
|
||||
@@ -585,22 +583,14 @@ main(int argc, char **argv) {
|
||||
}
|
||||
isc_commandline_reset = true;
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
loadplugins = false;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
debug++;
|
||||
break;
|
||||
|
||||
case 'i':
|
||||
nodeprecate = true;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
nomerge = false;
|
||||
break;
|
||||
@@ -681,21 +671,15 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||
|
||||
if (nodeprecate) {
|
||||
cfg_parser_setflags(parser, CFG_PCTX_NODEPRECATED, true);
|
||||
}
|
||||
cfg_parser_setcallback(parser, directory_callback, NULL);
|
||||
|
||||
if (cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config) !=
|
||||
ISC_R_SUCCESS)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
result = bind9_check_namedconf(config, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
exit_status = 1;
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
|
||||
result = load_zones_fromconfig(config, mctx, list_zones);
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -53,7 +52,7 @@
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>named-checkconf</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-chjlvz</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-hjlvz</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p</option>
|
||||
<arg choice="opt" rep="norepeat"><option>-x</option>
|
||||
</arg></arg>
|
||||
@@ -115,26 +114,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Check "core" configuration only. This suppresses the loading
|
||||
of plugin modules, and causes all parameters to
|
||||
<command>plugin</command> statements to be ignored.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Ignore warnings on deprecated options.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -33,7 +33,7 @@
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">named-checkconf</code>
|
||||
[<code class="option">-chjlvz</code>]
|
||||
[<code class="option">-hjlvz</code>]
|
||||
[<code class="option">-p</code>
|
||||
[<code class="option">-x</code>
|
||||
]]
|
||||
@@ -88,20 +88,6 @@
|
||||
(e.g. master or slave).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-c</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Check "core" configuration only. This suppresses the loading
|
||||
of plugin modules, and causes all parameters to
|
||||
<span class="command"><strong>plugin</strong></span> statements to be ignored.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-i</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Ignore warnings on deprecated options.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-p</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -325,5 +325,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
@@ -517,7 +519,7 @@ main(int argc, char **argv) {
|
||||
InitSockets();
|
||||
#endif
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
if (!quiet)
|
||||
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
|
||||
== ISC_R_SUCCESS);
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -65,7 +62,6 @@
|
||||
<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>
|
||||
@@ -93,7 +89,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -17,21 +17,18 @@
|
||||
<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">
|
||||
@@ -68,7 +65,6 @@
|
||||
<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>
|
||||
@@ -92,7 +88,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -65,16 +62,15 @@
|
||||
<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>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</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>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>cd ..\..\..\Build\$(Configuration)
|
||||
@@ -99,8 +95,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
||||
<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>
|
||||
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -109,8 +104,8 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -27,9 +27,9 @@ CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -144,5 +144,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
* and the corresponding key and update-policy statements in named.conf.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -207,7 +209,7 @@ main(int argc, char **argv) {
|
||||
/* Use canonical algorithm name */
|
||||
algname = alg_totext(alg);
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
DO("create memory context", isc_mem_create(0, 0, &mctx));
|
||||
|
||||
if (keyname == NULL) {
|
||||
const char *suffix = NULL;
|
||||
@@ -222,6 +224,8 @@ main(int argc, char **argv) {
|
||||
if (suffix != NULL) {
|
||||
len = strlen(keyname) + strlen(suffix) + 2;
|
||||
keybuf = isc_mem_get(mctx, len);
|
||||
if (keybuf == NULL)
|
||||
fatal("failed to allocate memory for keyname");
|
||||
snprintf(keybuf, len, "%s.%s", keyname, suffix);
|
||||
keyname = (const char *) keybuf;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -206,5 +206,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
* controls statement altogether.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -209,7 +211,7 @@ main(int argc, char **argv) {
|
||||
keysize = alg_bits(alg);
|
||||
algname = alg_totext(alg);
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
DO("create memory context", isc_mem_create(0, 0, &mctx));
|
||||
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
|
||||
|
||||
generate_key(mctx, alg, keysize, &key_txtbuffer);
|
||||
@@ -222,6 +224,8 @@ main(int argc, char **argv) {
|
||||
char *buf;
|
||||
len = strlen(chrootdir) + strlen(keyfile) + 2;
|
||||
buf = isc_mem_get(mctx, len);
|
||||
if (buf == NULL)
|
||||
fatal("isc_mem_get(%d) failed\n", len);
|
||||
snprintf(buf, len, "%s%s%s", chrootdir,
|
||||
(*keyfile != '/') ? "/" : "", keyfile);
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <confgen/os.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -63,7 +60,6 @@
|
||||
<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>
|
||||
@@ -88,7 +84,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -65,7 +62,6 @@
|
||||
<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;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
@@ -99,7 +95,6 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
|
||||
<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;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -9,6 +9,9 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <confgen/os.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -65,7 +62,6 @@
|
||||
<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;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
@@ -93,7 +89,6 @@
|
||||
<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;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -16,17 +16,16 @@ VERSION=@BIND9_VERSION@
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
${OPENSSL_CFLAGS}
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" \
|
||||
-DSYSCONFDIR=\"${sysconfdir}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -53,7 +53,7 @@ is a tool for sending DNS queries and validating the results, using the same int
|
||||
\fBnamed\fR\&.
|
||||
.PP
|
||||
\fBdelv\fR
|
||||
will send to a specified name server all queries needed to fetch and validate the requested data; this includes the original requested query, subsequent queries to follow CNAME or DNAME chains, and queries for DNSKEY and DS records to establish a chain of trust for DNSSEC validation\&. It does not perform iterative resolution, but simulates the behavior of a name server configured for DNSSEC validating and forwarding\&.
|
||||
will send to a specified name server all queries needed to fetch and validate the requested data; this includes the original requested query, subsequent queries to follow CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records to establish a chain of trust for DNSSEC validation\&. It does not perform iterative resolution, but simulates the behavior of a name server configured for DNSSEC validating and forwarding\&.
|
||||
.PP
|
||||
By default, responses are validated using built\-in DNSSEC trust anchor for the root zone ("\&.")\&. Records returned by
|
||||
\fBdelv\fR
|
||||
@@ -139,21 +139,21 @@ BIND
|
||||
.sp
|
||||
Keys that do not match the root zone name are ignored\&. An alternate key name can be specified using the
|
||||
\fB+root=NAME\fR
|
||||
options\&.
|
||||
options\&. DNSSEC Lookaside Validation can also be turned on by using the
|
||||
\fB+dlv=NAME\fR
|
||||
to specify the name of a zone containing DLV records\&.
|
||||
.sp
|
||||
Note: When reading the trust anchor file,
|
||||
\fBdelv\fR
|
||||
treats
|
||||
\fBdnssec\-keys\fR\fBinitial\-key\fR
|
||||
and
|
||||
\fBstatic\-key\fR
|
||||
entries identically\&. That is, even if a key is configured with
|
||||
\fBinitial\-key\fR, indicating that it is meant to be used only as an initializing key for RFC 5011 key maintenance, it is still treated by
|
||||
\fBmanaged\-keys\fR
|
||||
statements and
|
||||
\fBtrusted\-keys\fR
|
||||
statements identically\&. That is, for a managed key, it is the
|
||||
\fIinitial\fR
|
||||
key that is trusted; RFC 5011 key management is not supported\&.
|
||||
\fBdelv\fR
|
||||
as if it had been configured as a
|
||||
\fBstatic\-key\fR\&.
|
||||
\fBdelv\fR
|
||||
does not consult the managed keys database maintained by
|
||||
will not consult the managed\-keys database maintained by
|
||||
\fBnamed\fR\&. This means that if either of the keys in
|
||||
/etc/bind\&.keys
|
||||
is revoked and rolled over, it will be necessary to update
|
||||
@@ -390,16 +390,25 @@ output\&. The default is to do so\&. Note that (unlike in
|
||||
control whether to request DNSSEC records or whether to validate them\&. DNSSEC records are always requested, and validation will always occur unless suppressed by the use of
|
||||
\fB\-i\fR
|
||||
or
|
||||
\fB+noroot\fR\&.
|
||||
\fB+noroot\fR
|
||||
and
|
||||
\fB+nodlv\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]root[=ROOT]\fR
|
||||
.RS 4
|
||||
Indicates whether to perform conventional DNSSEC validation, and if so, 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 specifying a different trust anchor, then
|
||||
Indicates whether to perform conventional (non\-lookaside) DNSSEC validation, and if so, 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 specifying a different trust anchor, then
|
||||
\fB\-a\fR
|
||||
must be used to specify a file containing the key\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]dlv[=DLV]\fR
|
||||
.RS 4
|
||||
Indicates whether to perform DNSSEC lookaside validation, and if so, specifies the name of the DLV trust anchor\&. The
|
||||
\fB\-a\fR
|
||||
option must also be used to specify a file containing the DLV key\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]tcp\fR
|
||||
.RS 4
|
||||
Controls whether to use TCP when sending queries\&. The default is to use UDP unless a truncated response has been received\&.
|
||||
@@ -409,11 +418,6 @@ Controls whether to use TCP when sending queries\&. The default is to use UDP un
|
||||
.RS 4
|
||||
Print all RDATA in unknown RR type presentation format (RFC 3597)\&. The default is to print RDATA for known types in the type\*(Aqs presentation format\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]yaml\fR
|
||||
.RS 4
|
||||
Print response data in YAML format\&.
|
||||
.RE
|
||||
.SH "FILES"
|
||||
.PP
|
||||
/etc/bind\&.keys
|
||||
@@ -433,5 +437,5 @@ RFC5155\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2014-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
313
bin/delv/delv.c
313
bin/delv/delv.c
@@ -9,6 +9,7 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <bind.keys.h>
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -111,8 +112,7 @@ static bool
|
||||
nottl = false,
|
||||
multiline = false,
|
||||
short_form = false,
|
||||
print_unknown_format = false,
|
||||
yaml = false;
|
||||
print_unknown_format = false;
|
||||
|
||||
static bool
|
||||
resolve_trace = false,
|
||||
@@ -126,19 +126,21 @@ static bool
|
||||
static bool
|
||||
cdflag = false,
|
||||
no_sigs = false,
|
||||
root_validation = true;
|
||||
root_validation = true,
|
||||
dlv_validation = true;
|
||||
|
||||
static bool use_tcp = false;
|
||||
|
||||
static char *anchorfile = NULL;
|
||||
static char *trust_anchor = NULL;
|
||||
static int num_keys = 0;
|
||||
static char *dlv_anchor = NULL;
|
||||
static int trusted_keys = 0;
|
||||
|
||||
static dns_fixedname_t afn;
|
||||
static dns_name_t *anchor_name = NULL;
|
||||
static dns_fixedname_t afn, dfn;
|
||||
static dns_name_t *anchor_name = NULL, *dlv_name = NULL;
|
||||
|
||||
/* Default bind.keys contents */
|
||||
static char anchortext[] = DNSSEC_KEYS;
|
||||
static char anchortext[] = MANAGED_KEYS;
|
||||
|
||||
/*
|
||||
* Static function prototypes
|
||||
@@ -160,7 +162,7 @@ usage(void) {
|
||||
" q-opt is one of:\n"
|
||||
" -x dot-notation (shortcut for reverse lookups)\n"
|
||||
" -d level (set debugging level)\n"
|
||||
" -a anchor-file (specify root trust anchor)\n"
|
||||
" -a anchor-file (specify root and dlv trust anchors)\n"
|
||||
" -b address[#port] (bind to source address/port)\n"
|
||||
" -p port (specify port number)\n"
|
||||
" -q name (specify query name)\n"
|
||||
@@ -180,8 +182,7 @@ usage(void) {
|
||||
" +[no]comments (Control display of comment lines)\n"
|
||||
" +[no]rrcomments (Control display of per-record "
|
||||
"comments)\n"
|
||||
" +[no]unknownformat (Print RDATA in RFC 3597 "
|
||||
"\"unknown\" format)\n"
|
||||
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" format)\n"
|
||||
" +[no]short (Short form answer)\n"
|
||||
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
||||
" +[no]tcp (TCP mode)\n"
|
||||
@@ -190,7 +191,7 @@ usage(void) {
|
||||
" +[no]rtrace (Trace resolver fetches)\n"
|
||||
" +[no]mtrace (Trace messages received)\n"
|
||||
" +[no]vtrace (Trace validation process)\n"
|
||||
" +[no]dlv (Obsolete)\n"
|
||||
" +[no]dlv (DNSSEC lookaside validation anchor)\n"
|
||||
" +[no]root (DNSSEC validation trust anchor)\n"
|
||||
" +[no]dnssec (Display DNSSEC records)\n"
|
||||
" -h (print help and exit)\n"
|
||||
@@ -354,80 +355,53 @@ setup_logging(FILE *errout) {
|
||||
|
||||
static void
|
||||
print_status(dns_rdataset_t *rdataset) {
|
||||
char buf[1024] = { 0 };
|
||||
const char *astr = "", *tstr = "";
|
||||
|
||||
REQUIRE(rdataset != NULL);
|
||||
|
||||
if (!showtrust || !dns_rdataset_isassociated(rdataset)) {
|
||||
if (!showtrust || !dns_rdataset_isassociated(rdataset))
|
||||
return;
|
||||
}
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0) {
|
||||
strlcat(buf, "negative response", sizeof(buf));
|
||||
strlcat(buf, (yaml ? "_" : ", "), sizeof(buf));
|
||||
}
|
||||
if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0)
|
||||
astr = "negative response, ";
|
||||
|
||||
switch (rdataset->trust) {
|
||||
case dns_trust_none:
|
||||
strlcat(buf, "untrusted", sizeof(buf));
|
||||
tstr = "untrusted";
|
||||
break;
|
||||
case dns_trust_pending_additional:
|
||||
strlcat(buf, "signed additional data", sizeof(buf));
|
||||
if (!yaml) {
|
||||
strlcat(buf, ", ", sizeof(buf));
|
||||
}
|
||||
strlcat(buf, "pending validation", sizeof(buf));
|
||||
tstr = "signed additional data, pending validation";
|
||||
break;
|
||||
case dns_trust_pending_answer:
|
||||
strlcat(buf, "signed answer", sizeof(buf));
|
||||
if (!yaml) {
|
||||
strlcat(buf, ", ", sizeof(buf));
|
||||
}
|
||||
strlcat(buf, "pending validation", sizeof(buf));
|
||||
tstr = "signed answer, pending validation";
|
||||
break;
|
||||
case dns_trust_additional:
|
||||
strlcat(buf, "unsigned additional data", sizeof(buf));
|
||||
tstr = "unsigned additional data";
|
||||
break;
|
||||
case dns_trust_glue:
|
||||
strlcat(buf, "glue data", sizeof(buf));
|
||||
tstr = "glue data";
|
||||
break;
|
||||
case dns_trust_answer:
|
||||
if (root_validation) {
|
||||
strlcat(buf, "unsigned answer", sizeof(buf));
|
||||
} else {
|
||||
strlcat(buf, "answer not validated", sizeof(buf));
|
||||
}
|
||||
if (root_validation || dlv_validation)
|
||||
tstr = "unsigned answer";
|
||||
else
|
||||
tstr = "answer not validated";
|
||||
break;
|
||||
case dns_trust_authauthority:
|
||||
strlcat(buf, "authority data", sizeof(buf));
|
||||
tstr = "authority data";
|
||||
break;
|
||||
case dns_trust_authanswer:
|
||||
strlcat(buf, "authoritative", sizeof(buf));
|
||||
tstr = "authoritative";
|
||||
break;
|
||||
case dns_trust_secure:
|
||||
strlcat(buf, "fully validated", sizeof(buf));
|
||||
tstr = "fully validated";
|
||||
break;
|
||||
case dns_trust_ultimate:
|
||||
strlcat(buf, "ultimate trust", sizeof(buf));
|
||||
tstr = "ultimate trust";
|
||||
break;
|
||||
}
|
||||
|
||||
if (yaml) {
|
||||
char *p;
|
||||
|
||||
/* Convert spaces to underscores for YAML */
|
||||
for (p = buf; p != NULL && *p != '\0'; p++) {
|
||||
if (*p == ' ') {
|
||||
*p = '_';
|
||||
}
|
||||
}
|
||||
|
||||
printf(" - %s:\n", buf);
|
||||
} else {
|
||||
printf("; %s\n", buf);
|
||||
}
|
||||
printf("; %s%s\n", astr, tstr);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
@@ -454,9 +428,8 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
if (first || rdataset->trust != trust) {
|
||||
if (!first && showtrust && !short_form && !yaml) {
|
||||
if (!first && showtrust && !short_form)
|
||||
putchar('\n');
|
||||
}
|
||||
print_status(rdataset);
|
||||
trust = rdataset->trust;
|
||||
first = false;
|
||||
@@ -464,6 +437,8 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
|
||||
|
||||
do {
|
||||
t = isc_mem_get(mctx, len);
|
||||
if (t == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
isc_buffer_init(&target, t, len);
|
||||
if (short_form) {
|
||||
@@ -495,11 +470,9 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
|
||||
dns_rdata_reset(&rdata);
|
||||
}
|
||||
} else {
|
||||
if (!yaml && (rdataset->attributes &
|
||||
DNS_RDATASETATTR_NEGATIVE) != 0)
|
||||
{
|
||||
if ((rdataset->attributes &
|
||||
DNS_RDATASETATTR_NEGATIVE) != 0)
|
||||
isc_buffer_putstr(&target, "; ");
|
||||
}
|
||||
|
||||
result = dns_master_rdatasettotext(owner, rdataset,
|
||||
style, &target);
|
||||
@@ -529,55 +502,41 @@ setup_style(dns_master_style_t **stylep) {
|
||||
isc_result_t result;
|
||||
dns_master_style_t *style = NULL;
|
||||
|
||||
REQUIRE(stylep != NULL && *stylep == NULL);
|
||||
REQUIRE(stylep != NULL || *stylep == NULL);
|
||||
|
||||
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
||||
if (yaml) {
|
||||
styleflags |= DNS_STYLEFLAG_YAML;
|
||||
dns_master_indentstr = " ";
|
||||
dns_master_indent = 2;
|
||||
} else {
|
||||
if (showcomments) {
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
}
|
||||
if (print_unknown_format) {
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
}
|
||||
if (rrcomments) {
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
}
|
||||
if (nottl) {
|
||||
styleflags |= DNS_STYLEFLAG_NO_TTL;
|
||||
}
|
||||
if (noclass) {
|
||||
styleflags |= DNS_STYLEFLAG_NO_CLASS;
|
||||
}
|
||||
if (nocrypto) {
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
}
|
||||
if (multiline) {
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
}
|
||||
if (showcomments)
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
if (print_unknown_format)
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
if (rrcomments)
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
if (nottl)
|
||||
styleflags |= DNS_STYLEFLAG_NO_TTL;
|
||||
if (noclass)
|
||||
styleflags |= DNS_STYLEFLAG_NO_CLASS;
|
||||
if (nocrypto)
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
if (multiline) {
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
}
|
||||
|
||||
if (multiline || (nottl && noclass)) {
|
||||
if (multiline || (nottl && noclass))
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 24, 32, 80, 8,
|
||||
splitwidth, mctx);
|
||||
} else if (nottl || noclass) {
|
||||
else if (nottl || noclass)
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 32, 40, 80, 8,
|
||||
splitwidth, mctx);
|
||||
} else {
|
||||
else
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 32, 40, 48, 80, 8,
|
||||
splitwidth, mctx);
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS)
|
||||
*stylep = style;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -619,28 +578,30 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
||||
dns_fixedname_t fkeyname;
|
||||
dns_name_t *keyname;
|
||||
isc_result_t result;
|
||||
bool match_root = false;
|
||||
bool match_root = false, match_dlv = false;
|
||||
|
||||
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
||||
CHECK(convert_name(&fkeyname, &keyname, keynamestr));
|
||||
|
||||
if (!root_validation) {
|
||||
if (!root_validation && !dlv_validation)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (anchor_name) {
|
||||
if (anchor_name)
|
||||
match_root = dns_name_equal(keyname, anchor_name);
|
||||
}
|
||||
if (dlv_name)
|
||||
match_dlv = dns_name_equal(keyname, dlv_name);
|
||||
|
||||
if (!match_root) {
|
||||
if (!match_root && !match_dlv)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (!root_validation) {
|
||||
if ((!root_validation && match_root) || (!dlv_validation && match_dlv))
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
delv_log(ISC_LOG_DEBUG(3), "adding trust anchor %s", trust_anchor);
|
||||
if (match_root)
|
||||
delv_log(ISC_LOG_DEBUG(3), "adding trust anchor %s",
|
||||
trust_anchor);
|
||||
if (match_dlv)
|
||||
delv_log(ISC_LOG_DEBUG(3), "adding DLV trust anchor %s",
|
||||
dlv_anchor);
|
||||
|
||||
flags = cfg_obj_asuint32(cfg_tuple_get(key, "flags"));
|
||||
proto = cfg_obj_asuint32(cfg_tuple_get(key, "protocol"));
|
||||
@@ -682,7 +643,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
||||
|
||||
CHECK(dns_client_addtrustedkey(client, dns_rdataclass_in,
|
||||
keyname, &rrdatabuf));
|
||||
num_keys++;
|
||||
trusted_keys++;
|
||||
|
||||
cleanup:
|
||||
if (result == DST_R_NOCRYPTO)
|
||||
@@ -733,15 +694,13 @@ static isc_result_t
|
||||
setup_dnsseckeys(dns_client_t *client) {
|
||||
isc_result_t result;
|
||||
cfg_parser_t *parser = NULL;
|
||||
const cfg_obj_t *trusted_keys = NULL;
|
||||
const cfg_obj_t *keys = NULL;
|
||||
const cfg_obj_t *managed_keys = NULL;
|
||||
const cfg_obj_t *dnssec_keys = NULL;
|
||||
cfg_obj_t *bindkeys = NULL;
|
||||
const char *filename = anchorfile;
|
||||
|
||||
if (!root_validation) {
|
||||
if (!root_validation && !dlv_validation)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if (filename == NULL) {
|
||||
#ifndef WIN32
|
||||
@@ -756,27 +715,27 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
|
||||
if (trust_anchor == NULL) {
|
||||
trust_anchor = isc_mem_strdup(mctx, ".");
|
||||
if (trust_anchor == NULL)
|
||||
fatal("out of memory");
|
||||
}
|
||||
|
||||
if (trust_anchor != NULL) {
|
||||
if (trust_anchor != NULL)
|
||||
CHECK(convert_name(&afn, &anchor_name, trust_anchor));
|
||||
}
|
||||
if (dlv_anchor != NULL)
|
||||
CHECK(convert_name(&dfn, &dlv_name, dlv_anchor));
|
||||
|
||||
CHECK(cfg_parser_create(mctx, dns_lctx, &parser));
|
||||
|
||||
if (access(filename, R_OK) != 0) {
|
||||
if (anchorfile != NULL) {
|
||||
if (anchorfile != NULL)
|
||||
fatal("Unable to read key file '%s'", anchorfile);
|
||||
}
|
||||
} else {
|
||||
result = cfg_parse_file(parser, filename,
|
||||
&cfg_type_bindkeys, &bindkeys);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (anchorfile != NULL) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (anchorfile != NULL)
|
||||
fatal("Unable to load keys from '%s'",
|
||||
anchorfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bindkeys == NULL) {
|
||||
@@ -784,32 +743,28 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
|
||||
isc_buffer_init(&b, anchortext, sizeof(anchortext) - 1);
|
||||
isc_buffer_add(&b, sizeof(anchortext) - 1);
|
||||
result = cfg_parse_buffer(parser, &b, NULL, 0,
|
||||
&cfg_type_bindkeys, 0, &bindkeys);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
result = cfg_parse_buffer(parser, &b, &cfg_type_bindkeys,
|
||||
&bindkeys);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("Unable to parse built-in keys");
|
||||
}
|
||||
}
|
||||
|
||||
INSIST(bindkeys != NULL);
|
||||
cfg_map_get(bindkeys, "trusted-keys", &trusted_keys);
|
||||
cfg_map_get(bindkeys, "trusted-keys", &keys);
|
||||
cfg_map_get(bindkeys, "managed-keys", &managed_keys);
|
||||
cfg_map_get(bindkeys, "dnssec-keys", &dnssec_keys);
|
||||
|
||||
if (trusted_keys != NULL) {
|
||||
CHECK(load_keys(trusted_keys, client));
|
||||
}
|
||||
if (managed_keys != NULL) {
|
||||
if (keys != NULL)
|
||||
CHECK(load_keys(keys, client));
|
||||
if (managed_keys != NULL)
|
||||
CHECK(load_keys(managed_keys, client));
|
||||
}
|
||||
if (dnssec_keys != NULL) {
|
||||
CHECK(load_keys(dnssec_keys, client));
|
||||
}
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
if (num_keys == 0) {
|
||||
if (trusted_keys == 0)
|
||||
fatal("No trusted keys were loaded");
|
||||
}
|
||||
|
||||
if (dlv_validation)
|
||||
dns_client_setdlv(client, dns_rdataclass_in, dlv_anchor);
|
||||
|
||||
|
||||
cleanup:
|
||||
if (bindkeys != NULL) {
|
||||
@@ -818,10 +773,9 @@ setup_dnsseckeys(dns_client_t *client) {
|
||||
if (parser != NULL) {
|
||||
cfg_parser_destroy(&parser);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
delv_log(ISC_LOG_ERROR, "setup_dnsseckeys: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -848,6 +802,8 @@ addserver(dns_client_t *client) {
|
||||
fatal("Use of IPv4 disabled by -6");
|
||||
}
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
ISC_LINK_INIT(sa, link);
|
||||
isc_sockaddr_fromin(sa, &in4, destport);
|
||||
ISC_LIST_APPEND(servers, sa, link);
|
||||
@@ -856,6 +812,8 @@ addserver(dns_client_t *client) {
|
||||
fatal("Use of IPv6 disabled by -4");
|
||||
}
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
ISC_LINK_INIT(sa, link);
|
||||
isc_sockaddr_fromin6(sa, &in6, destport);
|
||||
ISC_LIST_APPEND(servers, sa, link);
|
||||
@@ -883,6 +841,10 @@ addserver(dns_client_t *client) {
|
||||
cur->ai_family != AF_INET6)
|
||||
continue;
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
break;
|
||||
}
|
||||
memset(sa, 0, sizeof(*sa));
|
||||
ISC_LINK_INIT(sa, link);
|
||||
memmove(&sa->type, cur->ai_addr, cur->ai_addrlen);
|
||||
@@ -955,6 +917,10 @@ findserver(dns_client_t *client) {
|
||||
struct in_addr localhost;
|
||||
localhost.s_addr = htonl(INADDR_LOOPBACK);
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_sockaddr_fromin(sa, &localhost, destport);
|
||||
|
||||
ISC_LINK_INIT(sa, link);
|
||||
@@ -963,6 +929,10 @@ findserver(dns_client_t *client) {
|
||||
|
||||
if (use_ipv6) {
|
||||
sa = isc_mem_get(mctx, sizeof(*sa));
|
||||
if (sa == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_sockaddr_fromin6(sa, &in6addr_loopback, destport);
|
||||
|
||||
ISC_LINK_INIT(sa, link);
|
||||
@@ -1058,10 +1028,13 @@ plus_option(char *option) {
|
||||
switch (cmd[1]) {
|
||||
case 'l': /* dlv */
|
||||
FULLCHECK("dlv");
|
||||
if (state) {
|
||||
fprintf(stderr, "Invalid option: "
|
||||
"+dlv is obsolete\n");
|
||||
exit(1);
|
||||
if (state && no_sigs)
|
||||
break;
|
||||
dlv_validation = state;
|
||||
if (value != NULL) {
|
||||
dlv_anchor = isc_mem_strdup(mctx, value);
|
||||
if (dlv_anchor == NULL)
|
||||
fatal("out of memory");
|
||||
}
|
||||
break;
|
||||
case 'n': /* dnssec */
|
||||
@@ -1096,6 +1069,8 @@ plus_option(char *option) {
|
||||
root_validation = state;
|
||||
if (value != NULL) {
|
||||
trust_anchor = isc_mem_strdup(mctx, value);
|
||||
if (trust_anchor == NULL)
|
||||
fatal("out of memory");
|
||||
}
|
||||
break;
|
||||
case 'r': /* rrcomments */
|
||||
@@ -1183,13 +1158,6 @@ plus_option(char *option) {
|
||||
if (state)
|
||||
resolve_trace = state;
|
||||
break;
|
||||
case 'y': /* yaml */
|
||||
FULLCHECK("yaml");
|
||||
yaml = state;
|
||||
if (state) {
|
||||
rrcomments = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
invalid_option:
|
||||
/*
|
||||
@@ -1253,6 +1221,7 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
/* NOTREACHED */
|
||||
case 'i':
|
||||
no_sigs = true;
|
||||
dlv_validation = false;
|
||||
root_validation = false;
|
||||
break;
|
||||
case 'm':
|
||||
@@ -1284,6 +1253,8 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
switch (opt) {
|
||||
case 'a':
|
||||
anchorfile = isc_mem_strdup(mctx, value);
|
||||
if (anchorfile == NULL)
|
||||
fatal("out of memory");
|
||||
return (value_from_next);
|
||||
case 'b':
|
||||
hash = strchr(value, '#');
|
||||
@@ -1347,6 +1318,8 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
isc_mem_free(mctx, curqname);
|
||||
}
|
||||
curqname = isc_mem_strdup(mctx, value);
|
||||
if (curqname == NULL)
|
||||
fatal("out of memory");
|
||||
return (value_from_next);
|
||||
case 't':
|
||||
*open_type_class = false;
|
||||
@@ -1374,6 +1347,8 @@ dash_option(char *option, char *next, bool *open_type_class) {
|
||||
warn("extra query name");
|
||||
}
|
||||
curqname = isc_mem_strdup(mctx, textname);
|
||||
if (curqname == NULL)
|
||||
fatal("out of memory");
|
||||
if (typeset)
|
||||
warn("extra query type");
|
||||
qtype = dns_rdatatype_ptr;
|
||||
@@ -1520,6 +1495,8 @@ parse_args(int argc, char **argv) {
|
||||
|
||||
if (curqname == NULL) {
|
||||
curqname = isc_mem_strdup(mctx, argv[0]);
|
||||
if (curqname == NULL)
|
||||
fatal("out of memory");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1533,6 +1510,8 @@ parse_args(int argc, char **argv) {
|
||||
|
||||
if (curqname == NULL) {
|
||||
qname = isc_mem_strdup(mctx, ".");
|
||||
if (qname == NULL)
|
||||
fatal("out of memory");
|
||||
|
||||
if (!typeset)
|
||||
qtype = dns_rdatatype_ns;
|
||||
@@ -1616,7 +1595,6 @@ main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
dns_fixedname_t qfn;
|
||||
dns_name_t *query_name, *response_name;
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
dns_rdataset_t *rdataset;
|
||||
dns_namelist_t namelist;
|
||||
unsigned int resopt, clopt;
|
||||
@@ -1640,12 +1618,14 @@ main(int argc, char *argv[]) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("dns_lib_init failed: %d", result);
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
result = isc_mem_create(0, 0, &mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to create mctx");
|
||||
|
||||
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));
|
||||
CHECK(isc_taskmgr_createinctx(mctx, actx, 1, &taskmgr));
|
||||
CHECK(isc_socketmgr_createinctx(mctx, actx, &socketmgr));
|
||||
CHECK(isc_timermgr_createinctx(mctx, actx, &timermgr));
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
@@ -1686,35 +1666,22 @@ main(int argc, char *argv[]) {
|
||||
|
||||
/* Set up resolution options */
|
||||
resopt = DNS_CLIENTRESOPT_ALLOWRUN | DNS_CLIENTRESOPT_NOCDFLAG;
|
||||
if (no_sigs) {
|
||||
if (no_sigs)
|
||||
resopt |= DNS_CLIENTRESOPT_NODNSSEC;
|
||||
}
|
||||
if (!root_validation) {
|
||||
if (!root_validation && !dlv_validation)
|
||||
resopt |= DNS_CLIENTRESOPT_NOVALIDATE;
|
||||
}
|
||||
if (cdflag) {
|
||||
if (cdflag)
|
||||
resopt &= ~DNS_CLIENTRESOPT_NOCDFLAG;
|
||||
}
|
||||
if (use_tcp) {
|
||||
if (use_tcp)
|
||||
resopt |= DNS_CLIENTRESOPT_TCP;
|
||||
}
|
||||
|
||||
/* Perform resolution */
|
||||
ISC_LIST_INIT(namelist);
|
||||
result = dns_client_resolve(client, query_name, dns_rdataclass_in,
|
||||
qtype, resopt, &namelist);
|
||||
if (result != ISC_R_SUCCESS && !yaml) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
delv_log(ISC_LOG_ERROR, "resolution failed: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
if (yaml) {
|
||||
printf("type: DELV_RESULT\n");
|
||||
dns_name_format(query_name, namestr, sizeof(namestr));
|
||||
printf("query_name: %s\n", namestr);
|
||||
printf("status: %s\n", isc_result_totext(result));
|
||||
printf("records:\n");
|
||||
}
|
||||
|
||||
for (response_name = ISC_LIST_HEAD(namelist);
|
||||
response_name != NULL;
|
||||
@@ -1731,6 +1698,8 @@ main(int argc, char *argv[]) {
|
||||
dns_client_freeresanswer(client, &namelist);
|
||||
|
||||
cleanup:
|
||||
if (dlv_anchor != NULL)
|
||||
isc_mem_free(mctx, dlv_anchor);
|
||||
if (trust_anchor != NULL)
|
||||
isc_mem_free(mctx, trust_anchor);
|
||||
if (anchorfile != NULL)
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -96,7 +95,7 @@
|
||||
<command>delv</command> will send to a specified name server all
|
||||
queries needed to fetch and validate the requested data; this
|
||||
includes the original requested query, subsequent queries to follow
|
||||
CNAME or DNAME chains, and queries for DNSKEY and DS records
|
||||
CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records
|
||||
to establish a chain of trust for DNSSEC validation.
|
||||
It does not perform iterative resolution, but simulates the
|
||||
behavior of a name server configured for DNSSEC validating and
|
||||
@@ -211,21 +210,21 @@
|
||||
<para>
|
||||
Keys that do not match the root zone name are ignored.
|
||||
An alternate key name can be specified using the
|
||||
<option>+root=NAME</option> options.
|
||||
<option>+root=NAME</option> options. DNSSEC Lookaside
|
||||
Validation can also be turned on by using the
|
||||
<option>+dlv=NAME</option> to specify the name of a
|
||||
zone containing DLV records.
|
||||
</para>
|
||||
<para>
|
||||
Note: When reading the trust anchor file,
|
||||
<command>delv</command> treats <option>dnssec-keys</option>
|
||||
<option>initial-key</option> and <option>static-key</option>
|
||||
entries identically. That is, even if a key is configured
|
||||
with <command>initial-key</command>, indicating that it is
|
||||
meant to be used only as an initializing key for RFC 5011
|
||||
key maintenance, it is still treated by <command>delv</command>
|
||||
as if it had been configured as a <command>static-key</command>.
|
||||
<command>delv</command> does not consult the managed keys
|
||||
database maintained by <command>named</command>. This means
|
||||
that if either of the keys in
|
||||
<filename>/etc/bind.keys</filename> is revoked
|
||||
<command>delv</command> treats <option>managed-keys</option>
|
||||
statements and <option>trusted-keys</option> statements
|
||||
identically. That is, for a managed key, it is the
|
||||
<emphasis>initial</emphasis> key that is trusted; RFC 5011
|
||||
key management is not supported. <command>delv</command>
|
||||
will not consult the managed-keys database maintained by
|
||||
<command>named</command>. This means that if either of the
|
||||
keys in <filename>/etc/bind.keys</filename> is revoked
|
||||
and rolled over, it will be necessary to update
|
||||
<filename>/etc/bind.keys</filename> to use DNSSEC
|
||||
validation in <command>delv</command>.
|
||||
@@ -617,7 +616,8 @@
|
||||
request DNSSEC records or whether to validate them.
|
||||
DNSSEC records are always requested, and validation
|
||||
will always occur unless suppressed by the use of
|
||||
<option>-i</option> or <option>+noroot</option>.
|
||||
<option>-i</option> or <option>+noroot</option> and
|
||||
<option>+nodlv</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -626,7 +626,7 @@
|
||||
<term><option>+[no]root[=ROOT]</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates whether to perform conventional
|
||||
Indicates whether to perform conventional (non-lookaside)
|
||||
DNSSEC validation, and if so, specifies the
|
||||
name of a trust anchor. The default is to validate using
|
||||
a trust anchor of "." (the root zone), for which there is
|
||||
@@ -637,6 +637,18 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]dlv[=DLV]</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates whether to perform DNSSEC lookaside validation,
|
||||
and if so, specifies the name of the DLV trust anchor.
|
||||
The <option>-a</option> option must also be used to specify
|
||||
a file containing the DLV key.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]tcp</option></term>
|
||||
<listitem>
|
||||
@@ -658,16 +670,6 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]yaml</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print response data in YAML format.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -83,7 +83,7 @@
|
||||
<span class="command"><strong>delv</strong></span> will send to a specified name server all
|
||||
queries needed to fetch and validate the requested data; this
|
||||
includes the original requested query, subsequent queries to follow
|
||||
CNAME or DNAME chains, and queries for DNSKEY and DS records
|
||||
CNAME or DNAME chains, and queries for DNSKEY, DS and DLV records
|
||||
to establish a chain of trust for DNSSEC validation.
|
||||
It does not perform iterative resolution, but simulates the
|
||||
behavior of a name server configured for DNSSEC validating and
|
||||
@@ -193,21 +193,21 @@
|
||||
<p>
|
||||
Keys that do not match the root zone name are ignored.
|
||||
An alternate key name can be specified using the
|
||||
<code class="option">+root=NAME</code> options.
|
||||
<code class="option">+root=NAME</code> options. DNSSEC Lookaside
|
||||
Validation can also be turned on by using the
|
||||
<code class="option">+dlv=NAME</code> to specify the name of a
|
||||
zone containing DLV records.
|
||||
</p>
|
||||
<p>
|
||||
Note: When reading the trust anchor file,
|
||||
<span class="command"><strong>delv</strong></span> treats <code class="option">dnssec-keys</code>
|
||||
<code class="option">initial-key</code> and <code class="option">static-key</code>
|
||||
entries identically. That is, even if a key is configured
|
||||
with <span class="command"><strong>initial-key</strong></span>, indicating that it is
|
||||
meant to be used only as an initializing key for RFC 5011
|
||||
key maintenance, it is still treated by <span class="command"><strong>delv</strong></span>
|
||||
as if it had been configured as a <span class="command"><strong>static-key</strong></span>.
|
||||
<span class="command"><strong>delv</strong></span> does not consult the managed keys
|
||||
database maintained by <span class="command"><strong>named</strong></span>. This means
|
||||
that if either of the keys in
|
||||
<code class="filename">/etc/bind.keys</code> is revoked
|
||||
<span class="command"><strong>delv</strong></span> treats <code class="option">managed-keys</code>
|
||||
statements and <code class="option">trusted-keys</code> statements
|
||||
identically. That is, for a managed key, it is the
|
||||
<span class="emphasis"><em>initial</em></span> key that is trusted; RFC 5011
|
||||
key management is not supported. <span class="command"><strong>delv</strong></span>
|
||||
will not consult the managed-keys database maintained by
|
||||
<span class="command"><strong>named</strong></span>. This means that if either of the
|
||||
keys in <code class="filename">/etc/bind.keys</code> is revoked
|
||||
and rolled over, it will be necessary to update
|
||||
<code class="filename">/etc/bind.keys</code> to use DNSSEC
|
||||
validation in <span class="command"><strong>delv</strong></span>.
|
||||
@@ -517,13 +517,14 @@
|
||||
request DNSSEC records or whether to validate them.
|
||||
DNSSEC records are always requested, and validation
|
||||
will always occur unless suppressed by the use of
|
||||
<code class="option">-i</code> or <code class="option">+noroot</code>.
|
||||
<code class="option">-i</code> or <code class="option">+noroot</code> and
|
||||
<code class="option">+nodlv</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]root[=ROOT]</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Indicates whether to perform conventional
|
||||
Indicates whether to perform conventional (non-lookaside)
|
||||
DNSSEC validation, and if so, specifies the
|
||||
name of a trust anchor. The default is to validate using
|
||||
a trust anchor of "." (the root zone), for which there is
|
||||
@@ -532,6 +533,15 @@
|
||||
containing the key.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]dlv[=DLV]</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Indicates whether to perform DNSSEC lookaside validation,
|
||||
and if so, specifies the name of the DLV trust anchor.
|
||||
The <code class="option">-a</code> option must also be used to specify
|
||||
a file containing the DLV key.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -548,12 +558,6 @@
|
||||
in the type's presentation format.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]yaml</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print response data in YAML format.
|
||||
</p>
|
||||
</dd>
|
||||
</dl></div>
|
||||
<p>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -63,8 +60,7 @@
|
||||
<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>
|
||||
<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>
|
||||
@@ -91,8 +87,7 @@
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -19,17 +19,16 @@ READLINE_LIB = @READLINE_LIB@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
||||
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ \
|
||||
${OPENSSL_CFLAGS}
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -361,20 +361,14 @@ Display [do not display] the CLASS when printing the record\&.
|
||||
.PP
|
||||
\fB+[no]cmd\fR
|
||||
.RS 4
|
||||
Toggles the printing of the initial comment in the output, identifying the version of
|
||||
Toggles the printing of the initial comment in the output identifying the version of
|
||||
\fBdig\fR
|
||||
and the query options that have been applied\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&. The default is to print this comment\&.
|
||||
and the query options that have been applied\&. This comment is printed by default\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]comments\fR
|
||||
.RS 4
|
||||
Toggles the display of some comment lines in the output, containing information about the packet header and OPT pseudosection, and the names of the response section\&. The default is to print these comments\&.
|
||||
.sp
|
||||
Other types of comments in the output are not affected by this option, but can be controlled using other command line switches\&. These include
|
||||
\fB+[no]cmd\fR,
|
||||
\fB+[no]question\fR,
|
||||
\fB+[no]stats\fR, and
|
||||
\fB+[no]rrcomments\fR\&.
|
||||
Toggle the display of comment lines in the output\&. The default is to print comments\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]cookie\fR\fB[=####]\fR
|
||||
@@ -456,11 +450,6 @@ clears the EDNS options to be sent\&.
|
||||
Send an EDNS Expire option\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]expandaaaa\fR
|
||||
.RS 4
|
||||
When printing AAAA record print all zero nibbles rather than the default RFC 5952 preferred presentation format\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]fail\fR
|
||||
.RS 4
|
||||
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 resolver behavior\&.
|
||||
@@ -572,12 +561,12 @@ would cause a 48\-byte query to be padded to 64 bytes\&. The default block size
|
||||
.PP
|
||||
\fB+[no]qr\fR
|
||||
.RS 4
|
||||
Toggles the display of the query message as it is sent\&. By default, the query is not printed\&.
|
||||
Print [do not print] the query as it is sent\&. By default, the query is not printed\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]question\fR
|
||||
.RS 4
|
||||
Toggles the display of the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
||||
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]raflag\fR
|
||||
@@ -595,11 +584,11 @@ A synonym for
|
||||
.RS 4
|
||||
Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
|
||||
\fBdig\fR
|
||||
normally sends recursive queries\&. Recursion is automatically disabled when using the
|
||||
normally sends recursive queries\&. Recursion is automatically disabled when the
|
||||
\fI+nssearch\fR
|
||||
option, and when using
|
||||
or
|
||||
\fI+trace\fR
|
||||
except for an initial recursive query to get the list of root servers\&.
|
||||
query options are used\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+retry=T\fR
|
||||
@@ -630,7 +619,7 @@ determines if the name will be treated as relative or not and hence whether a se
|
||||
.PP
|
||||
\fB+[no]short\fR
|
||||
.RS 4
|
||||
Provide a terse answer\&. The default is to print the answer in a verbose form\&. This option always has global effect; it cannot be set globally and then overridden on a per\-lookup basis\&.
|
||||
Provide a terse answer\&. The default is to print the answer in a verbose form\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]showsearch\fR
|
||||
@@ -660,7 +649,7 @@ causes fields not to be split at all\&. The default is 56 characters, or 44 char
|
||||
.PP
|
||||
\fB+[no]stats\fR
|
||||
.RS 4
|
||||
Toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics as a comment after each lookup\&.
|
||||
This query option toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]subnet=addr[/prefix\-length]\fR
|
||||
@@ -744,13 +733,6 @@ Display [do not display] the TTL when printing the record\&.
|
||||
Display [do not display] the TTL in friendly human\-readable time units of "s", "m", "h", "d", and "w", representing seconds, minutes, hours, days and weeks\&. Implies +ttlid\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]unexpected\fR
|
||||
.RS 4
|
||||
Accept [do not accept] answers from unexpected sources\&. By default,
|
||||
\fBdig\fR
|
||||
won\*(Aqt accept a reply from a source other than the one to which it sent the query\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]unknownformat\fR
|
||||
.RS 4
|
||||
Print all RDATA in unknown RR type presentation format (RFC 3597)\&. The default is to print RDATA for known types in the type\*(Aqs presentation format\&.
|
||||
@@ -763,13 +745,6 @@ Use [do not use] TCP when querying name servers\&. This alternate syntax to
|
||||
is provided for backwards compatibility\&. The "vc" stands for "virtual circuit"\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]yaml\fR
|
||||
.RS 4
|
||||
Print the responses (and, if
|
||||
\fB+qr\fR
|
||||
is in use, also the outgoing queries) in a detailed YAML format\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]zflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the last unassigned DNS header flag in a DNS query\&. This flag is off by default\&.
|
||||
@@ -849,5 +824,5 @@ There are probably too many query options\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
373
bin/dig/dig.c
373
bin/dig/dig.c
@@ -11,6 +11,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -173,13 +175,11 @@ help(void) {
|
||||
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
|
||||
" +[no]cdflag (Set checking disabled flag in query)\n"
|
||||
" +[no]class (Control display of class in records)\n"
|
||||
" +[no]cmd (Control display of command line -\n"
|
||||
" global option)\n"
|
||||
" +[no]comments (Control display of packet header\n"
|
||||
" and section name comments)\n"
|
||||
" +[no]cmd (Control display of command line)\n"
|
||||
" +[no]comments (Control display of comment lines)\n"
|
||||
" +[no]cookie (Add a COOKIE option to the request)\n"
|
||||
" +[no]crypto (Control display of cryptographic\n"
|
||||
" fields in records)\n"
|
||||
" +[no]crypto (Control display of cryptographic "
|
||||
"fields in records)\n"
|
||||
" +[no]defname (Use search list (+[no]search))\n"
|
||||
" +[no]dnssec (Request DNSSEC records)\n"
|
||||
" +domain=### (Set default domainname)\n"
|
||||
@@ -189,20 +189,17 @@ help(void) {
|
||||
" +[no]ednsnegotiation (Set EDNS version negotiation)\n"
|
||||
" +ednsopt=###[:value] (Send specified EDNS option)\n"
|
||||
" +noednsopt (Clear list of +ednsopt options)\n"
|
||||
" +[no]expandaaaa (Expand AAAA records)\n"
|
||||
" +[no]expire (Request time to expire)\n"
|
||||
" +[no]fail (Don't try next server on SERVFAIL)\n"
|
||||
" +[no]header-only (Send query without a question section)\n"
|
||||
" +[no]identify (ID responders in short answers)\n"
|
||||
#ifdef HAVE_LIBIDN2
|
||||
" +[no]idnin (Parse IDN names [default=on on tty])\n"
|
||||
" +[no]idnout (Convert IDN response "
|
||||
"[default=on on tty])\n"
|
||||
" +[no]idnout (Convert IDN response [default=on on tty])\n"
|
||||
#endif
|
||||
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
|
||||
" +[no]keepalive (Request EDNS TCP keepalive)\n"
|
||||
" +[no]keepopen (Keep the TCP socket open between "
|
||||
"queries)\n"
|
||||
" +[no]keepopen (Keep the TCP socket open between queries)\n"
|
||||
" +[no]mapped (Allow mapped IPv4 over IPv6)\n"
|
||||
" +[no]multiline (Print records in an expanded format)\n"
|
||||
" +ndots=### (Set search NDOTS value)\n"
|
||||
@@ -221,7 +218,7 @@ help(void) {
|
||||
"comments)\n"
|
||||
" +[no]search (Set whether to use searchlist)\n"
|
||||
" +[no]short (Display nothing except short\n"
|
||||
" form of answers - global option)\n"
|
||||
" form of answer)\n"
|
||||
" +[no]showsearch (Search with intermediate results)\n"
|
||||
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
||||
" +[no]stats (Control display of statistics)\n"
|
||||
@@ -229,15 +226,11 @@ help(void) {
|
||||
" +[no]tcflag (Set TC flag in query (+[no]tcflag))\n"
|
||||
" +[no]tcp (TCP mode (+[no]vc))\n"
|
||||
" +timeout=### (Set query timeout) [5]\n"
|
||||
" +[no]trace (Trace delegation down from root "
|
||||
"[+dnssec])\n"
|
||||
" +[no]trace (Trace delegation down from root [+dnssec])\n"
|
||||
" +tries=### (Set number of UDP attempts) [3]\n"
|
||||
" +[no]ttlid (Control display of ttls in records)\n"
|
||||
" +[no]ttlunits (Display TTLs in human-readable units)\n"
|
||||
" +[no]unexpected (Print replies from unexpected sources\n"
|
||||
" default=off)\n"
|
||||
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" "
|
||||
"format)\n"
|
||||
" +[no]unknownformat (Print RDATA in RFC 3597 \"unknown\" format)\n"
|
||||
" +[no]vc (TCP mode (+[no]tcp))\n"
|
||||
" +[no]zflag (Set Z flag in query)\n"
|
||||
" global d-opts and servers (before host name) affect all queries.\n"
|
||||
@@ -264,11 +257,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
|
||||
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
|
||||
|
||||
if (short_form || yaml) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (query->lookup->stats) {
|
||||
if (query->lookup->stats && !short_form) {
|
||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||
if (query->lookup->use_usec)
|
||||
printf(";; Query time: %ld usec\n", (long) diff);
|
||||
@@ -289,15 +278,11 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
*/
|
||||
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
|
||||
if (strftime(time_str, sizeof(time_str),
|
||||
"%a %b %d %H:%M:%S %Z %Y", &tmnow) > 0U)
|
||||
{
|
||||
printf(";; WHEN: %s\n", time_str);
|
||||
}
|
||||
#endif
|
||||
if (query->lookup->doing_xfr) {
|
||||
printf(";; XFR size: %u records (messages %u, "
|
||||
@@ -308,32 +293,30 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
printf(";; MSG SIZE rcvd: %u\n", bytes);
|
||||
}
|
||||
if (tsigkey != NULL) {
|
||||
if (!validated) {
|
||||
if (!validated)
|
||||
puts(";; WARNING -- Some TSIG could not "
|
||||
"be validated");
|
||||
}
|
||||
}
|
||||
if ((tsigkey == NULL) && (keysecret[0] != 0)) {
|
||||
puts(";; WARNING -- TSIG key was not used.");
|
||||
}
|
||||
puts("");
|
||||
} else if (query->lookup->identify) {
|
||||
} else if (query->lookup->identify && !short_form) {
|
||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||
if (query->lookup->use_usec) {
|
||||
if (query->lookup->use_usec)
|
||||
printf(";; Received %" PRIu64 " bytes "
|
||||
"from %s(%s) in %ld us\n\n",
|
||||
query->lookup->doing_xfr
|
||||
? query->byte_count
|
||||
: (uint64_t)bytes,
|
||||
fromtext, query->userarg, (long) diff);
|
||||
} else {
|
||||
else
|
||||
printf(";; Received %" PRIu64 " bytes "
|
||||
"from %s(%s) in %ld ms\n\n",
|
||||
query->lookup->doing_xfr
|
||||
? query->byte_count
|
||||
: (uint64_t)bytes,
|
||||
fromtext, query->userarg, (long) diff / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,24 +355,20 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
if (query->lookup->print_unknown_format)
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
if (query->lookup->expandaaaa)
|
||||
styleflags |= DNS_STYLEFLAG_EXPANDAAAA;
|
||||
result = dns_rdata_tofmttext(rdata, NULL, styleflags, 0,
|
||||
splitwidth, " ", buf);
|
||||
if (result == ISC_R_NOSPACE) {
|
||||
if (result == ISC_R_NOSPACE)
|
||||
return (result);
|
||||
}
|
||||
check_result(result, "dns_rdata_totext");
|
||||
if (query->lookup->identify) {
|
||||
|
||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||
ADD_STRING(buf, " from server ");
|
||||
ADD_STRING(buf, query->servname);
|
||||
if (query->lookup->use_usec) {
|
||||
snprintf(store, sizeof(store),
|
||||
" in %" PRIu64 " us.", diff);
|
||||
snprintf(store, sizeof(store), " in %" PRIu64 " us.", diff);
|
||||
} else {
|
||||
snprintf(store, sizeof(store),
|
||||
" in %" PRIu64 " ms.", diff / 1000);
|
||||
snprintf(store, sizeof(store), " in %" PRIu64 " ms.", diff / 1000);
|
||||
}
|
||||
ADD_STRING(buf, store);
|
||||
}
|
||||
@@ -429,7 +408,8 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
|
||||
loopresult = dns_rdataset_first(rdataset);
|
||||
while (loopresult == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = say_message(&rdata, query, buf);
|
||||
result = say_message(&rdata, query,
|
||||
buf);
|
||||
if (result == ISC_R_NOSPACE)
|
||||
return (result);
|
||||
check_result(result, "say_message");
|
||||
@@ -471,85 +451,60 @@ isdotlocal(dns_message_t *msg) {
|
||||
* Callback from dighost.c to print the reply from a server
|
||||
*/
|
||||
static isc_result_t
|
||||
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers)
|
||||
{
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||
isc_result_t result;
|
||||
dns_messagetextflag_t flags;
|
||||
isc_buffer_t *buf = NULL;
|
||||
unsigned int len = OUTPUTBUF;
|
||||
dns_master_style_t *style = NULL;
|
||||
unsigned int styleflags = 0;
|
||||
bool isquery = (msg == query->lookup->sendmsg);
|
||||
|
||||
UNUSED(msgbuf);
|
||||
|
||||
styleflags |= DNS_STYLEFLAG_REL_OWNER;
|
||||
if (yaml) {
|
||||
dns_master_indentstr = " ";
|
||||
dns_master_indent = 3;
|
||||
styleflags |= DNS_STYLEFLAG_YAML;
|
||||
} else {
|
||||
if (query->lookup->comments) {
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
}
|
||||
if (query->lookup->print_unknown_format) {
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
}
|
||||
/* Turn on rrcomments if explicitly enabled */
|
||||
if (query->lookup->rrcomments > 0) {
|
||||
if (query->lookup->comments)
|
||||
styleflags |= DNS_STYLEFLAG_COMMENT;
|
||||
if (query->lookup->print_unknown_format)
|
||||
styleflags |= DNS_STYLEFLAG_UNKNOWNFORMAT;
|
||||
/* Turn on rrcomments if explicitly enabled */
|
||||
if (query->lookup->rrcomments > 0)
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
if (query->lookup->ttlunits)
|
||||
styleflags |= DNS_STYLEFLAG_TTL_UNITS;
|
||||
if (query->lookup->nottl)
|
||||
styleflags |= DNS_STYLEFLAG_NO_TTL;
|
||||
if (query->lookup->noclass)
|
||||
styleflags |= DNS_STYLEFLAG_NO_CLASS;
|
||||
if (query->lookup->nocrypto)
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
if (query->lookup->multiline) {
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_OWNER;
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_CLASS;
|
||||
styleflags |= DNS_STYLEFLAG_REL_DATA;
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
/* Turn on rrcomments unless explicitly disabled */
|
||||
if (query->lookup->rrcomments >= 0)
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
}
|
||||
if (query->lookup->ttlunits) {
|
||||
styleflags |= DNS_STYLEFLAG_TTL_UNITS;
|
||||
}
|
||||
if (query->lookup->nottl) {
|
||||
styleflags |= DNS_STYLEFLAG_NO_TTL;
|
||||
}
|
||||
if (query->lookup->noclass) {
|
||||
styleflags |= DNS_STYLEFLAG_NO_CLASS;
|
||||
}
|
||||
if (query->lookup->nocrypto) {
|
||||
styleflags |= DNS_STYLEFLAG_NOCRYPTO;
|
||||
}
|
||||
if (query->lookup->expandaaaa) {
|
||||
styleflags |= DNS_STYLEFLAG_EXPANDAAAA;
|
||||
}
|
||||
if (query->lookup->multiline) {
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_OWNER;
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_CLASS;
|
||||
styleflags |= DNS_STYLEFLAG_REL_DATA;
|
||||
styleflags |= DNS_STYLEFLAG_OMIT_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_TTL;
|
||||
styleflags |= DNS_STYLEFLAG_MULTILINE;
|
||||
/* Turn on rrcomments unless explicitly disabled */
|
||||
if (query->lookup->rrcomments >= 0) {
|
||||
styleflags |= DNS_STYLEFLAG_RRCOMMENT;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (query->lookup->multiline ||
|
||||
(query->lookup->nottl && query->lookup->noclass))
|
||||
{
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 24, 32, 80, 8,
|
||||
splitwidth, mctx);
|
||||
} else if (query->lookup->nottl || query->lookup->noclass) {
|
||||
else if (query->lookup->nottl || query->lookup->noclass)
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 32, 40, 80, 8,
|
||||
splitwidth, mctx);
|
||||
} else {
|
||||
else
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 32, 40, 48, 80, 8,
|
||||
splitwidth, mctx);
|
||||
}
|
||||
check_result(result, "dns_master_stylecreate");
|
||||
|
||||
if (query->lookup->cmdline[0] != 0) {
|
||||
if (!short_form && printcmd) {
|
||||
if (!short_form)
|
||||
fputs(query->lookup->cmdline, stdout);
|
||||
}
|
||||
query->lookup->cmdline[0] = '\0';
|
||||
query->lookup->cmdline[0]=0;
|
||||
}
|
||||
debug("printmessage(%s %s %s)", headers ? "headers" : "noheaders",
|
||||
query->lookup->comments ? "comments" : "nocomments",
|
||||
@@ -570,110 +525,13 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
result = isc_buffer_allocate(mctx, &buf, len);
|
||||
check_result(result, "isc_buffer_allocate");
|
||||
|
||||
if (yaml) {
|
||||
enum { Q = 0x1, R = 0x2 }; /* Q:query; R:ecursive */
|
||||
unsigned int tflag = 0;
|
||||
isc_sockaddr_t saddr;
|
||||
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
||||
uint16_t sport;
|
||||
char *hash;
|
||||
int pf;
|
||||
|
||||
printf("-\n");
|
||||
printf(" type: MESSAGE\n");
|
||||
printf(" message:\n");
|
||||
|
||||
if (isquery) {
|
||||
tflag |= Q;
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
|
||||
tflag |= R;
|
||||
}
|
||||
} else if (((msg->flags & DNS_MESSAGEFLAG_RD) != 0) &&
|
||||
((msg->flags & DNS_MESSAGEFLAG_RA) != 0))
|
||||
{
|
||||
tflag |= R;
|
||||
}
|
||||
|
||||
if (tflag == (Q|R)) {
|
||||
printf(" type: RECURSIVE_QUERY\n");
|
||||
} else if (tflag == Q) {
|
||||
printf(" type: AUTH_QUERY\n");
|
||||
} else if (tflag == R) {
|
||||
printf(" type: RECURSIVE_RESPONSE\n");
|
||||
} else {
|
||||
printf(" type: AUTH_RESPONSE\n");
|
||||
}
|
||||
|
||||
if (!isc_time_isepoch(&query->time_sent)) {
|
||||
char tbuf[100];
|
||||
isc_time_formatISO8601ms(&query->time_sent,
|
||||
tbuf, sizeof(tbuf));
|
||||
printf(" query_time: !!timestamp %s\n", tbuf);
|
||||
}
|
||||
|
||||
if (!isquery && !isc_time_isepoch(&query->time_recv)) {
|
||||
char tbuf[100];
|
||||
isc_time_formatISO8601ms(&query->time_recv,
|
||||
tbuf, sizeof(tbuf));
|
||||
printf(" response_time: !!timestamp %s\n", tbuf);
|
||||
}
|
||||
|
||||
printf(" message_size: %ub\n",
|
||||
isc_buffer_usedlength(msgbuf));
|
||||
|
||||
pf = isc_sockaddr_pf(&query->sockaddr);
|
||||
if (pf == PF_INET || pf == PF_INET6) {
|
||||
printf(" socket_family: %s\n",
|
||||
pf == PF_INET ? "INET" : "INET6");
|
||||
|
||||
printf(" socket_protocol: %s\n",
|
||||
query->lookup->tcp_mode ? "TCP" : "UDP");
|
||||
|
||||
sport = isc_sockaddr_getport(&query->sockaddr);
|
||||
isc_sockaddr_format(&query->sockaddr,
|
||||
sockstr, sizeof(sockstr));
|
||||
hash = strchr(sockstr, '#');
|
||||
if (hash != NULL) {
|
||||
*hash = '\0';
|
||||
}
|
||||
if (strcmp(sockstr, "::") == 0) {
|
||||
strlcat(sockstr, "0", sizeof(sockstr));
|
||||
}
|
||||
|
||||
printf(" response_address: %s\n", sockstr);
|
||||
printf(" response_port: %u\n", sport);
|
||||
}
|
||||
|
||||
if (query->sock != NULL &&
|
||||
isc_socket_getsockname(query->sock, &saddr)
|
||||
== ISC_R_SUCCESS)
|
||||
{
|
||||
sport = isc_sockaddr_getport(&saddr);
|
||||
isc_sockaddr_format(&saddr, sockstr, sizeof(sockstr));
|
||||
hash = strchr(sockstr, '#');
|
||||
if (hash != NULL) {
|
||||
*hash = '\0';
|
||||
}
|
||||
if (strcmp(sockstr, "::") == 0) {
|
||||
strlcat(sockstr, "0", sizeof(sockstr));
|
||||
}
|
||||
|
||||
printf(" query_address: %s\n", sockstr);
|
||||
printf(" query_port: %u\n", sport);
|
||||
}
|
||||
|
||||
printf(" %s:\n", isquery ? "query_message_data"
|
||||
: "response_message_data");
|
||||
result = dns_message_headertotext(msg, style, flags, buf);
|
||||
} else if (query->lookup->comments && !short_form) {
|
||||
if (query->lookup->cmdline[0] != '\0' && printcmd) {
|
||||
if (query->lookup->comments && !short_form) {
|
||||
if (query->lookup->cmdline[0] != 0)
|
||||
printf("; %s\n", query->lookup->cmdline);
|
||||
}
|
||||
if (msg == query->lookup->sendmsg) {
|
||||
if (msg == query->lookup->sendmsg)
|
||||
printf(";; Sending:\n");
|
||||
} else {
|
||||
else
|
||||
printf(";; Got answer:\n");
|
||||
}
|
||||
|
||||
if (headers) {
|
||||
if (isdotlocal(msg)) {
|
||||
@@ -818,9 +676,8 @@ buftoosmall:
|
||||
}
|
||||
}
|
||||
|
||||
if (headers && query->lookup->comments && !short_form && !yaml) {
|
||||
if (headers && query->lookup->comments && !short_form)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("%.*s", (int)isc_buffer_usedlength(buf),
|
||||
(char *)isc_buffer_base(buf));
|
||||
@@ -1179,24 +1036,8 @@ plus_option(char *option, bool is_batchfile,
|
||||
}
|
||||
break;
|
||||
case 'x':
|
||||
switch (cmd[2]) {
|
||||
case 'p':
|
||||
switch(cmd[3]) {
|
||||
case 'a':
|
||||
FULLCHECK("expandaaaa");
|
||||
lookup->expandaaaa = state;
|
||||
break;
|
||||
case 'i':
|
||||
FULLCHECK("expire");
|
||||
lookup->expire = state;
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
FULLCHECK("expire");
|
||||
lookup->expire = state;
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
@@ -1604,7 +1445,7 @@ plus_option(char *option, bool is_batchfile,
|
||||
lookup->trace = state;
|
||||
lookup->trace_root = state;
|
||||
if (state) {
|
||||
lookup->recurse = true;
|
||||
lookup->recurse = false;
|
||||
lookup->identify = true;
|
||||
lookup->comments = false;
|
||||
lookup->rrcomments = 0;
|
||||
@@ -1668,25 +1509,8 @@ plus_option(char *option, bool is_batchfile,
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
switch (cmd[1]) {
|
||||
case 'n':
|
||||
switch (cmd[2]) {
|
||||
case 'e':
|
||||
FULLCHECK("unexpected");
|
||||
lookup->accept_reply_unexpected_src = state;
|
||||
break;
|
||||
case 'k':
|
||||
FULLCHECK("unknownformat");
|
||||
lookup->print_unknown_format = state;
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
|
||||
FULLCHECK("unknownformat");
|
||||
lookup->print_unknown_format = state;
|
||||
break;
|
||||
case 'v':
|
||||
FULLCHECK("vc");
|
||||
@@ -1695,15 +1519,6 @@ plus_option(char *option, bool is_batchfile,
|
||||
lookup->tcp_mode_set = true;
|
||||
}
|
||||
break;
|
||||
case 'y': /* yaml */
|
||||
FULLCHECK("yaml");
|
||||
yaml = state;
|
||||
if (state) {
|
||||
printcmd = false;
|
||||
lookup->stats = false;
|
||||
lookup->rrcomments = -1;
|
||||
}
|
||||
break;
|
||||
case 'z': /* zflag */
|
||||
FULLCHECK("zflag");
|
||||
lookup->zflag = state;
|
||||
@@ -2416,67 +2231,8 @@ query_finished(void) {
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dig_error(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
if (yaml) {
|
||||
printf("-\n");
|
||||
printf(" type: DIG_ERROR\n");
|
||||
|
||||
/*
|
||||
* Print an indent before a literal block quote.
|
||||
* Note: this will break if used to print more than
|
||||
* one line of text as only the first line would be
|
||||
* indented.
|
||||
*/
|
||||
printf(" message: |\n");
|
||||
printf(" ");
|
||||
} else {
|
||||
printf(";; ");
|
||||
}
|
||||
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
|
||||
if (!yaml) {
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dig_warning(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
if (!yaml) {
|
||||
printf(";; ");
|
||||
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dig_comments(dig_lookup_t *lookup, const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
if (lookup->comments && !yaml) {
|
||||
printf(";; ");
|
||||
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dig_setup(int argc, char **argv) {
|
||||
void dig_setup(int argc, char **argv)
|
||||
{
|
||||
isc_result_t result;
|
||||
|
||||
ISC_LIST_INIT(lookup_list);
|
||||
@@ -2490,9 +2246,6 @@ dig_setup(int argc, char **argv) {
|
||||
dighost_received = received;
|
||||
dighost_trying = trying;
|
||||
dighost_shutdown = query_finished;
|
||||
dighost_error = dig_error;
|
||||
dighost_warning = dig_warning;
|
||||
dighost_comments = dig_comments;
|
||||
|
||||
progname = argv[0];
|
||||
preparse_args(argc, argv);
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -593,11 +592,9 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Toggles the printing of the initial comment in the
|
||||
output, identifying the version of <command>dig</command>
|
||||
and the query options that have been applied. This option
|
||||
always has global effect; it cannot be set globally
|
||||
and then overridden on a per-lookup basis. The default
|
||||
is to print this comment.
|
||||
output identifying the version of <command>dig</command>
|
||||
and the query options that have been applied. This
|
||||
comment is printed by default.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -606,18 +603,8 @@
|
||||
<term><option>+[no]comments</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggles the display of some comment lines in the output,
|
||||
containing information about the packet header and
|
||||
OPT pseudosection, and the names of the response
|
||||
section. The default is to print these comments.
|
||||
</para>
|
||||
<para>
|
||||
Other types of comments in the output are not affected by
|
||||
this option, but can be controlled using other command
|
||||
line switches. These include <command>+[no]cmd</command>,
|
||||
<command>+[no]question</command>,
|
||||
<command>+[no]stats</command>, and
|
||||
<command>+[no]rrcomments</command>.
|
||||
Toggle the display of comment lines in the output.
|
||||
The default is to print comments.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -759,16 +746,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]expandaaaa</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
When printing AAAA record print all zero nibbles rather
|
||||
than the default RFC 5952 preferred presentation format.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]fail</option></term>
|
||||
<listitem>
|
||||
@@ -977,8 +954,8 @@
|
||||
<term><option>+[no]qr</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggles the display of the query message as it is sent.
|
||||
By default, the query is not printed.
|
||||
Print [do not print] the query as it is sent. By
|
||||
default, the query is not printed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -987,7 +964,7 @@
|
||||
<term><option>+[no]question</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggles the display of the question section of a query
|
||||
Print [do not print] the question section of a query
|
||||
when an answer is returned. The default is to print
|
||||
the question section as a comment.
|
||||
</para>
|
||||
@@ -1022,10 +999,8 @@
|
||||
in the query. This bit is set by default, which means
|
||||
<command>dig</command> normally sends recursive
|
||||
queries. Recursion is automatically disabled when
|
||||
using the <parameter>+nssearch</parameter> option, and
|
||||
when using <parameter>+trace</parameter> except for
|
||||
an initial recursive query to get the list of root
|
||||
servers.
|
||||
the <parameter>+nssearch</parameter> or
|
||||
<parameter>+trace</parameter> query options are used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1078,9 +1053,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Provide a terse answer. The default is to print the
|
||||
answer in a verbose form. This option always has global
|
||||
effect; it cannot be set globally and then overridden on
|
||||
a per-lookup basis.
|
||||
answer in a verbose form.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1125,9 +1098,10 @@
|
||||
<term><option>+[no]stats</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Toggles the printing of statistics: when the query was made,
|
||||
the size of the reply and so on. The default behavior is to
|
||||
print the query statistics as a comment after each lookup.
|
||||
This query option toggles the printing of statistics:
|
||||
when the query was made, the size of the reply and
|
||||
so on. The default behavior is to print the query
|
||||
statistics.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1269,17 +1243,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]unexpected</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Accept [do not accept] answers from unexpected sources. By
|
||||
default, <command>dig</command> won't accept a reply from a
|
||||
source other than the one to which it sent the query.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]unknownformat</option></term>
|
||||
<listitem>
|
||||
@@ -1303,16 +1266,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]yaml</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the responses (and, if <option>+qr</option> is in use,
|
||||
also the outgoing queries) in a detailed YAML format.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]zflag</option></term>
|
||||
<listitem>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -481,28 +481,16 @@
|
||||
<dd>
|
||||
<p>
|
||||
Toggles the printing of the initial comment in the
|
||||
output, identifying the version of <span class="command"><strong>dig</strong></span>
|
||||
and the query options that have been applied. This option
|
||||
always has global effect; it cannot be set globally
|
||||
and then overridden on a per-lookup basis. The default
|
||||
is to print this comment.
|
||||
output identifying the version of <span class="command"><strong>dig</strong></span>
|
||||
and the query options that have been applied. This
|
||||
comment is printed by default.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggles the display of some comment lines in the output,
|
||||
containing information about the packet header and
|
||||
OPT pseudosection, and the names of the response
|
||||
section. The default is to print these comments.
|
||||
</p>
|
||||
<p>
|
||||
Other types of comments in the output are not affected by
|
||||
this option, but can be controlled using other command
|
||||
line switches. These include <span class="command"><strong>+[no]cmd</strong></span>,
|
||||
<span class="command"><strong>+[no]question</strong></span>,
|
||||
<span class="command"><strong>+[no]stats</strong></span>, and
|
||||
<span class="command"><strong>+[no]rrcomments</strong></span>.
|
||||
Toggle the display of comment lines in the output.
|
||||
The default is to print comments.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
|
||||
@@ -610,13 +598,6 @@
|
||||
Send an EDNS Expire option.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]expandaaaa</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
When printing AAAA record print all zero nibbles rather
|
||||
than the default RFC 5952 preferred presentation format.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -776,14 +757,14 @@
|
||||
<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggles the display of the query message as it is sent.
|
||||
By default, the query is not printed.
|
||||
Print [do not print] the query as it is sent. By
|
||||
default, the query is not printed.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]question</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggles the display of the question section of a query
|
||||
Print [do not print] the question section of a query
|
||||
when an answer is returned. The default is to print
|
||||
the question section as a comment.
|
||||
</p>
|
||||
@@ -809,10 +790,8 @@
|
||||
in the query. This bit is set by default, which means
|
||||
<span class="command"><strong>dig</strong></span> normally sends recursive
|
||||
queries. Recursion is automatically disabled when
|
||||
using the <em class="parameter"><code>+nssearch</code></em> option, and
|
||||
when using <em class="parameter"><code>+trace</code></em> except for
|
||||
an initial recursive query to get the list of root
|
||||
servers.
|
||||
the <em class="parameter"><code>+nssearch</code></em> or
|
||||
<em class="parameter"><code>+trace</code></em> query options are used.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
|
||||
@@ -853,9 +832,7 @@
|
||||
<dd>
|
||||
<p>
|
||||
Provide a terse answer. The default is to print the
|
||||
answer in a verbose form. This option always has global
|
||||
effect; it cannot be set globally and then overridden on
|
||||
a per-lookup basis.
|
||||
answer in a verbose form.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
|
||||
@@ -888,9 +865,10 @@
|
||||
<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggles the printing of statistics: when the query was made,
|
||||
the size of the reply and so on. The default behavior is to
|
||||
print the query statistics as a comment after each lookup.
|
||||
This query option toggles the printing of statistics:
|
||||
when the query was made, the size of the reply and
|
||||
so on. The default behavior is to print the query
|
||||
statistics.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
|
||||
@@ -1000,14 +978,6 @@
|
||||
seconds, minutes, hours, days and weeks. Implies +ttlid.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]unexpected</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Accept [do not accept] answers from unexpected sources. By
|
||||
default, <span class="command"><strong>dig</strong></span> won't accept a reply from a
|
||||
source other than the one to which it sent the query.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]unknownformat</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -1025,13 +995,6 @@
|
||||
stands for "virtual circuit".
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]yaml</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Print the responses (and, if <code class="option">+qr</code> is in use,
|
||||
also the outgoing queries) in a detailed YAML format.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]zflag</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
* functions in most applications.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -112,8 +114,7 @@ bool
|
||||
showsearch = false,
|
||||
is_dst_up = false,
|
||||
keep_open = false,
|
||||
verbose = false,
|
||||
yaml = false;
|
||||
verbose = false;
|
||||
in_port_t port = 53;
|
||||
unsigned int timeout = 0;
|
||||
unsigned int extrabytes;
|
||||
@@ -191,48 +192,14 @@ dig_lookup_t *current_lookup = NULL;
|
||||
"isc_mutex_unlock");\
|
||||
}
|
||||
|
||||
static void
|
||||
default_warnerr(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
printf(";; ");
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
printf("\n");
|
||||
};
|
||||
|
||||
static void
|
||||
default_comments(dig_lookup_t *lookup, const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
if (lookup->comments) {
|
||||
printf(";; ");
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
printf("\n");
|
||||
}
|
||||
};
|
||||
|
||||
/* dynamic callbacks */
|
||||
|
||||
isc_result_t
|
||||
(*dighost_printmessage)(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers);
|
||||
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg,
|
||||
bool headers);
|
||||
|
||||
void
|
||||
(*dighost_error)(const char *format, ...) = default_warnerr;
|
||||
|
||||
void
|
||||
(*dighost_warning)(const char *format, ...) = default_warnerr;
|
||||
|
||||
void
|
||||
(*dighost_comments)(dig_lookup_t *lookup, const char *format, ...) = default_comments;
|
||||
|
||||
void
|
||||
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from,
|
||||
dig_query_t *query);
|
||||
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query);
|
||||
|
||||
void
|
||||
(*dighost_trying)(char *frm, dig_lookup_t *lookup);
|
||||
@@ -481,6 +448,9 @@ make_server(const char *servname, const char *userarg) {
|
||||
|
||||
debug("make_server(%s)", servname);
|
||||
srv = isc_mem_allocate(mctx, sizeof(struct dig_server));
|
||||
if (srv == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
strlcpy(srv->servername, servname, MXNAME);
|
||||
strlcpy(srv->userarg, userarg, MXNAME);
|
||||
ISC_LINK_INIT(srv, link);
|
||||
@@ -608,6 +578,9 @@ make_empty_lookup(void) {
|
||||
INSIST(!free_now);
|
||||
|
||||
looknew = isc_mem_allocate(mctx, sizeof(struct dig_lookup));
|
||||
if (looknew == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
looknew->pending = true;
|
||||
looknew->textname[0] = 0;
|
||||
looknew->cmdline[0] = 0;
|
||||
@@ -649,9 +622,8 @@ make_empty_lookup(void) {
|
||||
looknew->use_usec = false;
|
||||
looknew->nocrypto = false;
|
||||
looknew->ttlunits = false;
|
||||
looknew->expandaaaa = false;
|
||||
looknew->ttlunits = false;
|
||||
looknew->qr = false;
|
||||
looknew->accept_reply_unexpected_src = false;
|
||||
#ifdef HAVE_LIBIDN2
|
||||
looknew->idnin = isatty(1)?(getenv("IDN_DISABLE") == NULL):false;
|
||||
looknew->idnout = looknew->idnin;
|
||||
@@ -710,6 +682,8 @@ cloneopts(dig_lookup_t *looknew, dig_lookup_t *lookold) {
|
||||
size_t len = sizeof(looknew->ednsopts[0]) * EDNSOPT_OPTIONS;
|
||||
size_t i;
|
||||
looknew->ednsopts = isc_mem_allocate(mctx, len);
|
||||
if (looknew->ednsopts == NULL)
|
||||
fatal("out of memory");
|
||||
for (i = 0; i < EDNSOPT_OPTIONS; i++) {
|
||||
looknew->ednsopts[i].code = 0;
|
||||
looknew->ednsopts[i].length = 0;
|
||||
@@ -723,8 +697,10 @@ cloneopts(dig_lookup_t *looknew, dig_lookup_t *lookold) {
|
||||
len = lookold->ednsopts[i].length;
|
||||
if (len != 0) {
|
||||
INSIST(lookold->ednsopts[i].value != NULL);
|
||||
looknew->ednsopts[i].value = isc_mem_allocate(mctx,
|
||||
len);
|
||||
looknew->ednsopts[i].value =
|
||||
isc_mem_allocate(mctx, len);
|
||||
if (looknew->ednsopts[i].value == NULL)
|
||||
fatal("out of memory");
|
||||
memmove(looknew->ednsopts[i].value,
|
||||
lookold->ednsopts[i].value, len);
|
||||
}
|
||||
@@ -795,10 +771,7 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
|
||||
looknew->use_usec = lookold->use_usec;
|
||||
looknew->nocrypto = lookold->nocrypto;
|
||||
looknew->ttlunits = lookold->ttlunits;
|
||||
looknew->expandaaaa = lookold->expandaaaa;
|
||||
looknew->qr = lookold->qr;
|
||||
looknew->accept_reply_unexpected_src =
|
||||
lookold->accept_reply_unexpected_src;
|
||||
looknew->idnin = lookold->idnin;
|
||||
looknew->idnout = lookold->idnout;
|
||||
looknew->udpsize = lookold->udpsize;
|
||||
@@ -832,11 +805,13 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
|
||||
if (lookold->ecs_addr != NULL) {
|
||||
size_t len = sizeof(isc_sockaddr_t);
|
||||
looknew->ecs_addr = isc_mem_allocate(mctx, len);
|
||||
if (looknew->ecs_addr == NULL)
|
||||
fatal("out of memory");
|
||||
memmove(looknew->ecs_addr, lookold->ecs_addr, len);
|
||||
}
|
||||
|
||||
dns_name_copynf(dns_fixedname_name(&lookold->fdomain),
|
||||
dns_fixedname_name(&looknew->fdomain));
|
||||
dns_name_copy(dns_fixedname_name(&lookold->fdomain),
|
||||
dns_fixedname_name(&looknew->fdomain), NULL);
|
||||
|
||||
if (servers)
|
||||
clone_server_list(lookold->my_server_list,
|
||||
@@ -890,6 +865,9 @@ setup_text_key(void) {
|
||||
isc_buffer_putstr(namebuf, keynametext);
|
||||
secretsize = (unsigned int) strlen(keysecret) * 3 / 4;
|
||||
secretstore = isc_mem_allocate(mctx, secretsize);
|
||||
if (secretstore == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
isc_buffer_init(&secretbuf, secretstore, secretsize);
|
||||
result = isc_base64_decodestring(keysecret, &secretbuf);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
@@ -979,6 +957,8 @@ parse_netprefix(isc_sockaddr_t **sap, const char *value) {
|
||||
fatal("invalid prefix '%s'\n", value);
|
||||
|
||||
sa = isc_mem_allocate(mctx, sizeof(*sa));
|
||||
if (sa == NULL)
|
||||
fatal("out of memory");
|
||||
memset(sa, 0, sizeof(*sa));
|
||||
|
||||
if (strcmp(buf, "0") == 0) {
|
||||
@@ -1210,6 +1190,9 @@ static dig_searchlist_t *
|
||||
make_searchlist_entry(char *domain) {
|
||||
dig_searchlist_t *search;
|
||||
search = isc_mem_allocate(mctx, sizeof(*search));
|
||||
if (search == NULL)
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
strlcpy(search->origin, domain, MXNAME);
|
||||
search->origin[MXNAME-1] = 0;
|
||||
ISC_LINK_INIT(search, link);
|
||||
@@ -1364,7 +1347,8 @@ setup_libs(void) {
|
||||
if (!have_ipv6 && !have_ipv4)
|
||||
fatal("can't find either v4 or v6 networking");
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
result = isc_mem_create(0, 0, &mctx);
|
||||
check_result(result, "isc_mem_create");
|
||||
isc_mem_setname(mctx, "dig", NULL);
|
||||
|
||||
result = isc_log_create(mctx, &lctx, &logconfig);
|
||||
@@ -1379,7 +1363,7 @@ setup_libs(void) {
|
||||
|
||||
isc_log_setdebuglevel(lctx, 0);
|
||||
|
||||
result = isc_taskmgr_create(mctx, 1, 0, &taskmgr);
|
||||
result = isc_taskmgr_create(mctx, 1, &taskmgr);
|
||||
check_result(result, "isc_taskmgr_create");
|
||||
|
||||
result = isc_task_create(taskmgr, 0, &global_task);
|
||||
@@ -1415,7 +1399,6 @@ typedef struct dig_ednsoptname {
|
||||
} dig_ednsoptname_t;
|
||||
|
||||
dig_ednsoptname_t optnames[] = {
|
||||
{ 1, "LLQ" }, /* draft-sekar-dns-llq */
|
||||
{ 3, "NSID" }, /* RFC 5001 */
|
||||
{ 5, "DAU" }, /* RFC 6975 */
|
||||
{ 6, "DHU" }, /* RFC 6975 */
|
||||
@@ -1428,8 +1411,6 @@ dig_ednsoptname_t optnames[] = {
|
||||
{ 12, "PAD" }, /* shorthand */
|
||||
{ 13, "CHAIN" }, /* RFC 7901 */
|
||||
{ 14, "KEY-TAG" }, /* RFC 8145 */
|
||||
{ 16, "CLIENT-TAG" }, /* draft-bellis-dnsop-edns-tags */
|
||||
{ 17, "SERVER-TAG" }, /* draft-bellis-dnsop-edns-tags */
|
||||
{ 26946, "DEVICEID" }, /* Brian Hartvigsen */
|
||||
};
|
||||
|
||||
@@ -1473,7 +1454,9 @@ save_opt(dig_lookup_t *lookup, char *code, char *value) {
|
||||
|
||||
if (value != NULL) {
|
||||
char *buf;
|
||||
buf = isc_mem_allocate(mctx, strlen(value) / 2 + 1);
|
||||
buf = isc_mem_allocate(mctx, strlen(value)/2 + 1);
|
||||
if (buf == NULL)
|
||||
fatal("out of memory");
|
||||
isc_buffer_init(&b, buf, (unsigned int) strlen(value)/2 + 1);
|
||||
result = isc_hex_decodestring(value, &b);
|
||||
check_result(result, "isc_hex_decodestring");
|
||||
@@ -1789,15 +1772,12 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
|
||||
namereln = dns_name_fullcompare(name, domain,
|
||||
&order, &nlabels);
|
||||
if (namereln == dns_namereln_equal) {
|
||||
if (!horizontal) {
|
||||
dighost_warning("BAD (HORIZONTAL) "
|
||||
"REFERRAL");
|
||||
}
|
||||
if (!horizontal)
|
||||
printf(";; BAD (HORIZONTAL) REFERRAL\n");
|
||||
horizontal = true;
|
||||
} else if (namereln != dns_namereln_subdomain) {
|
||||
if (!bad) {
|
||||
dighost_warning( "BAD REFERRAL");
|
||||
}
|
||||
if (!bad)
|
||||
printf(";; BAD REFERRAL\n");
|
||||
bad = true;
|
||||
continue;
|
||||
}
|
||||
@@ -1841,7 +1821,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
|
||||
if (lookup->ns_search_only)
|
||||
lookup->recurse = false;
|
||||
domain = dns_fixedname_name(&lookup->fdomain);
|
||||
dns_name_copynf(name, domain);
|
||||
dns_name_copy(name, domain, NULL);
|
||||
}
|
||||
debug("adding server %s", namestr);
|
||||
num = getaddresses(lookup, namestr, &lresult);
|
||||
@@ -2045,9 +2025,6 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
char cookiebuf[256];
|
||||
char *origin = NULL;
|
||||
char *textname = NULL;
|
||||
|
||||
REQUIRE(lookup != NULL);
|
||||
|
||||
#ifdef HAVE_LIBIDN2
|
||||
char idn_origin[MXNAME], idn_textname[MXNAME];
|
||||
|
||||
@@ -2056,6 +2033,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
check_result(result, "dns_name_settotextfilter");
|
||||
#endif /* HAVE_LIBIDN2 */
|
||||
|
||||
REQUIRE(lookup != NULL);
|
||||
INSIST(!free_now);
|
||||
|
||||
debug("setup_lookup(%p)", lookup);
|
||||
@@ -2156,26 +2134,22 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
isc_buffer_init(&b, textname, len);
|
||||
isc_buffer_add(&b, len);
|
||||
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
if (!dns_name_isabsolute(name)) {
|
||||
result = dns_name_concatenate(name,
|
||||
lookup->oname,
|
||||
lookup->name,
|
||||
&lookup->namebuf);
|
||||
} else {
|
||||
result = dns_name_copy(name,
|
||||
lookup->name,
|
||||
&lookup->namebuf);
|
||||
}
|
||||
}
|
||||
if (result == ISC_R_SUCCESS &&
|
||||
!dns_name_isabsolute(name))
|
||||
result = dns_name_concatenate(name,
|
||||
lookup->oname,
|
||||
lookup->name,
|
||||
&lookup->namebuf);
|
||||
else if (result == ISC_R_SUCCESS)
|
||||
result = dns_name_copy(name, lookup->name,
|
||||
&lookup->namebuf);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_message_puttempname(lookup->sendmsg,
|
||||
&lookup->name);
|
||||
dns_message_puttempname(lookup->sendmsg,
|
||||
&lookup->oname);
|
||||
if (result == DNS_R_NAMETOOLONG) {
|
||||
if (result == DNS_R_NAMETOOLONG)
|
||||
return (false);
|
||||
}
|
||||
fatal("'%s' is not in legal name syntax (%s)",
|
||||
lookup->textname,
|
||||
isc_result_totext(result));
|
||||
@@ -2215,14 +2189,12 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
lookup->sendmsg->id = (dns_messageid_t)isc_random16();
|
||||
lookup->sendmsg->opcode = lookup->opcode;
|
||||
lookup->msgcounter = 0;
|
||||
|
||||
/*
|
||||
* If this is a trace request, completely disallow recursion after
|
||||
* looking up the root name servers, since it's meaningless for traces.
|
||||
* If this is a trace request, completely disallow recursion, since
|
||||
* it's meaningless for traces.
|
||||
*/
|
||||
if ((lookup->trace || lookup->ns_search_only) && !lookup->trace_root) {
|
||||
if (lookup->trace || (lookup->ns_search_only && !lookup->trace_root))
|
||||
lookup->recurse = false;
|
||||
}
|
||||
|
||||
if (lookup->recurse &&
|
||||
lookup->rdtype != dns_rdatatype_axfr &&
|
||||
@@ -2513,6 +2485,10 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
serv = ISC_LIST_NEXT(serv, link))
|
||||
{
|
||||
query = isc_mem_allocate(mctx, sizeof(dig_query_t));
|
||||
if (query == NULL) {
|
||||
fatal("memory allocation failure in %s:%d",
|
||||
__FILE__, __LINE__);
|
||||
}
|
||||
debug("create query %p linked to lookup %p", query, lookup);
|
||||
query->lookup = lookup;
|
||||
query->timer = NULL;
|
||||
@@ -2547,9 +2523,6 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
COMMSIZE);
|
||||
query->sendbuf = lookup->renderbuf;
|
||||
|
||||
isc_time_settoepoch(&query->time_sent);
|
||||
isc_time_settoepoch(&query->time_recv);
|
||||
|
||||
ISC_LINK_INIT(query, clink);
|
||||
ISC_LINK_INIT(query, link);
|
||||
|
||||
@@ -2558,6 +2531,16 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
ISC_LIST_ENQUEUE(lookup->q, query, link);
|
||||
}
|
||||
|
||||
/* XXX qrflag, print_query, etc... */
|
||||
if (!ISC_LIST_EMPTY(lookup->q) && lookup->qr) {
|
||||
extrabytes = 0;
|
||||
dighost_printmessage(ISC_LIST_HEAD(lookup->q),
|
||||
lookup->sendmsg, true);
|
||||
if (lookup->stats) {
|
||||
printf(";; QUERY SIZE: %u\n\n",
|
||||
isc_buffer_usedlength(&lookup->renderbuf));
|
||||
}
|
||||
}
|
||||
return (true);
|
||||
}
|
||||
|
||||
@@ -2674,6 +2657,10 @@ force_timeout(dig_query_t *query) {
|
||||
event = isc_event_allocate(mctx, query, ISC_TIMEREVENT_IDLE,
|
||||
connect_timeout, query,
|
||||
sizeof(isc_event_t));
|
||||
if (event == NULL) {
|
||||
fatal("isc_event_allocate: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
isc_task_send(global_task, &event);
|
||||
|
||||
/*
|
||||
@@ -2725,7 +2712,7 @@ send_tcp_connect(dig_query_t *query) {
|
||||
|
||||
isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr);
|
||||
isc_netaddr_format(&netaddr, buf, sizeof(buf));
|
||||
dighost_warning("Skipping mapped address '%s'", buf);
|
||||
printf(";; Skipping mapped address '%s'\n", buf);
|
||||
|
||||
query->waiting_connect = false;
|
||||
if (ISC_LINK_LINKED(query, link))
|
||||
@@ -2735,7 +2722,28 @@ send_tcp_connect(dig_query_t *query) {
|
||||
l = query->lookup;
|
||||
clear_query(query);
|
||||
if (next == NULL) {
|
||||
dighost_warning("No acceptable nameservers");
|
||||
printf(";; No acceptable nameservers\n");
|
||||
check_next_lookup(l);
|
||||
return;
|
||||
}
|
||||
send_tcp_connect(next);
|
||||
return;
|
||||
}
|
||||
|
||||
if (specified_source &&
|
||||
(isc_sockaddr_pf(&query->sockaddr) !=
|
||||
isc_sockaddr_pf(&bind_address))) {
|
||||
printf(";; Skipping server %s, incompatible "
|
||||
"address family\n", query->servname);
|
||||
query->waiting_connect = false;
|
||||
if (ISC_LINK_LINKED(query, link))
|
||||
next = ISC_LIST_NEXT(query, link);
|
||||
else
|
||||
next = NULL;
|
||||
l = query->lookup;
|
||||
clear_query(query);
|
||||
if (next == NULL) {
|
||||
printf(";; No acceptable nameservers\n");
|
||||
check_next_lookup(l);
|
||||
return;
|
||||
}
|
||||
@@ -2796,14 +2804,6 @@ send_tcp_connect(dig_query_t *query) {
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_query_size(dig_query_t *query) {
|
||||
if (!yaml) {
|
||||
printf(";; QUERY SIZE: %u\n\n",
|
||||
isc_buffer_usedlength(&query->lookup->renderbuf));
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* Send a UDP packet to the remote nameserver, possible starting the
|
||||
* recv action as well. Also make sure that the timer is running and
|
||||
@@ -2842,12 +2842,13 @@ send_udp(dig_query_t *query) {
|
||||
|
||||
isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr);
|
||||
isc_netaddr_format(&netaddr, buf, sizeof(buf));
|
||||
dighost_warning("Skipping mapped address '%s'", buf);
|
||||
printf(";; Skipping mapped address '%s'\n", buf);
|
||||
|
||||
next = ISC_LIST_NEXT(query, link);
|
||||
l = query->lookup;
|
||||
clear_query(query);
|
||||
if (next == NULL) {
|
||||
dighost_warning("No acceptable nameservers");
|
||||
printf(";; No acceptable nameservers\n");
|
||||
check_next_lookup(l);
|
||||
} else {
|
||||
send_udp(next);
|
||||
@@ -2898,47 +2899,6 @@ send_udp(dig_query_t *query) {
|
||||
sevent, ISC_SOCKFLAG_NORETRY);
|
||||
check_result(result, "isc_socket_sendto2");
|
||||
sendcount++;
|
||||
|
||||
/* XXX qrflag, print_query, etc... */
|
||||
if (!ISC_LIST_EMPTY(query->lookup->q) && query->lookup->qr) {
|
||||
extrabytes = 0;
|
||||
dighost_printmessage(ISC_LIST_HEAD(query->lookup->q),
|
||||
&query->lookup->renderbuf,
|
||||
query->lookup->sendmsg, true);
|
||||
if (query->lookup->stats) {
|
||||
print_query_size(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* If there are more servers available for querying within 'lookup', initiate a
|
||||
* TCP or UDP query to the next available server and return true; otherwise,
|
||||
* return false.
|
||||
*/
|
||||
static bool
|
||||
try_next_server(dig_lookup_t *lookup) {
|
||||
dig_query_t *current_query, *next_query;
|
||||
|
||||
current_query = lookup->current_query;
|
||||
if (current_query == NULL || !ISC_LINK_LINKED(current_query, link)) {
|
||||
return (false);
|
||||
}
|
||||
|
||||
next_query = ISC_LIST_NEXT(current_query, link);
|
||||
if (next_query == NULL) {
|
||||
return (false);
|
||||
}
|
||||
|
||||
debug("trying next server...");
|
||||
|
||||
if (lookup->tcp_mode) {
|
||||
send_tcp_connect(next_query);
|
||||
} else {
|
||||
send_udp(next_query);
|
||||
}
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
/*%
|
||||
@@ -2949,7 +2909,7 @@ try_next_server(dig_lookup_t *lookup) {
|
||||
static void
|
||||
connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
dig_lookup_t *l = NULL;
|
||||
dig_query_t *query = NULL;
|
||||
dig_query_t *query = NULL, *cq;
|
||||
|
||||
UNUSED(task);
|
||||
REQUIRE(event->ev_type == ISC_TIMEREVENT_IDLE);
|
||||
@@ -2969,14 +2929,18 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (try_next_server(l)) {
|
||||
if (l->tcp_mode) {
|
||||
if (query->sock != NULL) {
|
||||
if ((query != NULL) && (query->lookup->current_query != NULL) &&
|
||||
ISC_LINK_LINKED(query->lookup->current_query, link) &&
|
||||
(ISC_LIST_NEXT(query->lookup->current_query, link) != NULL)) {
|
||||
debug("trying next server...");
|
||||
cq = query->lookup->current_query;
|
||||
if (!l->tcp_mode)
|
||||
send_udp(ISC_LIST_NEXT(cq, link));
|
||||
else {
|
||||
if (query->sock != NULL)
|
||||
isc_socket_cancel(query->sock, NULL,
|
||||
ISC_SOCKCANCEL_ALL);
|
||||
} else {
|
||||
clear_query(query);
|
||||
}
|
||||
send_tcp_connect(ISC_LIST_NEXT(cq, link));
|
||||
}
|
||||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
@@ -3008,11 +2972,11 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr);
|
||||
isc_netaddr_format(&netaddr, buf, sizeof(buf));
|
||||
|
||||
dighost_error("no response from %s\n", buf);
|
||||
printf(";; no response from %s\n", buf);
|
||||
} else {
|
||||
fputs(l->cmdline, stdout);
|
||||
dighost_error("connection timed out; "
|
||||
"no servers could be reached\n");
|
||||
printf(";; connection timed out; no servers could be "
|
||||
"reached\n");
|
||||
}
|
||||
cancel_lookup(l);
|
||||
check_next_lookup(l);
|
||||
@@ -3022,27 +2986,6 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
UNLOCK_LOOKUP;
|
||||
}
|
||||
|
||||
/*%
|
||||
* Called when a peer closes a TCP socket prematurely.
|
||||
*/
|
||||
static void
|
||||
requeue_or_update_exitcode(dig_lookup_t *lookup) {
|
||||
if (lookup->eoferr == 0U) {
|
||||
/*
|
||||
* Peer closed the connection prematurely for the first time
|
||||
* for this lookup. Try again, keeping track of this failure.
|
||||
*/
|
||||
dig_lookup_t *requeued_lookup = requeue_lookup(lookup, true);
|
||||
requeued_lookup->eoferr++;
|
||||
} else {
|
||||
/*
|
||||
* Peer closed the connection prematurely and it happened
|
||||
* previously for this lookup. Indicate an error.
|
||||
*/
|
||||
exitcode = 9;
|
||||
}
|
||||
}
|
||||
|
||||
/*%
|
||||
* Event handler for the TCP recv which gets the length header of TCP
|
||||
* packets. Start the next recv of length bytes.
|
||||
@@ -3054,7 +2997,7 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
|
||||
isc_region_t r;
|
||||
isc_result_t result;
|
||||
dig_query_t *query = NULL;
|
||||
dig_lookup_t *l;
|
||||
dig_lookup_t *l, *n;
|
||||
uint16_t length;
|
||||
|
||||
REQUIRE(event->ev_type == ISC_SOCKEVENT_RECVDONE);
|
||||
@@ -3084,8 +3027,8 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
|
||||
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
||||
isc_sockaddr_format(&query->sockaddr, sockstr,
|
||||
sizeof(sockstr));
|
||||
dighost_error("communications error to %s: %s\n",
|
||||
sockstr, isc_result_totext(sevent->result));
|
||||
printf(";; communications error to %s: %s\n",
|
||||
sockstr, isc_result_totext(sevent->result));
|
||||
if (keep != NULL)
|
||||
isc_socket_detach(&keep);
|
||||
l = query->lookup;
|
||||
@@ -3093,8 +3036,9 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
|
||||
sockcount--;
|
||||
debug("sockcount=%d", sockcount);
|
||||
INSIST(sockcount >= 0);
|
||||
if (sevent->result == ISC_R_EOF) {
|
||||
requeue_or_update_exitcode(l);
|
||||
if (sevent->result == ISC_R_EOF && l->eoferr == 0U) {
|
||||
n = requeue_lookup(l, true);
|
||||
n->eoferr++;
|
||||
}
|
||||
isc_event_free(&event);
|
||||
clear_query(query);
|
||||
@@ -3184,17 +3128,6 @@ launch_next_query(dig_query_t *query, bool include_question) {
|
||||
check_result(result, "isc_socket_send");
|
||||
sendcount++;
|
||||
debug("sendcount=%d", sendcount);
|
||||
|
||||
/* XXX qrflag, print_query, etc... */
|
||||
if (!ISC_LIST_EMPTY(query->lookup->q) && query->lookup->qr) {
|
||||
extrabytes = 0;
|
||||
dighost_printmessage(ISC_LIST_HEAD(query->lookup->q),
|
||||
&query->lookup->renderbuf,
|
||||
query->lookup->sendmsg, true);
|
||||
if (query->lookup->stats) {
|
||||
print_query_size(query);
|
||||
}
|
||||
}
|
||||
}
|
||||
query->waiting_connect = false;
|
||||
#if 0
|
||||
@@ -3234,12 +3167,11 @@ connect_done(isc_task_t *task, isc_event_t *event) {
|
||||
if (sevent->result == ISC_R_CANCELED) {
|
||||
debug("in cancel handler");
|
||||
isc_sockaddr_format(&query->sockaddr, sockstr, sizeof(sockstr));
|
||||
if (query->timedout) {
|
||||
dighost_warning("Connection to %s(%s) for %s failed: "
|
||||
"%s.", sockstr, query->servname,
|
||||
query->lookup->textname,
|
||||
isc_result_totext(ISC_R_TIMEDOUT));
|
||||
}
|
||||
if (query->timedout)
|
||||
printf(";; Connection to %s(%s) for %s failed: %s.\n",
|
||||
sockstr, query->servname,
|
||||
query->lookup->textname,
|
||||
isc_result_totext(ISC_R_TIMEDOUT));
|
||||
isc_socket_detach(&query->sock);
|
||||
INSIST(sockcount > 0);
|
||||
sockcount--;
|
||||
@@ -3257,12 +3189,11 @@ connect_done(isc_task_t *task, isc_event_t *event) {
|
||||
debug("unsuccessful connection: %s",
|
||||
isc_result_totext(sevent->result));
|
||||
isc_sockaddr_format(&query->sockaddr, sockstr, sizeof(sockstr));
|
||||
if (sevent->result != ISC_R_CANCELED) {
|
||||
dighost_warning("Connection to %s(%s) for %s failed: "
|
||||
"%s.", sockstr, query->servname,
|
||||
query->lookup->textname,
|
||||
isc_result_totext(sevent->result));
|
||||
}
|
||||
if (sevent->result != ISC_R_CANCELED)
|
||||
printf(";; Connection to %s(%s) for %s failed: "
|
||||
"%s.\n", sockstr,
|
||||
query->servname, query->lookup->textname,
|
||||
isc_result_totext(sevent->result));
|
||||
isc_socket_detach(&query->sock);
|
||||
INSIST(sockcount > 0);
|
||||
sockcount--;
|
||||
@@ -3466,16 +3397,16 @@ process_cookie(dig_lookup_t *l, dns_message_t *msg,
|
||||
}
|
||||
|
||||
INSIST(msg->cc_ok == 0 && msg->cc_bad == 0);
|
||||
if (len >= 8 && optlen >= 8U) {
|
||||
if (optlen >= len && optlen >= 8U) {
|
||||
if (isc_safe_memequal(isc_buffer_current(optbuf), sent, 8)) {
|
||||
msg->cc_ok = 1;
|
||||
} else {
|
||||
dighost_warning("Warning: Client COOKIE mismatch");
|
||||
printf(";; Warning: Client COOKIE mismatch\n");
|
||||
msg->cc_bad = 1;
|
||||
copy = false;
|
||||
}
|
||||
} else {
|
||||
dighost_warning("Warning: COOKIE bad token (too short)");
|
||||
printf(";; Warning: COOKIE bad token (too short)\n");
|
||||
msg->cc_bad = 1;
|
||||
copy = false;
|
||||
}
|
||||
@@ -3553,7 +3484,6 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
dig_lookup_t *n, *l;
|
||||
bool docancel = false;
|
||||
bool match = true;
|
||||
bool done_process_opt = false;
|
||||
unsigned int parseflags;
|
||||
dns_messageid_t id;
|
||||
unsigned int msgflags;
|
||||
@@ -3571,6 +3501,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
query = event->ev_arg;
|
||||
TIME_NOW(&query->time_recv);
|
||||
debug("lookup=%p, query=%p", query->lookup, query);
|
||||
|
||||
l = query->lookup;
|
||||
|
||||
@@ -3599,8 +3530,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
debug("in recv cancel handler");
|
||||
query->waiting_connect = false;
|
||||
} else {
|
||||
dighost_error("communications error: %s\n",
|
||||
isc_result_totext(sevent->result));
|
||||
printf(";; communications error: %s\n",
|
||||
isc_result_totext(sevent->result));
|
||||
if (keep != NULL)
|
||||
isc_socket_detach(&keep);
|
||||
isc_socket_detach(&query->sock);
|
||||
@@ -3608,8 +3539,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
debug("sockcount=%d", sockcount);
|
||||
INSIST(sockcount >= 0);
|
||||
}
|
||||
if (sevent->result == ISC_R_EOF) {
|
||||
requeue_or_update_exitcode(l);
|
||||
if (sevent->result == ISC_R_EOF && l->eoferr == 0U) {
|
||||
n = requeue_lookup(l, true);
|
||||
n->eoferr++;
|
||||
}
|
||||
isc_event_free(&event);
|
||||
clear_query(query);
|
||||
@@ -3647,11 +3579,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
sizeof(buf1));
|
||||
isc_sockaddr_format(&query->sockaddr, buf2,
|
||||
sizeof(buf2));
|
||||
dighost_warning("reply from unexpected source: %s,"
|
||||
" expected %s\n", buf1, buf2);
|
||||
if (!l->accept_reply_unexpected_src) {
|
||||
match = false;
|
||||
}
|
||||
printf(";; reply from unexpected source: %s,"
|
||||
" expected %s\n", buf1, buf2);
|
||||
match = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3661,22 +3591,19 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
if (l->tcp_mode) {
|
||||
bool fail = true;
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
if ((!query->first_soa_rcvd || query->warn_id))
|
||||
{
|
||||
dighost_warning("%s: ID mismatch: "
|
||||
"expected ID %u, got "
|
||||
"%u",
|
||||
query->first_soa_rcvd ?
|
||||
"WARNING" : "ERROR",
|
||||
l->sendmsg->id, id);
|
||||
}
|
||||
if (!query->first_soa_rcvd ||
|
||||
query->warn_id)
|
||||
printf(";; %s: ID mismatch: "
|
||||
"expected ID %u, got %u\n",
|
||||
query->first_soa_rcvd ?
|
||||
"WARNING" : "ERROR",
|
||||
l->sendmsg->id, id);
|
||||
if (query->first_soa_rcvd)
|
||||
fail = false;
|
||||
query->warn_id = false;
|
||||
} else {
|
||||
dighost_warning("ERROR: short (< header size) "
|
||||
"message");
|
||||
}
|
||||
} else
|
||||
printf(";; ERROR: short "
|
||||
"(< header size) message\n");
|
||||
if (fail) {
|
||||
isc_event_free(&event);
|
||||
clear_query(query);
|
||||
@@ -3686,18 +3613,16 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
return;
|
||||
}
|
||||
match = true;
|
||||
} else if (result == ISC_R_SUCCESS) {
|
||||
dighost_warning("Warning: ID mismatch: expected ID %u,"
|
||||
" got %u", l->sendmsg->id, id);
|
||||
} else {
|
||||
dighost_warning("Warning: short (< header size) "
|
||||
"message received");
|
||||
}
|
||||
} else if (result == ISC_R_SUCCESS)
|
||||
printf(";; Warning: ID mismatch: "
|
||||
"expected ID %u, got %u\n", l->sendmsg->id, id);
|
||||
else
|
||||
printf(";; Warning: short "
|
||||
"(< header size) message received\n");
|
||||
}
|
||||
|
||||
if (result == ISC_R_SUCCESS && (msgflags & DNS_MESSAGEFLAG_QR) == 0) {
|
||||
dighost_warning("Warning: query response not set");
|
||||
}
|
||||
if (result == ISC_R_SUCCESS && (msgflags & DNS_MESSAGEFLAG_QR) == 0)
|
||||
printf(";; Warning: query response not set\n");
|
||||
|
||||
if (!match)
|
||||
goto udp_mismatch;
|
||||
@@ -3731,16 +3656,13 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
result = dns_message_parse(msg, &b, parseflags);
|
||||
if (result == DNS_R_RECOVERABLE) {
|
||||
dighost_warning("Warning: Message parser reports malformed "
|
||||
"message packet.");
|
||||
printf(";; Warning: Message parser reports malformed "
|
||||
"message packet.\n");
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (!yaml) {
|
||||
printf(";; Got bad packet: %s\n",
|
||||
isc_result_totext(result));
|
||||
hex_dump(&b);
|
||||
}
|
||||
printf(";; Got bad packet: %s\n", isc_result_totext(result));
|
||||
hex_dump(&b);
|
||||
query->waiting_connect = false;
|
||||
dns_message_destroy(&msg);
|
||||
isc_event_free(&event);
|
||||
@@ -3777,10 +3699,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
dns_rdataclass_format(rdataset->rdclass,
|
||||
classbuf,
|
||||
sizeof(classbuf));
|
||||
dighost_warning(";; Question section "
|
||||
"mismatch: got "
|
||||
"%s/%s/%s", namestr,
|
||||
typebuf, classbuf);
|
||||
printf(";; Question section mismatch: "
|
||||
"got %s/%s/%s\n",
|
||||
namestr, typebuf, classbuf);
|
||||
match = false;
|
||||
}
|
||||
}
|
||||
@@ -3803,8 +3724,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
/*
|
||||
* Add minimum EDNS version required checks here if needed.
|
||||
*/
|
||||
dighost_comments(l, "BADVERS, retrying with EDNS version %u.",
|
||||
(unsigned int)newedns);
|
||||
if (l->comments)
|
||||
printf(";; BADVERS, retrying with EDNS version %u.\n",
|
||||
(unsigned int)newedns);
|
||||
l->edns = newedns;
|
||||
n = requeue_lookup(l, true);
|
||||
if (l->trace && l->trace_root)
|
||||
@@ -3821,7 +3743,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
!l->ignore && !l->tcp_mode) {
|
||||
if (l->cookie == NULL && l->sendcookie && msg->opt != NULL)
|
||||
process_opt(l, msg);
|
||||
dighost_comments(l, "Truncated, retrying in TCP mode.");
|
||||
if (l->comments)
|
||||
printf(";; Truncated, retrying in TCP mode.\n");
|
||||
n = requeue_lookup(l, true);
|
||||
n->tcp_mode = true;
|
||||
if (l->trace && l->trace_root)
|
||||
@@ -3838,9 +3761,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
l->sendcookie && l->badcookie) {
|
||||
process_opt(l, msg);
|
||||
if (msg->cc_ok) {
|
||||
dighost_comments(l, "BADCOOKIE, retrying%s.",
|
||||
l->seenbadcookie ?
|
||||
" in TCP mode" : "");
|
||||
if (l->comments)
|
||||
printf(";; BADCOOKIE, retrying%s.\n",
|
||||
l->seenbadcookie ? " in TCP mode" : "");
|
||||
n = requeue_lookup(l, true);
|
||||
if (l->seenbadcookie)
|
||||
n->tcp_mode = true;
|
||||
@@ -3855,7 +3778,6 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
}
|
||||
done_process_opt = true;
|
||||
}
|
||||
if ((msg->rcode == dns_rcode_servfail && !l->servfail_stops) ||
|
||||
(check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && l->recurse))
|
||||
@@ -3877,12 +3799,13 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
*/
|
||||
if ((ISC_LIST_HEAD(l->q) != query) ||
|
||||
(ISC_LIST_NEXT(query, link) != NULL)) {
|
||||
dighost_comments(l, "Got %s from %s, trying next "
|
||||
"server",
|
||||
msg->rcode == dns_rcode_servfail ?
|
||||
"SERVFAIL reply" :
|
||||
"recursion not available",
|
||||
query->servname);
|
||||
if (l->comments)
|
||||
printf(";; Got %s from %s, "
|
||||
"trying next server\n",
|
||||
msg->rcode == dns_rcode_servfail ?
|
||||
"SERVFAIL reply" :
|
||||
"recursion not available",
|
||||
query->servname);
|
||||
clear_query(query);
|
||||
check_next_lookup(l);
|
||||
dns_message_destroy(&msg);
|
||||
@@ -3895,8 +3818,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
if (tsigkey != NULL) {
|
||||
result = dns_tsig_verify(&b, msg, NULL, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dighost_warning("Couldn't verify signature: %s",
|
||||
isc_result_totext(result));
|
||||
printf(";; Couldn't verify signature: %s\n",
|
||||
isc_result_totext(result));
|
||||
validated = false;
|
||||
}
|
||||
l->tsigctx = msg->tsigctx;
|
||||
@@ -3944,35 +3867,30 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!done_process_opt) {
|
||||
if (l->cookie != NULL) {
|
||||
if (msg->opt == NULL) {
|
||||
dighost_warning("expected opt record in "
|
||||
"response");
|
||||
} else {
|
||||
process_opt(l, msg);
|
||||
}
|
||||
} else if (l->sendcookie && msg->opt != NULL) {
|
||||
if (l->cookie != NULL) {
|
||||
if (msg->opt == NULL)
|
||||
printf(";; expected opt record in response\n");
|
||||
else
|
||||
process_opt(l, msg);
|
||||
}
|
||||
}
|
||||
} else if (l->sendcookie && msg->opt != NULL)
|
||||
process_opt(l, msg);
|
||||
if (!l->doing_xfr || l->xfr_q == query) {
|
||||
if (msg->rcode == dns_rcode_nxdomain &&
|
||||
(l->origin != NULL || l->need_search)) {
|
||||
if (!next_origin(query->lookup) || showsearch) {
|
||||
dighost_printmessage(query, &b, msg, true);
|
||||
dighost_printmessage(query, msg, true);
|
||||
dighost_received(isc_buffer_usedlength(&b),
|
||||
&sevent->address, query);
|
||||
}
|
||||
} else if (!l->trace && !l->ns_search_only) {
|
||||
dighost_printmessage(query, &b, msg, true);
|
||||
dighost_printmessage(query, msg, true);
|
||||
} else if (l->trace) {
|
||||
int nl = 0;
|
||||
int count = msg->counts[DNS_SECTION_ANSWER];
|
||||
|
||||
debug("in TRACE code");
|
||||
if (!l->ns_search_only)
|
||||
dighost_printmessage(query, &b, msg, true);
|
||||
dighost_printmessage(query, msg, true);
|
||||
|
||||
l->rdtype = l->qrdtype;
|
||||
if (l->trace_root || (l->ns_search_only && count > 0)) {
|
||||
@@ -4003,7 +3921,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
l->trace_root = false;
|
||||
usesearch = false;
|
||||
} else {
|
||||
dighost_printmessage(query, &b, msg, true);
|
||||
dighost_printmessage(query, msg, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4426,20 +4344,9 @@ idn_ace_to_locale(const char *src, char **dst) {
|
||||
*/
|
||||
res = idn2_to_unicode_8zlz(utf8_src, &local_src, 0);
|
||||
if (res != IDN2_OK) {
|
||||
static bool warned = false;
|
||||
|
||||
res = idn2_to_ascii_8z(utf8_src, &local_src, 0);
|
||||
if (res != IDN2_OK) {
|
||||
fatal("Cannot represent '%s' "
|
||||
"in the current locale nor ascii (%s), "
|
||||
"use +noidnout or a different locale",
|
||||
src, idn2_strerror(res));
|
||||
} else if (!warned) {
|
||||
fprintf(stderr, ";; Warning: cannot represent '%s' "
|
||||
"in the current locale",
|
||||
local_src);
|
||||
warned = true;
|
||||
}
|
||||
fatal("Cannot represent '%s' in the current locale (%s), "
|
||||
"use +noidnout or a different locale",
|
||||
src, idn2_strerror(res));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -269,5 +269,5 @@ runs\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -149,7 +151,6 @@ show_usage(void) {
|
||||
" -s a SERVFAIL response should stop query\n"
|
||||
" -t specifies the query type\n"
|
||||
" -T enables TCP/IP mode\n"
|
||||
" -U enables UDP mode\n"
|
||||
" -v enables verbose output\n"
|
||||
" -V print version number and exit\n"
|
||||
" -w specifies to wait forever for a reply\n"
|
||||
@@ -394,22 +395,19 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
||||
check_result(result, "dns_rdata_tostruct");
|
||||
dns_name_copynf(&cname.cname, qname);
|
||||
dns_name_copy(&cname.cname, qname, NULL);
|
||||
dns_rdata_freestruct(&cname);
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers)
|
||||
{
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||
bool did_flag = false;
|
||||
dns_rdataset_t *opt, *tsig = NULL;
|
||||
const dns_name_t *tsigname;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
int force_error;
|
||||
|
||||
UNUSED(msgbuf);
|
||||
UNUSED(headers);
|
||||
|
||||
/*
|
||||
@@ -456,7 +454,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
|
||||
/* Add AAAA and MX lookups. */
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
dns_name_copynf(query->lookup->name, name);
|
||||
dns_name_copy(query->lookup->name, name, NULL);
|
||||
chase_cnamechain(msg, name);
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
lookup = clone_lookup(query->lookup, false);
|
||||
@@ -626,29 +624,28 @@ pre_parse_args(int argc, char **argv) {
|
||||
case 'a': break;
|
||||
case 'A': break;
|
||||
case 'c': break;
|
||||
case 'C': break;
|
||||
case 'd': break;
|
||||
case 'D':
|
||||
if (debugging)
|
||||
debugtiming = true;
|
||||
debugging = true;
|
||||
break;
|
||||
case 'i': break;
|
||||
case 'l': break;
|
||||
case 'n': break;
|
||||
case 'N': break;
|
||||
case 'r': break;
|
||||
case 'R': break;
|
||||
case 's': break;
|
||||
case 't': break;
|
||||
case 'T': break;
|
||||
case 'U': break;
|
||||
case 'v': break;
|
||||
case 'V':
|
||||
version();
|
||||
exit(0);
|
||||
break;
|
||||
case 'w': break;
|
||||
case 'C': break;
|
||||
case 'D':
|
||||
if (debugging)
|
||||
debugtiming = true;
|
||||
debugging = true;
|
||||
break;
|
||||
case 'N': break;
|
||||
case 'R': break;
|
||||
case 'T': break;
|
||||
case 'W': break;
|
||||
default:
|
||||
show_usage();
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -140,10 +140,7 @@ struct dig_lookup {
|
||||
ttlunits,
|
||||
idnin,
|
||||
idnout,
|
||||
expandaaaa,
|
||||
qr,
|
||||
accept_reply_unexpected_src; /*% print replies from unexpected
|
||||
sources. */
|
||||
qr;
|
||||
char textname[MXNAME]; /*% Name we're going to be looking up */
|
||||
char cmdline[MXNAME];
|
||||
dns_rdatatype_t rdtype;
|
||||
@@ -252,7 +249,7 @@ extern dig_searchlistlist_t search_list;
|
||||
extern unsigned int extrabytes;
|
||||
|
||||
extern bool check_ra, have_ipv4, have_ipv6, specified_source,
|
||||
usesearch, showsearch, yaml;
|
||||
usesearch, showsearch;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
@@ -382,34 +379,13 @@ set_search_domain(char *domain);
|
||||
* then assigned to the appropriate function pointer
|
||||
*/
|
||||
extern isc_result_t
|
||||
(*dighost_printmessage)(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers);
|
||||
|
||||
/*
|
||||
* Print an error message in the appropriate format.
|
||||
*/
|
||||
extern void
|
||||
(*dighost_error)(const char *format, ...);
|
||||
|
||||
/*
|
||||
* Print a warning message in the appropriate format.
|
||||
*/
|
||||
extern void
|
||||
(*dighost_warning)(const char *format, ...);
|
||||
|
||||
/*
|
||||
* Print a comment in the appropriate format.
|
||||
*/
|
||||
extern void
|
||||
(*dighost_comments)(dig_lookup_t *lookup, const char *format, ...);
|
||||
|
||||
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, bool headers);
|
||||
/*%<
|
||||
* Print the final result of the lookup.
|
||||
*/
|
||||
|
||||
extern void
|
||||
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from,
|
||||
dig_query_t *query);
|
||||
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query);
|
||||
/*%<
|
||||
* Print a message about where and when the response
|
||||
* was received from, like the final comment in the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -301,5 +301,5 @@ runs or when the standard output is not a tty\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -423,27 +425,22 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
||||
check_result(result, "dns_rdata_tostruct");
|
||||
dns_name_copynf(&cname.cname, qname);
|
||||
dns_name_copy(&cname.cname, qname, NULL);
|
||||
dns_rdata_freestruct(&cname);
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
dns_message_t *msg, bool headers)
|
||||
{
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||
char servtext[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
UNUSED(msgbuf);
|
||||
|
||||
/* I've we've gotten this far, we've reached a server. */
|
||||
query_error = 0;
|
||||
|
||||
debug("printmessage()");
|
||||
|
||||
if(!default_lookups || query->lookup->rdtype == dns_rdatatype_a) {
|
||||
isc_sockaddr_format(&query->sockaddr, servtext,
|
||||
sizeof(servtext));
|
||||
isc_sockaddr_format(&query->sockaddr, servtext, sizeof(servtext));
|
||||
printf("Server:\t\t%s\n", query->userarg);
|
||||
printf("Address:\t%s\n", servtext);
|
||||
|
||||
@@ -481,7 +478,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
||||
|
||||
/* Add AAAA lookup. */
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
dns_name_copynf(query->lookup->name, name);
|
||||
dns_name_copy(query->lookup->name, name, NULL);
|
||||
chase_cnamechain(msg, name);
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
lookup = clone_lookup(query->lookup, false);
|
||||
@@ -855,6 +852,8 @@ get_next_command(void) {
|
||||
|
||||
fflush(stdout);
|
||||
buf = isc_mem_allocate(mctx, COMMSIZE);
|
||||
if (buf == NULL)
|
||||
fatal("memory allocation failure");
|
||||
isc_app_block();
|
||||
if (interactive) {
|
||||
#ifdef HAVE_READLINE
|
||||
@@ -880,29 +879,12 @@ get_next_command(void) {
|
||||
isc_mem_free(mctx, buf);
|
||||
}
|
||||
|
||||
ISC_PLATFORM_NORETURN_PRE static void
|
||||
usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr,
|
||||
" nslookup [-opt ...] # interactive mode using default server\n");
|
||||
fprintf(stderr,
|
||||
" nslookup [-opt ...] - server # interactive mode using 'server'\n");
|
||||
fprintf(stderr,
|
||||
" nslookup [-opt ...] host # just look up 'host' using default server\n");
|
||||
fprintf(stderr,
|
||||
" nslookup [-opt ...] host server # just look up 'host' using 'server'\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void
|
||||
parse_args(int argc, char **argv) {
|
||||
bool have_lookup = false;
|
||||
|
||||
usesearch = true;
|
||||
for (argc--, argv++; argc > 0 && argv[0] != NULL; argc--, argv++) {
|
||||
for (argc--, argv++; argc > 0; argc--, argv++) {
|
||||
debug("main parsing %s", argv[0]);
|
||||
if (argv[0][0] == '-') {
|
||||
if (strncasecmp(argv[0], "-ver", 4) == 0) {
|
||||
@@ -918,9 +900,6 @@ parse_args(int argc, char **argv) {
|
||||
in_use = true;
|
||||
addlookup(argv[0]);
|
||||
} else {
|
||||
if (argv[1] != NULL) {
|
||||
usage();
|
||||
}
|
||||
set_nameserver(argv[0]);
|
||||
check_ra = false;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,6 @@
|
||||
<year>2016</year>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -63,7 +60,6 @@
|
||||
<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>
|
||||
@@ -91,7 +87,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -63,7 +60,6 @@
|
||||
<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>
|
||||
@@ -89,7 +85,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -63,7 +60,6 @@
|
||||
<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>
|
||||
@@ -91,7 +87,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|@PLATFORM@">
|
||||
<Configuration>Debug</Configuration>
|
||||
@@ -14,21 +14,18 @@
|
||||
<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">
|
||||
@@ -63,7 +60,6 @@
|
||||
<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>
|
||||
@@ -91,7 +87,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
</Project>
|
||||
@@ -15,15 +15,14 @@ VERSION=@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||
${OPENSSL_CFLAGS}
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -102,7 +102,7 @@ Specify a digest algorithm to use when converting CDNSKEY records to DS records\
|
||||
.sp
|
||||
The
|
||||
\fIalgorithm\fR
|
||||
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&.
|
||||
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&.
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
@@ -293,5 +293,5 @@ RFC 7344\&.
|
||||
.RE
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2017-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
@@ -59,7 +61,12 @@
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
|
||||
#endif
|
||||
|
||||
const char *program = "dnssec-cds";
|
||||
int verbose;
|
||||
|
||||
/*
|
||||
* Infrastructure
|
||||
@@ -75,6 +82,12 @@ static dns_fixedname_t fixed;
|
||||
static dns_name_t *name = NULL;
|
||||
static dns_rdataclass_t rdclass = dns_rdataclass_in;
|
||||
|
||||
/*
|
||||
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
|
||||
* from -a arguments. The size of the array is an arbitrary limit.
|
||||
*/
|
||||
static uint8_t dtype[8];
|
||||
|
||||
static const char *startstr = NULL; /* from which we derive notbefore */
|
||||
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
|
||||
static dns_rdata_rrsig_t oldestsig; /* for recording inception time */
|
||||
@@ -116,7 +129,7 @@ static int nkey; /* number of child zone DNSKEY records */
|
||||
typedef struct keyinfo {
|
||||
dns_rdata_t rdata;
|
||||
dst_key_t *dst;
|
||||
dns_secalg_t algo;
|
||||
uint8_t algo;
|
||||
dns_keytag_t tag;
|
||||
} keyinfo_t;
|
||||
|
||||
@@ -469,6 +482,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
||||
dns_rdata_ds_t ds;
|
||||
dns_rdata_t dsrdata = DNS_RDATA_INIT;
|
||||
dns_rdata_t newdsrdata = DNS_RDATA_INIT;
|
||||
dns_rdatatype_t keytype;
|
||||
bool c;
|
||||
|
||||
dns_rdataset_current(dsset, &dsrdata);
|
||||
@@ -479,8 +493,12 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* allow for both DNSKEY and CDNSKEY */
|
||||
keytype = ki->rdata.type;
|
||||
ki->rdata.type = dns_rdatatype_dnskey;
|
||||
result = dns_ds_buildrdata(name, &ki->rdata, ds.digest_type,
|
||||
dsbuf, &newdsrdata);
|
||||
ki->rdata.type = keytype;
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
vbprintf(3, "dns_ds_buildrdata("
|
||||
"keytag=%d, algo=%d, digest=%d): %s\n",
|
||||
@@ -530,6 +548,9 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
|
||||
nkey = dns_rdataset_count(keyset);
|
||||
|
||||
keytable = isc_mem_get(mctx, sizeof(keyinfo_t) * nkey);
|
||||
if (keytable == NULL) {
|
||||
fatal("out of memory");
|
||||
}
|
||||
|
||||
for (result = dns_rdataset_first(keyset), i = 0;
|
||||
result == ISC_R_SUCCESS;
|
||||
@@ -552,7 +573,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
|
||||
ki->algo = dnskey.algorithm;
|
||||
|
||||
dns_rdata_toregion(keyrdata, &r);
|
||||
ki->tag = dst_region_computeid(&r);
|
||||
ki->tag = dst_region_computeid(&r, ki->algo);
|
||||
|
||||
ki->dst = NULL;
|
||||
if (!match_key_dsset(ki, dsset, strictness)) {
|
||||
@@ -598,15 +619,19 @@ free_keytable(keyinfo_t **keytable_p) {
|
||||
* otherwise the key algorithm. This is used by the signature coverage
|
||||
* check functions below.
|
||||
*/
|
||||
static dns_secalg_t *
|
||||
static uint8_t *
|
||||
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
||||
dns_rdataset_t *sigset)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_secalg_t *algo;
|
||||
uint8_t *algo;
|
||||
int i;
|
||||
|
||||
algo = isc_mem_get(mctx, nkey);
|
||||
if (algo == NULL) {
|
||||
fatal("allocating RRSIG/DNSKEY match list: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
memset(algo, 0, nkey);
|
||||
|
||||
for (result = dns_rdataset_first(sigset);
|
||||
@@ -682,7 +707,7 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
||||
* fetched from the child zone, any working signature is enough.
|
||||
*/
|
||||
static bool
|
||||
signed_loose(dns_secalg_t *algo) {
|
||||
signed_loose(uint8_t *algo) {
|
||||
bool ok = false;
|
||||
int i;
|
||||
for (i = 0; i < nkey; i++) {
|
||||
@@ -701,7 +726,7 @@ signed_loose(dns_secalg_t *algo) {
|
||||
* RRset.
|
||||
*/
|
||||
static bool
|
||||
signed_strict(dns_rdataset_t *dsset, dns_secalg_t *algo) {
|
||||
signed_strict(dns_rdataset_t *dsset, uint8_t *algo) {
|
||||
isc_result_t result;
|
||||
bool all_ok = true;
|
||||
|
||||
@@ -740,6 +765,10 @@ rdata_get(void) {
|
||||
dns_rdata_t *rdata;
|
||||
|
||||
rdata = isc_mem_get(mctx, sizeof(*rdata));
|
||||
if (rdata == NULL) {
|
||||
fatal("allocating DS rdata: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
dns_rdata_init(rdata);
|
||||
|
||||
return (rdata);
|
||||
@@ -797,6 +826,7 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
|
||||
cdnskey->type = dns_rdatatype_dnskey;
|
||||
rdata = rdata_get();
|
||||
result = dns_ds_buildrdata(name, cdnskey, dtype[i],
|
||||
r.base, rdata);
|
||||
@@ -814,6 +844,34 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* For sorting the digest types so that DS records generated
|
||||
* from CDNSKEY records are in canonical order.
|
||||
*/
|
||||
static int
|
||||
cmp_dtype(const void *ap, const void *bp) {
|
||||
int a = *(const uint8_t *)ap;
|
||||
int b = *(const uint8_t *)bp;
|
||||
return (a - b);
|
||||
}
|
||||
|
||||
static void
|
||||
add_dtype(const char *dn) {
|
||||
uint8_t dt;
|
||||
unsigned i, n;
|
||||
|
||||
dt = strtodsdigest(dn);
|
||||
n = sizeof(dtype)/sizeof(dtype[0]);
|
||||
for (i = 0; i < n; i++) {
|
||||
if (dtype[i] == 0 || dtype[i] == dt) {
|
||||
dtype[i] = dt;
|
||||
qsort(dtype, i+1, 1, cmp_dtype);
|
||||
return;
|
||||
}
|
||||
}
|
||||
fatal("too many -a digest type arguments");
|
||||
}
|
||||
|
||||
static void
|
||||
make_new_ds_set(ds_maker_func_t *ds_from_rdata,
|
||||
uint32_t ttl, dns_rdataset_t *rdset)
|
||||
@@ -824,6 +882,10 @@ make_new_ds_set(ds_maker_func_t *ds_from_rdata,
|
||||
dns_rdatalist_t *dslist;
|
||||
|
||||
dslist = isc_mem_get(mctx, sizeof(*dslist));
|
||||
if (dslist == NULL) {
|
||||
fatal("allocating new DS list: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
|
||||
dns_rdatalist_init(dslist);
|
||||
dslist->rdclass = rdclass;
|
||||
@@ -880,7 +942,7 @@ consistent_digests(dns_rdataset_t *dsset) {
|
||||
dns_rdata_t *arrdata;
|
||||
dns_rdata_ds_t *ds;
|
||||
dns_keytag_t key_tag;
|
||||
dns_secalg_t algorithm;
|
||||
uint8_t algorithm;
|
||||
bool match;
|
||||
int i, j, n, d;
|
||||
|
||||
@@ -892,6 +954,10 @@ consistent_digests(dns_rdataset_t *dsset) {
|
||||
n = dns_rdataset_count(dsset);
|
||||
|
||||
arrdata = isc_mem_get(mctx, n * sizeof(dns_rdata_t));
|
||||
if (arrdata == NULL) {
|
||||
fatal("allocating DS rdata array: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
|
||||
for (result = dns_rdataset_first(dsset), i = 0;
|
||||
result == ISC_R_SUCCESS;
|
||||
@@ -907,6 +973,10 @@ consistent_digests(dns_rdataset_t *dsset) {
|
||||
* Convert sorted arrdata to more accessible format
|
||||
*/
|
||||
ds = isc_mem_get(mctx, n * sizeof(dns_rdata_ds_t));
|
||||
if (ds == NULL) {
|
||||
fatal("allocating unpacked DS array: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
}
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
result = dns_rdata_tostruct(&arrdata[i], &ds[i], NULL);
|
||||
@@ -1074,7 +1144,10 @@ main(int argc, char *argv[]) {
|
||||
int ch;
|
||||
char *endp;
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
result = isc_mem_create(0, 0, &mctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("out of memory");
|
||||
}
|
||||
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
@@ -1087,7 +1160,7 @@ main(int argc, char *argv[]) {
|
||||
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
add_dtype(strtodsdigest(isc_commandline_argument));
|
||||
add_dtype(isc_commandline_argument);
|
||||
break;
|
||||
case 'c':
|
||||
rdclass = strtoclass(isc_commandline_argument);
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
<copyright>
|
||||
<year>2017</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -144,9 +143,9 @@
|
||||
record. This option has no effect when using CDS records.
|
||||
</para>
|
||||
<para>
|
||||
The <replaceable>algorithm</replaceable> must be one of
|
||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
||||
and the hyphen may be omitted. If no algorithm is specified,
|
||||
The <replaceable>algorithm</replaceable> must be one of SHA-1
|
||||
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
|
||||
values are case insensitive. If no algorithm is specified,
|
||||
the default is SHA-256.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -129,9 +129,9 @@
|
||||
record. This option has no effect when using CDS records.
|
||||
</p>
|
||||
<p>
|
||||
The <em class="replaceable"><code>algorithm</code></em> must be one of
|
||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
||||
and the hyphen may be omitted. If no algorithm is specified,
|
||||
The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
|
||||
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
|
||||
values are case insensitive. If no algorithm is specified,
|
||||
the default is SHA-256.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -10,12 +10,12 @@
|
||||
.\" Title: dnssec-dsfromkey
|
||||
.\" Author:
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 2019-05-08
|
||||
.\" Date: 2012-05-02
|
||||
.\" Manual: BIND9
|
||||
.\" Source: ISC
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "DNSSEC\-DSFROMKEY" "8" "2019\-05\-08" "ISC" "BIND9"
|
||||
.TH "DNSSEC\-DSFROMKEY" "8" "2012\-05\-02" "ISC" "BIND9"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -39,99 +39,61 @@
|
||||
dnssec-dsfromkey \- DNSSEC DS RR generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {keyfile}
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] {keyfile}
|
||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-A\fR] {\fB\-f\ \fR\fB\fIfile\fR\fR} [dnsname]
|
||||
\fBdnssec\-dsfromkey\fR {\-s} [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-s\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-A\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {dnsname}
|
||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {\-s} {dnsname}
|
||||
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-h\fR | \fB\-V\fR]
|
||||
\fBdnssec\-dsfromkey\fR [\fB\-h\fR] [\fB\-V\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
The
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
command outputs DS (Delegation Signer) resource records (RRs), or CDS (Child DS) RRs with the
|
||||
\fB\-C\fR
|
||||
option\&.
|
||||
.PP
|
||||
The input keys can be specified in a number of ways:
|
||||
.PP
|
||||
By default,
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
reads a key file named like
|
||||
Knnnn\&.+aaa+iiiii\&.key, as generated by
|
||||
\fBdnssec\-keygen\fR\&.
|
||||
.PP
|
||||
With the
|
||||
\fB\-f \fR\fB\fIfile\fR\fR
|
||||
option,
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
reads keys from a zone file or partial zone file (which can contain just the DNSKEY records)\&.
|
||||
.PP
|
||||
With the
|
||||
\fB\-s\fR
|
||||
option,
|
||||
\fBdnssec\-dsfromkey\fR
|
||||
reads a
|
||||
keyset\-
|
||||
file, as generated by
|
||||
\fBdnssec\-keygen\fR\fB\-C\fR\&.
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s)\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-1
|
||||
.RS 4
|
||||
An abbreviation for
|
||||
\fB\-a SHA\-1\fR\&. (Note: The SHA\-1 algorithm is no longer recommended for use when generating new DS and CDS records\&.)
|
||||
Use SHA\-1 as the digest algorithm (the default is to use both SHA\-1 and SHA\-256)\&.
|
||||
.RE
|
||||
.PP
|
||||
\-2
|
||||
.RS 4
|
||||
An abbreviation for
|
||||
\fB\-a SHA\-256\fR\&.
|
||||
Use SHA\-256 as the digest algorithm\&.
|
||||
.RE
|
||||
.PP
|
||||
\-a \fIalgorithm\fR
|
||||
.RS 4
|
||||
Specify a digest algorithm to use when converting DNSKEY records to DS records\&. This option can be repeated, so that multiple DS records are created for each DNSKEY record\&.
|
||||
.sp
|
||||
The
|
||||
\fIalgorithm\fR
|
||||
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&. (Note: The SHA\-1 algorithm is no longer recommended for use when generating new DS and CDS records\&.)
|
||||
.RE
|
||||
.PP
|
||||
\-A
|
||||
.RS 4
|
||||
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in
|
||||
\fB\-f\fR
|
||||
zone file mode\&.
|
||||
.RE
|
||||
.PP
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Specifies the DNS class (default is IN)\&. Useful only in
|
||||
\fB\-s\fR
|
||||
keyset or
|
||||
\fB\-f\fR
|
||||
zone file mode\&.
|
||||
Select the digest algorithm\&. The value of
|
||||
\fBalgorithm\fR
|
||||
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256) or SHA\-384 (SHA384)\&. These values are case insensitive\&.
|
||||
.RE
|
||||
.PP
|
||||
\-C
|
||||
.RS 4
|
||||
Generate CDS records rather than DS records\&.
|
||||
Generate CDS records rather than DS records\&. This is mutually exclusive with generating lookaside records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-T \fITTL\fR
|
||||
.RS 4
|
||||
Specifies the TTL of the DS records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-K \fIdirectory\fR
|
||||
.RS 4
|
||||
Look for key files (or, in keyset mode,
|
||||
keyset\-
|
||||
files) in
|
||||
\fBdirectory\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-f \fIfile\fR
|
||||
.RS 4
|
||||
Zone file mode:
|
||||
\fBdnssec\-dsfromkey\fR\*(Aqs final
|
||||
\fIdnsname\fR
|
||||
argument is the DNS domain name of a zone whose master file can be read from
|
||||
Zone file mode: in place of the keyfile name, the argument is the DNS domain name of a zone master file, which can be read from
|
||||
\fBfile\fR\&. If the zone name is the same as
|
||||
\fBfile\fR, then it may be omitted\&.
|
||||
.sp
|
||||
If
|
||||
\fIfile\fR
|
||||
is
|
||||
\fBfile\fR
|
||||
is set to
|
||||
"\-", then the zone data is read from the standard input\&. This makes it possible to use the output of the
|
||||
\fBdig\fR
|
||||
command as input, as in:
|
||||
@@ -139,32 +101,26 @@ command as input, as in:
|
||||
\fBdig dnskey example\&.com | dnssec\-dsfromkey \-f \- example\&.com\fR
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
\-A
|
||||
.RS 4
|
||||
Prints usage information\&.
|
||||
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in zone file mode\&.
|
||||
.RE
|
||||
.PP
|
||||
\-K \fIdirectory\fR
|
||||
\-l \fIdomain\fR
|
||||
.RS 4
|
||||
Look for key files or
|
||||
keyset\-
|
||||
files in
|
||||
\fBdirectory\fR\&.
|
||||
Generate a DLV set instead of a DS set\&. The specified
|
||||
\fBdomain\fR
|
||||
is appended to the name for each record in the set\&. The DNSSEC Lookaside Validation (DLV) RR is described in RFC 4431\&. This is mutually exclusive with generating CDS records\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s
|
||||
.RS 4
|
||||
Keyset mode:
|
||||
\fBdnssec\-dsfromkey\fR\*(Aqs final
|
||||
\fIdnsname\fR
|
||||
argument is the DNS domain name used to locate a
|
||||
keyset\-
|
||||
file\&.
|
||||
Keyset mode: in place of the keyfile name, the argument is the DNS domain name of a keyset file\&.
|
||||
.RE
|
||||
.PP
|
||||
\-T \fITTL\fR
|
||||
\-c \fIclass\fR
|
||||
.RS 4
|
||||
Specifies the TTL of the DS records\&. By default the TTL is omitted\&.
|
||||
Specifies the DNS class (default is IN)\&. Useful only in keyset or zone file mode\&.
|
||||
.RE
|
||||
.PP
|
||||
\-v \fIlevel\fR
|
||||
@@ -172,6 +128,11 @@ Specifies the TTL of the DS records\&. By default the TTL is omitted\&.
|
||||
Sets the debugging level\&.
|
||||
.RE
|
||||
.PP
|
||||
\-h
|
||||
.RS 4
|
||||
Prints usage information\&.
|
||||
.RE
|
||||
.PP
|
||||
\-V
|
||||
.RS 4
|
||||
Prints version information\&.
|
||||
@@ -180,16 +141,16 @@ Prints version information\&.
|
||||
.PP
|
||||
To build the SHA\-256 DS RR from the
|
||||
\fBKexample\&.com\&.+003+26160\fR
|
||||
keyfile name, you can issue the following command:
|
||||
keyfile name, the following command would be issued:
|
||||
.PP
|
||||
\fBdnssec\-dsfromkey \-2 Kexample\&.com\&.+003+26160\fR
|
||||
.PP
|
||||
The command would print something like:
|
||||
.PP
|
||||
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94\fR
|
||||
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94\fR
|
||||
.SH "FILES"
|
||||
.PP
|
||||
The keyfile can be designated by the key identification
|
||||
The keyfile can be designed by the key identification
|
||||
Knnnn\&.+aaa+iiiii
|
||||
or the full file name
|
||||
Knnnn\&.+aaa+iiiii\&.key
|
||||
@@ -209,18 +170,13 @@ A keyfile error can give a "file not found" even if the file exists\&.
|
||||
\fBdnssec-keygen\fR(8),
|
||||
\fBdnssec-signzone\fR(8),
|
||||
BIND 9 Administrator Reference Manual,
|
||||
RFC 3658
|
||||
(DS RRs),
|
||||
RFC 4509
|
||||
(SHA\-256 for DS RRs),
|
||||
RFC 6605
|
||||
(SHA\-384 for DS RRs),
|
||||
RFC 7344
|
||||
(CDS and CDNSKEY RRs)\&.
|
||||
RFC 3658,
|
||||
RFC 4431\&.
|
||||
RFC 4509\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
@@ -47,7 +49,12 @@
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
|
||||
#endif
|
||||
|
||||
const char *program = "dnssec-dsfromkey";
|
||||
int verbose;
|
||||
|
||||
static dns_rdataclass_t rdclass;
|
||||
static dns_fixedname_t fixed;
|
||||
@@ -200,13 +207,16 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
||||
rdclass = dst_key_class(key);
|
||||
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
dns_name_copynf(dst_key_name(key), name);
|
||||
result = dns_name_copy(dst_key_name(key), name, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't copy name");
|
||||
|
||||
dst_key_free(&key);
|
||||
}
|
||||
|
||||
static void
|
||||
logkey(dns_rdata_t *rdata) {
|
||||
logkey(dns_rdata_t *rdata)
|
||||
{
|
||||
isc_result_t result;
|
||||
dst_key_t *key = NULL;
|
||||
isc_buffer_t buf;
|
||||
@@ -225,7 +235,9 @@ logkey(dns_rdata_t *rdata) {
|
||||
}
|
||||
|
||||
static void
|
||||
emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
|
||||
emit(unsigned int dtype, bool showall, char *lookaside,
|
||||
bool cds, dns_rdata_t *rdata)
|
||||
{
|
||||
isc_result_t result;
|
||||
unsigned char buf[DNS_DS_BUFFERSIZE];
|
||||
char text_buf[DST_KEY_MAXTEXTSIZE];
|
||||
@@ -249,7 +261,7 @@ emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
|
||||
if ((dnskey.flags & DNS_KEYFLAG_KSK) == 0 && !showall)
|
||||
return;
|
||||
|
||||
result = dns_ds_buildrdata(name, rdata, dt, buf, &ds);
|
||||
result = dns_ds_buildrdata(name, rdata, dtype, buf, &ds);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't build record");
|
||||
|
||||
@@ -257,6 +269,18 @@ emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't print name");
|
||||
|
||||
/* Add lookaside origin, if set */
|
||||
if (lookaside != NULL) {
|
||||
if (isc_buffer_availablelength(&nameb) < strlen(lookaside))
|
||||
fatal("DLV origin '%s' is too long", lookaside);
|
||||
isc_buffer_putstr(&nameb, lookaside);
|
||||
if (lookaside[strlen(lookaside) - 1] != '.') {
|
||||
if (isc_buffer_availablelength(&nameb) < 1)
|
||||
fatal("DLV origin '%s' is too long", lookaside);
|
||||
isc_buffer_putstr(&nameb, ".");
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_rdata_tofmttext(&ds, (dns_name_t *) NULL, 0, 0, 0, "",
|
||||
&textb);
|
||||
|
||||
@@ -276,54 +300,48 @@ emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
|
||||
isc_buffer_usedregion(&classb, &r);
|
||||
printf("%.*s", (int)r.length, r.base);
|
||||
|
||||
if (cds) {
|
||||
printf(" CDS ");
|
||||
} else {
|
||||
printf(" DS ");
|
||||
}
|
||||
if (lookaside == NULL) {
|
||||
if (cds)
|
||||
printf(" CDS ");
|
||||
else
|
||||
printf(" DS ");
|
||||
} else
|
||||
printf(" DLV ");
|
||||
|
||||
isc_buffer_usedregion(&textb, &r);
|
||||
printf("%.*s\n", (int)r.length, r.base);
|
||||
}
|
||||
|
||||
static void
|
||||
emits(bool showall, bool cds, dns_rdata_t *rdata) {
|
||||
unsigned i, n;
|
||||
|
||||
n = sizeof(dtype)/sizeof(dtype[0]);
|
||||
for (i = 0; i < n; i++) {
|
||||
if (dtype[i] != 0) {
|
||||
emit(dtype[i], showall, cds, rdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ISC_PLATFORM_NORETURN_PRE static void
|
||||
usage(void) ISC_PLATFORM_NORETURN_POST;
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
||||
fprintf(stderr, " %s [options] -f zonefile [zonename]\n\n", program);
|
||||
fprintf(stderr, " %s [options] -s dnsname\n\n", program);
|
||||
fprintf(stderr, " %s [-h|-V]\n\n", program);
|
||||
fprintf(stderr, " %s options [-K dir] keyfile\n\n", program);
|
||||
fprintf(stderr, " %s options [-K dir] [-c class] -s dnsname\n\n",
|
||||
program);
|
||||
fprintf(stderr, " %s options -f zonefile (as zone name)\n\n", program);
|
||||
fprintf(stderr, " %s options -f zonefile zonename\n\n", program);
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
fprintf(stderr, "Options:\n"
|
||||
" -1: digest algorithm SHA-1\n"
|
||||
" -2: digest algorithm SHA-256\n"
|
||||
" -a algorithm: digest algorithm (SHA-1, SHA-256 or SHA-384)\n"
|
||||
" -A: include all keys in DS set, not just KSKs (-f only)\n"
|
||||
" -c class: rdata class for DS set (default IN) (-f or -s only)\n"
|
||||
" -C: print CDS records\n"
|
||||
" -f zonefile: read keys from a zone file\n"
|
||||
" -h: print help information\n"
|
||||
" -K directory: where to find key or keyset files\n"
|
||||
" -s: read keys from keyset-<dnsname> file\n"
|
||||
" -T: TTL of output records (omitted by default)\n"
|
||||
" -v level: verbosity\n"
|
||||
" -V: print version information\n");
|
||||
fprintf(stderr, "Output: DS or CDS RRs\n");
|
||||
fprintf(stderr, "Options:\n");
|
||||
fprintf(stderr, " -v <verbose level>\n");
|
||||
fprintf(stderr, " -V: print version information\n");
|
||||
fprintf(stderr, " -K <directory>: directory in which to find "
|
||||
"key file or keyset file\n");
|
||||
fprintf(stderr, " -a algorithm: digest algorithm "
|
||||
"(SHA-1, SHA-256, GOST or SHA-384)\n");
|
||||
fprintf(stderr, " -1: use SHA-1\n");
|
||||
fprintf(stderr, " -2: use SHA-256\n");
|
||||
fprintf(stderr, " -C: print CDS record\n");
|
||||
fprintf(stderr, " -l: add lookaside zone and print DLV records\n");
|
||||
fprintf(stderr, " -s: read keyset from keyset-<dnsname> file\n");
|
||||
fprintf(stderr, " -c class: rdata class for DS set (default: IN)\n");
|
||||
fprintf(stderr, " -T TTL\n");
|
||||
fprintf(stderr, " -f file: read keyset from zone file\n");
|
||||
fprintf(stderr, " -A: when used with -f, "
|
||||
"include all keys in DS set, not just KSKs\n");
|
||||
fprintf(stderr, "Output: DS or DLV RRs\n");
|
||||
|
||||
exit (-1);
|
||||
}
|
||||
@@ -332,11 +350,14 @@ int
|
||||
main(int argc, char **argv) {
|
||||
char *classname = NULL;
|
||||
char *filename = NULL, *dir = NULL, *namestr;
|
||||
char *endp, *arg1;
|
||||
char *lookaside = NULL;
|
||||
char *endp;
|
||||
int ch;
|
||||
bool cds = false;
|
||||
bool usekeyset = false;
|
||||
bool showall = false;
|
||||
unsigned int dtype = DNS_DSDIGEST_SHA1;
|
||||
bool cds = false;
|
||||
bool both = true;
|
||||
bool usekeyset = false;
|
||||
bool showall = false;
|
||||
isc_result_t result;
|
||||
isc_log_t *log = NULL;
|
||||
dns_rdataset_t rdataset;
|
||||
@@ -344,11 +365,12 @@ main(int argc, char **argv) {
|
||||
|
||||
dns_rdata_init(&rdata);
|
||||
|
||||
if (argc == 1) {
|
||||
if (argc == 1)
|
||||
usage();
|
||||
}
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
result = isc_mem_create(0, 0, &mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
@@ -361,18 +383,24 @@ main(int argc, char **argv) {
|
||||
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
|
||||
switch (ch) {
|
||||
case '1':
|
||||
add_dtype(DNS_DSDIGEST_SHA1);
|
||||
dtype = DNS_DSDIGEST_SHA1;
|
||||
both = false;
|
||||
break;
|
||||
case '2':
|
||||
add_dtype(DNS_DSDIGEST_SHA256);
|
||||
dtype = DNS_DSDIGEST_SHA256;
|
||||
both = false;
|
||||
break;
|
||||
case 'A':
|
||||
showall = true;
|
||||
break;
|
||||
case 'a':
|
||||
add_dtype(strtodsdigest(isc_commandline_argument));
|
||||
dtype = strtodsdigest(isc_commandline_argument);
|
||||
both = false;
|
||||
break;
|
||||
case 'C':
|
||||
if (lookaside != NULL)
|
||||
fatal("lookaside and CDS are mutually"
|
||||
" exclusive");
|
||||
cds = true;
|
||||
break;
|
||||
case 'c':
|
||||
@@ -391,7 +419,12 @@ main(int argc, char **argv) {
|
||||
filename = isc_commandline_argument;
|
||||
break;
|
||||
case 'l':
|
||||
fatal("-l option (DLV lookaside) is obsolete");
|
||||
if (cds)
|
||||
fatal("lookaside and CDS are mutually"
|
||||
" exclusive");
|
||||
lookaside = isc_commandline_argument;
|
||||
if (strlen(lookaside) == 0U)
|
||||
fatal("lookaside must be a non-empty string");
|
||||
break;
|
||||
case 's':
|
||||
usekeyset = true;
|
||||
@@ -430,104 +463,92 @@ main(int argc, char **argv) {
|
||||
|
||||
rdclass = strtoclass(classname);
|
||||
|
||||
if (usekeyset && filename != NULL) {
|
||||
if (usekeyset && filename != NULL)
|
||||
fatal("cannot use both -s and -f");
|
||||
}
|
||||
|
||||
/* When not using -f, -A is implicit */
|
||||
if (filename == NULL) {
|
||||
if (filename == NULL)
|
||||
showall = true;
|
||||
}
|
||||
|
||||
/* Default digest type if none specified. */
|
||||
if (dtype[0] == 0) {
|
||||
dtype[0] = DNS_DSDIGEST_SHA256;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use local variable arg1 so that clang can correctly analyse
|
||||
* reachable paths rather than 'argc < isc_commandline_index + 1'.
|
||||
*/
|
||||
arg1 = argv[isc_commandline_index];
|
||||
if (arg1 == NULL && filename == NULL) {
|
||||
if (argc < isc_commandline_index + 1 && filename == NULL)
|
||||
fatal("the key file name was not specified");
|
||||
}
|
||||
if (arg1 != NULL && argv[isc_commandline_index + 1] != NULL) {
|
||||
if (argc > isc_commandline_index + 1)
|
||||
fatal("extraneous arguments");
|
||||
}
|
||||
|
||||
result = dst_lib_init(mctx, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
setup_logging(mctx, &log);
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
||||
if (usekeyset || filename != NULL) {
|
||||
if (arg1 == NULL) {
|
||||
/* using file name as the zone name */
|
||||
if (argc < isc_commandline_index + 1 && filename != NULL) {
|
||||
/* using zone name as the zone file name */
|
||||
namestr = filename;
|
||||
} else {
|
||||
namestr = arg1;
|
||||
}
|
||||
} else
|
||||
namestr = argv[isc_commandline_index];
|
||||
|
||||
result = initname(namestr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize name %s", namestr);
|
||||
}
|
||||
|
||||
if (usekeyset) {
|
||||
if (usekeyset)
|
||||
result = loadkeyset(dir, &rdataset);
|
||||
} else {
|
||||
INSIST(filename != NULL);
|
||||
else
|
||||
result = loadset(filename, &rdataset);
|
||||
}
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not load DNSKEY set: %s\n",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
for (result = dns_rdataset_first(&rdataset);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdataset_next(&rdataset))
|
||||
{
|
||||
result = dns_rdataset_next(&rdataset)) {
|
||||
dns_rdata_init(&rdata);
|
||||
dns_rdataset_current(&rdataset, &rdata);
|
||||
|
||||
if (verbose > 2) {
|
||||
if (verbose > 2)
|
||||
logkey(&rdata);
|
||||
}
|
||||
|
||||
emits(showall, cds, &rdata);
|
||||
if (both) {
|
||||
emit(DNS_DSDIGEST_SHA1, showall, lookaside,
|
||||
cds, &rdata);
|
||||
emit(DNS_DSDIGEST_SHA256, showall, lookaside,
|
||||
cds, &rdata);
|
||||
} else
|
||||
emit(dtype, showall, lookaside, cds, &rdata);
|
||||
}
|
||||
} else {
|
||||
unsigned char key_buf[DST_KEY_MAXSIZE];
|
||||
|
||||
loadkey(arg1, key_buf, DST_KEY_MAXSIZE, &rdata);
|
||||
loadkey(argv[isc_commandline_index], key_buf,
|
||||
DST_KEY_MAXSIZE, &rdata);
|
||||
|
||||
emits(showall, cds, &rdata);
|
||||
if (both) {
|
||||
emit(DNS_DSDIGEST_SHA1, showall, lookaside, cds,
|
||||
&rdata);
|
||||
emit(DNS_DSDIGEST_SHA256, showall, lookaside, cds,
|
||||
&rdata);
|
||||
} else
|
||||
emit(dtype, showall, lookaside, cds, &rdata);
|
||||
}
|
||||
|
||||
if (dns_rdataset_isassociated(&rdataset)) {
|
||||
if (dns_rdataset_isassociated(&rdataset))
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
}
|
||||
cleanup_logging(&log);
|
||||
dst_lib_destroy();
|
||||
dns_name_destroy();
|
||||
if (verbose > 10) {
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
}
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
fflush(stdout);
|
||||
if (ferror(stdout)) {
|
||||
fprintf(stderr, "write error\n");
|
||||
return (1);
|
||||
} else {
|
||||
} else
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<!-- Converted by db4-upgrade version 1.0 -->
|
||||
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-dsfromkey">
|
||||
<info>
|
||||
<date>2019-05-08</date>
|
||||
<date>2012-05-02</date>
|
||||
</info>
|
||||
<refentryinfo>
|
||||
<corpname>ISC</corpname>
|
||||
@@ -41,7 +41,6 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
@@ -49,108 +48,56 @@
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<group choice="opt">
|
||||
<arg choice="plain"><option>-1</option></arg>
|
||||
<arg choice="plain"><option>-2</option></arg>
|
||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
</group>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">keyfile</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<group choice="opt">
|
||||
<arg choice="plain"><option>-1</option></arg>
|
||||
<arg choice="plain"><option>-2</option></arg>
|
||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
</group>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
|
||||
<arg choice="req" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat">dnsname</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<group choice="opt">
|
||||
<arg choice="plain"><option>-1</option></arg>
|
||||
<arg choice="plain"><option>-2</option></arg>
|
||||
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
|
||||
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
</group>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">-s</arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="req" rep="norepeat">dnsname</arg>
|
||||
</cmdsynopsis>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
<command>dnssec-dsfromkey</command>
|
||||
<group choice="opt">
|
||||
<arg choice="plain" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="plain" rep="norepeat"><option>-V</option></arg>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsection><info><title>DESCRIPTION</title></info>
|
||||
|
||||
<para>
|
||||
The <command>dnssec-dsfromkey</command> command outputs DS (Delegation
|
||||
Signer) resource records (RRs), or CDS (Child DS) RRs with the
|
||||
<option>-C</option> option.
|
||||
<para><command>dnssec-dsfromkey</command>
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in
|
||||
RFC 3658 and RFC 4509, for the given key(s).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The input keys can be specified in a number of ways:
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default, <command>dnssec-dsfromkey</command> reads a key file
|
||||
named like <filename>Knnnn.+aaa+iiiii.key</filename>, as generated
|
||||
by <command>dnssec-keygen</command>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
With the <option>-f <replaceable>file</replaceable></option>
|
||||
option, <command>dnssec-dsfromkey</command> reads keys from a zone file
|
||||
or partial zone file (which can contain just the DNSKEY records).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
With the <option>-s</option>
|
||||
option, <command>dnssec-dsfromkey</command> reads
|
||||
a <filename>keyset-</filename> file, as generated
|
||||
by <command>dnssec-keygen</command> <option>-C</option>.
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>OPTIONS</title></info>
|
||||
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-1</term>
|
||||
<listitem>
|
||||
<para>
|
||||
An abbreviation for <option>-a SHA-1</option>.
|
||||
(Note: The SHA-1 algorithm is no longer recommended for use
|
||||
when generating new DS and CDS records.)
|
||||
Use SHA-1 as the digest algorithm (the default is to use
|
||||
both SHA-1 and SHA-256).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -159,7 +106,7 @@
|
||||
<term>-2</term>
|
||||
<listitem>
|
||||
<para>
|
||||
An abbreviation for <option>-a SHA-256</option>.
|
||||
Use SHA-256 as the digest algorithm.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -168,49 +115,40 @@
|
||||
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify a digest algorithm to use when converting DNSKEY
|
||||
records to DS records. This option can be repeated, so
|
||||
that multiple DS records are created for each DNSKEY
|
||||
record.
|
||||
</para>
|
||||
<para>
|
||||
The <replaceable>algorithm</replaceable> must be one of
|
||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
||||
and the hyphen may be omitted. If no algorithm is specified,
|
||||
the default is SHA-256.
|
||||
(Note: The SHA-1 algorithm is no longer recommended for use
|
||||
when generating new DS and CDS records.)
|
||||
Select the digest algorithm. The value of
|
||||
<option>algorithm</option> must be one of SHA-1 (SHA1),
|
||||
SHA-256 (SHA256) or SHA-384 (SHA384).
|
||||
These values are case insensitive.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-A</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Include ZSKs when generating DS records. Without this option, only
|
||||
keys which have the KSK flag set will be converted to DS records
|
||||
and printed. Useful only in <option>-f</option> zone file mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the DNS class (default is IN). Useful only
|
||||
in <option>-s</option> keyset or <option>-f</option>
|
||||
zone file mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-C</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Generate CDS records rather than DS records.
|
||||
Generate CDS records rather than DS records. This is mutually
|
||||
exclusive with generating lookaside records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-T <replaceable class="parameter">TTL</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the TTL of the DS records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-K <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Look for key files (or, in keyset mode,
|
||||
<filename>keyset-</filename> files) in
|
||||
<option>directory</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -219,14 +157,13 @@
|
||||
<term>-f <replaceable class="parameter">file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Zone file mode: <command>dnssec-dsfromkey</command>'s
|
||||
final <replaceable>dnsname</replaceable> argument is
|
||||
the DNS domain name of a zone whose master file can be read
|
||||
Zone file mode: in place of the keyfile name, the argument is
|
||||
the DNS domain name of a zone master file, which can be read
|
||||
from <option>file</option>. If the zone name is the same as
|
||||
<option>file</option>, then it may be omitted.
|
||||
</para>
|
||||
<para>
|
||||
If <replaceable>file</replaceable> is <literal>"-"</literal>, then
|
||||
If <option>file</option> is set to <literal>"-"</literal>, then
|
||||
the zone data is read from the standard input. This makes it
|
||||
possible to use the output of the <command>dig</command>
|
||||
command as input, as in:
|
||||
@@ -238,20 +175,26 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints usage information.
|
||||
</para>
|
||||
</listitem>
|
||||
<term>-A</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Include ZSKs when generating DS records. Without this option,
|
||||
only keys which have the KSK flag set will be converted to DS
|
||||
records and printed. Useful only in zone file mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-K <replaceable class="parameter">directory</replaceable></term>
|
||||
<term>-l <replaceable class="parameter">domain</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Look for key files or <filename>keyset-</filename> files in
|
||||
<option>directory</option>.
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<option>domain</option> is appended to the name for each
|
||||
record in the set.
|
||||
The DNSSEC Lookaside Validation (DLV) RR is described
|
||||
in RFC 4431. This is mutually exclusive with generating
|
||||
CDS records.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -260,18 +203,18 @@
|
||||
<term>-s</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Keyset mode: <command>dnssec-dsfromkey</command>'s
|
||||
final <replaceable>dnsname</replaceable> argument is the DNS
|
||||
domain name used to locate a <filename>keyset-</filename> file.
|
||||
Keyset mode: in place of the keyfile name, the argument is
|
||||
the DNS domain name of a keyset file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-T <replaceable class="parameter">TTL</replaceable></term>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the TTL of the DS records. By default the TTL is omitted.
|
||||
Specifies the DNS class (default is IN). Useful only
|
||||
in keyset or zone file mode.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -285,6 +228,15 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints usage information.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-V</term>
|
||||
<listitem>
|
||||
@@ -301,22 +253,21 @@
|
||||
<para>
|
||||
To build the SHA-256 DS RR from the
|
||||
<userinput>Kexample.com.+003+26160</userinput>
|
||||
keyfile name, you can issue the following command:
|
||||
keyfile name, the following command would be issued:
|
||||
</para>
|
||||
<para><userinput>dnssec-dsfromkey -2 Kexample.com.+003+26160</userinput>
|
||||
</para>
|
||||
<para>
|
||||
The command would print something like:
|
||||
</para>
|
||||
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</userinput>
|
||||
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</userinput>
|
||||
</para>
|
||||
|
||||
</refsection>
|
||||
|
||||
<refsection><info><title>FILES</title></info>
|
||||
|
||||
<para>
|
||||
The keyfile can be designated by the key identification
|
||||
The keyfile can be designed by the key identification
|
||||
<filename>Knnnn.+aaa+iiiii</filename> or the full file name
|
||||
<filename>Knnnn.+aaa+iiiii.key</filename> as generated by
|
||||
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>.
|
||||
@@ -344,10 +295,9 @@
|
||||
<refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
||||
<citetitle>RFC 3658</citetitle> (DS RRs),
|
||||
<citetitle>RFC 4509</citetitle> (SHA-256 for DS RRs),
|
||||
<citetitle>RFC 6605</citetitle> (SHA-384 for DS RRs),
|
||||
<citetitle>RFC 7344</citetitle> (CDS and CDNSKEY RRs).
|
||||
<citetitle>RFC 3658</citetitle>,
|
||||
<citetitle>RFC 4431</citetitle>.
|
||||
<citetitle>RFC 4509</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -33,167 +33,105 @@
|
||||
<h2>Synopsis</h2>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-dsfromkey</code>
|
||||
[
|
||||
<code class="option">-1</code>
|
||||
| <code class="option">-2</code>
|
||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
||||
]
|
||||
[
|
||||
<code class="option">-C</code>
|
||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
||||
]
|
||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||
[<code class="option">-1</code>]
|
||||
[<code class="option">-2</code>]
|
||||
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
|
||||
[<code class="option">-C</code>]
|
||||
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
|
||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||
{keyfile}
|
||||
</p></div>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-dsfromkey</code>
|
||||
[
|
||||
<code class="option">-1</code>
|
||||
| <code class="option">-2</code>
|
||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
||||
]
|
||||
[
|
||||
<code class="option">-C</code>
|
||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
||||
]
|
||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||
[<code class="option">-A</code>]
|
||||
{<code class="option">-f <em class="replaceable"><code>file</code></em></code>}
|
||||
[dnsname]
|
||||
</p></div>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-dsfromkey</code>
|
||||
[
|
||||
<code class="option">-1</code>
|
||||
| <code class="option">-2</code>
|
||||
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
|
||||
]
|
||||
[
|
||||
<code class="option">-C</code>
|
||||
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
|
||||
]
|
||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||
{-s}
|
||||
[<code class="option">-1</code>]
|
||||
[<code class="option">-2</code>]
|
||||
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
|
||||
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
|
||||
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
|
||||
[<code class="option">-s</code>]
|
||||
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
|
||||
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
|
||||
[<code class="option">-f <em class="replaceable"><code>file</code></em></code>]
|
||||
[<code class="option">-A</code>]
|
||||
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
|
||||
{dnsname}
|
||||
</p></div>
|
||||
</p></div>
|
||||
<div class="cmdsynopsis"><p>
|
||||
<code class="command">dnssec-dsfromkey</code>
|
||||
[
|
||||
<code class="option">-h</code>
|
||||
| <code class="option">-V</code>
|
||||
]
|
||||
</p></div>
|
||||
[<code class="option">-h</code>]
|
||||
[<code class="option">-V</code>]
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
|
||||
|
||||
<p>
|
||||
The <span class="command"><strong>dnssec-dsfromkey</strong></span> command outputs DS (Delegation
|
||||
Signer) resource records (RRs), or CDS (Child DS) RRs with the
|
||||
<code class="option">-C</code> option.
|
||||
<p><span class="command"><strong>dnssec-dsfromkey</strong></span>
|
||||
outputs the Delegation Signer (DS) resource record (RR), as defined in
|
||||
RFC 3658 and RFC 4509, for the given key(s).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The input keys can be specified in a number of ways:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
By default, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads a key file
|
||||
named like <code class="filename">Knnnn.+aaa+iiiii.key</code>, as generated
|
||||
by <span class="command"><strong>dnssec-keygen</strong></span>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
With the <code class="option">-f <em class="replaceable"><code>file</code></em></code>
|
||||
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads keys from a zone file
|
||||
or partial zone file (which can contain just the DNSKEY records).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
With the <code class="option">-s</code>
|
||||
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads
|
||||
a <code class="filename">keyset-</code> file, as generated
|
||||
by <span class="command"><strong>dnssec-keygen</strong></span> <code class="option">-C</code>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.8"></a><h2>OPTIONS</h2>
|
||||
|
||||
|
||||
<div class="variablelist"><dl class="variablelist">
|
||||
<dt><span class="term">-1</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
An abbreviation for <code class="option">-a SHA-1</code>.
|
||||
(Note: The SHA-1 algorithm is no longer recommended for use
|
||||
when generating new DS and CDS records.)
|
||||
Use SHA-1 as the digest algorithm (the default is to use
|
||||
both SHA-1 and SHA-256).
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-2</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
An abbreviation for <code class="option">-a SHA-256</code>.
|
||||
Use SHA-256 as the digest algorithm.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specify a digest algorithm to use when converting DNSKEY
|
||||
records to DS records. This option can be repeated, so
|
||||
that multiple DS records are created for each DNSKEY
|
||||
record.
|
||||
</p>
|
||||
<p>
|
||||
The <em class="replaceable"><code>algorithm</code></em> must be one of
|
||||
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
|
||||
and the hyphen may be omitted. If no algorithm is specified,
|
||||
the default is SHA-256.
|
||||
(Note: The SHA-1 algorithm is no longer recommended for use
|
||||
when generating new DS and CDS records.)
|
||||
Select the digest algorithm. The value of
|
||||
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
|
||||
SHA-256 (SHA256) or SHA-384 (SHA384).
|
||||
These values are case insensitive.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-A</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Include ZSKs when generating DS records. Without this option, only
|
||||
keys which have the KSK flag set will be converted to DS records
|
||||
and printed. Useful only in <code class="option">-f</code> zone file mode.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the DNS class (default is IN). Useful only
|
||||
in <code class="option">-s</code> keyset or <code class="option">-f</code>
|
||||
zone file mode.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-C</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Generate CDS records rather than DS records.
|
||||
Generate CDS records rather than DS records. This is mutually
|
||||
exclusive with generating lookaside records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the TTL of the DS records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Look for key files (or, in keyset mode,
|
||||
<code class="filename">keyset-</code> files) in
|
||||
<code class="option">directory</code>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Zone file mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s
|
||||
final <em class="replaceable"><code>dnsname</code></em> argument is
|
||||
the DNS domain name of a zone whose master file can be read
|
||||
Zone file mode: in place of the keyfile name, the argument is
|
||||
the DNS domain name of a zone master file, which can be read
|
||||
from <code class="option">file</code>. If the zone name is the same as
|
||||
<code class="option">file</code>, then it may be omitted.
|
||||
</p>
|
||||
<p>
|
||||
If <em class="replaceable"><code>file</code></em> is <code class="literal">"-"</code>, then
|
||||
If <code class="option">file</code> is set to <code class="literal">"-"</code>, then
|
||||
the zone data is read from the standard input. This makes it
|
||||
possible to use the output of the <span class="command"><strong>dig</strong></span>
|
||||
command as input, as in:
|
||||
@@ -202,31 +140,37 @@
|
||||
<strong class="userinput"><code>dig dnskey example.com | dnssec-dsfromkey -f - example.com</code></strong>
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dt><span class="term">-A</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Include ZSKs when generating DS records. Without this option,
|
||||
only keys which have the KSK flag set will be converted to DS
|
||||
records and printed. Useful only in zone file mode.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Prints usage information.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Look for key files or <code class="filename">keyset-</code> files in
|
||||
<code class="option">directory</code>.
|
||||
Generate a DLV set instead of a DS set. The specified
|
||||
<code class="option">domain</code> is appended to the name for each
|
||||
record in the set.
|
||||
The DNSSEC Lookaside Validation (DLV) RR is described
|
||||
in RFC 4431. This is mutually exclusive with generating
|
||||
CDS records.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-s</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Keyset mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s
|
||||
final <em class="replaceable"><code>dnsname</code></em> argument is the DNS
|
||||
domain name used to locate a <code class="filename">keyset-</code> file.
|
||||
Keyset mode: in place of the keyfile name, the argument is
|
||||
the DNS domain name of a keyset file.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
|
||||
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the TTL of the DS records. By default the TTL is omitted.
|
||||
Specifies the DNS class (default is IN). Useful only
|
||||
in keyset or zone file mode.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
|
||||
@@ -235,6 +179,12 @@
|
||||
Sets the debugging level.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-h</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Prints usage information.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-V</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -250,23 +200,22 @@
|
||||
<p>
|
||||
To build the SHA-256 DS RR from the
|
||||
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
|
||||
keyfile name, you can issue the following command:
|
||||
keyfile name, the following command would be issued:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>dnssec-dsfromkey -2 Kexample.com.+003+26160</code></strong>
|
||||
</p>
|
||||
<p>
|
||||
The command would print something like:
|
||||
</p>
|
||||
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</code></strong>
|
||||
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</code></strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="refsection">
|
||||
<a name="id-1.10"></a><h2>FILES</h2>
|
||||
|
||||
<p>
|
||||
The keyfile can be designated by the key identification
|
||||
The keyfile can be designed by the key identification
|
||||
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
|
||||
<code class="filename">Knnnn.+aaa+iiiii.key</code> as generated by
|
||||
<span class="refentrytitle">dnssec-keygen</span>(8).
|
||||
@@ -296,10 +245,9 @@
|
||||
<span class="refentrytitle">dnssec-signzone</span>(8)
|
||||
</span>,
|
||||
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
|
||||
<em class="citetitle">RFC 3658</em> (DS RRs),
|
||||
<em class="citetitle">RFC 4509</em> (SHA-256 for DS RRs),
|
||||
<em class="citetitle">RFC 6605</em> (SHA-384 for DS RRs),
|
||||
<em class="citetitle">RFC 7344</em> (CDS and CDNSKEY RRs).
|
||||
<em class="citetitle">RFC 3658</em>,
|
||||
<em class="citetitle">RFC 4431</em>.
|
||||
<em class="citetitle">RFC 4509</em>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -134,5 +134,5 @@ RFC 5011\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
/*! \file */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -46,7 +48,12 @@
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
|
||||
#endif
|
||||
|
||||
const char *program = "dnssec-importkey";
|
||||
int verbose;
|
||||
|
||||
static dns_rdataclass_t rdclass;
|
||||
static dns_fixedname_t fixed;
|
||||
@@ -174,7 +181,9 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
||||
rdclass = dst_key_class(key);
|
||||
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
dns_name_copynf(dst_key_name(key), name);
|
||||
result = dns_name_copy(dst_key_name(key), name, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't copy name");
|
||||
|
||||
dst_key_free(&key);
|
||||
}
|
||||
@@ -298,7 +307,9 @@ main(int argc, char **argv) {
|
||||
if (argc == 1)
|
||||
usage();
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
result = isc_mem_create(0, 0, &mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#if USE_PKCS11
|
||||
pk11_result_register();
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
<year>2015</year>
|
||||
<year>2016</year>
|
||||
<year>2018</year>
|
||||
<year>2019</year>
|
||||
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
|
||||
</copyright>
|
||||
</docinfo>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2008-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -55,7 +55,7 @@ of the key is specified on the command line\&. This must match the name of the z
|
||||
.RS 4
|
||||
Selects the cryptographic algorithm\&. The value of
|
||||
\fBalgorithm\fR
|
||||
must be one of RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
|
||||
must be one of RSAMD5, RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
|
||||
.sp
|
||||
If no algorithm is specified, then RSASHA1 will be used by default, unless the
|
||||
\fB\-3\fR
|
||||
@@ -307,5 +307,5 @@ The PKCS#11 URI Scheme (draft\-pechanec\-pkcs11uri\-13)\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2008-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user